Init PIC on CMOS shutdown status 05h. Should fix bug #2734455.

- Sebastian
This commit is contained in:
Stanislav Shwartsman 2010-02-08 20:56:55 +00:00
parent 7f7b2cfcf0
commit 27d82f8856

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: rombios.c,v 1.245 2010-02-01 21:05:42 sshwarts Exp $
// $Id: rombios.c,v 1.246 2010-02-08 20:56:55 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -869,7 +869,7 @@ Bit16u cdrom_boot();
#endif // BX_ELTORITO_BOOT
static char bios_cvs_version_string[] = "$Revision: 1.245 $ $Date: 2010-02-01 21:05:42 $";
static char bios_cvs_version_string[] = "$Revision: 1.246 $ $Date: 2010-02-08 20:56:55 $";
#define BIOS_COPYRIGHT_STRING "(c) 2002 MandrakeSoft S.A. Written by Kevin Lawton & the Bochs team."
@ -9101,6 +9101,28 @@ ebda_post:
;--------------------
; relocated here because the primary POST area isnt big enough.
eoi_jmp_post:
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
mov al, #0x20
out #0xA0, al ;; slave PIC EOI
mov al, #0x20