coreboot/payloads/libpayload/libc
Jakub Czapiga c109fc92ff libpayload: Add API to get physical memory size
sysinfo contains both CBMEM_ID_MEMINFO and CBMEM_ID_MEM_CHIP.
This new function allows to easily retrieve the amount of memory the
system has based on the mentioned CBMEM entries structures.

BUG=b:450374306
TEST=Checked on Google/Brya/Omnigul (x86) - MEMINFO
TEST=Checked on Google/Rauru/Navi (ARM64) - MEM_CHIP

Change-Id: Iaf69c54dfb3d2eaffbccacee8bee3be425b78a3f
Signed-off-by: Jakub Czapiga <czapiga@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90430
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-12-11 19:45:26 +00:00
..
args.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
console.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
coreboot.c libpayload: Add CBMEM_ID_MEMINFO to sysinfo 2025-11-22 18:55:00 +00:00
ctype.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
fmap.c libpayload: Remove legacy CBFS API 2024-02-22 21:18:39 +00:00
fpmath.c libpayload: Add simple 32.32 fixed-point math API 2020-07-09 00:32:11 +00:00
getopt_long.c commonlib: Change GCD function to always use 64 bits 2024-02-08 13:13:58 +00:00
hexdump.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
lib.c libpayload: Fix strsep() edge cases 2025-08-13 17:44:31 +00:00
libgcc.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
lp_vboot.c libpayload: Add vboot and reboot utility functions 2023-09-18 15:42:31 +00:00
Makefile.mk libpayload: Unify selfboot() implementations 2025-02-11 20:59:57 +00:00
malloc.c libpayload: Add dma_allocator_range() 2023-11-21 13:50:53 +00:00
memory.c libpayload: Use Kconfig for architecture memcpy, not weak symbols 2025-05-22 19:27:24 +00:00
printf.c libpayload: Fix printf edge cases for precision 2025-11-04 23:14:13 +00:00
qsort.c libpayload: Fix whitespace errors 2013-06-27 14:46:43 +02:00
rand.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
readline.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
selfboot.c libpayload: Unify selfboot() implementations 2025-02-11 20:59:57 +00:00
string.c libpayload: Fix strsep() edge cases 2025-08-13 17:44:31 +00:00
strlcpy.c libpayload: Implement strlcpy 2011-07-07 22:29:35 +02:00
sysinfo.c libpayload: Add API to get physical memory size 2025-12-11 19:45:26 +00:00
time.c libpayload: Use Kconfig instead of weak symbol for arch_ndelay() 2025-05-22 19:27:30 +00:00