From 6a452eff90411176f9f2cad0ca0c665a31c032ee Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Tue, 19 May 2015 16:25:20 -0500 Subject: prog_loading: add region_device representing memory One can remove the struct buffer_area and use the region_device embedded in the struct prog to represent the in-memory loaded program. Do this by introducing a addrspace_32bit mem_region_device that can have region_device operations performed on it. The addrspace_32bit name was chosen to make it explicit that 32-bits of address space is supported at the max. Change-Id: Ifffa0ef301141de940e54581b5a7b6cd81311ead Signed-off-by: Aaron Durbin Reviewed-on: http://review.coreboot.org/10261 Reviewed-by: Patrick Georgi Tested-by: build bot (Jenkins) --- src/lib/prog_loaders.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/lib') diff --git a/src/lib/prog_loaders.c b/src/lib/prog_loaders.c index 881cd99794..77999945d1 100644 --- a/src/lib/prog_loaders.c +++ b/src/lib/prog_loaders.c @@ -35,6 +35,9 @@ #include #include +/* Only can represent up to 1 byte less than size_t. */ +const struct mem_region_device addrspace_32bit = MEM_REGION_DEV_INIT(0, ~0UL); + #define DEFAULT_CBFS_LOADER_PRESENT \ (!ENV_VERSTAGE || (ENV_VERSTAGE && !CONFIG_RETURN_FROM_VERSTAGE)) -- cgit v1.2.3