2020-03-06 18:09:57 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2019-2020 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2020-03-22 15:52:57 +08:00
|
|
|
#include "level_zero/tools/source/sysman/os_sysman.h"
|
2020-03-06 18:09:57 +08:00
|
|
|
#include <level_zero/zet_api.h>
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace L0 {
|
2020-08-14 02:03:21 +08:00
|
|
|
std::string changeDirNLevelsUp(std::string realRootPath, uint8_t nLevel);
|
2020-03-06 18:09:57 +08:00
|
|
|
|
|
|
|
class OsPci {
|
|
|
|
public:
|
|
|
|
virtual ze_result_t getPciBdf(std::string &bdf) = 0;
|
|
|
|
virtual ze_result_t getMaxLinkSpeed(double &maxLinkSpeed) = 0;
|
2020-07-23 09:34:28 +08:00
|
|
|
virtual ze_result_t getMaxLinkWidth(int32_t &maxLinkWidth) = 0;
|
|
|
|
virtual ze_result_t getLinkGen(int32_t &linkGen) = 0;
|
2020-07-29 17:45:54 +08:00
|
|
|
virtual ze_result_t initializeBarProperties(std::vector<zes_pci_bar_properties_t *> &pBarProperties) = 0;
|
2020-03-06 18:09:57 +08:00
|
|
|
static OsPci *create(OsSysman *pOsSysman);
|
2020-04-03 15:49:17 +08:00
|
|
|
virtual ~OsPci() = default;
|
2020-03-06 18:09:57 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace L0
|