coreboot/util/cbmem
Jakub Czapiga c24a12db86 util/cbmem: Consolidate CBMEM and coreboot table access
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>
2025-06-05 13:44:27 +00:00
..
.gitignore .gitignore: Ignore .test/.dependencies globally 2020-10-31 18:21:36 +00:00
cbmem.c util/cbmem: Consolidate CBMEM and coreboot table access 2025-06-05 13:44:27 +00:00
description.md util/cbmem: Improve utility description 2019-03-01 10:00:46 +00:00
Makefile util/cbmem: Use commonlib ipchksum() algorithm 2024-02-02 22:49:23 +00:00