summaryrefslogblamecommitdiffstats
path: root/pc-bios/bios.diff
blob: 4f33a0a982f04bdc8b1079bc73415490b7c67af8 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11


                                                                   


                                                     
                                         



                      
 

                   
                     
 

                     



























                                                            





                                                                   
                                         





























                                                                  
 







                                              
 
Index: rombios.c
===================================================================
RCS file: /cvsroot/bochs/bochs/bios/rombios.c,v
retrieving revision 1.130
diff -u -w -r1.130 rombios.c
--- rombios.c	13 Feb 2005 08:47:30 -0000	1.130
+++ rombios.c	9 Feb 2006 21:49:38 -0000
@@ -8570,7 +8570,10 @@
 use32 386
 #define APM_PROT32
 #include "apmbios.S"
+
 use16 386
+#define APM_PROT16
+#include "apmbios.S"
 
 #define APM_REAL
 #include "apmbios.S"
@@ -8611,6 +8614,7 @@
   mov al, #0x80
 bios32_end:
   popf
+  and dword ptr[esp+4],0xfffffffc ;; reset CS.RPL for kqemu
   retf
 
 .align 16
@@ -8721,17 +8725,17 @@
 pci_pro_fail:
   pop edi
   pop esi
-  sti
   popf
   stc
+  and dword ptr[esp+4],0xfffffffc ;; reset CS.RPL for kqemu
   retf
 pci_pro_ok:
   xor ah, ah
   pop edi
   pop esi
-  sti
   popf
   clc
+  and dword ptr[esp+4],0xfffffffc ;; reset CS.RPL for kqemu
   retf
 
 pci_pro_select_reg:
Index: apmbios.S
===================================================================
RCS file: /cvsroot/bochs/bochs/bios/apmbios.S,v
retrieving revision 1.1
diff -u -w -r1.1 apmbios.S
--- apmbios.S	20 Jun 2004 18:27:09 -0000	1.1
+++ apmbios.S	9 Feb 2006 21:49:38 -0000
@@ -1,6 +1,9 @@
 //  APM BIOS support for the Bochs BIOS
 //  Copyright (C) 2004 Fabrice Bellard
 //
+//  16-bit interface activation
+//  Copyright (C) 2005 Struan Bartlett
+//
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
 //  License as published by the Free Software Foundation; either
@@ -111,13 +114,28 @@
   mov bl, #0x4d // 'M'
   // bit 0 : 16 bit interface supported
   // bit 1 : 32 bit interface supported
-  mov cx, #0x2 
+  mov cx, #0x3
   jmp APMSYM(ok)
   
 ;-----------------
 ; APM real mode interface connect
 APMSYM(01):
   cmp al, #0x01
+  jne APMSYM(02)
+  jmp APMSYM(ok)
+
+;-----------------
+; APM 16 bit protected mode interface connect
+APMSYM(02):
+  cmp al, #0x02
+  jne APMSYM(03)
+
+  mov bx, #_apm16_entry
+  
+  mov ax, #0xf000 // 16 bit code segment base
+  mov si, #0xfff0 // 16 bit code segment size
+  mov cx, #0xf000 // data segment address
+  mov di, #0xfff0 // data segment length
   jne APMSYM(03)
   jmp APMSYM(ok)