Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/63602 )
Change subject: [WIP]cpu/x86/smm: Use struct region to check overlapping sections ......................................................................
Patch Set 1:
(1 comment)
File src/cpu/x86/smm/smm_module_loader.c:
https://review.coreboot.org/c/coreboot/+/63602/comment/92c9720d_a5540ea9 PS1, Line 364: static struct region_list *list; : : static int check_region(const struct region smram, : const struct region new_region, : const char *region_name) : { : if (!region_is_subregion(&smram, &new_region)) { : printk(BIOS_ERR, "%s not in SMM\n", region_name); : return 1; : } : : struct region_list *test; : for (test = list; test != NULL; test = test->next) { : if (region_overlap(&test->region, &new_region)) { : printk(BIOS_ERR, "%s overlaps with a previous region\n", region_name); : return 1; : } : } : /* All is fine. Add the new region to the linked list */ : struct region_list *new_entry = malloc(sizeof(struct region_list)); : if (new_entry == NULL) { : printk(BIOS_ERR, "Out of memory\n"); : return 1; : } : : test->next = new_entry; : new_entry->region = new_region; : new_entry->next = NULL; : printk(BIOS_DEBUG, "%-12s [0x%lx-0x%lx]\n", region_name, region_offset(&new_region), : region_end(&new_region)); : return 0; really messing up linked lists here...