[OpenBIOS] [PATCH 5/6] ppc: Claim memory used by OpenBIOS
Andreas Färber
andreas.faerber at web.de
Mon Oct 11 00:54:27 CEST 2010
OpenBIOS kept getting overwritten in RAM by clients such as Haiku.
Make sure memory used by OpenBIOS cannot accidentally be claimed
by someone else.
This also sets up the "available" property as expected.
Signed-off-by: Andreas Färber <andreas.faerber at web.de>
---
arch/ppc/qemu/ofmem.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/arch/ppc/qemu/ofmem.c b/arch/ppc/qemu/ofmem.c
index 711ed01..67fc1fe 100644
--- a/arch/ppc/qemu/ofmem.c
+++ b/arch/ppc/qemu/ofmem.c
@@ -428,6 +428,10 @@ ofmem_init( void )
{
ofmem_t *ofmem = ofmem_arch_get_private();
+ ofmem_claim_phys(0, get_ram_bottom(), 0);
+ ofmem_claim_virt(0, get_ram_bottom(), 0);
ofmem_map( 0, 0, get_ram_bottom(), 0 );
+ ofmem_claim_phys(get_ram_top(), ofmem->ramsize - get_ram_top(), 0);
+ ofmem_claim_virt(get_ram_top(), ofmem->ramsize - get_ram_top(), 0);
ofmem_map( get_ram_top(), get_ram_top(), ofmem->ramsize - get_ram_top(), 0);
}
--
1.7.3
More information about the OpenBIOS
mailing list