mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 07:14:10 +08:00
sysman: add warm reset capability to diagnostics.
Relates-to:LOCI-2507 Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
e857979406
commit
35607e7830
@@ -10,6 +10,7 @@
|
||||
#include "shared/source/helpers/string.h"
|
||||
|
||||
namespace L0 {
|
||||
const std::string LinuxDiagnosticsImp::deviceDir("device");
|
||||
|
||||
void OsDiagnostics::getSupportedDiagTests(std::vector<std::string> &supportedDiagTests, OsSysman *pOsSysman) {
|
||||
LinuxSysmanImp *pLinuxSysmanImp = static_cast<LinuxSysmanImp *>(pOsSysman);
|
||||
@@ -20,7 +21,8 @@ void OsDiagnostics::getSupportedDiagTests(std::vector<std::string> &supportedDia
|
||||
}
|
||||
|
||||
void LinuxDiagnosticsImp::osGetDiagProperties(zes_diag_properties_t *pProperties) {
|
||||
pProperties->onSubdevice = false;
|
||||
pProperties->onSubdevice = isSubdevice;
|
||||
pProperties->subdeviceId = subdeviceId;
|
||||
pProperties->haveTests = 0; // osGetDiagTests is Unsupported
|
||||
strncpy_s(pProperties->name, ZES_STRING_PROPERTY_SIZE, osDiagType.c_str(), osDiagType.size());
|
||||
return;
|
||||
@@ -38,6 +40,8 @@ LinuxDiagnosticsImp::LinuxDiagnosticsImp(OsSysman *pOsSysman, const std::string
|
||||
LinuxSysmanImp *pLinuxSysmanImp = static_cast<LinuxSysmanImp *>(pOsSysman);
|
||||
pFwInterface = pLinuxSysmanImp->getFwUtilInterface();
|
||||
pSysfsAccess = &pLinuxSysmanImp->getSysfsAccess();
|
||||
pFsAccess = &pLinuxSysmanImp->getFsAccess();
|
||||
pProcfsAccess = &pLinuxSysmanImp->getProcfsAccess();
|
||||
}
|
||||
|
||||
std::unique_ptr<OsDiagnostics> OsDiagnostics::create(OsSysman *pOsSysman, const std::string &diagTests, ze_bool_t onSubdevice, uint32_t subdeviceId) {
|
||||
|
||||
@@ -20,6 +20,7 @@ class LinuxDiagnosticsImp : public OsDiagnostics, NEO::NonCopyableOrMovableClass
|
||||
ze_result_t osGetDiagTests(uint32_t *pCount, zes_diag_test_t *pTests) override;
|
||||
ze_result_t osRunDiagTests(uint32_t start, uint32_t end, zes_diag_result_t *pResult) override;
|
||||
ze_result_t osRunDiagTestsinFW(zes_diag_result_t *pResult);
|
||||
ze_result_t osWarmReset();
|
||||
LinuxDiagnosticsImp() = default;
|
||||
LinuxDiagnosticsImp(OsSysman *pOsSysman, const std::string &diagTests, ze_bool_t onSubdevice, uint32_t subdeviceId);
|
||||
~LinuxDiagnosticsImp() override = default;
|
||||
@@ -28,12 +29,19 @@ class LinuxDiagnosticsImp : public OsDiagnostics, NEO::NonCopyableOrMovableClass
|
||||
protected:
|
||||
FirmwareUtil *pFwInterface = nullptr;
|
||||
SysfsAccess *pSysfsAccess = nullptr;
|
||||
FsAccess *pFsAccess = nullptr;
|
||||
ProcfsAccess *pProcfsAccess = nullptr;
|
||||
decltype(&NEO::SysCalls::open) openFunction = NEO::SysCalls::open;
|
||||
decltype(&NEO::SysCalls::close) closeFunction = NEO::SysCalls::close;
|
||||
decltype(&NEO::SysCalls::pread) preadFunction = NEO::SysCalls::pread;
|
||||
decltype(&NEO::SysCalls::pwrite) pwriteFunction = NEO::SysCalls::pwrite;
|
||||
|
||||
private:
|
||||
static const std::string quiescentGpuFile;
|
||||
bool isSubdevice = false;
|
||||
uint32_t subdeviceId = 0;
|
||||
static const std::string invalidateLmemFile;
|
||||
static const std::string deviceDir;
|
||||
};
|
||||
|
||||
} // namespace L0
|
||||
|
||||
Reference in New Issue
Block a user