2018-01-23 21:42:40 +01:00
|
|
|
/*
|
2021-06-10 19:43:22 +00:00
|
|
|
* Copyright (C) 2018-2021 Intel Corporation
|
2018-09-18 09:11:08 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
2018-01-23 21:42:40 +01:00
|
|
|
|
|
|
|
|
#pragma once
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/gmm_helper/gmm_lib.h"
|
2019-02-27 11:39:32 +01:00
|
|
|
|
2018-01-23 21:42:40 +01:00
|
|
|
#include <memory>
|
|
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2020-01-24 15:03:28 +01:00
|
|
|
class GmmClientContext;
|
2018-01-23 21:42:40 +01:00
|
|
|
class GmmMemoryBase {
|
|
|
|
|
public:
|
|
|
|
|
virtual ~GmmMemoryBase() = default;
|
|
|
|
|
|
|
|
|
|
MOCKABLE_VIRTUAL bool configureDeviceAddressSpace(GMM_ESCAPE_HANDLE hAdapter,
|
|
|
|
|
GMM_ESCAPE_HANDLE hDevice,
|
|
|
|
|
GMM_ESCAPE_FUNC_TYPE pfnEscape,
|
2021-06-10 19:43:22 +00:00
|
|
|
GMM_GFX_SIZE_T svmSize,
|
|
|
|
|
BOOLEAN bdwL3Coherency);
|
2018-08-23 11:29:39 +02:00
|
|
|
|
2019-12-23 14:28:33 +01:00
|
|
|
bool configureDevice(GMM_ESCAPE_HANDLE hAdapter,
|
|
|
|
|
GMM_ESCAPE_HANDLE hDevice,
|
|
|
|
|
GMM_ESCAPE_FUNC_TYPE pfnEscape,
|
2021-06-10 19:43:22 +00:00
|
|
|
GMM_GFX_SIZE_T svmSize,
|
|
|
|
|
BOOLEAN bdwL3Coherency,
|
2019-12-23 14:28:33 +01:00
|
|
|
uintptr_t &minAddress,
|
|
|
|
|
bool obtainMinAddress);
|
|
|
|
|
|
|
|
|
|
MOCKABLE_VIRTUAL uintptr_t getInternalGpuVaRangeLimit();
|
|
|
|
|
|
|
|
|
|
MOCKABLE_VIRTUAL bool setDeviceInfo(GMM_DEVICE_INFO *deviceInfo);
|
2018-01-23 21:42:40 +01:00
|
|
|
|
|
|
|
|
protected:
|
2020-01-24 15:03:28 +01:00
|
|
|
GmmMemoryBase(GmmClientContext *gmmClientContext);
|
|
|
|
|
GMM_CLIENT_CONTEXT &clientContext;
|
2018-01-23 21:42:40 +01:00
|
|
|
};
|
2019-03-26 11:59:46 +01:00
|
|
|
} // namespace NEO
|