[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] hvmloader: Move init_vm86_tss() back into common code.



# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1312886020 -3600
# Node ID ea18090ab6e3cb3c69d232ec0865589688db3f81
# Parent  f5176c177b9940b7be756ddc61563bc5878e696d
hvmloader: Move init_vm86_tss() back into common code.

It is not BIOS specific.

Signed-off-by: Keir Fraser <keir@xxxxxxx>
---


diff -r f5176c177b99 -r ea18090ab6e3 tools/firmware/hvmloader/config.h
--- a/tools/firmware/hvmloader/config.h Tue Aug 09 08:53:40 2011 +0100
+++ b/tools/firmware/hvmloader/config.h Tue Aug 09 11:33:40 2011 +0100
@@ -25,7 +25,6 @@
     void (*bios_info_setup)(void);
     void (*bios_info_finish)(void);
 
-    void (*vm86_setup)(void);
     void (*e820_setup)(void);
 
     void (*acpi_build_tables)(void);
diff -r f5176c177b99 -r ea18090ab6e3 tools/firmware/hvmloader/hvmloader.c
--- a/tools/firmware/hvmloader/hvmloader.c      Tue Aug 09 08:53:40 2011 +0100
+++ b/tools/firmware/hvmloader/hvmloader.c      Tue Aug 09 11:33:40 2011 +0100
@@ -336,6 +336,25 @@
     cmos_outb(0x35, (uint8_t)( alt_mem >> 8));
 }
 
+/*
+ * Set up an empty TSS area for virtual 8086 mode to use. 
+ * The only important thing is that it musn't have any bits set 
+ * in the interrupt redirection bitmap, so all zeros will do.
+ */
+static void init_vm86_tss(void)
+{
+    void *tss;
+    struct xen_hvm_param p;
+
+    tss = mem_alloc(128, 128);
+    memset(tss, 0, 128);
+    p.domid = DOMID_SELF;
+    p.index = HVM_PARAM_VM86_TSS;
+    p.value = virt_to_phys(tss);
+    hypercall_hvm_op(HVMOP_set_param, &p);
+    printf("vm86 TSS at %08lx\n", virt_to_phys(tss));
+}
+
 static void apic_setup(void)
 {
     /* Set the IOAPIC ID to the static value used in the MP/ACPI tables. */
@@ -506,8 +525,7 @@
         hypercall_hvm_op(HVMOP_set_param, &p);
     }
 
-    if ( bios->vm86_setup )
-        bios->vm86_setup();
+    init_vm86_tss();
 
     cmos_write_memory_size();
 
diff -r f5176c177b99 -r ea18090ab6e3 tools/firmware/hvmloader/rombios.c
--- a/tools/firmware/hvmloader/rombios.c        Tue Aug 09 08:53:40 2011 +0100
+++ b/tools/firmware/hvmloader/rombios.c        Tue Aug 09 11:33:40 2011 +0100
@@ -40,25 +40,6 @@
 #define ROMBIOS_MAXOFFSET      0x0000FFFF
 #define ROMBIOS_END            (ROMBIOS_BEGIN + ROMBIOS_SIZE)
 
-/*
- * Set up an empty TSS area for virtual 8086 mode to use. 
- * The only important thing is that it musn't have any bits set 
- * in the interrupt redirection bitmap, so all zeros will do.
- */
-static void rombios_init_vm86_tss(void)
-{
-    void *tss;
-    struct xen_hvm_param p;
-
-    tss = mem_alloc(128, 128);
-    memset(tss, 0, 128);
-    p.domid = DOMID_SELF;
-    p.index = HVM_PARAM_VM86_TSS;
-    p.value = virt_to_phys(tss);
-    hypercall_hvm_op(HVMOP_set_param, &p);
-    printf("vm86 TSS at %08lx\n", virt_to_phys(tss));
-}
-
 static void rombios_setup_e820(void)
 {
     /*
@@ -178,7 +159,6 @@
     .bios_info_setup = rombios_setup_bios_info,
     .bios_info_finish = NULL,
 
-    .vm86_setup = rombios_init_vm86_tss,
     .e820_setup = rombios_setup_e820,
 
     .acpi_build_tables = rombios_acpi_build_tables,
diff -r f5176c177b99 -r ea18090ab6e3 tools/firmware/hvmloader/seabios.c
--- a/tools/firmware/hvmloader/seabios.c        Tue Aug 09 08:53:40 2011 +0100
+++ b/tools/firmware/hvmloader/seabios.c        Tue Aug 09 11:33:40 2011 +0100
@@ -143,7 +143,6 @@
     .bios_info_setup = seabios_setup_bios_info,
     .bios_info_finish = seabios_finish_bios_info,
 
-    .vm86_setup = NULL,
     .e820_setup = seabios_setup_e820,
 
     .acpi_build_tables = seabios_acpi_build_tables,

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.