| 1 |
/* |
| 2 |
* Copyright (C) 2018-2023 Intel Corporation |
| 3 |
* |
| 4 |
* SPDX-License-Identifier: MIT |
| 5 |
* |
| 6 |
*/ |
| 7 |
|
| 8 |
#pragma once |
| 9 |
#include "shared/source/gmm_helper/gmm_lib.h" |
| 10 |
|
| 11 |
namespace NEO { |
| 12 |
class GmmClientContext; |
| 13 |
class GmmMemoryBase { |
| 14 |
public: |
| 15 |
virtual ~GmmMemoryBase() = default; |
| 16 |
|
| 17 |
MOCKABLE_VIRTUAL bool configureDeviceAddressSpace(GMM_ESCAPE_HANDLE hAdapter, |
| 18 |
GMM_ESCAPE_HANDLE hDevice, |
| 19 |
GMM_ESCAPE_FUNC_TYPE pfnEscape, |
| 20 |
GMM_GFX_SIZE_T svmSize, |
| 21 |
BOOLEAN bdwL3Coherency); |
| 22 |
|
| 23 |
bool configureDevice(GMM_ESCAPE_HANDLE hAdapter, |
| 24 |
GMM_ESCAPE_HANDLE hDevice, |
| 25 |
GMM_ESCAPE_FUNC_TYPE pfnEscape, |
| 26 |
GMM_GFX_SIZE_T svmSize, |
| 27 |
BOOLEAN bdwL3Coherency, |
| 28 |
uintptr_t &minAddress, |
| 29 |
bool obtainMinAddress); |
| 30 |
|
| 31 |
MOCKABLE_VIRTUAL uintptr_t getInternalGpuVaRangeLimit(); |
| 32 |
|
| 33 |
MOCKABLE_VIRTUAL bool setDeviceInfo(GMM_DEVICE_INFO *deviceInfo); |
| 34 |
|
| 35 |
protected: |
| 36 |
GmmMemoryBase(GmmClientContext *gmmClientContext); |
| 37 |
GMM_CLIENT_CONTEXT &clientContext; |
| 38 |
}; |
| 39 |
} // namespace NEO |