[Skiboot] [PATCH 2/7 v3] core: Introduce REGION_HW_RESERVED
Jeremy Kerr
jk at ozlabs.org
Tue May 19 19:05:38 AEST 2015
This change allows the mem_region code to distinguish reserved memory
that was allocated before skiboot init, by introducing a new
mem_region_type member.
When we extract reserved ranges from the device tree, we mark them with
this new type.
Signed-off-by: Jeremy Kerr <jk at ozlabs.org>
---
core/mem_region.c | 2 +-
include/mem_region.h | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/core/mem_region.c b/core/mem_region.c
index 4f73776..b3f7dc4 100644
--- a/core/mem_region.c
+++ b/core/mem_region.c
@@ -878,7 +878,7 @@ void mem_region_init(void)
region = new_region(name,
dt_get_number(range, 2),
dt_get_number(range + 1, 2),
- NULL, REGION_RESERVED);
+ NULL, REGION_HW_RESERVED);
list_add(®ions, ®ion->list);
}
} else if (names || ranges) {
diff --git a/include/mem_region.h b/include/mem_region.h
index fefd6ba..1f25c9c 100644
--- a/include/mem_region.h
+++ b/include/mem_region.h
@@ -28,7 +28,10 @@ enum mem_region_type {
/* ranges used explicitly for skiboot, but not allocatable. eg .text */
REGION_SKIBOOT_FIRMWARE,
- /* ranges reserved, possibly before skiboot init, eg HW framebuffer */
+ /* ranges reserved before skiboot init, eg HBRT memory */
+ REGION_HW_RESERVED,
+
+ /* ranges reserved, eg HW framebuffer */
REGION_RESERVED,
/* ranges available for the OS, created by mem_region_release_unused */
More information about the Skiboot
mailing list