Sip programming changes
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
parent
10f06bb942
commit
0747cb80f5
|
@ -140,6 +140,7 @@ HWTEST_F(L0DebuggerTest, givenDebuggingEnabledWhenCommandListIsExecutedThenValid
|
||||||
EXPECT_EQ(0u, debugModeRegisterCount);
|
EXPECT_EQ(0u, debugModeRegisterCount);
|
||||||
EXPECT_EQ(0u, tdDebugControlRegisterCount);
|
EXPECT_EQ(0u, tdDebugControlRegisterCount);
|
||||||
|
|
||||||
|
if (!HwHelper::get(hwInfo.platform.eRenderCoreFamily).isSipWANeeded(hwInfo)) {
|
||||||
auto stateSipCmds = findAll<STATE_SIP *>(cmdList.begin(), cmdList.end());
|
auto stateSipCmds = findAll<STATE_SIP *>(cmdList.begin(), cmdList.end());
|
||||||
ASSERT_EQ(1u, stateSipCmds.size());
|
ASSERT_EQ(1u, stateSipCmds.size());
|
||||||
|
|
||||||
|
@ -148,6 +149,7 @@ HWTEST_F(L0DebuggerTest, givenDebuggingEnabledWhenCommandListIsExecutedThenValid
|
||||||
auto systemRoutine = SipKernel::getSipKernelAllocation(*neoDevice);
|
auto systemRoutine = SipKernel::getSipKernelAllocation(*neoDevice);
|
||||||
ASSERT_NE(nullptr, systemRoutine);
|
ASSERT_NE(nullptr, systemRoutine);
|
||||||
EXPECT_EQ(systemRoutine->getGpuAddress(), stateSip->getSystemInstructionPointer());
|
EXPECT_EQ(systemRoutine->getGpuAddress(), stateSip->getSystemInstructionPointer());
|
||||||
|
}
|
||||||
|
|
||||||
for (auto i = 0u; i < numCommandLists; i++) {
|
for (auto i = 0u; i < numCommandLists; i++) {
|
||||||
auto commandList = CommandList::fromHandle(commandLists[i]);
|
auto commandList = CommandList::fromHandle(commandLists[i]);
|
||||||
|
|
|
@ -1163,3 +1163,9 @@ HWTEST_F(HwHelperTest, GivenZeroSlmSizeWhenComputeSlmSizeIsCalledThenCorrectValu
|
||||||
auto receivedSlmSize = static_cast<SHARED_LOCAL_MEMORY_SIZE>(HwHelperHw<FamilyType>::get().computeSlmValues(hwInfo, 0));
|
auto receivedSlmSize = static_cast<SHARED_LOCAL_MEMORY_SIZE>(HwHelperHw<FamilyType>::get().computeSlmValues(hwInfo, 0));
|
||||||
EXPECT_EQ(SHARED_LOCAL_MEMORY_SIZE::SHARED_LOCAL_MEMORY_SIZE_ENCODES_0K, receivedSlmSize);
|
EXPECT_EQ(SHARED_LOCAL_MEMORY_SIZE::SHARED_LOCAL_MEMORY_SIZE_ENCODES_0K, receivedSlmSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HWTEST2_F(HwHelperTest, givenHwHelperWhenCheckingSipWaThenFalseIsReturned, isTglLpOrBelow) {
|
||||||
|
auto &helper = HwHelper::get(renderCoreFamily);
|
||||||
|
|
||||||
|
EXPECT_FALSE(helper.isSipWANeeded(*defaultHwInfo));
|
||||||
|
}
|
|
@ -125,6 +125,7 @@ class HwHelper {
|
||||||
virtual bool isMediaBlockIOSupported(const HardwareInfo &hwInfo) const = 0;
|
virtual bool isMediaBlockIOSupported(const HardwareInfo &hwInfo) const = 0;
|
||||||
virtual bool isCopyOnlyEngineType(EngineGroupType type) const = 0;
|
virtual bool isCopyOnlyEngineType(EngineGroupType type) const = 0;
|
||||||
virtual void adjustAddressWidthForCanonize(uint32_t &addressWidth) const = 0;
|
virtual void adjustAddressWidthForCanonize(uint32_t &addressWidth) const = 0;
|
||||||
|
virtual bool isSipWANeeded(const HardwareInfo &hwInfo) const = 0;
|
||||||
|
|
||||||
static uint32_t getSubDevicesCount(const HardwareInfo *pHwInfo);
|
static uint32_t getSubDevicesCount(const HardwareInfo *pHwInfo);
|
||||||
static uint32_t getEnginesCount(const HardwareInfo &hwInfo);
|
static uint32_t getEnginesCount(const HardwareInfo &hwInfo);
|
||||||
|
@ -317,6 +318,8 @@ class HwHelperHw : public HwHelper {
|
||||||
|
|
||||||
void adjustAddressWidthForCanonize(uint32_t &addressWidth) const override;
|
void adjustAddressWidthForCanonize(uint32_t &addressWidth) const override;
|
||||||
|
|
||||||
|
bool isSipWANeeded(const HardwareInfo &hwInfo) const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
LocalMemoryAccessMode getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const override;
|
LocalMemoryAccessMode getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const override;
|
||||||
|
|
||||||
|
|
|
@ -514,4 +514,9 @@ template <typename GfxFamily>
|
||||||
void HwHelperHw<GfxFamily>::adjustAddressWidthForCanonize(uint32_t &addressWidth) const {
|
void HwHelperHw<GfxFamily>::adjustAddressWidthForCanonize(uint32_t &addressWidth) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename GfxFamily>
|
||||||
|
bool HwHelperHw<GfxFamily>::isSipWANeeded(const HardwareInfo &hwInfo) const {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|
|
@ -105,4 +105,11 @@ struct TdDebugControlRegisterOffset {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <typename GfxFamily>
|
||||||
|
struct GlobalSipRegister {
|
||||||
|
enum {
|
||||||
|
registerOffset = 0xE42C,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|
|
@ -14,6 +14,7 @@ set(NEO_CORE_tests_mocks
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_direct_submission_diagnostic_collector.h
|
${CMAKE_CURRENT_SOURCE_DIR}/mock_direct_submission_diagnostic_collector.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_dispatch_kernel_encoder_interface.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/mock_dispatch_kernel_encoder_interface.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_dispatch_kernel_encoder_interface.h
|
${CMAKE_CURRENT_SOURCE_DIR}/mock_dispatch_kernel_encoder_interface.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/mock_debugger.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_device.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/mock_device.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_device.h
|
${CMAKE_CURRENT_SOURCE_DIR}/mock_device.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_graphics_allocation.h
|
${CMAKE_CURRENT_SOURCE_DIR}/mock_graphics_allocation.h
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2020 Intel Corporation
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include "shared/source/debugger/debugger.h"
|
||||||
|
|
||||||
|
namespace NEO {
|
||||||
|
class CommandContainer;
|
||||||
|
|
||||||
|
class MockDebugger : public Debugger {
|
||||||
|
public:
|
||||||
|
MockDebugger() = default;
|
||||||
|
~MockDebugger() = default;
|
||||||
|
void captureStateBaseAddress(CommandContainer &container, SbaAddresses sba){};
|
||||||
|
};
|
||||||
|
} // namespace NEO
|
Loading…
Reference in New Issue