OpenBIC
OpenSource Bridge-IC
plat_hook.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 PLAT_HOOK_H
18#define PLAT_HOOK_H
19
20typedef struct _isl69259_pre_proc_arg {
21 /* vr page to set */
22 uint8_t vr_page;
24
25typedef struct _pmic_pre_proc_arg {
26 bool pre_read_init;
28
29typedef struct _dimm_pre_proc_arg {
32
33typedef struct _dimm_post_proc_arg {
34 uint8_t dimm_channel;
35 uint8_t dimm_number;
37
38typedef struct _ifx_vr_fw_info {
39 uint8_t checksum[4];
41 uint8_t vendor;
42 bool is_init;
44
49};
50
51/**************************************************************************************************
52 * INIT ARGS
53**************************************************************************************************/
62
63/**************************************************************************************************
64 * PRE-HOOK/POST-HOOK ARGS
65 **************************************************************************************************/
66extern struct tca9548 mux_conf_addr_0xe2[];
71
72/**************************************************************************************************
73 * PRE-HOOK/POST-HOOK FUNC
74 **************************************************************************************************/
75bool pre_isl69259_read(sensor_cfg *cfg, void *args);
76bool pre_nvme_read(sensor_cfg *cfg, void *args);
77bool pre_pmic_read(sensor_cfg *cfg, void *args);
78bool pre_vol_bat3v_read(sensor_cfg *cfg, void *args);
79bool pre_intel_peci_dimm_read(sensor_cfg *cfg, void *args);
80bool post_vol_bat3v_read(sensor_cfg *cfg, void *args, int *reading);
81bool post_cpu_margin_read(sensor_cfg *cfg, void *args, int *reading);
82bool post_adm1278_power_read(sensor_cfg *cfg, void *args, int *reading);
83bool post_adm1278_current_read(sensor_cfg *cfg, void *args, int *reading);
84bool post_ltc4286_read(sensor_cfg *cfg, void *args, int *reading);
85bool post_ltc4282_read(sensor_cfg *cfg, void *args, int *reading);
86bool pre_intel_dimm_i3c_read(sensor_cfg *cfg, void *args);
87bool post_intel_dimm_i3c_read(sensor_cfg *cfg, void *args, int *reading);
88bool pre_ifx_vr_cache_crc(sensor_cfg *cfg, uint8_t index);
89
90#endif
adc_asd_init_arg adc_asd_init_args[]
Definition: plat_hook.c:742
ltc4286_init_arg ltc4286_init_args[]
Definition: plat_hook.c:90
bool pre_nvme_read(sensor_cfg *cfg, void *args)
Definition: plat_hook.c:1000
mp5990_init_arg mp5990_init_args[]
Definition: plat_hook.c:46
struct tca9548 mux_conf_addr_0xe2[]
Definition: plat_hook.c:955
bool post_ltc4286_read(sensor_cfg *cfg, void *args, int *reading)
Definition: plat_hook.c:1171
bool post_ltc4282_read(sensor_cfg *cfg, void *args, int *reading)
Definition: plat_hook.c:1135
uint8_t reading[1]
Definition: pldm_monitor.h:3
Definition: sensor.h:363
Definition: sensor.h:368
Definition: plat_hook.h:33
uint8_t dimm_number
Definition: plat_hook.h:35
uint8_t dimm_channel
Definition: plat_hook.h:34
Definition: plat_hook.h:29
bool is_present_checked
Definition: plat_hook.h:30
Definition: plat_hook.h:38
uint8_t vendor
Definition: plat_hook.h:41
bool is_init
Definition: plat_hook.h:42
uint8_t checksum[4]
Definition: plat_hook.h:39
uint8_t remaining_write
Definition: plat_hook.h:40
Definition: plat_hook.h:20
uint8_t vr_page
Definition: plat_hook.h:22
Definition: sensor.h:402
Definition: sensor.h:428
Definition: sensor.h:524
Definition: sensor.h:446
Definition: sensor.h:472
Definition: plat_hook.h:25
bool pre_read_init
Definition: plat_hook.h:26
Definition: sensor.h:255
Definition: sensor.h:204
bool post_adm1278_power_read(sensor_cfg *cfg, void *args, int *reading)
Definition: plat_hook.c:208
bool pre_intel_peci_dimm_read(sensor_cfg *cfg, void *args)
Definition: plat_hook.c:248
pmic_init_arg pmic_init_args[]
Definition: plat_hook.c:58
bool post_vol_bat3v_read(sensor_cfg *cfg, void *args, int *reading)
Definition: plat_hook.c:186
bool post_cpu_margin_read(sensor_cfg *cfg, void *args, int *reading)
Definition: plat_hook.c:143
bool post_adm1278_current_read(sensor_cfg *cfg, void *args, int *reading)
Definition: plat_hook.c:233
adm1278_init_arg adm1278_init_args[]
Definition: plat_hook.c:44
bool pre_pmic_read(sensor_cfg *cfg, void *args)
dimm_pre_proc_arg dimm_pre_proc_args[]
Definition: plat_hook.c:111
struct _pmic_pre_proc_arg pmic_pre_proc_arg
bool pre_vol_bat3v_read(sensor_cfg *cfg, void *args)
Definition: plat_hook.c:163
struct _dimm_pre_proc_arg dimm_pre_proc_arg
pmic_pre_proc_arg pmic_pre_read_args[]
ltc4282_init_arg ltc4282_init_args[]
Definition: plat_hook.c:42
bool pre_intel_dimm_i3c_read(sensor_cfg *cfg, void *args)
Definition: plat_hook.c:456
bool post_intel_dimm_i3c_read(sensor_cfg *cfg, void *args, int *reading)
Definition: plat_hook.c:493
bool pre_isl69259_read(sensor_cfg *cfg, void *args)
Definition: plat_hook.c:153
struct _isl69259_pre_proc_arg isl69259_pre_proc_arg
max16550a_init_arg max16550a_init_args[]
Definition: plat_hook.c:104
ifx_vr_fw_info ifx_vr_fw_info_table[]
Definition: plat_hook.c:106
dimm_post_proc_arg dimm_post_proc_args[]
Definition: plat_hook.c:131
IFX_VR_ID
Definition: plat_hook.h:45
@ IFX_VR_VCCD
Definition: plat_hook.h:48
@ IFX_VR_VCCFA
Definition: plat_hook.h:47
@ IFX_VR_VCCIN
Definition: plat_hook.h:46
bool pre_ifx_vr_cache_crc(sensor_cfg *cfg, uint8_t index)
Definition: plat_hook.c:529
isl69259_pre_proc_arg isl69259_pre_read_args[]
Definition: plat_hook.c:120
struct _dimm_post_proc_arg dimm_post_proc_arg
struct _ifx_vr_fw_info ifx_vr_fw_info