/** * Functions for generating pseudo-random CPER ARM processor sections. * * Author: Lawrence.Tang@arm.com **/ #include #include #include "../../edk/BaseTypes.h" #include "../gen-utils.h" #include "gen-sections.h" #define ARM_ERROR_INFO_SIZE 32 void* generate_arm_error_info(); size_t generate_arm_context_info(void** location); //Generates a single pseudo-random ARM processor section, saving the resulting address to the given //location. Returns the size of the newly created section. size_t generate_section_arm(void** location) { //Set up for generation of error/context structures. UINT16 error_structure_num = rand() % 4 + 1; //Must be at least 1. UINT16 context_structure_num = rand() % 3; void* error_structures[error_structure_num]; void* context_structures[context_structure_num]; size_t context_structure_lengths[context_structure_num]; //Generate the structures. for (int i=0; i