mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 05:56:36 +08:00
fix: Removing stream
Related-To: NEO-14718 Signed-off-by: Aleksandra Nizio <aleksandra.nizio@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9831931722
commit
e43ec2bbfd
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2024 Intel Corporation
|
||||
* Copyright (C) 2021-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -139,8 +139,6 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterAubCommandStreamReceiverTests, givenAub
|
||||
debugManager.flags.AUBDumpForceAllToLocalMemory.set(true);
|
||||
|
||||
std::unique_ptr<MockAubCsrXeHPAndLater<FamilyType>> aubCsr(new MockAubCsrXeHPAndLater<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
auto stream = std::make_unique<MockAubFileStreamMockMmioWrite>();
|
||||
aubCsr->stream = stream.get();
|
||||
|
||||
auto addressSpace = aubCsr->getAddressSpace(AubMemDump::DataTypeHintValues::TraceNotype);
|
||||
|
||||
@@ -154,50 +152,15 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterAubCommandStreamReceiverTests, givenAub
|
||||
debugManager.flags.AUBDumpForceAllToLocalMemory.set(false);
|
||||
|
||||
std::unique_ptr<MockAubCsrXeHPAndLater<FamilyType>> aubCsr(new MockAubCsrXeHPAndLater<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
auto stream = std::make_unique<MockAubFileStreamMockMmioWrite>();
|
||||
aubCsr->stream = stream.get();
|
||||
|
||||
auto addressSpace = aubCsr->getAddressSpace(AubMemDump::DataTypeHintValues::TraceNotype);
|
||||
|
||||
EXPECT_EQ(AubMemDump::AddressSpaceValues::TraceNonlocal, addressSpace);
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterAubCommandStreamReceiverTests, givenCCSEnabledWhenEngineMmiosAreInitializedThenExpectL3ConfigMmioIsWritten) {
|
||||
setUpImpl<FamilyType>();
|
||||
|
||||
MockOsContext osContext(0, EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_CCS, EngineUsage::regular}));
|
||||
AUBCommandStreamReceiverHw<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
aubCsr.setupContext(osContext);
|
||||
|
||||
auto stream = std::make_unique<MockAubFileStreamMockMmioWrite>();
|
||||
aubCsr.stream = stream.get();
|
||||
|
||||
aubCsr.initEngineMMIO();
|
||||
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0xB234, 0xA0000000u)));
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterAubCommandStreamReceiverTests, givenRCSEnabledWhenEngineMmiosAreInitializedThenExpectL3ConfigMmioIsWritten) {
|
||||
setUpImpl<FamilyType>();
|
||||
|
||||
MockOsContext osContext(0, EngineDescriptorHelper::getDefaultDescriptor());
|
||||
AUBCommandStreamReceiverHw<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
aubCsr.setupContext(osContext);
|
||||
|
||||
auto stream = std::make_unique<MockAubFileStreamMockMmioWrite>();
|
||||
aubCsr.stream = stream.get();
|
||||
|
||||
aubCsr.initEngineMMIO();
|
||||
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0xB134, 0xA0000000u)));
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterAubCommandStreamReceiverTests, givenLocaLMemoryBitWhenGetAddressSpaceFromPTEBitsIsCalledThenTraceLocalIsReturned) {
|
||||
setUpImpl<FamilyType>();
|
||||
|
||||
std::unique_ptr<MockAubCsrXeHPAndLater<FamilyType>> aubCsr(new MockAubCsrXeHPAndLater<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
auto stream = std::make_unique<MockAubFileStreamMockMmioWrite>();
|
||||
aubCsr->stream = stream.get();
|
||||
|
||||
uint64_t bits = BIT(PageTableEntry::presentBit) | BIT(PageTableEntry::writableBit) | BIT(PageTableEntry::localMemoryBit);
|
||||
auto addressSpace = aubCsr->getAddressSpaceFromPTEBits(bits);
|
||||
@@ -254,48 +217,6 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterAubCommandStreamReceiverTests, whenPhys
|
||||
EXPECT_EQ(4u, allocator->getNumberOfBanks());
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterAubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenInitEngineMMIOIsCalledForGivenEngineTypeThenCorrespondingMmiosAreInitialized) {
|
||||
setUpImpl<FamilyType>();
|
||||
|
||||
DebugManagerStateRestore debugRestorer;
|
||||
MockOsContext rcsOsContext(0, EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_RCS, EngineUsage::regular}));
|
||||
MockOsContext ccs0OsContext(0, EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_CCS, EngineUsage::regular}));
|
||||
MockOsContext ccs1OsContext(0, EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_CCS1, EngineUsage::regular}));
|
||||
MockOsContext ccs2OsContext(0, EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_CCS2, EngineUsage::regular}));
|
||||
MockOsContext ccs3OsContext(0, EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_CCS3, EngineUsage::regular}));
|
||||
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
EXPECT_NE(nullptr, aubCsr);
|
||||
|
||||
auto stream = std::make_unique<MockAubFileStreamMockMmioWrite>();
|
||||
aubCsr->stream = stream.get();
|
||||
|
||||
aubCsr->setupContext(rcsOsContext);
|
||||
aubCsr->initEngineMMIO();
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0002000 + 0x000058, 0x00000000)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0002000 + 0x00029c, 0xffff8280)));
|
||||
|
||||
aubCsr->setupContext(ccs0OsContext);
|
||||
aubCsr->initEngineMMIO();
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000ce90, 0x00030003)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x1a000 + 0x000029c, 0xffff8280)));
|
||||
|
||||
aubCsr->setupContext(ccs1OsContext);
|
||||
aubCsr->initEngineMMIO();
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000ce90, 0x00030003)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x1c000 + 0x000029c, 0xffff8280)));
|
||||
|
||||
aubCsr->setupContext(ccs2OsContext);
|
||||
aubCsr->initEngineMMIO();
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000ce90, 0x00030003)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x1e000 + 0x000029c, 0xffff8280)));
|
||||
|
||||
aubCsr->setupContext(ccs3OsContext);
|
||||
aubCsr->initEngineMMIO();
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000ce90, 0x00030003)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x26000 + 0x000029c, 0xffff8280)));
|
||||
}
|
||||
|
||||
template <class FamilyType>
|
||||
static void checkCcsEngineMMIO(aub_stream::EngineType engineType, uint32_t mmioBase) {
|
||||
auto &mmioList = *AUBFamilyMapper<FamilyType>::perEngineMMIO[engineType];
|
||||
|
||||
@@ -222,35 +222,6 @@ HWTEST_F(AubFileStreamWithoutAubStreamTests, givenAubCommandStreamReceiverWhenCa
|
||||
EXPECT_TRUE(aubCsr->pollForCompletionCalled);
|
||||
}
|
||||
|
||||
HWTEST_F(AubFileStreamWithoutAubStreamTests, givenNoNewTasksSinceLastPollWhenCallingPollForCompletionThenDontCallRegisterPoll) {
|
||||
auto aubStream = std::make_unique<MockAubFileStream>();
|
||||
auto aubExecutionEnvironment = getEnvironment<MockAubCsr<FamilyType>>(true, true, true);
|
||||
auto aubCsr = aubExecutionEnvironment->template getCsr<MockAubCsr<FamilyType>>();
|
||||
aubCsr->stream = aubStream.get();
|
||||
|
||||
aubCsr->latestSentTaskCount = 50;
|
||||
aubCsr->pollForCompletionTaskCount = 50;
|
||||
ASSERT_FALSE(aubStream->registerPollCalled);
|
||||
|
||||
aubCsr->pollForCompletion();
|
||||
EXPECT_FALSE(aubStream->registerPollCalled);
|
||||
EXPECT_EQ(50u, aubCsr->pollForCompletionTaskCount);
|
||||
}
|
||||
|
||||
HWTEST_F(AubFileStreamWithoutAubStreamTests, givenNoNewTaskSinceLastPollWhenDeletingAubCsrThenDontCallRegisterPoll) {
|
||||
auto aubStream = std::make_unique<MockAubFileStream>();
|
||||
auto aubExecutionEnvironment = getEnvironment<MockAubCsr<FamilyType>>(true, true, true);
|
||||
auto aubCsr = aubExecutionEnvironment->template getCsr<MockAubCsr<FamilyType>>();
|
||||
aubCsr->stream = aubStream.get();
|
||||
|
||||
aubCsr->latestSentTaskCount = 50;
|
||||
aubCsr->pollForCompletionTaskCount = 50;
|
||||
ASSERT_FALSE(aubStream->registerPollCalled);
|
||||
|
||||
aubExecutionEnvironment->commandStreamReceiver.reset();
|
||||
EXPECT_FALSE(aubStream->registerPollCalled);
|
||||
}
|
||||
|
||||
HWTEST_F(AubCsrTests, givenNewTasksAndHardwareContextPresentWhenCallingPollForCompletionThenCallPollForCompletion) {
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, EngineDescriptorHelper::getDefaultDescriptor());
|
||||
@@ -279,29 +250,6 @@ HWTEST_F(AubCsrTests, givenNoNewTasksAndHardwareContextPresentWhenCallingPollFor
|
||||
EXPECT_FALSE(hardwareContext->pollForCompletionCalled);
|
||||
}
|
||||
|
||||
HWTEST_F(AubFileStreamWithoutAubStreamTests, givenAubCommandStreamReceiverInSubCaptureModeWhenPollForCompletionIsCalledButSubCaptureIsDisabledThenItShouldntCallRegisterPoll) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto aubSubCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
auto aubStream = std::make_unique<MockAubFileStream>();
|
||||
auto aubExecutionEnvironment = getEnvironment<MockAubCsr<FamilyType>>(true, true, true);
|
||||
auto aubCsr = aubExecutionEnvironment->template getCsr<MockAubCsr<FamilyType>>();
|
||||
aubCsr->stream = aubStream.get();
|
||||
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
aubSubCaptureManagerMock->disableSubCapture();
|
||||
aubCsr->subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(aubSubCaptureManagerMock);
|
||||
ASSERT_FALSE(aubCsr->subCaptureManager->isSubCaptureEnabled());
|
||||
|
||||
aubCsr->latestSentTaskCount = 50;
|
||||
aubCsr->pollForCompletionTaskCount = 49;
|
||||
ASSERT_FALSE(aubStream->registerPollCalled);
|
||||
|
||||
aubCsr->pollForCompletion();
|
||||
|
||||
EXPECT_FALSE(aubStream->registerPollCalled);
|
||||
}
|
||||
|
||||
HWTEST_F(AubCsrTests, givenAubCommandStreamReceiverWithHardwareContextInSubCaptureModeWhenPollForCompletionIsCalledAndSubCaptureIsEnabledThenItShouldCallPollForCompletionOnHwContext) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2024 Intel Corporation
|
||||
* Copyright (C) 2021-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -18,178 +18,6 @@
|
||||
|
||||
using XeHPAndLaterMockSimulatedCsrHwTests = Test<DeviceFixture>;
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterMockSimulatedCsrHwTests, givenLocalMemoryEnabledWhenGlobalMmiosAreInitializedThenLmemIsInitializedAndLmemCfgMmioIsWritten) {
|
||||
std::unique_ptr<MockSimulatedCsrHw<FamilyType>> csrSimulatedCommonHw(new MockSimulatedCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
csrSimulatedCommonHw->localMemoryEnabled = true;
|
||||
|
||||
auto stream = std::make_unique<MockAubStreamMockMmioWrite>();
|
||||
csrSimulatedCommonHw->stream = stream.get();
|
||||
csrSimulatedCommonHw->initGlobalMMIO();
|
||||
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00101010, 0x00000080u)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000cf58, 0x80000000u)));
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterMockSimulatedCsrHwTests, givenAUBDumpForceAllToLocalMemoryWhenGlobalMmiosAreInitializedThenLmemIsInitializedAndLmemCfgMmioIsWritten) {
|
||||
DebugManagerStateRestore debugRestorer;
|
||||
debugManager.flags.AUBDumpForceAllToLocalMemory.set(true);
|
||||
|
||||
std::unique_ptr<MockSimulatedCsrHw<FamilyType>> csrSimulatedCommonHw(new MockSimulatedCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
|
||||
auto stream = std::make_unique<MockAubStreamMockMmioWrite>();
|
||||
csrSimulatedCommonHw->stream = stream.get();
|
||||
csrSimulatedCommonHw->initGlobalMMIO();
|
||||
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00101010, 0x00000080u)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000cf58, 0x80000000u)));
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterMockSimulatedCsrHwTests, givenAubCommandStreamReceiverWhenGlobalMmiosAreInitializedThenMOCSRegistersAreConfigured) {
|
||||
MockSimulatedCsrHw<FamilyType> csrSimulatedCommonHw(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
|
||||
auto stream = std::make_unique<MockAubStreamMockMmioWrite>();
|
||||
csrSimulatedCommonHw.stream = stream.get();
|
||||
|
||||
csrSimulatedCommonHw.initGlobalMMIO();
|
||||
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004000, 0x00000008)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004004, 0x00000038)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004008, 0x00000038)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000400C, 0x00000008)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004010, 0x00000018)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004014, 0x00060038)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004018, 0x00000000)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000401C, 0x00000033)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004020, 0x00060037)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004024, 0x0000003B)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004028, 0x00000032)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000402C, 0x00000036)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004030, 0x0000003A)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004034, 0x00000033)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004038, 0x00000037)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000403C, 0x0000003B)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004040, 0x00000030)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004044, 0x00000034)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004048, 0x00000038)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000404C, 0x00000031)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004050, 0x00000032)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004054, 0x00000036)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004058, 0x0000003A)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000405C, 0x00000033)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004060, 0x00000037)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004064, 0x0000003B)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004068, 0x00000032)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000406C, 0x00000036)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004070, 0x0000003A)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004074, 0x00000033)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004078, 0x00000037)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000407C, 0x0000003B)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004080, 0x00000030)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004084, 0x00000034)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004088, 0x00000038)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000408C, 0x00000031)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004090, 0x00000032)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004094, 0x00000036)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004098, 0x0000003A)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000409C, 0x00000033)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040A0, 0x00000037)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040A4, 0x0000003B)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040A8, 0x00000032)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040AC, 0x00000036)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040B0, 0x0000003A)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040B4, 0x00000033)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040B8, 0x00000037)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040BC, 0x0000003B)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040C0, 0x00000038)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040C4, 0x00000034)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040C8, 0x00000038)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040CC, 0x00000031)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040D0, 0x00000032)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040D4, 0x00000036)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040D8, 0x0000003A)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040DC, 0x00000033)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040E0, 0x00000037)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040E4, 0x0000003B)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040E8, 0x00000032)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040EC, 0x00000036)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040F0, 0x00000038)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040F4, 0x00000038)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040F8, 0x00000038)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040FC, 0x00000038)));
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterMockSimulatedCsrHwTests, givenAubCommandStreamReceiverWhenGlobalMmiosAreInitializedThenLNCFRegistersAreConfigured) {
|
||||
MockSimulatedCsrHw<FamilyType> csrSimulatedCommonHw(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
|
||||
auto stream = std::make_unique<MockAubStreamMockMmioWrite>();
|
||||
csrSimulatedCommonHw.stream = stream.get();
|
||||
|
||||
csrSimulatedCommonHw.initGlobalMMIO();
|
||||
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B020, 0x00300010)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B024, 0x00300010)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B028, 0x00300030)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B02C, 0x00000000)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B030, 0x0030001F)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B034, 0x00170013)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B038, 0x0000001F)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B03C, 0x00000000)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B040, 0x00100000)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B044, 0x00170013)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B048, 0x0010001F)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B04C, 0x00170013)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B050, 0x0030001F)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B054, 0x00170013)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B058, 0x0000001F)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B05C, 0x00000000)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B060, 0x00100000)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B064, 0x00170013)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B068, 0x0010001F)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B06C, 0x00170013)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B070, 0x0030001F)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B074, 0x00170013)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B078, 0x0000001F)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B07C, 0x00000000)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B080, 0x00300030)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B084, 0x00170013)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B088, 0x0010001F)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B08C, 0x00170013)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B090, 0x0030001F)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B094, 0x00170013)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B098, 0x00300010)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B09C, 0x00300010)));
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterMockSimulatedCsrHwTests, givenAubCommandStreamReceiverWhenGlobalMmiosAreInitializedThenPerfMmioRegistersAreConfigured) {
|
||||
MockSimulatedCsrHw<FamilyType> csrSimulatedCommonHw(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
|
||||
auto stream = std::make_unique<MockAubStreamMockMmioWrite>();
|
||||
csrSimulatedCommonHw.stream = stream.get();
|
||||
|
||||
csrSimulatedCommonHw.initGlobalMMIO();
|
||||
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B004, 0x2FC0100B)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B404, 0x00000160)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00008708, 0x00000000)));
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterMockSimulatedCsrHwTests, givenAubCommandStreamReceiverWhenGlobalMmiosAreInitializedThenTRTTRegistersAreConfigured) {
|
||||
MockSimulatedCsrHw<FamilyType> csrSimulatedCommonHw(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
|
||||
auto stream = std::make_unique<MockAubStreamMockMmioWrite>();
|
||||
csrSimulatedCommonHw.stream = stream.get();
|
||||
|
||||
csrSimulatedCommonHw.initGlobalMMIO();
|
||||
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004410, 0xffffffff)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004414, 0xfffffffe)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004404, 0x000000ff)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004408, 0x00000000)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000440C, 0x00000000)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004400, 0x00000001)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004DFC, 0x00000000)));
|
||||
}
|
||||
|
||||
class XeHPAndLaterTileRangeRegisterTest : public DeviceFixture, public ::testing::Test {
|
||||
public:
|
||||
template <typename FamilyType>
|
||||
@@ -208,73 +36,5 @@ class XeHPAndLaterTileRangeRegisterTest : public DeviceFixture, public ::testing
|
||||
DeviceFixture::tearDown();
|
||||
}
|
||||
|
||||
void checkMMIOs(MMIOList &list, uint32_t tilesNumber) {
|
||||
const uint32_t numberOfTiles = tilesNumber;
|
||||
const uint32_t totalLocalMemorySizeGB = static_cast<uint32_t>(AubHelper::getTotalMemBankSize(releaseHelper.get()) / MemoryConstants::gigaByte);
|
||||
|
||||
MMIOPair tileAddrRegisters[] = {{0x00004900, 0x0001},
|
||||
{0x00004904, 0x0001},
|
||||
{0x00004908, 0x0001},
|
||||
{0x0000490c, 0x0001}};
|
||||
|
||||
uint32_t localMemoryBase = 0x0;
|
||||
for (uint32_t i = 0; i < sizeof(tileAddrRegisters) / sizeof(MMIOPair); i++) {
|
||||
tileAddrRegisters[i].second |= localMemoryBase << 1;
|
||||
tileAddrRegisters[i].second |= (totalLocalMemorySizeGB / numberOfTiles) << 8;
|
||||
localMemoryBase += (totalLocalMemorySizeGB / numberOfTiles);
|
||||
}
|
||||
|
||||
uint32_t mmiosFound = 0;
|
||||
for (auto &mmioPair : list) {
|
||||
for (uint32_t i = 0; i < numberOfTiles; i++) {
|
||||
if (mmioPair.first == tileAddrRegisters[i].first && mmioPair.second == tileAddrRegisters[i].second) {
|
||||
mmiosFound++;
|
||||
}
|
||||
}
|
||||
}
|
||||
EXPECT_EQ(numberOfTiles, mmiosFound);
|
||||
}
|
||||
|
||||
std::unique_ptr<ReleaseHelper> releaseHelper;
|
||||
};
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterTileRangeRegisterTest, givenLocalMemoryEnabledWhenGlobalMmiosAreInitializedThenTileRangeRegistersAreProgrammed) {
|
||||
setUpImpl<FamilyType>();
|
||||
std::unique_ptr<MockSimulatedCsrHw<FamilyType>> csrSimulatedCommonHw(new MockSimulatedCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
csrSimulatedCommonHw->localMemoryEnabled = true;
|
||||
|
||||
auto stream = std::make_unique<MockAubStreamMockMmioWrite>();
|
||||
csrSimulatedCommonHw->stream = stream.get();
|
||||
csrSimulatedCommonHw->initGlobalMMIO();
|
||||
|
||||
checkMMIOs(stream->mmioList, 1);
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterTileRangeRegisterTest, givenLocalMemoryEnabledAnd4TileConfigWhenGlobalMmiosAreInitializedThenTileRangeRegistersAreProgrammed) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.CreateMultipleSubDevices.set(4);
|
||||
setUpImpl<FamilyType>();
|
||||
std::unique_ptr<MockSimulatedCsrHw<FamilyType>> csrSimulatedCommonHw(new MockSimulatedCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
csrSimulatedCommonHw->localMemoryEnabled = true;
|
||||
|
||||
auto stream = std::make_unique<MockAubStreamMockMmioWrite>();
|
||||
csrSimulatedCommonHw->stream = stream.get();
|
||||
csrSimulatedCommonHw->initGlobalMMIO();
|
||||
|
||||
checkMMIOs(stream->mmioList, 4);
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterTileRangeRegisterTest, givenAUBDumpForceAllToLocalMemoryWhenGlobalMmiosAreInitializedThenTileRangeRegistersAreProgrammed) {
|
||||
setUpImpl<FamilyType>();
|
||||
DebugManagerStateRestore debugRestorer;
|
||||
debugManager.flags.AUBDumpForceAllToLocalMemory.set(true);
|
||||
|
||||
std::unique_ptr<MockSimulatedCsrHw<FamilyType>> csrSimulatedCommonHw(new MockSimulatedCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
csrSimulatedCommonHw->localMemoryEnabled = true;
|
||||
|
||||
auto stream = std::make_unique<MockAubStreamMockMmioWrite>();
|
||||
csrSimulatedCommonHw->stream = stream.get();
|
||||
csrSimulatedCommonHw->initGlobalMMIO();
|
||||
|
||||
checkMMIOs(stream->mmioList, 1);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ if(TESTS_GEN12LP)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_tests_gen12lp.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/coherency_tests_gen12lp.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/command_encoder_tests_gen12lp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_common_hw_tests_gen12lp.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compute_mode_tests_gen12lp.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/excludes_gen12lp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gen12lp_shared_tests_wrapper.cpp
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2023 Intel Corporation
|
||||
* Copyright (C) 2019-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -46,29 +46,3 @@ GEN12LPTEST_F(Gen12LPAubCommandStreamReceiverTests, givenGraphicsAlloctionWithLo
|
||||
|
||||
EXPECT_EQ(expectedBits, bits);
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(Gen12LPAubCommandStreamReceiverTests, givenCCSEnabledWhenEngineMmiosAreInitializedThenExpectL3ConfigMmioIsWritten) {
|
||||
MockOsContext osContext(0, EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_CCS, EngineUsage::regular}));
|
||||
AUBCommandStreamReceiverHw<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
aubCsr.setupContext(osContext);
|
||||
|
||||
auto stream = std::make_unique<MockAubFileStreamMockMmioWrite>();
|
||||
aubCsr.stream = stream.get();
|
||||
|
||||
aubCsr.initEngineMMIO();
|
||||
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0xB234, 0xD0000020u)));
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(Gen12LPAubCommandStreamReceiverTests, givenRCSEnabledWhenEngineMmiosAreInitializedThenExpectL3ConfigMmioIsWritten) {
|
||||
MockOsContext osContext(0, EngineDescriptorHelper::getDefaultDescriptor());
|
||||
AUBCommandStreamReceiverHw<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
aubCsr.setupContext(osContext);
|
||||
|
||||
auto stream = std::make_unique<MockAubFileStreamMockMmioWrite>();
|
||||
aubCsr.stream = stream.get();
|
||||
|
||||
aubCsr.initEngineMMIO();
|
||||
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0xB134, 0xD0000020u)));
|
||||
}
|
||||
|
||||
@@ -1,146 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_stream/command_stream_receiver_simulated_hw.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/unit_test/mocks/mock_aub_stream.h"
|
||||
#include "shared/test/unit_test/mocks/mock_csr_simulated_common_hw.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using Gen12LPCommandStreamReceiverSimulatedCommonHwTests = Test<DeviceFixture>;
|
||||
|
||||
GEN12LPTEST_F(Gen12LPCommandStreamReceiverSimulatedCommonHwTests, givenAubCommandStreamReceiverWhewGlobalMmiosAreInitializedThenMOCSRegistersAreConfigured) {
|
||||
MockSimulatedCsrHw<FamilyType> csrSimulatedCommonHw(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
|
||||
auto stream = std::make_unique<MockAubStreamMockMmioWrite>();
|
||||
csrSimulatedCommonHw.stream = stream.get();
|
||||
|
||||
csrSimulatedCommonHw.initGlobalMMIO();
|
||||
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004000, 0x00000008)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004004, 0x00000038)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004008, 0x00000038)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000400C, 0x00000008)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004010, 0x00000018)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004014, 0x00060038)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004018, 0x00000000)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000401C, 0x00000033)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004020, 0x00060037)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004024, 0x0000003B)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004028, 0x00000032)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000402C, 0x00000036)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004030, 0x0000003A)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004034, 0x00000033)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004038, 0x00000037)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000403C, 0x0000003B)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004040, 0x00000030)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004044, 0x00000034)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004048, 0x00000038)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000404C, 0x00000031)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004050, 0x00000032)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004054, 0x00000036)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004058, 0x0000003A)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000405C, 0x00000033)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004060, 0x00000037)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004064, 0x0000003B)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004068, 0x00000032)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000406C, 0x00000036)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004070, 0x0000003A)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004074, 0x00000033)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004078, 0x00000037)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000407C, 0x0000003B)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004080, 0x00000030)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004084, 0x00000034)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004088, 0x00000038)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000408C, 0x00000031)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004090, 0x00000032)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004094, 0x00000036)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004098, 0x0000003A)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000409C, 0x00000033)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040A0, 0x00000037)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040A4, 0x0000003B)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040A8, 0x00000032)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040AC, 0x00000036)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040B0, 0x0000003A)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040B4, 0x00000033)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040B8, 0x00000037)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040BC, 0x0000003B)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040C0, 0x00000038)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040C4, 0x00000034)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040C8, 0x00000038)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040CC, 0x00000031)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040D0, 0x00000032)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040D4, 0x00000036)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040D8, 0x0000003A)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040DC, 0x00000033)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040E0, 0x00000037)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040E4, 0x0000003B)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040E8, 0x00000032)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040EC, 0x00000036)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040F0, 0x00000038)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040F4, 0x00000038)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040F8, 0x00000038)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x000040FC, 0x00000038)));
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(Gen12LPCommandStreamReceiverSimulatedCommonHwTests, givenAubCommandStreamReceiverWhenGlobalMmiosAreInitializedThenLNCFRegistersAreConfigured) {
|
||||
MockSimulatedCsrHw<FamilyType> csrSimulatedCommonHw(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
|
||||
auto stream = std::make_unique<MockAubStreamMockMmioWrite>();
|
||||
csrSimulatedCommonHw.stream = stream.get();
|
||||
|
||||
csrSimulatedCommonHw.initGlobalMMIO();
|
||||
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B020, 0x00300010)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B024, 0x00300010)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B028, 0x00300030)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B02C, 0x00000000)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B030, 0x0030001F)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B034, 0x00170013)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B038, 0x0000001F)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B03C, 0x00000000)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B040, 0x00100000)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B044, 0x00170013)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B048, 0x0010001F)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B04C, 0x00170013)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B050, 0x0030001F)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B054, 0x00170013)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B058, 0x0000001F)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B05C, 0x00000000)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B060, 0x00100000)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B064, 0x00170013)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B068, 0x0010001F)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B06C, 0x00170013)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B070, 0x0030001F)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B074, 0x00170013)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B078, 0x0000001F)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B07C, 0x00000000)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B080, 0x00000030)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B084, 0x00170013)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B088, 0x0010001F)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B08C, 0x00170013)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B090, 0x0030001F)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B094, 0x00170013)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B098, 0x00300010)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B09C, 0x00300010)));
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(Gen12LPCommandStreamReceiverSimulatedCommonHwTests, givenLocalMemoryEnabledWhenGlobalMmiosAreInitializedThenLmemCfgMmioIsWritten) {
|
||||
MockSimulatedCsrHw<FamilyType> csrSimulatedCommonHw(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
csrSimulatedCommonHw.localMemoryEnabled = true;
|
||||
|
||||
auto stream = std::make_unique<MockAubStreamMockMmioWrite>();
|
||||
csrSimulatedCommonHw.stream = stream.get();
|
||||
|
||||
csrSimulatedCommonHw.initGlobalMMIO();
|
||||
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000CF58, 0x80000000)));
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2024 Intel Corporation
|
||||
* Copyright (C) 2021-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
#include "shared/test/unit_test/gen12lp/aub_command_stream_receiver_tests_gen12lp.inl"
|
||||
#include "shared/test/unit_test/gen12lp/coherency_tests_gen12lp.inl"
|
||||
#include "shared/test/unit_test/gen12lp/command_stream_receiver_simulated_common_hw_tests_gen12lp.inl"
|
||||
#include "shared/test/unit_test/gen12lp/compute_mode_tests_gen12lp.inl"
|
||||
#include "shared/test/unit_test/gen12lp/tbx_command_stream_receiver_tests_gen12lp.inl"
|
||||
#include "shared/test/unit_test/gen12lp/test_device_caps_gen12lp.inl"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -25,16 +25,6 @@ struct MockAubStreamMockMmioWrite : AubMemDump::AubStream {
|
||||
void writeMMIOImpl(uint32_t offset, uint32_t value) override {
|
||||
mmioList.push_back(std::make_pair(offset, value));
|
||||
}
|
||||
bool isOnMmioList(const MMIOPair &mmio) {
|
||||
bool mmioFound = false;
|
||||
for (auto &mmioPair : mmioList) {
|
||||
if (mmioPair.first == mmio.first && mmioPair.second == mmio.second) {
|
||||
mmioFound = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return mmioFound;
|
||||
}
|
||||
|
||||
std::vector<std::pair<uint32_t, uint32_t>> mmioList;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user