1 /*
2  * Copyright (C) 2020-2021 Intel Corporation
3  *
4  * SPDX-License-Identifier: MIT
5  *
6  */
7 
8 #pragma once
9 #include <cstdint>
10 
11 namespace NEO {
12 struct HardwareInfo;
13 
14 struct SystemInfo {
15 
16     SystemInfo(const uint32_t *blobData, int32_t blobSize);
17 
18     ~SystemInfo() = default;
19 
getMaxSlicesSupportedSystemInfo20     uint32_t getMaxSlicesSupported() const { return maxSlicesSupported; }
getMaxDualSubSlicesSupportedSystemInfo21     uint32_t getMaxDualSubSlicesSupported() const { return maxDualSubSlicesSupported; }
getMaxEuPerDualSubSliceSystemInfo22     uint32_t getMaxEuPerDualSubSlice() const { return maxEuPerDualSubSlice; }
getL3CacheSizeInKbSystemInfo23     uint64_t getL3CacheSizeInKb() const { return L3CacheSizeInKb; }
getL3BankCountSystemInfo24     uint32_t getL3BankCount() const { return L3BankCount; }
getMemoryTypeSystemInfo25     uint32_t getMemoryType() const { return memoryType; }
getMaxMemoryChannelsSystemInfo26     uint32_t getMaxMemoryChannels() const { return maxMemoryChannels; }
getNumThreadsPerEuSystemInfo27     uint32_t getNumThreadsPerEu() const { return numThreadsPerEu; }
getTotalVsThreadsSystemInfo28     uint32_t getTotalVsThreads() const { return totalVsThreads; }
getTotalHsThreadsSystemInfo29     uint32_t getTotalHsThreads() const { return totalHsThreads; }
getTotalDsThreadsSystemInfo30     uint32_t getTotalDsThreads() const { return totalDsThreads; }
getTotalGsThreadsSystemInfo31     uint32_t getTotalGsThreads() const { return totalGsThreads; }
getTotalPsThreadsSystemInfo32     uint32_t getTotalPsThreads() const { return totalPsThreads; }
getMaxFillRateSystemInfo33     uint32_t getMaxFillRate() const { return maxFillRate; }
getMaxRCSSystemInfo34     uint32_t getMaxRCS() const { return maxRCS; }
getMaxCCSSystemInfo35     uint32_t getMaxCCS() const { return maxCCS; }
36 
37     void checkSysInfoMismatch(HardwareInfo *hwInfo);
38 
39   protected:
40     void parseDeviceBlob(const uint32_t *data, int32_t size);
41     void extendParseDeviceBlob(const uint32_t *data, uint32_t element);
42 
43     uint32_t maxSlicesSupported = 0;
44     uint32_t maxDualSubSlicesSupported = 0;
45     uint32_t maxEuPerDualSubSlice = 0;
46     uint64_t L3CacheSizeInKb = 0;
47     uint32_t L3BankCount = 0;
48     uint32_t memoryType = 0;
49     uint32_t maxMemoryChannels = 0;
50     uint32_t numThreadsPerEu = 0;
51     uint32_t totalVsThreads = 0;
52     uint32_t totalHsThreads = 0;
53     uint32_t totalDsThreads = 0;
54     uint32_t totalGsThreads = 0;
55     uint32_t totalPsThreads = 0;
56     uint32_t maxFillRate = 0;
57     uint32_t maxRCS = 0;
58     uint32_t maxCCS = 0;
59 };
60 
61 } // namespace NEO
62