Lawrence Tang | 02c801a | 2022-07-18 14:43:52 +0100 | [diff] [blame] | 1 | #ifndef GEN_UTILS_H |
| 2 | #define GEN_UTILS_H |
| 3 | |
| 4 | #include <stdlib.h> |
| 5 | #include "../edk/BaseTypes.h" |
Lawrence Tang | aacf0e2 | 2022-07-20 13:28:52 +0100 | [diff] [blame] | 6 | #include "../common-utils.h" |
Lawrence Tang | 02c801a | 2022-07-18 14:43:52 +0100 | [diff] [blame] | 7 | |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 8 | #define CPER_ERROR_TYPES_KEYS \ |
| 9 | (int[]) \ |
| 10 | { \ |
| 11 | 1, 16, 4, 5, 6, 7, 8, 9, 17, 18, 19, 20, 21, 22, 23, 24, 25, \ |
| 12 | 26 \ |
| 13 | } |
Lawrence Tang | de9707f | 2022-07-19 10:54:31 +0100 | [diff] [blame] | 14 | |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 15 | size_t generate_random_section(void **location, size_t size); |
| 16 | UINT8 *generate_random_bytes(size_t size); |
Lawrence Tang | 02c801a | 2022-07-18 14:43:52 +0100 | [diff] [blame] | 17 | void init_random(); |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 18 | void create_valid_error_section(UINT8 *start); |
Lawrence Tang | aacf0e2 | 2022-07-20 13:28:52 +0100 | [diff] [blame] | 19 | UINT8 int_to_bcd(int value); |
Lawrence Tang | 02c801a | 2022-07-18 14:43:52 +0100 | [diff] [blame] | 20 | |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 21 | #endif |