OpenBIC
OpenSource Bridge-IC
vistara.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 VISTARA_H
18#define VISTARA_H
19
20#ifdef ENABLE_VISTARA
21#include "cci.h"
22
23#define READ_DDR_TEMP_REQ_LEN 0
24#define READ_DDR_TEMP_RESP_LEN 32
25
26enum VISTARA_CCI_CMD_OEM_OPCODE {
27 CCI_OEM_OP_READ_DDR_TEMP = 0xC531,
28};
29
30enum VISTARA_SENSOR_TYPE {
31 DDR_TEMP,
32};
33
34enum VISTARA_DIMM_ID {
35 DIMMA_ID = 0,
36 DIMMB_ID,
37 DIMMC_ID,
38 DIMMD_ID,
39 MAX_DIMM_ID,
40};
41
42typedef struct {
43 uint8_t temp_valid;
44 uint8_t dimm_id;
45 uint8_t spd_id;
46 uint8_t reserved;
47 uint8_t dimm_temp[4];
48} read_ddr_temp_resp;
49
50uint8_t plat_get_cxl_eid(uint8_t cxl_id);
51void plat_set_dimm_cache(uint8_t *resp_buf, uint8_t cxl_id, uint8_t status);
52float plat_get_dimm_cache(uint8_t cxl_id, uint8_t dimm_id);
53bool vistara_cci_command(uint8_t cxl_eid, mctp_cci_msg cci_msg, uint8_t *resp, uint8_t resp_len);
54bool vistara_read_ddr_temp(uint8_t cxl_eid, uint8_t *resp);
55
56#endif
57#endif
uint8_t status
Definition: mctp_ctrl.h:1
uint32_t reserved
Definition: plat_ncsi.h:4
Definition: cci.h:71
uint8_t plat_get_cxl_eid(uint8_t cxl_id)
Definition: plat_mctp.c:424
void plat_set_dimm_cache(uint8_t *resp_buf, uint8_t cxl_id, uint8_t status)
Definition: plat_pldm_sensor.c:6710
float plat_get_dimm_cache(uint8_t cxl_id, uint8_t dimm_id)
Definition: plat_pldm_sensor.c:6696