OpenBIC
OpenSource Bridge-IC
plat_log.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_LOG_H
18#define PLAT_LOG_H
19
20#include "plat_pldm_sensor.h"
21
22#define AEGIS_FRU_LOG_SIZE sizeof(plat_err_log_mapping)
23
24#define LOG_ASSERT 1
25#define LOG_DEASSERT 0
26
27uint16_t error_log_count(void);
28void init_load_eeprom_log(void);
29
30void plat_log_read(uint8_t *log_data, uint8_t cmd_size, uint16_t order);
31void error_log_event(uint16_t error_code, bool log_status);
32void plat_clear_log();
33uint8_t plat_log_get_num(void);
34
35typedef struct __attribute__((packed)) _plat_err_log_mapping {
36 uint16_t index;
37 uint16_t err_code;
38 uint64_t sys_time;
39 uint8_t error_data[20];
40 uint8_t cpld_dump[96];
42
45 MAX_TRIGGER_CAUSE = 0b1000, //trigger cause maxium 3 bit
46};
47
48#endif
void error_log_event(uint8_t sensor_num, bool val_normal)
Definition: plat_log.c:152
void init_load_eeprom_log(void)
Definition: plat_log.c:206
uint16_t error_log_count(void)
Definition: plat_log.c:86
plat_err_log_mapping
Definition: plat_log.h:41
LOG_ERROR_TRIGGER_CAUSE
Definition: plat_log.h:43
@ CPLD_UNEXPECTED_VAL_TRIGGER_CAUSE
Definition: plat_log.h:44
@ MAX_TRIGGER_CAUSE
Definition: plat_log.h:45
void plat_clear_log()
Definition: plat_log.c:153
uint8_t plat_log_get_num(void)
Definition: plat_log.c:406
void plat_log_read(uint8_t *log_data, uint8_t cmd_size, uint16_t order)
Definition: plat_log.c:114
Definition: pldm_smbios.h:61