WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 05 of 11] tools: hvmloader: split scratch and hyperca

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 05 of 11] tools: hvmloader: split scratch and hypercall addressing from ROMBIOS low HEAP
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Tue, 05 Apr 2011 16:46:30 +0100
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Tue, 05 Apr 2011 08:53:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1302018385@xxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1302018385@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.4
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1302013752 -3600
# Node ID 5df591624c601fbe954c57d9884d27d6c4e57f6e
# Parent  825d013970ad7cb68b0aa6749cc501e70e14a871
tools: hvmloader: split scratch and hypercall addressing from ROMBIOS low HEAP

Although happen to live at the same physical address their lifespans
do not overlap. The scratch and hypercall spaces are used only within
hvmloader and the same area is reused as a heap within ROMBIOS. But
each is free to make its own decisions about where to place things.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r 825d013970ad -r 5df591624c60 tools/firmware/hvmloader/config.h
--- a/tools/firmware/hvmloader/config.h Tue Apr 05 15:29:11 2011 +0100
+++ b/tools/firmware/hvmloader/config.h Tue Apr 05 15:29:12 2011 +0100
@@ -28,6 +28,9 @@ extern unsigned long pci_mem_start, pci_
 #define ROMBIOS_MAXOFFSET      0x0000FFFF
 #define ROMBIOS_END            (ROMBIOS_BEGIN + ROMBIOS_SIZE)
 
+#define SCRATCH_PHYSICAL_ADDRESS      0x00010000
+#define HYPERCALL_PHYSICAL_ADDRESS    0x00080000
+
 #include "../rombios/config.h"
 #include "../rombios/e820.h"
 
diff -r 825d013970ad -r 5df591624c60 tools/firmware/rombios/32bit/pmm.c
--- a/tools/firmware/rombios/32bit/pmm.c        Tue Apr 05 15:29:11 2011 +0100
+++ b/tools/firmware/rombios/32bit/pmm.c        Tue Apr 05 15:29:12 2011 +0100
@@ -147,7 +147,7 @@ typedef struct heap {
  *
  * - conventional memroy (below 1MB)
  *    In HVM, the area is fixed. 0x00010000-0x0007FFFF
- *    (from SCRATCH_PHYSICAL_ADDRESS to HYPERCALL_PHYSICAL_ADDRESS)
+ *    (LOWHEAP_SIZE bytes from LOWHEAP_PHYSICAL_ADDRESS)
  *
  * - extended memory (start at 1MB, below 4GB)
  *    In HVM, the area starts at memory address 0x00100000.
@@ -283,8 +283,9 @@ pmm_initalize(void)
     }
 
     /* convectional memory: RAM below 1MB, 0x10000-0x7FFFF */
-    pmm_init_heap(&pmm_data.heap, SCRATCH_PHYSICAL_ADDRESS,
-                  HYPERCALL_PHYSICAL_ADDRESS);
+    pmm_init_heap(&pmm_data.heap,
+                 LOWHEAP_PHYSICAL_ADDRESS,
+                 LOWHEAP_PHYSICAL_ADDRESS+LOWHEAP_SIZE);
 }
 
 static uint32_t
diff -r 825d013970ad -r 5df591624c60 tools/firmware/rombios/config.h
--- a/tools/firmware/rombios/config.h   Tue Apr 05 15:29:11 2011 +0100
+++ b/tools/firmware/rombios/config.h   Tue Apr 05 15:29:12 2011 +0100
@@ -2,8 +2,9 @@
 #define _ROMBIOS_CONFIG_H
 
 /* Memory map. */
-#define SCRATCH_PHYSICAL_ADDRESS      0x00010000
-#define HYPERCALL_PHYSICAL_ADDRESS    0x00080000
+#define LOWHEAP_PHYSICAL_ADDRESS      0x00010000
+#define LOWHEAP_SIZE                  0x00070000
+
 #define VGABIOS_PHYSICAL_ADDRESS      0x000C0000
 #define OPTIONROM_PHYSICAL_ADDRESS    0x000C8000
 #define OPTIONROM_PHYSICAL_END        0x000EA000

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>