2018-09-26 07:27:29 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2018 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#include "runtime/command_stream/command_stream_receiver_hw.h"
|
2018-11-07 00:12:13 +08:00
|
|
|
#include "runtime/gen_common/aub_mapper.h"
|
2018-09-26 07:27:29 +08:00
|
|
|
#include "runtime/memory_manager/memory_banks.h"
|
|
|
|
|
2018-11-02 13:28:20 +08:00
|
|
|
namespace AubMemDump {
|
|
|
|
struct AubStream;
|
|
|
|
}
|
|
|
|
|
2018-09-26 07:27:29 +08:00
|
|
|
namespace OCLRT {
|
|
|
|
class GraphicsAllocation;
|
|
|
|
template <typename GfxFamily>
|
|
|
|
class CommandStreamReceiverSimulatedCommonHw : public CommandStreamReceiverHw<GfxFamily> {
|
2018-12-03 17:05:36 +08:00
|
|
|
protected:
|
2018-09-26 07:27:29 +08:00
|
|
|
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiverHw;
|
2018-12-03 17:05:36 +08:00
|
|
|
using CommandStreamReceiverHw<GfxFamily>::osContext;
|
2018-12-19 20:11:16 +08:00
|
|
|
using AUB = typename AUBFamilyMapper<GfxFamily>::AUB;
|
|
|
|
using MiContextDescriptorReg = typename AUB::MiContextDescriptorReg;
|
2018-09-26 07:27:29 +08:00
|
|
|
|
|
|
|
public:
|
|
|
|
uint64_t getGTTBits() const {
|
|
|
|
return 0u;
|
|
|
|
}
|
2018-11-10 15:00:58 +08:00
|
|
|
void initGlobalMMIO();
|
2018-11-02 13:28:20 +08:00
|
|
|
void initAdditionalMMIO();
|
2018-12-04 23:45:00 +08:00
|
|
|
uint64_t getPPGTTAdditionalBits(GraphicsAllocation *gfxAllocation);
|
|
|
|
void getGTTData(void *memory, AubGTTData &data);
|
|
|
|
uint32_t getMemoryBankForGtt() const;
|
2018-12-17 17:33:12 +08:00
|
|
|
size_t getEngineIndex(EngineInstanceT engineInstance);
|
2018-12-18 18:16:56 +08:00
|
|
|
static const AubMemDump::LrcaHelper &getCsTraits(EngineInstanceT engineInstance);
|
|
|
|
void initEngineMMIO(EngineInstanceT engineInstance);
|
|
|
|
void submitLRCA(EngineInstanceT engineInstance, const MiContextDescriptorReg &contextDescriptor);
|
2018-11-02 13:28:20 +08:00
|
|
|
|
|
|
|
AubMemDump::AubStream *stream;
|
2018-12-07 18:34:51 +08:00
|
|
|
size_t gpgpuEngineIndex = EngineInstanceConstants::numGpgpuEngineInstances - 1;
|
2018-10-04 22:22:22 +08:00
|
|
|
|
|
|
|
protected:
|
2018-11-07 00:12:13 +08:00
|
|
|
MMIOList splitMMIORegisters(const std::string ®isters, char delimiter);
|
2018-09-26 07:27:29 +08:00
|
|
|
};
|
|
|
|
} // namespace OCLRT
|