blob: 0ed28c263e8ff329410294b8496ed6c05bbed69e [file] [log] [blame]
Lawrence Tang02c801a2022-07-18 14:43:52 +01001#ifndef GEN_UTILS_H
2#define GEN_UTILS_H
3
4#include <stdlib.h>
5#include "../edk/BaseTypes.h"
Lawrence Tangaacf0e22022-07-20 13:28:52 +01006#include "../common-utils.h"
Lawrence Tang02c801a2022-07-18 14:43:52 +01007
John Chungf8fc7052024-05-03 20:05:29 +08008#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 Tangde9707f2022-07-19 10:54:31 +010014
John Chungf8fc7052024-05-03 20:05:29 +080015size_t generate_random_section(void **location, size_t size);
16UINT8 *generate_random_bytes(size_t size);
Lawrence Tang02c801a2022-07-18 14:43:52 +010017void init_random();
John Chungf8fc7052024-05-03 20:05:29 +080018void create_valid_error_section(UINT8 *start);
Lawrence Tangaacf0e22022-07-20 13:28:52 +010019UINT8 int_to_bcd(int value);
Lawrence Tang02c801a2022-07-18 14:43:52 +010020
John Chungf8fc7052024-05-03 20:05:29 +080021#endif