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
27
uint16_t
error_log_count
(
void
);
28
void
init_load_eeprom_log
(
void
);
29
30
void
plat_log_read
(uint8_t *log_data, uint8_t cmd_size, uint16_t order);
31
void
error_log_event
(uint16_t error_code,
bool
log_status);
32
void
plat_clear_log
();
33
uint8_t
plat_log_get_num
(
void
);
34
35
typedef
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];
41
}
plat_err_log_mapping
;
42
43
enum
LOG_ERROR_TRIGGER_CAUSE
{
44
CPLD_UNEXPECTED_VAL_TRIGGER_CAUSE
= 0b100,
45
MAX_TRIGGER_CAUSE
= 0b1000,
//trigger cause maxium 3 bit
46
};
47
48
#endif
error_log_event
void error_log_event(uint8_t sensor_num, bool val_normal)
Definition:
plat_log.c:152
init_load_eeprom_log
void init_load_eeprom_log(void)
Definition:
plat_log.c:206
error_log_count
uint16_t error_log_count(void)
Definition:
plat_log.c:86
plat_err_log_mapping
plat_err_log_mapping
Definition:
plat_log.h:41
LOG_ERROR_TRIGGER_CAUSE
LOG_ERROR_TRIGGER_CAUSE
Definition:
plat_log.h:43
CPLD_UNEXPECTED_VAL_TRIGGER_CAUSE
@ CPLD_UNEXPECTED_VAL_TRIGGER_CAUSE
Definition:
plat_log.h:44
MAX_TRIGGER_CAUSE
@ MAX_TRIGGER_CAUSE
Definition:
plat_log.h:45
plat_clear_log
void plat_clear_log()
Definition:
plat_log.c:153
plat_log_get_num
uint8_t plat_log_get_num(void)
Definition:
plat_log.c:406
plat_log_read
void plat_log_read(uint8_t *log_data, uint8_t cmd_size, uint16_t order)
Definition:
plat_log.c:114
__attribute__
Definition:
pldm_smbios.h:61
plat_pldm_sensor.h
meta-facebook
minerva-ag
src
platform
plat_log.h
Generated by
1.9.2