aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-07-29 13:11:29 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-07-29 13:11:29 +0100
commit8d375aa1744b012e9139a9fe3d560c61bb1fe437 (patch)
treece3600ab634fd5cde42e4f40a609f9c5b9f58b53
parent5c23498926626385ea51a774ea1a5d0e5c35ab77 (diff)
downloadxen-8d375aa1744b012e9139a9fe3d560c61bb1fe437.tar.gz
xen-8d375aa1744b012e9139a9fe3d560c61bb1fe437.tar.bz2
xen-8d375aa1744b012e9139a9fe3d560c61bb1fe437.zip
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@citrix.com>
-rw-r--r--tools/firmware/rombios/rombios.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/tools/firmware/rombios/rombios.c b/tools/firmware/rombios/rombios.c
index 97523dacab..cb2da617c7 100644
--- a/tools/firmware/rombios/rombios.c
+++ b/tools/firmware/rombios/rombios.c
@@ -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
@@ -10171,10 +10181,6 @@ post_default_ints:
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.
int #0x18