xref: /openbmc/libcper/generator/gen-utils.h (revision 2d17acec)
1 #ifndef CPER_GEN_UTILS_H
2 #define CPER_GEN_UTILS_H
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 #include <stdlib.h>
9 #include "../edk/BaseTypes.h"
10 #include "../common-utils.h"
11 
12 #define CPER_ERROR_TYPES_KEYS                                                  \
13 	(int[])                                                                \
14 	{                                                                      \
15 		1, 16, 4, 5, 6, 7, 8, 9, 17, 18, 19, 20, 21, 22, 23, 24, 25,   \
16 			26                                                     \
17 	}
18 
19 size_t generate_random_section(void **location, size_t size);
20 UINT8 *generate_random_bytes(size_t size);
21 void init_random();
22 void create_valid_error_section(UINT8 *start);
23 UINT8 int_to_bcd(int value);
24 
25 #ifdef __cplusplus
26 }
27 #endif
28 
29 #endif
30