Revert "Pass HardwareInfo to AubHelper::checkPTEAddress()"

Delete AubHelper::checkPTEAddress()

This reverts commit aa587b3bc5.

Change-Id: I32b90ce7dddfd2347586b2c47b9114b45cced8ab
This commit is contained in:
Maciej Dziuban 2019-02-19 09:20:43 +01:00 committed by sys_ocldev
parent 64fbfb21bf
commit 802eb37394
10 changed files with 19 additions and 26 deletions

View File

@ -24,9 +24,6 @@ uint64_t AubHelper::getPTEntryBits(uint64_t pdEntryBits) {
return pdEntryBits;
}
void AubHelper::checkPTEAddress(const HardwareInfo *pHwInfo, uint64_t address) {
}
uint32_t AubHelper::getMemType(uint32_t addressSpace) {
return 0;
}

View File

@ -31,7 +31,6 @@ class AubHelper : public NonCopyableOrMovableClass {
static uint64_t getTotalMemBankSize();
static int getMemTrace(uint64_t pdEntryBits);
static uint64_t getPTEntryBits(uint64_t pdEntryBits);
static void checkPTEAddress(const HardwareInfo *pHwInfo, uint64_t address);
static uint32_t getMemType(uint32_t addressSpace);
static uint64_t getMemBankSize(const HardwareInfo *pHwInfo);
static uint32_t getDevicesCount(const HardwareInfo *pHwInfo);

View File

@ -19,7 +19,6 @@
namespace OCLRT {
class AubHelper;
struct HardwareInfo;
}
namespace AubMemDump {
@ -243,7 +242,7 @@ struct AubPageTableHelper32 : public AubPageTableHelper<Traits>, PageTableTraits
static void createContext(typename Traits::Stream &stream, uint32_t context);
static uint64_t reserveAddressPPGTT(typename Traits::Stream &stream, uintptr_t gfxAddress,
size_t blockSize, uint64_t physAddress,
uint64_t additionalBits, const OCLRT::AubHelper &aubHelper, const OCLRT::HardwareInfo *hwInfo);
uint64_t additionalBits, const OCLRT::AubHelper &aubHelper);
static void fixupLRC(uint8_t *pLrc);
};
@ -259,7 +258,7 @@ struct AubPageTableHelper64 : public AubPageTableHelper<Traits>, PageTableTraits
static void createContext(typename Traits::Stream &stream, uint32_t context);
static uint64_t reserveAddressPPGTT(typename Traits::Stream &stream, uintptr_t gfxAddress,
size_t blockSize, uint64_t physAddress,
uint64_t additionalBits, const OCLRT::AubHelper &aubHelper, const OCLRT::HardwareInfo *hwInfo);
uint64_t additionalBits, const OCLRT::AubHelper &aubHelper);
static void fixupLRC(uint8_t *pLrc);
};
@ -294,8 +293,7 @@ struct AubDump : public std::conditional<TraitsIn::addressingBits == 32, AubPage
static uint64_t reserveAddressGGTT(Stream &stream, uint32_t addr, size_t size, uint64_t physStart, AubGTTData data);
static uint64_t reserveAddressGGTT(Stream &stream, const void *memory, size_t size, uint64_t physStart, AubGTTData data);
static void reserveAddressGGTTAndWriteMmeory(Stream &stream, uintptr_t gfxAddress, const void *memory, uint64_t physAddress,
size_t size, size_t offset, uint64_t additionalBits,
const OCLRT::AubHelper &aubHelper, const OCLRT::HardwareInfo *hwInfo);
size_t size, size_t offset, uint64_t additionalBits, const OCLRT::AubHelper &aubHelper);
static void setGttEntry(MiGttEntry &entry, uint64_t address, AubGTTData data);

View File

