OpenBIC
OpenSource Bridge-IC
nvidia.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef NVIDIA_H
18#define NVIDIA_H
19
20#include "plat_def.h"
21#ifdef ENABLE_NVIDIA
22
23#include <stdint.h>
24#include "pldm_monitor.h"
25
26enum nv_satmc_sensor_num_table {
27 /* numeric sensor */
28 NV_SATMC_SENSOR_NUM_PWR_VDD_CPU = 0x0010,
29 NV_SATMC_SENSOR_NUM_VOL_VDD_CPU,
30 NV_SATMC_SENSOR_NUM_PWR_VDD_SOC = 0x0020,
31 NV_SATMC_SENSOR_NUM_VOL_VDD_SOC,
32 NV_SATMC_SENSOR_NUM_PWR_MODULE = 0x0030,
33 NV_SATMC_SENSOR_NUM_ENG_MODULE,
34 NV_SATMC_SENSOR_NUM_PWR_GRACE = 0x0040,
35 NV_SATMC_SENSOR_NUM_ENG_GRACE,
36 NV_SATMC_SENSOR_NUM_PWR_TOTAL_MODULE,
37 NV_SATMC_SENSOR_NUM_ENG_TOTAL_MODULE,
38 NV_SATMC_SENSOR_NUM_CNT_PAGE_RETIRE = 0x0050,
39 NV_SATMC_SENSOR_NUM_TMP_GRACE = 0x00A0,
40 NV_SATMC_SENSOR_NUM_TMP_GRACE_LIMIT,
41 NV_SATMC_SENSOR_NUM_FRQ_MEMORY = 0x00B0,
42 NV_SATMC_SENSOR_NUM_FRQ_MAX_CPU = 0x00C0,
43
44 /* state sensor */
45 NV_SATMC_SENSOR_NUM_CPU_THROT_STATE = 0x0210,
46 NV_SATMC_SENSOR_NUM_POWER_BREAK = 0x0240,
47 NV_SATMC_SENSOR_NUM_SPARE_CH_PRESENCE = 0x0250,
48};
49
50#ifdef ENABLE_SBMR
51#define NV_STATUS_CODE_TYPE_PROG_CODE 0x1
52#define NV_STATUS_CODE_TYPE_ERROR_CODE 0x2
53#define NV_STATUS_CODE_TYPE_DEBUG_CODE 0x3
54#endif
55
56/* Y = (mX + b) * 10^r */
57struct nv_satmc_sensor_parm {
58 uint16_t nv_satmc_sensor_id;
59 pldm_sensor_pdr_parm cal_parm;
60};
61
62extern struct nv_satmc_sensor_parm satmc_sensor_cfg_list[];
63extern const int SATMC_SENSOR_CFG_LIST_SIZE;
64
65#endif /* ENABLE_NVIDIA */
66#endif /* NVIDIA_H */
Definition: pldm_monitor.h:202