Browse Source

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).
tags/v0.9.3
Michael Brown 18 years ago
parent
commit
6e42cb95bd
1 changed files with 14 additions and 3 deletions
  1. 14
    3
      src/arch/i386/interface/pcbios/int13.c

+ 14
- 3
src/arch/i386/interface/pcbios/int13.c View File

@@ -51,7 +51,14 @@ extern void int13_wrapper ( void );
51 51
  */
52 52
 static struct segoff int18_vector;
53 53
 
54
-/** Restart point for INT 18 */
54
+/** Vector for storing original INT 19 handler
55
+ *
56
+ * We do not chain to this vector, so there is no need to place it in
57
+ * .text16.
58
+ */
59
+static struct segoff int19_vector;
60
+
61
+/** Restart point for INT 18 or 19 */
55 62
 extern void int13_exec_fail ( void );
56 63
 
57 64
 /** List of registered emulated drives */
@@ -531,9 +538,11 @@ int int13_boot ( unsigned int drive ) {
531 538
 		return -ENOEXEC;
532 539
 	}
533 540
 
534
-	/* Hook INT 18 to capture failure path */
541
+	/* Hook INTs 18 and 19 to capture failure paths */
535 542
 	hook_bios_interrupt ( 0x18, ( unsigned int ) int13_exec_fail,
536 543
 			      &int18_vector );
544
+	hook_bios_interrupt ( 0x19, ( unsigned int ) int13_exec_fail,
545
+			      &int19_vector );
537 546
 
538 547
 	/* Boot the loaded sector */
539 548
 	REAL_EXEC ( rm_int13_exec,
@@ -555,9 +564,11 @@ int int13_boot ( unsigned int drive ) {
555 564
 
556 565
 	DBG ( "Booted disk returned via INT 18\n" );
557 566
 
558
-	/* Unhook INT 18 */
567
+	/* Unhook INTs 18 and 19 */
559 568
 	unhook_bios_interrupt ( 0x18, ( unsigned int ) int13_exec_fail,
560 569
 				&int18_vector );
570
+	unhook_bios_interrupt ( 0x19, ( unsigned int ) int13_exec_fail,
571
+				&int19_vector );
561 572
 	
562 573
 	return -ECANCELED;
563 574
 }

Loading…
Cancel
Save