mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
feature(sysman): Add support for RAS module
- Port RAS module to new sysman design - Add RAS ULTs for new sysman interface Related-To: LOCI-4246 Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
cfacbbd811
commit
826abf338a
53
level_zero/sysman/source/ras/ras_imp.cpp
Normal file
53
level_zero/sysman/source/ras/ras_imp.cpp
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/ras/ras_imp.h"
|
||||
|
||||
#include "shared/source/helpers/string.h"
|
||||
|
||||
#include "level_zero/sysman/source/sysman_const.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
ze_result_t RasImp::rasGetProperties(zes_ras_properties_t *pProperties) {
|
||||
*pProperties = rasProperties;
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
ze_result_t RasImp::rasGetConfig(zes_ras_config_t *pConfig) {
|
||||
return pOsRas->osRasGetConfig(pConfig);
|
||||
}
|
||||
|
||||
ze_result_t RasImp::rasSetConfig(const zes_ras_config_t *pConfig) {
|
||||
return pOsRas->osRasSetConfig(pConfig);
|
||||
}
|
||||
|
||||
ze_result_t RasImp::rasGetState(zes_ras_state_t *pState, ze_bool_t clear) {
|
||||
memset(pState->category, 0, maxRasErrorCategoryCount * sizeof(uint64_t));
|
||||
return pOsRas->osRasGetState(*pState, clear);
|
||||
}
|
||||
|
||||
void RasImp::init() {
|
||||
pOsRas->osRasGetProperties(rasProperties);
|
||||
}
|
||||
|
||||
RasImp::RasImp(OsSysman *pOsSysman, zes_ras_error_type_t type, ze_bool_t isSubDevice, uint32_t subDeviceId) {
|
||||
pOsRas = OsRas::create(pOsSysman, type, isSubDevice, subDeviceId);
|
||||
init();
|
||||
}
|
||||
|
||||
RasImp::~RasImp() {
|
||||
if (nullptr != pOsRas) {
|
||||
delete pOsRas;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
||||
Reference in New Issue
Block a user