blob: 5e8fb281d9d22bdcb17f17f6e5b76ecf521b8e20 [file] [log] [blame]
Lawrence Tangc60a2432022-07-06 14:58:33 +01001#ifndef CPER_SECTION_FIRMWARE_H
2#define CPER_SECTION_FIRMWARE_H
3
Karthik Rajagopalan255bd812024-09-06 14:36:34 -07004#ifdef __cplusplus
5extern "C" {
6#endif
7
Ed Tanousc97c0412025-02-04 11:31:31 -08008#include <stdio.h>
Lawrence Tang5202bbb2022-08-12 14:54:36 +01009#include <json.h>
Thu Nguyene42fb482024-10-15 14:43:11 +000010#include <libcper/Cper.h>
Lawrence Tangc60a2432022-07-06 14:58:33 +010011
Patrick Williams30cd66a2024-12-18 11:23:15 -050012#define FIRMWARE_ERROR_RECORD_TYPES_KEYS (int[]){ 0, 1, 2 }
John Chungf8fc7052024-05-03 20:05:29 +080013#define FIRMWARE_ERROR_RECORD_TYPES_VALUES \
Patrick Williams30cd66a2024-12-18 11:23:15 -050014 (const char *[]){ "IPF SAL Error Record", \
15 "SOC Firmware Error Record (Type1 Legacy)", \
16 "SOC Firmware Error Record (Type2)" }
Lawrence Tangc60a2432022-07-06 14:58:33 +010017
Aushim Nagarkattiad6c8802025-06-18 16:45:28 -070018json_object *cper_section_firmware_to_ir(const UINT8 *section, UINT32 size,
19 char **desc_string);
John Chungf8fc7052024-05-03 20:05:29 +080020void ir_section_firmware_to_cper(json_object *section, FILE *out);
Lawrence Tangc60a2432022-07-06 14:58:33 +010021
Karthik Rajagopalan255bd812024-09-06 14:36:34 -070022#ifdef __cplusplus
23}
24#endif
25
John Chungf8fc7052024-05-03 20:05:29 +080026#endif