Changeset 5757 in vbox
- Timestamp:
- Nov 15, 2007 1:47:55 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS/rombios.c
r5571 r5757 904 904 static void int70_function(); 905 905 static void int74_function(); 906 static void dummy_isr_function(); 906 907 static Bit16u get_CS(); 907 908 static Bit16u get_SS(); … … 8501 8502 } 8502 8503 8504 void 8505 dummy_isr_function(regs, ds, iret_addr) 8506 pusha_regs_t regs; // regs pushed from PUSHA instruction 8507 Bit16u ds; // previous DS:, DS set to 0x0000 by asm wrapper 8508 iret_addr_t iret_addr; // CS,IP,Flags pushed from original INT call 8509 { 8510 // Interrupt handler for unexpected hardware interrupts. We have to clear 8511 // the PIC because if we don't, the next EOI will clear the wrong interrupt 8512 // and all hell will break loose! This routine also masks the unexpected 8513 // interrupt so it will generally be called only once for each unexpected 8514 // interrupt level. 8515 Bit8u isrA, isrB, imr, last_int = 0xFF; 8516 8517 outb( 0x20, 0x0B ); 8518 isrA = inb( 0x20 ); 8519 if (isrA) { 8520 outb( 0xA0, 0x0B ); 8521 isrB = inb( 0xA0 ); 8522 if (isrB) { 8523 imr = inb( 0xA1 ); 8524 outb( 0xA1, imr | isrB ); // Mask this interrupt 8525 outb( 0xA0, 0x20 ); // Send EOI on slave PIC 8526 } else { 8527 imr = inb( 0x21 ); 8528 isrA &= 0xFB; // Never mask the cascade interrupt 8529 outb( 0x21, imr | isrA); // Mask this interrupt 8530 } 8531 outb( 0x20, 0x20 ); // Send EOI on master PIC 8532 last_int = isrA; 8533 } 8534 write_byte( 0x40, 0x6B, last_int ); // Write INTR_FLAG 8535 } 8503 8536 8504 8537 ASM_START … … 9207 9240 ;-------------------- 9208 9241 ; relocated here because the primary POST area isnt big enough. 9242 ; the SET_INT_VECTORs have nothing to do with EBDA but do not 9243 ; fit into the primary POST area either 9209 9244 ebda_post: 9245 SET_INT_VECTOR(0x0D, #0xF000, #dummy_isr); IRQ 5 9246 SET_INT_VECTOR(0x0F, #0xF000, #dummy_isr); IRQ 7 9247 SET_INT_VECTOR(0x72, #0xF000, #dummy_isr); IRQ 11 9248 SET_INT_VECTOR(0x77, #0xF000, #dummy_isr); IRQ 15 9249 9210 9250 #if BX_USE_EBDA 9211 9251 mov ax, #EBDA_SEG … … 11330 11370 db 0x00 ;; base 23:16 11331 11371 11372 ;; 11373 ;; Handler for unexpected hardware interrupts 11374 ;; 11375 dummy_isr: 11376 push ds 11377 pushad 11378 xor ax, ax 11379 mov ds, ax 11380 call _dummy_isr_function 11381 popad 11382 pop ds 11383 iret 11332 11384 11333 11385 ;----------
Note:
See TracChangeset
for help on using the changeset viewer.