2017-12-21 00:45:38 +01:00
|
|
|
/*
|
2019-01-27 17:36:42 +01:00
|
|
|
* Copyright (C) 2017-2019 Intel Corporation
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
2018-09-18 09:11:08 +02:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2019-01-27 17:36:42 +01:00
|
|
|
#include "runtime/aub_mem_dump/aub_alloc_dump.inl"
|
2017-12-21 00:45:38 +01:00
|
|
|
#include "runtime/aub_mem_dump/aub_mem_dump.inl"
|
2019-01-27 17:36:42 +01:00
|
|
|
#include "runtime/helpers/hw_helper.h"
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2019-02-27 11:39:32 +01:00
|
|
|
#include "aub_mapper.h"
|
|
|
|
|
|
2017-12-21 00:45:38 +01:00
|
|
|
namespace AubMemDump {
|
|
|
|
|
|
|
|
|
|
enum {
|
|
|
|
|
device = DeviceValues::Bdw
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// Instantiate these common template implementations.
|
|
|
|
|
template struct AubDump<Traits<device, 32>>;
|
|
|
|
|
template struct AubDump<Traits<device, 48>>;
|
|
|
|
|
|
|
|
|
|
template struct AubPageTableHelper32<Traits<device, 32>>;
|
|
|
|
|
template struct AubPageTableHelper64<Traits<device, 48>>;
|
|
|
|
|
} // namespace AubMemDump
|
|
|
|
|
|
|
|
|
|
namespace OCLRT {
|
|
|
|
|
using Family = BDWFamily;
|
|
|
|
|
|
2018-11-26 11:20:50 +01:00
|
|
|
static AubMemDump::LrcaHelperRcs rcs(0x002000);
|
|
|
|
|
static AubMemDump::LrcaHelperBcs bcs(0x022000);
|
|
|
|
|
static AubMemDump::LrcaHelperVcs vcs(0x012000);
|
|
|
|
|
static AubMemDump::LrcaHelperVecs vecs(0x01a000);
|
2017-12-21 00:45:38 +01:00
|
|
|
|
|
|
|
|
const AubMemDump::LrcaHelper *AUBFamilyMapper<Family>::csTraits[EngineType::NUM_ENGINES] = {
|
|
|
|
|
&rcs,
|
|
|
|
|
&bcs,
|
|
|
|
|
&vcs,
|
|
|
|
|
&vecs};
|
|
|
|
|
|
|
|
|
|
const MMIOList AUBFamilyMapper<Family>::globalMMIO;
|
|
|
|
|
|
|
|
|
|
static const MMIOList mmioListRCS = {
|
|
|
|
|
MMIOPair(0x000020d8, 0x00020000),
|
2018-11-26 11:20:50 +01:00
|
|
|
MMIOPair(AubMemDump::computeRegisterOffset(rcs.mmioBase, 0x229c), 0xffff8280),
|
2017-12-21 00:45:38 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const MMIOList mmioListBCS = {
|
2018-11-26 11:20:50 +01:00
|
|
|
MMIOPair(AubMemDump::computeRegisterOffset(bcs.mmioBase, 0x229c), 0xffff8280),
|
2017-12-21 00:45:38 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const MMIOList mmioListVCS = {
|
2018-11-26 11:20:50 +01:00
|
|
|
MMIOPair(AubMemDump::computeRegisterOffset(vcs.mmioBase, 0x229c), 0xffff8280),
|
2017-12-21 00:45:38 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const MMIOList mmioListVECS = {
|
2018-11-26 11:20:50 +01:00
|
|
|
MMIOPair(AubMemDump::computeRegisterOffset(vecs.mmioBase, 0x229c), 0xffff8280),
|
2017-12-21 00:45:38 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const MMIOList *AUBFamilyMapper<Family>::perEngineMMIO[EngineType::NUM_ENGINES] = {
|
|
|
|
|
&mmioListRCS,
|
|
|
|
|
&mmioListBCS,
|
|
|
|
|
&mmioListVCS,
|
|
|
|
|
&mmioListVECS};
|
|
|
|
|
} // namespace OCLRT
|
2019-01-27 17:36:42 +01:00
|
|
|
|
|
|
|
|
namespace AubAllocDump {
|
|
|
|
|
using namespace OCLRT;
|
|
|
|
|
|
|
|
|
|
template uint32_t getImageSurfaceTypeFromGmmResourceType<Family>(GMM_RESOURCE_TYPE gmmResourceType);
|
|
|
|
|
|
|
|
|
|
template void dumpBufferInBinFormat<Family>(GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context);
|
|
|
|
|
|
|
|
|
|
template void dumpImageInBmpFormat<Family>(GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context);
|
|
|
|
|
|
|
|
|
|
template void dumpBufferInTreFormat<Family>(GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context);
|
|
|
|
|
|
|
|
|
|
template void dumpImageInTreFormat<Family>(GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context);
|
|
|
|
|
|
|
|
|
|
template void dumpAllocation<Family>(GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context);
|
|
|
|
|
} // namespace AubAllocDump
|