summaryrefslogtreecommitdiff
path: root/pc-bios/optionrom/optionrom.h
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2011-01-31 15:11:01 +0200
committerAurelien Jarno <aurelien@aurel32.net>2011-03-22 07:00:58 +0100
commit75b9f69057b166876a0c33d5fd86aa59ccfd3812 (patch)
tree17748f2b93078e1825bbd08f98dba4c638d5e7ea /pc-bios/optionrom/optionrom.h
parent31b7c261a207e1e670d737ec78a87dd031bd8f73 (diff)
downloadqemu-75b9f69057b166876a0c33d5fd86aa59ccfd3812.tar.gz
fix linuxboot.bin and multiboot.bin to not hijack int19
Currently linuxboot.bin and multiboot.bin option roms override int19 vector to intercept boot process. No sane option rom should do that. Provide bev entry instead that will be called by BIOS if option rom is selected for booting. Signed-off-by: Gleb Natapov <gleb@redhat.com> Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'pc-bios/optionrom/optionrom.h')
-rw-r--r--pc-bios/optionrom/optionrom.h40
1 files changed, 25 insertions, 15 deletions
diff --git a/pc-bios/optionrom/optionrom.h b/pc-bios/optionrom/optionrom.h
index fbdd48a021..aa783deed1 100644
--- a/pc-bios/optionrom/optionrom.h
+++ b/pc-bios/optionrom/optionrom.h
@@ -97,22 +97,28 @@
#define BOOT_ROM_START \
OPTION_ROM_START \
- push %eax; \
- push %ds; \
- \
- /* setup ds so we can access the IVT */ \
- xor %ax, %ax; \
- mov %ax, %ds; \
- \
- /* install our int 19 handler */ \
- movw $int19_handler, (0x19*4); \
- mov %cs, (0x19*4+2); \
- \
- pop %ds; \
- pop %eax; \
lret; \
- \
- int19_handler:; \
+ .org 0x18; \
+ .short 0; \
+ .short _pnph; \
+ _pnph: \
+ .ascii "$PnP"; \
+ .byte 0x01; \
+ .byte ( _pnph_len / 16 ); \
+ .short 0x0000; \
+ .byte 0x00; \
+ .byte 0x00; \
+ .long 0x00000000; \
+ .short _manufacturer; \
+ .short _product; \
+ .long 0x00000000; \
+ .short 0x0000; \
+ .short 0x0000; \
+ .short _bev; \
+ .short 0x0000; \
+ .short 0x0000; \
+ .equ _pnph_len, . - _pnph; \
+ _bev:; \
/* DS = CS */ \
movw %cs, %ax; \
movw %ax, %ds;
@@ -122,5 +128,9 @@
_end:
#define BOOT_ROM_END \
+ _manufacturer:; \
+ .asciz "QEMU"; \
+ _product:; \
+ .asciz BOOT_ROM_PRODUCT; \
OPTION_ROM_END