]> xenbits.xensource.com Git - seabios.git/commitdiff
Update EFI_COMPATIBILITY16_TABLE to match 0.98 spec update
authorDavid Woodhouse <dwmw2@infradead.org>
Mon, 2 Jun 2014 13:00:14 +0000 (14:00 +0100)
committerKevin O'Connor <kevin@koconnor.net>
Mon, 2 Jun 2014 14:47:28 +0000 (10:47 -0400)
Unless CONFIG_MALLOC_UPPERMEMORY is turned off, we expect to use the
space between the top of option ROMs and the bottom of our own BIOS code
as a stack. OVMF was previously marking the whole region from 0xC0000 to
0xFFFFF read-only before invoking our Legacy16Boot method. Read-only
stack considered harmful.

Version 0.98 of the CSM spec adds the UmaAddress and UmaSize fields which
allow the CSM to specify a memory region that needs to be writeable, so
provide that information.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
src/fw/csm.c
src/std/LegacyBios.h

index a44ed267c4208ec5e8e3630b271d8772e3154c03..7cdb398f20e3de4ecf59fee2c3e78c46a91f5dc7 100644 (file)
@@ -46,8 +46,14 @@ extern void __csm_return(struct bregs *regs) __noreturn;
 static void
 csm_return(struct bregs *regs)
 {
+    u32 rommax = rom_get_max();
+    extern u8 final_readonly_start[];
+
     dprintf(3, "handle_csm returning AX=%04x\n", regs->ax);
 
+    csm_compat_table.UmaAddress = rommax;
+    csm_compat_table.UmaSize = (u32)final_readonly_start - rommax;
+
     PICMask = pic_irqmask_read();
     __csm_return(regs);
 }
index cf0c3c570935ccbb32b85919578771ff97239910..5170c37865fc573d54a06c8b1140a353721daec7 100644 (file)
@@ -228,6 +228,26 @@ typedef struct {
   /// Maximum PCI bus number assigned.
   ///
   UINT8                             LastPciBus;
+
+  ///
+  /// Start address of UMB RAM
+  ///
+  UINT32                            UmaAddress;
+
+  ///
+  /// Size of UMB RAM
+  ///
+  UINT32                            UmaSize;
+
+  ///
+  /// Start address of persistent allocation in high (>1MiB) memory
+  ///
+  UINT32                            HiPermanentMemoryAddress;
+
+  ///
+  /// Size of persistent allocation in high (>1MiB) memory
+  ///
+  UINT32                            HiPermanentMemorySize;
 } EFI_COMPATIBILITY16_TABLE;
 
 ///