2021-03-10 14:57:01 +08:00
|
|
|
/*
|
2022-05-10 01:40:30 +08:00
|
|
|
* Copyright (C) 2021-2022 Intel Corporation
|
2021-03-10 14:57:01 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "level_zero/tools/source/sysman/os_sysman.h"
|
|
|
|
#include <level_zero/zes_api.h>
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace L0 {
|
|
|
|
|
|
|
|
class OsDiagnostics {
|
|
|
|
public:
|
|
|
|
virtual void osGetDiagProperties(zes_diag_properties_t *pProperties) = 0;
|
2021-04-21 12:12:31 +08:00
|
|
|
virtual ze_result_t osGetDiagTests(uint32_t *pCount, zes_diag_test_t *pTests) = 0;
|
|
|
|
virtual ze_result_t osRunDiagTests(uint32_t start, uint32_t end, zes_diag_result_t *pResult) = 0;
|
2022-04-28 16:56:02 +08:00
|
|
|
static std::unique_ptr<OsDiagnostics> create(OsSysman *pOsSysman, const std::string &diagTests);
|
2021-12-10 21:20:56 +08:00
|
|
|
static void getSupportedDiagTestsFromFW(void *pOsSysman, std::vector<std::string> &supportedDiagTests);
|
2021-03-10 14:57:01 +08:00
|
|
|
virtual ~OsDiagnostics() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace L0
|