diff options
author | sshwarts <sshwarts> | 2008-11-13 19:15:20 +0000 |
---|---|---|
committer | sshwarts <sshwarts> | 2008-11-13 19:15:20 +0000 |
commit | 0377cda5bb2037cc636ebc4b6553143d02f41fa4 (patch) | |
tree | 26febd412fe6b796c04bd5398e7cbd7c766b8796 /bios | |
parent | c3f64f502eea071d9462c0026353d7c92df328c3 (diff) |
Applied [Bochs-developers] [PATCH v3 1/6] Move PIC initialization out of line to save space in post code area.
Diffstat (limited to 'bios')
-rw-r--r-- | bios/rombios.c | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/bios/rombios.c b/bios/rombios.c index 1e650a37..f25ebf12 100644 --- a/bios/rombios.c +++ b/bios/rombios.c @@ -10256,6 +10256,31 @@ rom_scan_increment: mov ds, ax ret +post_init_pic: + mov al, #0x11 ; send initialisation commands + out 0x20, al + out 0xa0, al + mov al, #0x08 + out 0x21, al + mov al, #0x70 + out 0xa1, al + mov al, #0x04 + out 0x21, al + mov al, #0x02 + out 0xa1, al + mov al, #0x01 + out 0x21, al + out 0xa1, al + mov al, #0xb8 + out 0x21, AL ;master pic: unmask IRQ 0, 1, 2, 6 +#if BX_USE_PS2_MOUSE + mov al, #0x8f +#else + mov al, #0x9f +#endif + out 0xa1, AL ;slave pic: unmask IRQ 12, 13, 14 + ret + ;; the following area can be used to write dynamically generated tables .align 16 bios_table_area_start: @@ -10516,28 +10541,7 @@ post_default_ints: SET_INT_VECTOR(0x10, #0xF000, #int10_handler) ;; PIC - mov al, #0x11 ; send initialisation commands - out 0x20, al - out 0xa0, al - mov al, #0x08 - out 0x21, al - mov al, #0x70 - out 0xa1, al - mov al, #0x04 - out 0x21, al - mov al, #0x02 - out 0xa1, al - mov al, #0x01 - out 0x21, al - out 0xa1, al - mov al, #0xb8 - out 0x21, AL ;master pic: unmask IRQ 0, 1, 2, 6 -#if BX_USE_PS2_MOUSE - mov al, #0x8f -#else - mov al, #0x9f -#endif - out 0xa1, AL ;slave pic: unmask IRQ 12, 13, 14 + call post_init_pic mov cx, #0xc000 ;; init vga bios mov ax, #0xc780 |