diff options
author | Michael Brown | 2006-05-14 16:13:55 +0200 |
---|---|---|
committer | Michael Brown | 2006-05-14 16:13:55 +0200 |
commit | 6e42cb95bd7100f6d8b0351b24d6a7887390261e (patch) | |
tree | d79f768507a13872dcb24adc298ce9faf38c2223 | |
parent | Add int13_boot(), to allow booting from INT 13 emulated drives. (diff) | |
download | ipxe-6e42cb95bd7100f6d8b0351b24d6a7887390261e.tar.gz ipxe-6e42cb95bd7100f6d8b0351b24d6a7887390261e.tar.xz ipxe-6e42cb95bd7100f6d8b0351b24d6a7887390261e.zip |
Also capture INT 19 as a failure path, to allow for boot sectors that
don't conform to BBS (e.g. the one created by mkdosfs).
-rw-r--r-- | src/arch/i386/interface/pcbios/int13.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/arch/i386/interface/pcbios/int13.c b/src/arch/i386/interface/pcbios/int13.c index 229bb3ba..1adbef1b 100644 --- a/src/arch/i386/interface/pcbios/int13.c +++ b/src/arch/i386/interface/pcbios/int13.c @@ -51,7 +51,14 @@ extern void int13_wrapper ( void ); */ static struct segoff int18_vector; -/** Restart point for INT 18 */ +/** Vector for storing original INT 19 handler + * + * We do not chain to this vector, so there is no need to place it in + * .text16. + */ +static struct segoff int19_vector; + +/** Restart point for INT 18 or 19 */ extern void int13_exec_fail ( void ); /** List of registered emulated drives */ @@ -531,9 +538,11 @@ int int13_boot ( unsigned int drive ) { return -ENOEXEC; } - /* Hook INT 18 to capture failure path */ + /* Hook INTs 18 and 19 to capture failure paths */ hook_bios_interrupt ( 0x18, ( unsigned int ) int13_exec_fail, &int18_vector ); + hook_bios_interrupt ( 0x19, ( unsigned int ) int13_exec_fail, + &int19_vector ); /* Boot the loaded sector */ REAL_EXEC ( rm_int13_exec, @@ -555,9 +564,11 @@ int int13_boot ( unsigned int drive ) { DBG ( "Booted disk returned via INT 18\n" ); - /* Unhook INT 18 */ + /* Unhook INTs 18 and 19 */ unhook_bios_interrupt ( 0x18, ( unsigned int ) int13_exec_fail, &int18_vector ); + unhook_bios_interrupt ( 0x19, ( unsigned int ) int13_exec_fail, + &int19_vector ); return -ECANCELED; } |