Provide common functions for accessing CBMEM and coreboot table entries instead of mapping them manually in each function. New functions return a copy of requested region as a heap-allocated buffer thus avoiding a need for aligned memory access. Remove global variables wherever possible to make code easier to read and to isolate responsibilities of functions. Use CBMEM entries instead of coreboot table records directly, but provide fallback for old systems in case the correcponding CBMEM entry does not exist. BUG=b:391874512 TEST=cbmem -l; cbmem -x; cbmem -r 434f4e53; cbmem -t; cbmem -a 1200 Change-Id: I89b371e27ab3840cfbbd44880c32383b77f65e5c Signed-off-by: Jakub Czapiga <czapiga@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/87417 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| cbmem.c | ||
| description.md | ||
| Makefile | ||