diff options
author | Keir Fraser <keir@xen.org> | 2011-08-09 11:33:40 +0100 |
---|---|---|
committer | Keir Fraser <keir@xen.org> | 2011-08-09 11:33:40 +0100 |
commit | ab6e985fae87d9d84cc8bd072043b8674d8e3a70 (patch) | |
tree | 3495674fa9f55b3345fad89e120b9773b127a58c /tools/firmware/hvmloader/hvmloader.c | |
parent | 2346303a425b8adcea86397e49739c8ab206903d (diff) | |
download | xen-ab6e985fae87d9d84cc8bd072043b8674d8e3a70.tar.gz xen-ab6e985fae87d9d84cc8bd072043b8674d8e3a70.tar.bz2 xen-ab6e985fae87d9d84cc8bd072043b8674d8e3a70.zip |
hvmloader: Move init_vm86_tss() back into common code.
It is not BIOS specific.
Signed-off-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'tools/firmware/hvmloader/hvmloader.c')
-rw-r--r-- | tools/firmware/hvmloader/hvmloader.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/tools/firmware/hvmloader/hvmloader.c b/tools/firmware/hvmloader/hvmloader.c index 4129670fc7..f5817b31ff 100644 --- a/tools/firmware/hvmloader/hvmloader.c +++ b/tools/firmware/hvmloader/hvmloader.c @@ -336,6 +336,25 @@ static void cmos_write_memory_size(void) 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 @@ int main(void) hypercall_hvm_op(HVMOP_set_param, &p); } - if ( bios->vm86_setup ) - bios->vm86_setup(); + init_vm86_tss(); cmos_write_memory_size(); |