Add PhysicalAddressAllocator to PageTables

- Allocator is responsible for physical pages allocation

Change-Id: I3a9034c87292484da8f4f0eb1d1e0cc5122a4d8a
This commit is contained in:
Hoppe, Mateusz
2018-09-11 14:45:43 +02:00
committed by sys_ocldev
parent 8df30ceac1
commit 610eda5ad1
17 changed files with 366 additions and 178 deletions

View File

@@ -333,3 +333,14 @@ HWTEST_F(TbxCommandSteamSimpleTest, givenTbxCsrWhenWaitBeforeMakeNonResidentWhen
EXPECT_TRUE(tbxCsr.makeCoherentCalled);
EXPECT_EQ(6u, tag);
}
HWTEST_F(TbxCommandSteamSimpleTest, whenTbxCommandStreamReceiverIsCreatedThenPPGTTAndGGTTCreatedHavePhysicalAddressAllocatorSet) {
MockTbxCsr<FamilyType> tbxCsr(*platformDevices[0], *pDevice->executionEnvironment);
uintptr_t address = 0x20000;
auto physicalAddress = tbxCsr.ppgtt->map(address, MemoryConstants::pageSize, PageTableHelper::memoryBankNotSpecified);
EXPECT_NE(0u, physicalAddress);
physicalAddress = tbxCsr.ggtt->map(address, MemoryConstants::pageSize, PageTableHelper::memoryBankNotSpecified);
EXPECT_NE(0u, physicalAddress);
}