2018-07-24 18:36:26 +02:00
|
|
|
/*
|
2024-03-05 03:39:51 +00:00
|
|
|
* Copyright (C) 2018-2024 Intel Corporation
|
2018-07-24 18:36:26 +02:00
|
|
|
*
|
2018-09-18 13:37:39 -07:00
|
|
|
* SPDX-License-Identifier: MIT
|
2018-07-24 18:36:26 +02:00
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2018-09-25 12:44:36 -07:00
|
|
|
#pragma once
|
2020-10-16 12:10:52 +02:00
|
|
|
#include "shared/source/aub/aub_mapper_base.h"
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/helpers/non_copyable_or_moveable.h"
|
|
|
|
|
#include "shared/source/memory_manager/graphics_allocation.h"
|
2020-02-24 10:22:30 +01:00
|
|
|
|
2024-03-05 03:39:51 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2018-07-24 18:36:26 +02:00
|
|
|
|
2024-03-05 03:39:51 +00:00
|
|
|
class ReleaseHelper;
|
2022-11-10 09:37:42 +00:00
|
|
|
struct HardwareInfo;
|
|
|
|
|
|
2018-09-18 13:37:39 -07:00
|
|
|
class AubHelper : public NonCopyableOrMovableClass {
|
2018-07-24 18:36:26 +02:00
|
|
|
public:
|
2024-04-25 08:12:46 +00:00
|
|
|
static bool isOneTimeAubWritableAllocationType(const AllocationType &type);
|
2024-03-05 15:43:36 +00:00
|
|
|
static uint64_t getTotalMemBankSize(const ReleaseHelper *releaseHelper);
|
2018-08-20 15:54:20 +02:00
|
|
|
static int getMemTrace(uint64_t pdEntryBits);
|
2018-09-11 10:26:39 +02:00
|
|
|
static uint64_t getPTEntryBits(uint64_t pdEntryBits);
|
2018-11-09 23:00:58 -08:00
|
|
|
static uint32_t getMemType(uint32_t addressSpace);
|
2024-03-05 15:43:36 +00:00
|
|
|
static uint64_t getPerTileLocalMemorySize(const HardwareInfo *pHwInfo, const ReleaseHelper *releaseHelper);
|
2024-03-05 03:39:51 +00:00
|
|
|
static const std::string getDeviceConfigString(const ReleaseHelper *releaseHelper, uint32_t tileCount, uint32_t sliceCount, uint32_t subSliceCount, uint32_t euPerSubSliceCount);
|
2019-01-14 10:31:06 +01:00
|
|
|
static MMIOList getAdditionalMmioList();
|
2020-08-22 14:12:46 +02:00
|
|
|
static void setTbxConfiguration();
|
2018-09-14 05:31:37 -07:00
|
|
|
|
|
|
|
|
virtual int getDataHintForPml4Entry() const = 0;
|
|
|
|
|
virtual int getDataHintForPdpEntry() const = 0;
|
|
|
|
|
virtual int getDataHintForPdEntry() const = 0;
|
|
|
|
|
virtual int getDataHintForPtEntry() const = 0;
|
|
|
|
|
|
|
|
|
|
virtual int getMemTraceForPml4Entry() const = 0;
|
|
|
|
|
virtual int getMemTraceForPdpEntry() const = 0;
|
|
|
|
|
virtual int getMemTraceForPdEntry() const = 0;
|
|
|
|
|
virtual int getMemTraceForPtEntry() const = 0;
|
2019-01-14 10:31:06 +01:00
|
|
|
|
|
|
|
|
static MMIOList splitMMIORegisters(const std::string ®isters, char delimiter);
|
2018-07-24 18:36:26 +02:00
|
|
|
};
|
2018-09-14 05:31:37 -07:00
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
|
|
|
|
class AubHelperHw : public AubHelper {
|
|
|
|
|
public:
|
|
|
|
|
AubHelperHw(bool localMemoryEnabled) : localMemoryEnabled(localMemoryEnabled){};
|
|
|
|
|
|
|
|
|
|
int getDataHintForPml4Entry() const override;
|
|
|
|
|
int getDataHintForPdpEntry() const override;
|
|
|
|
|
int getDataHintForPdEntry() const override;
|
|
|
|
|
int getDataHintForPtEntry() const override;
|
|
|
|
|
|
|
|
|
|
int getMemTraceForPml4Entry() const override;
|
|
|
|
|
int getMemTraceForPdpEntry() const override;
|
|
|
|
|
int getMemTraceForPdEntry() const override;
|
|
|
|
|
int getMemTraceForPtEntry() const override;
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
bool localMemoryEnabled;
|
|
|
|
|
};
|
|
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
} // namespace NEO
|