coreboot/src/include/cpu/x86
Nico Huber af0d4bce65 region: Introduce region_create() functions
We introduce two new functions to create region objects. They allow us
to check for integer overflows (region_create_untrusted()) or assert
their absence (region_create()).

This fixes potential overflows in region_overlap() checks in SMI
handlers, where we would wrongfully report MMIO as *not* overlapping
SMRAM.

Also, two cases of strtol() in parse_region() (cbfstool),  where the
results were implicitly converted to `size_t`, are replaced with the
unsigned strtoul().

FIT payload support is left out, as it doesn't use the region API
(only the struct).

Change-Id: I4ae3e6274c981c9ab4fb1263c2a72fa68ef1c32b
Ticket: https://ticket.coreboot.org/issues/522
Found-by: Vadim Zaliva <lord@digamma.ai>
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79905
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-08-11 17:07:32 +00:00
..
bist.h
cache.h include/cpu/x86: Simplify en/dis cache functions 2023-06-02 01:51:09 +00:00
cr.h
gdt.h
lapic.h cpu/x86/lapic: Always have LAPIC enabled 2024-08-11 17:06:41 +00:00
lapic_def.h
legacy_save_state.h
mp.h drivers/ipmi to lib: Fix misspellings & capitalization issues 2023-12-13 10:42:30 +00:00
msr.h
msr_access.h
mtrr.h cpu/x86: Reduce scope of MTRR functions used locally 2023-07-03 12:59:23 +00:00
name.h
pae.h cpu/x86/pae/pgtbl.c: extract reusable code from memset_pae() 2024-05-29 13:04:30 +00:00
post_code.h
save_state.h
smi_deprecated.h
smm.h region: Introduce region_create() functions 2024-08-11 17:07:32 +00:00
topology.h cpu/x86/topology: Add node ID parser 2024-04-03 07:35:15 +00:00
tsc.h