[OpenBIOS] [commit] r1333 - trunk/openbios-devel/arch/sparc32

repository service svn at openbios.org
Wed Mar 11 23:58:18 CET 2015


Author: mcayland
Date: Wed Mar 11 23:58:18 2015
New Revision: 1333
URL: http://tracker.coreboot.org/trac/openbios/changeset/1333

Log:
SPARC32: mark pre-loaded kernel image memory as being in use

This is to ensure that a client OS reading the memory lists from the PROM
won't consider its own memory space available.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>

Modified:
   trunk/openbios-devel/arch/sparc32/openbios.c

Modified: trunk/openbios-devel/arch/sparc32/openbios.c
==============================================================================
--- trunk/openbios-devel/arch/sparc32/openbios.c	Wed Mar 11 23:58:15 2015	(r1332)
+++ trunk/openbios-devel/arch/sparc32/openbios.c	Wed Mar 11 23:58:18 2015	(r1333)
@@ -865,9 +865,14 @@
         romvec = init_openprom();
 
 	kernel_size = fw_cfg_read_i32(FW_CFG_KERNEL_SIZE);
-	if (kernel_size)
+	if (kernel_size) {
 		kernel_image = fw_cfg_read_i32(FW_CFG_KERNEL_ADDR);
 
+		/* Mark the kernel memory as in use */
+		ofmem_claim_phys(PAGE_ALIGN(kernel_image), PAGE_ALIGN(kernel_size), 0);
+		ofmem_claim_virt(PAGE_ALIGN(kernel_image), PAGE_ALIGN(kernel_size), 0);
+	}
+
         kernel_cmdline = (const char *) fw_cfg_read_i32(FW_CFG_KERNEL_CMDLINE);
         if (kernel_cmdline) {
             cmdline = strdup(kernel_cmdline);



More information about the OpenBIOS mailing list