OpenBIC
OpenSource Bridge-IC
plat_apml.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_APML_H
18#define PLAT_APML_H
19
20#include "apml.h"
21#include "plat_i2c.h"
22
23#define TSI_HIGH_TEMP_THRESHOLD 0x5F
24#define TSI_TEMP_ALERT_UPDATE_RATE 0x0A
25#define PLAT_SBRMI_REVISION 0x20
26#define CPUID_SIZE 16
27
28typedef struct _addc_trigger_info {
29 uint8_t event_version;
30 uint8_t RAS_status;
31 uint8_t total_socket;
32 uint8_t apml_index;
33 uint8_t cpuid[16];
34} __attribute__((__packed__)) addc_trigger_info;
35
36bool get_tsi_status();
37void reset_tsi_status();
39void read_cpuid();
40const uint8_t* get_cpuid();
41
42#endif
Definition: plat_apml.h:30
uint8_t event_version
Definition: plat_apml.h:31
uint8_t cpuid[16]
Definition: plat_apml.h:35
uint8_t total_socket
Definition: plat_apml.h:33
uint8_t RAS_status
Definition: plat_apml.h:32
uint8_t apml_index
Definition: plat_apml.h:34
void read_cpuid()
Definition: plat_apml.c:89
bool get_tsi_status()
Definition: plat_apml.c:28
struct _addc_trigger_info __attribute__((__packed__)) addc_trigger_info
Definition: hal_i2c_target.h:28
void set_tsi_threshold()
Definition: plat_apml.c:38
void reset_tsi_status()
Definition: plat_apml.c:33
const uint8_t * get_cpuid()
Definition: plat_apml.c:212