Source Level Debugger - add MI_LOAD_REG debug cmds

- add 2 MI_LOAD_REGISTER_IMM cmds in preamble when debugger
is active

Change-Id: I4dd46a3c01fc95feadf8a12728ce801efe506e05
This commit is contained in:
Hoppe, Mateusz
2018-04-13 11:50:57 +02:00
committed by sys_ocldev
parent 079f94cd2d
commit 87f0dcda36
5 changed files with 148 additions and 2 deletions

View File

@@ -50,8 +50,10 @@ struct PreambleHelper {
static void programVFEState(LinearStream *pCommandStream, const HardwareInfo &hwInfo, int scratchSize, uint64_t scratchAddress);
static void programPreamble(LinearStream *pCommandStream, Device &device, uint32_t l3Config,
uint32_t requiredThreadArbitrationPolicy, GraphicsAllocation *preemptionCsr);
static void programKernelDebugging(LinearStream *pCommandStream);
static uint32_t getL3Config(const HardwareInfo &hwInfo, bool useSLM);
static size_t getAdditionalCommandsSize(const Device &device);
static size_t getKernelDebuggingCommandsSize(bool debuggingActive);
static void programGenSpecificPreambleWorkArounds(LinearStream *pCommandStream, const HardwareInfo &hwInfo);
static uint32_t getUrbEntryAllocationSize();
};
@@ -78,4 +80,14 @@ struct L3CNTLRegisterOffset {
static const uint32_t registerOffset;
};
namespace DebugModeRegisterOffset {
static constexpr uint32_t registerOffset = 0x20ec;
static constexpr uint32_t debugEnabledValue = (1 << 6) | (1 << 22);
}; // namespace DebugModeRegisterOffset
namespace TdDebugControlRegisterOffset {
static constexpr uint32_t registerOffset = 0xe400;
static constexpr uint32_t debugEnabledValue = (1 << 4) | (1 << 7);
}; // namespace TdDebugControlRegisterOffset
} // namespace OCLRT