@ -117,12 +117,12 @@ uint64_t AubDump<Traits>::reserveAddressGGTT(typename Traits::Stream &stream, co
template <typename Traits>
void AubDump<Traits>::reserveAddressGGTTAndWriteMmeory(typename Traits::Stream &stream, uintptr_t gfxAddress,
const void *memory, uint64_t physAddress,
size_t size, size_t offset, uint64_t additionalBits,
const OCLRT::AubHelper &aubHelper, const HardwareInfo *hwInfo) {
size_t size, size_t offset,
uint64_t additionalBits, const OCLRT::AubHelper &aubHelper) {
auto vmAddr = (gfxAddress + offset) & ~(MemoryConstants::pageSize - 1);
auto pAddr = physAddress & ~(MemoryConstants::pageSize - 1);
AubDump<Traits>::reserveAddressPPGTT(stream, vmAddr, MemoryConstants::pageSize, pAddr, additionalBits, aubHelper, hwInfo);
AubDump<Traits>::reserveAddressPPGTT(stream, vmAddr, MemoryConstants::pageSize, pAddr, additionalBits, aubHelper);
int hint = OCLRT::AubHelper::getMemTrace(additionalBits);
@ -142,7 +142,7 @@ void AubDump<Traits>::setGttEntry(MiGttEntry &entry, uint64_t address, AubGTTDat
template <typename Traits>
uint64_t AubPageTableHelper32<Traits>::reserveAddressPPGTT(typename Traits::Stream &stream, uintptr_t gfxAddress,
size_t blockSize, uint64_t physAddress,
uint64_t additionalBits, const OCLRT::AubHelper &aubHelper, const HardwareInfo *hwInfo) {
uint64_t additionalBits, const OCLRT::AubHelper &aubHelper) {
auto startAddress = gfxAddress;
auto endAddress = gfxAddress + blockSize - 1;
@ -206,7 +206,7 @@ uint64_t AubPageTableHelper32<Traits>::reserveAddressPPGTT(typename Traits::Stre
template <typename Traits>
uint64_t AubPageTableHelper64<Traits>::reserveAddressPPGTT(typename Traits::Stream &stream, uintptr_t gfxAddress,
size_t blockSize, uint64_t physAddress,
uint64_t additionalBits, const OCLRT::AubHelper &aubHelper, const HardwareInfo *hwInfo) {
uint64_t additionalBits, const OCLRT::AubHelper &aubHelper) {
auto startAddress = gfxAddress;
auto endAddress = gfxAddress + blockSize - 1;
@ -312,7 +312,6 @@ uint64_t AubPageTableHelper64<Traits>::reserveAddressPPGTT(typename Traits::Stre
stream.writePTE(startAddress, pte, addressSpace);
startAddress += sizeof(pte);
OCLRT::AubHelper::checkPTEAddress(hwInfo, startAddress);
physPage += 4096;
currPTE++;

View File

@ -421,7 +421,7 @@ void AUBCommandStreamReceiverHw<GfxFamily>::submitBatchBuffer(uint64_t batchBuff
auto physBatchBuffer = ppgtt->map(static_cast<uintptr_t>(batchBufferGpuAddress), batchBufferSize, entryBits, memoryBank);
AubHelperHw<GfxFamily> aubHelperHw(this->localMemoryEnabled);
AUB::reserveAddressPPGTT(*stream, static_cast<uintptr_t>(batchBufferGpuAddress), batchBufferSize, physBatchBuffer,
entryBits, aubHelperHw, &this->hwInfo);
entryBits, aubHelperHw);
AUB::addMemoryWrite(
*stream,
@ -625,7 +625,7 @@ void AUBCommandStreamReceiverHw<GfxFamily>::writeMemory(uint64_t gpuAddress, voi
PageWalker walker = [&](uint64_t physAddress, size_t size, size_t offset, uint64_t entryBits) {
AUB::reserveAddressGGTTAndWriteMmeory(*stream, static_cast<uintptr_t>(gpuAddress), cpuAddress, physAddress, size, offset, entryBits,
aubHelperHw, &this->hwInfo);
aubHelperHw);
};
ppgtt->pageWalk(static_cast<uintptr_t>(gpuAddress), size, 0, entryBits, walker, memoryBank);
@ -818,7 +818,7 @@ void AUBCommandStreamReceiverHw<GfxFamily>::addGUCStartMessage(uint64_t batchBuf
AUB::reserveAddressPPGTT(*stream, reinterpret_cast<uintptr_t>(buffer.get()), bufferSize, physBufferAddres,
this->getPPGTTAdditionalBits(linearStream.getGraphicsAllocation()),
aubHelperHw, &this->hwInfo);
aubHelperHw);
AUB::addMemoryWrite(
*stream,

View File

@ -234,7 +234,7 @@ void TbxCommandStreamReceiverHw<GfxFamily>::submitBatchBuffer(uint64_t batchBuff
AubHelperHw<GfxFamily> aubHelperHw(this->localMemoryEnabled);
AUB::reserveAddressPPGTT(tbxStream, static_cast<uintptr_t>(batchBufferGpuAddress), batchBufferSize, physBatchBuffer,
entryBits, aubHelperHw, &this->hwInfo);
entryBits, aubHelperHw);
AUB::addMemoryWrite(
tbxStream,
@ -373,7 +373,7 @@ void TbxCommandStreamReceiverHw<GfxFamily>::writeMemory(uint64_t gpuAddress, voi
PageWalker walker = [&](uint64_t physAddress, size_t size, size_t offset, uint64_t entryBits) {
AUB::reserveAddressGGTTAndWriteMmeory(tbxStream, static_cast<uintptr_t>(gpuAddress), cpuAddress, physAddress, size, offset, entryBits,
aubHelperHw, &this->hwInfo);
aubHelperHw);
};
ppgtt->pageWalk(static_cast<uintptr_t>(gpuAddress), size, 0, entryBits, walker, memoryBank);

View File

@ -86,7 +86,7 @@ HWTEST_F(AubMemDumpTests, reserveMaxAddress) {
auto enableLocalMemory = HwHelper::get(hwInfo.pPlatform->eRenderCoreFamily).getEnableLocalMemory(hwInfo);
OCLRT::AubHelperHw<FamilyType> aubHelperHw(enableLocalMemory);
AUB::reserveAddressPPGTT(aubFile, gAddress, 4096, pAddress, 7, aubHelperHw, &hwInfo);
AUB::reserveAddressPPGTT(aubFile, gAddress, 4096, pAddress, 7, aubHelperHw);
aubFile.fileHandle.close();
}
@ -108,7 +108,7 @@ HWTEST_F(AubMemDumpTests, DISABLED_writeVerifyOneBytePPGTT) {
uint64_t physAddress = reinterpret_cast<uint64_t>(&byte) & 0xFFFFFFFF;
OCLRT::AubHelperHw<FamilyType> aubHelperHw(false);
AUB::reserveAddressPPGTT(aubFile, gAddress, sizeof(byte), physAddress, 7, aubHelperHw, &pDevice->getHardwareInfo());
AUB::reserveAddressPPGTT(aubFile, gAddress, sizeof(byte), physAddress, 7, aubHelperHw);
AUB::addMemoryWrite(aubFile, physAddress, &byte, sizeof(byte), AubMemDump::AddressSpaceValues::TraceNonlocal);
aubFile.expectMemory(physAddress, &byte, sizeof(byte), AubMemDump::AddressSpaceValues::TraceNonlocal,
AubMemDump::CmdServicesMemTraceMemoryCompare::CompareOperationValues::CompareEqual);
@ -156,7 +156,7 @@ HWTEST_F(AubMemDumpTests, writeVerifySevenBytesPPGTT) {
auto physAddress = reinterpret_cast<uint64_t>(bytes) & 0xFFFFFFFF;
OCLRT::AubHelperHw<FamilyType> aubHelperHw(false);
AUB::reserveAddressPPGTT(aubFile, gAddress, sizeof(bytes), physAddress, 7, aubHelperHw, &pDevice->getHardwareInfo());
AUB::reserveAddressPPGTT(aubFile, gAddress, sizeof(bytes), physAddress, 7, aubHelperHw);
AUB::addMemoryWrite(aubFile, physAddress, bytes, sizeof(bytes), AubMemDump::AddressSpaceValues::TraceNonlocal);
aubFile.expectMemory(physAddress, bytes, sizeof(bytes), AubMemDump::AddressSpaceValues::TraceNonlocal,
AubMemDump::CmdServicesMemTraceMemoryCompare::CompareOperationValues::CompareEqual);

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2018 Intel Corporation
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*

View File

@ -55,7 +55,7 @@ void setupAUBWithBatchBuffer(const OCLRT::Device *pDevice, OCLRT::EngineType eng
OCLRT::AubHelperHw<FamilyType> aubHelperHw(false);
AUB::reserveAddressPPGTT(aubFile, gpuBatchBuffer, sizeBatchBuffer, physBatchBuffer, 7, aubHelperHw, &pDevice->getHardwareInfo());
AUB::reserveAddressPPGTT(aubFile, gpuBatchBuffer, sizeBatchBuffer, physBatchBuffer, 7, aubHelperHw);
uint8_t batchBuffer[sizeBatchBuffer];
auto noop = MI_NOOP::sInit();

View File

@ -56,7 +56,7 @@ void setupAUBWithBatchBuffer(const OCLRT::Device *pDevice, OCLRT::EngineType eng
OCLRT::AubHelperHw<FamilyType> aubHelperHw(false);
AUB::reserveAddressPPGTT(aubFile, gpuBatchBuffer, sizeBatchBuffer, physBatchBuffer, 7, aubHelperHw, &pDevice->getHardwareInfo());
AUB::reserveAddressPPGTT(aubFile, gpuBatchBuffer, sizeBatchBuffer, physBatchBuffer, 7, aubHelperHw);
uint8_t batchBuffer[sizeBatchBuffer];
auto noop = FamilyType::cmdInitNoop;