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-changelog

[Xen-changelog] [xen-unstable] rombios: Narrow window where BIOS area is

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] rombios: Narrow window where BIOS area is writable, and ensure it
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 29 Jul 2008 11:30:14 -0700
Delivery-date: Tue, 29 Jul 2008 11:30:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1217333489 -3600
# Node ID eb10a50752bc81ec0f5d16fc0ef958d20ad6a54b
# Parent  9454fae58cb83ad678492879e82ecef2eab08705
rombios: Narrow window where BIOS area is writable, and ensure it
really *is* writable in that region. This is almost enough to get S3
working again (read-only firmware-waking-vector is still a problem).

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/firmware/rombios/rombios.c |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diff -r 9454fae58cb8 -r eb10a50752bc tools/firmware/rombios/rombios.c
--- a/tools/firmware/rombios/rombios.c  Tue Jul 29 10:42:30 2008 +0100
+++ b/tools/firmware/rombios/rombios.c  Tue Jul 29 13:11:29 2008 +0100
@@ -1467,17 +1467,18 @@ copy_e820_table()
 }
 
 void
-disable_rom_write_access()
+set_rom_write_access(action)
+  Bit16u action;
 {
     Bit16u off = (Bit16u)&((struct bios_info *)0)->xen_pfiob;
 ASM_START
-    mov si,.disable_rom_write_access.off[bp]
+    mov si,.set_rom_write_access.off[bp]
     push ds
     mov ax,#(ACPI_PHYSICAL_ADDRESS >> 4)
     mov ds,ax
     mov dx,[si]
     pop ds
-    mov ax,#PFFLAG_ROM_LOCK
+    mov ax,.set_rom_write_access.action[bp]
     out dx,al
 ASM_END
 }
@@ -9925,6 +9926,12 @@ normal_post:
 
   call _log_bios_start
 
+#ifdef HVMASSIST
+  push #0
+  call _set_rom_write_access
+  add sp,#2
+#endif
+
   call _clobber_entry_point
 
   ;; set all interrupts to default handler
@@ -10121,6 +10128,9 @@ post_default_ints:
 #ifdef HVMASSIST
   call _copy_e820_table
   call smbios_init
+  push #PFFLAG_ROM_LOCK
+  call _set_rom_write_access
+  add sp,#2
 #endif
 
   call _init_boot_vectors
@@ -10170,10 +10180,6 @@ post_default_ints:
 #if BX_TCGBIOS
   call tcpa_post_part2
 #endif
-
-#ifdef HVMASSIST
-  call _disable_rom_write_access
-#endif 
 
   ;; Start the boot sequence.   See the comments in int19_relocated 
   ;; for why we use INT 18h instead of INT 19h here.

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] rombios: Narrow window where BIOS area is writable, and ensure it, Xen patchbot-unstable <=