]> xenbits.xensource.com Git - xen.git/commitdiff
hvmloader: Fix _start-relative calculation of hypercall page address.
authorKeir Fraser <keir@xen.org>
Mon, 18 Apr 2011 17:08:47 +0000 (18:08 +0100)
committerKeir Fraser <keir@xen.org>
Mon, 18 Apr 2011 17:08:47 +0000 (18:08 +0100)
We got away with it because _start-HYPERCALL_PHYSICAL_ADDRESS happens
to equal HYPERCALL_PHYSICAL_ADDRESS.

Signed-off-by: Keir Fraser <keir@xen.org>
tools/firmware/hvmloader/config.h
tools/firmware/hvmloader/hypercall.h

index 510c0170751c9422a170d762e52339b141b11f99..296d500af034c13a131e6cbbf52105ab35e0003c 100644 (file)
@@ -63,10 +63,11 @@ extern unsigned long pci_mem_start, pci_mem_end;
 #define RESERVED_MEMBASE    0xfc000000
 #define RESERVED_MEMSIZE    0x01000000
 
+/* Memory map. */
 #define SCRATCH_PHYSICAL_ADDRESS      0x00010000
 #define HYPERCALL_PHYSICAL_ADDRESS    0x00080000
-
 #define VGABIOS_PHYSICAL_ADDRESS      0x000C0000
+#define HVMLOADER_PHYSICAL_ADDRESS    0x00100000
 
 #endif /* __HVMLOADER_CONFIG_H__ */
 
index 2df7247359986dd22e10923e37c44a762ecbf14e..2de0d828e1a5191fcbb760acc6c820fda19da126 100644 (file)
@@ -39,7 +39,8 @@
  * NB. Hypercall address needs to be relative to a linkage symbol for
  * some version of ld to relocate the relative calls properly.
  */
-#define hypercall_pa "_start - " STR(HYPERCALL_PHYSICAL_ADDRESS)
+#define hypercall_pa "_start - " STR(HVMLOADER_PHYSICAL_ADDRESS) \
+                           " + " STR(HYPERCALL_PHYSICAL_ADDRESS)
 
 #define _hypercall0(type, name)                                                \
 ({                                                                     \