diff options
-rw-r--r-- | payloads/libpayload/arch/arm64/sysinfo.c | 7 | ||||
-rw-r--r-- | payloads/libpayload/include/libpayload.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/payloads/libpayload/arch/arm64/sysinfo.c b/payloads/libpayload/arch/arm64/sysinfo.c index 6d204e2dc7..28d3c4be55 100644 --- a/payloads/libpayload/arch/arm64/sysinfo.c +++ b/payloads/libpayload/arch/arm64/sysinfo.c @@ -62,3 +62,10 @@ int lib_get_sysinfo(void) return ret; } + +void lib_sysinfo_get_memranges(struct memrange **ranges, + uint64_t *nranges) +{ + *ranges = &lib_sysinfo.memrange[0]; + *nranges = lib_sysinfo.n_memranges; +} diff --git a/payloads/libpayload/include/libpayload.h b/payloads/libpayload/include/libpayload.h index 3d8417c42a..0be0d8e230 100644 --- a/payloads/libpayload/include/libpayload.h +++ b/payloads/libpayload/include/libpayload.h @@ -422,6 +422,8 @@ int get_multiboot_info(struct sysinfo_t *info); void *get_cb_header_ptr(void); int lib_get_sysinfo(void); +void lib_sysinfo_get_memranges(struct memrange **ranges, + uint64_t *nranges); /* Timer functions. */ /* Defined by each architecture. */ |