Improving OS abstraction

Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
This commit is contained in:
Jaroslaw Chodor
2021-05-21 01:17:57 +02:00
committed by Compute-Runtime-Automation
parent 7bec5d5d3b
commit 0e9aa45e46
127 changed files with 558 additions and 606 deletions

View File

@@ -13,6 +13,7 @@
#include "shared/source/os_interface/linux/engine_info.h"
#include "shared/source/os_interface/linux/hw_device_id.h"
#include "shared/source/os_interface/linux/memory_info.h"
#include "shared/source/os_interface/os_interface.h"
#include "shared/source/utilities/api_intercept.h"
#include "shared/source/utilities/stackvec.h"
@@ -54,10 +55,12 @@ struct DeviceDescriptor { // NOLINT(clang-analyzer-optin.performance.Padding)
extern const DeviceDescriptor deviceDescriptorTable[];
class Drm {
class Drm : public DriverModel {
friend DeviceFactory;
public:
static constexpr DriverModelType driverModelType = DriverModelType::DRM;
enum class ResourceClass : uint32_t {
Elf,
Isa,
@@ -82,6 +85,9 @@ class Drm {
virtual int ioctl(unsigned long request, void *arg);
int getDeviceID(int &devId);
unsigned int getDeviceHandle() const override {
return 0;
}
int getDeviceRevID(int &revId);
int getExecSoftPin(int &execSoftPin);
int enableTurboBoost();
@@ -157,6 +163,8 @@ class Drm {
MOCKABLE_VIRTUAL bool isDebugAttachAvailable();
void setGmmInputArgs(void *args) override;
SystemInfo *getSystemInfo() const {
return systemInfo.get();
}