From 49c828e481bebad7a8137801591d9b4f47d529b5 Mon Sep 17 00:00:00 2001 From: Compute-Runtime-Validation Date: Thu, 3 Nov 2022 09:04:40 +0100 Subject: [PATCH] Revert "L0debug - Canonize SBA in single address space mode" This reverts commit f06714513742fd54f72313eafc1bea498b7136dd. Signed-off-by: Compute-Runtime-Validation --- shared/source/debugger/debugger_l0.inl | 2 +- .../test_l0_debugger_single_address_space.cpp | 14 ++------------ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/shared/source/debugger/debugger_l0.inl b/shared/source/debugger/debugger_l0.inl index 42d24be2f9..5cba2b33b1 100644 --- a/shared/source/debugger/debugger_l0.inl +++ b/shared/source/debugger/debugger_l0.inl @@ -41,7 +41,7 @@ void DebuggerL0Hw::captureStateBaseAddress(NEO::LinearStream &cmdStre sbaCanonized.IndirectObjectBaseAddress, sbaCanonized.InstructionBaseAddress, sbaCanonized.BindlessSurfaceStateBaseAddress); if (singleAddressSpaceSbaTracking) { - programSbaTrackingCommandsSingleAddressSpace(cmdStream, sbaCanonized); + programSbaTrackingCommandsSingleAddressSpace(cmdStream, sba); } else { if (sbaCanonized.GeneralStateBaseAddress) { auto generalStateBaseAddress = sbaCanonized.GeneralStateBaseAddress; diff --git a/shared/test/unit_test/debugger/test_l0_debugger_single_address_space.cpp b/shared/test/unit_test/debugger/test_l0_debugger_single_address_space.cpp index d42a07ce58..577e2a8529 100644 --- a/shared/test/unit_test/debugger/test_l0_debugger_single_address_space.cpp +++ b/shared/test/unit_test/debugger/test_l0_debugger_single_address_space.cpp @@ -6,7 +6,6 @@ */ #include "shared/source/command_container/command_encoder.h" -#include "shared/source/gmm_helper/gmm_helper.h" #include "shared/test/common/cmd_parse/gen_cmd_parse.h" #include "shared/test/common/fixtures/device_fixture.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" @@ -242,13 +241,12 @@ HWTEST2_F(SingleAddressSpaceFixture, GivenOneNonZeroSbaAddressesWhenProgrammingS cmdStream.replaceGraphicsAllocation(streamAllocation); cmdStream.replaceBuffer(streamAllocation->getUnderlyingBuffer(), streamAllocation->getUnderlyingBufferSize()); - uint64_t ssba = 0x0000800011112222; + uint64_t ssba = 0x1234567000; NEO::Debugger::SbaAddresses sbaAddresses = {0}; sbaAddresses.SurfaceStateBaseAddress = ssba; - debugger->singleAddressSpaceSbaTracking = true; - debugger->captureStateBaseAddress(cmdStream, sbaAddresses); + debugger->programSbaTrackingCommandsSingleAddressSpace(cmdStream, sbaAddresses); GenCmdList cmdList; ASSERT_TRUE(FamilyType::PARSE::parseCommandBuffer(cmdList, cmdStream.getCpuBase(), cmdStream.getUsed())); @@ -291,17 +289,9 @@ HWTEST2_F(SingleAddressSpaceFixture, GivenOneNonZeroSbaAddressesWhenProgrammingS itor = find(itor, cmdList.end()); ASSERT_NE(cmdList.end(), itor); - auto lowDword = genCmdCast(*itor)->getDataDword0(); - itor++; itor = find(itor, cmdList.end()); ASSERT_NE(cmdList.end(), itor); - auto highDword = genCmdCast(*itor)->getDataDword0(); - - uint64_t foundSsba = ((static_cast(highDword) & 0xffffffff) << 32) | lowDword; - const auto gmmHelper = pDevice->getGmmHelper(); - const auto ssbaCanonized = gmmHelper->canonize(ssba); - EXPECT_EQ(ssbaCanonized, foundSsba); itor = find(itor, cmdList.end()); ASSERT_NE(cmdList.end(), itor);