2018-01-24 04:42:40 +08:00
|
|
|
/*
|
2018-09-18 15:11:08 +08:00
|
|
|
* Copyright (C) 2018 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
2018-01-24 04:42:40 +08:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#include "runtime/gmm_helper/gmm_lib.h"
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
namespace OCLRT {
|
|
|
|
class GmmMemoryBase {
|
|
|
|
public:
|
|
|
|
virtual ~GmmMemoryBase() = default;
|
|
|
|
|
|
|
|
MOCKABLE_VIRTUAL bool configureDeviceAddressSpace(GMM_ESCAPE_HANDLE hAdapter,
|
|
|
|
GMM_ESCAPE_HANDLE hDevice,
|
|
|
|
GMM_ESCAPE_FUNC_TYPE pfnEscape,
|
|
|
|
GMM_GFX_SIZE_T SvmSize,
|
2018-08-23 17:29:39 +08:00
|
|
|
BOOLEAN BDWL3Coherency);
|
|
|
|
|
|
|
|
virtual bool configureDevice(GMM_ESCAPE_HANDLE hAdapter,
|
|
|
|
GMM_ESCAPE_HANDLE hDevice,
|
|
|
|
GMM_ESCAPE_FUNC_TYPE pfnEscape,
|
|
|
|
GMM_GFX_SIZE_T SvmSize,
|
|
|
|
BOOLEAN BDWL3Coherency,
|
|
|
|
GMM_GFX_PARTITIONING &gfxPartition,
|
|
|
|
uintptr_t &minAddress);
|
2018-01-24 04:42:40 +08:00
|
|
|
|
|
|
|
protected:
|
2018-07-23 16:06:00 +08:00
|
|
|
GmmMemoryBase();
|
2018-07-06 15:07:42 +08:00
|
|
|
GMM_CLIENT_CONTEXT *clientContext = nullptr;
|
2018-01-24 04:42:40 +08:00
|
|
|
};
|
|
|
|
} // namespace OCLRT
|