mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Check for supported CPU VA size in GfxPartition initialization
Resolves: NEO-5220 Change-Id: I081b0c693e9d7a468be81e12d7f816fada5da21d Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
62709a6ddc
commit
67a31d0975
@@ -10,6 +10,7 @@
|
||||
#include "shared/source/helpers/aligned_memory.h"
|
||||
#include "shared/source/helpers/heap_assigner.h"
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
#include "shared/source/utilities/cpu_info.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -138,7 +139,8 @@ bool GfxPartition::init(uint64_t gpuAddressSpace, size_t cpuAddressRangeSizeToRe
|
||||
gfxBase = maxNBitValue(32) + 1;
|
||||
heapInit(HeapIndex::HEAP_SVM, 0ull, gfxBase);
|
||||
} else {
|
||||
if (gpuAddressSpace == maxNBitValue(48)) {
|
||||
auto cpuVirtualAddressSize = CpuInfo::getInstance().getVirtualAddressSize();
|
||||
if (cpuVirtualAddressSize == 48 && gpuAddressSpace == maxNBitValue(48)) {
|
||||
gfxBase = maxNBitValue(48 - 1) + 1;
|
||||
heapInit(HeapIndex::HEAP_SVM, 0ull, gfxBase);
|
||||
} else if (gpuAddressSpace == maxNBitValue(47)) {
|
||||
@@ -161,7 +163,7 @@ bool GfxPartition::init(uint64_t gpuAddressSpace, size_t cpuAddressRangeSizeToRe
|
||||
gfxBase = 0ull;
|
||||
heapInit(HeapIndex::HEAP_SVM, 0ull, 0ull);
|
||||
} else {
|
||||
if (!initAdditionalRange(gpuAddressSpace, gfxBase, gfxTop, rootDeviceIndex, numRootDevices)) {
|
||||
if (!initAdditionalRange(cpuVirtualAddressSize, gpuAddressSpace, gfxBase, gfxTop, rootDeviceIndex, numRootDevices)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ class GfxPartition {
|
||||
static const std::array<HeapIndex, 7> heapNonSvmNames;
|
||||
|
||||
protected:
|
||||
bool initAdditionalRange(uint64_t gpuAddressSpace, uint64_t &gfxBase, uint64_t &gfxTop, uint32_t rootDeviceIndex, size_t numRootDevices);
|
||||
bool initAdditionalRange(uint32_t cpuAddressWidth, uint64_t gpuAddressSpace, uint64_t &gfxBase, uint64_t &gfxTop, uint32_t rootDeviceIndex, size_t numRootDevices);
|
||||
|
||||
class Heap {
|
||||
public:
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
bool GfxPartition::initAdditionalRange(uint64_t gpuAddressSpace, uint64_t &gfxBase, uint64_t &gfxTop, uint32_t rootDeviceIndex, size_t numRootDevices) {
|
||||
bool GfxPartition::initAdditionalRange(uint32_t cpuVirtualAddressSize, uint64_t gpuAddressSpace, uint64_t &gfxBase, uint64_t &gfxTop, uint32_t rootDeviceIndex, size_t numRootDevices) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user