From 27d82f8856a632338cba685256dafb2ce4d4a0d5 Mon Sep 17 00:00:00 2001 From: Stanislav Shwartsman Date: Mon, 8 Feb 2010 20:56:55 +0000 Subject: [PATCH] Init PIC on CMOS shutdown status 05h. Should fix bug #2734455. - Sebastian --- bochs/bios/rombios.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/bochs/bios/rombios.c b/bochs/bios/rombios.c index a24e6784f..85ba4ad5f 100644 --- a/bochs/bios/rombios.c +++ b/bochs/bios/rombios.c @@ -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