update
[qemu.git] / pc-bios / bios.diff
blob443236a24669e504bd4a84902fc5465efdc927cd
1 Index: rombios.c
2 ===================================================================
3 RCS file: /cvsroot/bochs/bochs/bios/rombios.c,v
4 retrieving revision 1.110
5 diff -u -w -r1.110 rombios.c
6 --- rombios.c 31 May 2004 13:11:27 -0000 1.110
7 +++ rombios.c 20 Jun 2004 13:10:07 -0000
8 @@ -137,6 +137,7 @@
9 #define DEBUG_INT16 0
10 #define DEBUG_INT1A 0
11 #define DEBUG_INT74 0
12 +#define DEBUG_APM 0
14 #define BX_CPU 3
15 #define BX_USE_PS2_MOUSE 1
16 @@ -145,6 +146,7 @@
17 #define BX_SUPPORT_FLOPPY 1
18 #define BX_FLOPPY_ON_CNT 37 // 2 seconds
19 #define BX_PCIBIOS 1
20 +#define BX_APM 1
22 #define BX_USE_ATADRV 1
23 #define BX_ELTORITO_BOOT 1
24 @@ -230,17 +232,6 @@
25 out dx,ax
26 MEND
28 -MACRO HALT2
29 - ;; the HALT macro is called with the line number of the HALT call.
30 - ;; The line number is then sent to the PANIC_PORT, causing Bochs/Plex
31 - ;; to print a BX_PANIC message. This will normally halt the simulation
32 - ;; with a message such as "BIOS panic at rombios.c, line 4091".
33 - ;; However, users can choose to make panics non-fatal and continue.
34 - mov dx,#PANIC_PORT2
35 - mov ax,#?1
36 - out dx,ax
37 -MEND
39 MACRO JMP_AP
40 db 0xea
41 dw ?2
42 @@ -1543,15 +1534,12 @@
45 if (action & BIOS_PRINTF_HALT) {
46 - // freeze in a busy loop. If I do a HLT instruction, then in versions
47 - // 1.3.pre1 and earlier, it will panic without ever updating the VGA
48 - // display, so the panic message will not be visible. By waiting
49 - // forever, you are certain to see the panic message on screen.
50 - // After a few more versions have passed, we can turn this back into
51 - // a halt or something.
52 - // do {} while (1);
53 + // freeze in a busy loop.
54 ASM_START
55 - HALT2(__LINE__)
56 + cli
57 + halt2_loop:
58 + hlt
59 + jmp halt2_loop
60 ASM_END
63 @@ -8344,6 +8332,19 @@
64 pop ax
65 iret
68 +;--------------------
69 +#if BX_APM
70 +use32 386
71 +#define APM_PROT32
72 +#include "apmbios.S"
73 +use16 386
75 +#define APM_REAL
76 +#include "apmbios.S"
78 +#endif
80 ;--------------------
81 #if BX_PCIBIOS
82 use32 386
83 @@ -9560,6 +9561,10 @@
84 .org 0xf859 ; INT 15h System Services Entry Point
85 int15_handler:
86 pushf
87 +#if BX_APM
88 + cmp ah, #0x53
89 + je apm_call
90 +#endif
91 push ds
92 push es
93 pushad
94 @@ -9570,6 +9575,10 @@
95 popf
96 //JMPL(iret_modify_cf)
97 jmp iret_modify_cf
98 +#if BX_APM
99 +apm_call:
100 + jmp _apmreal_entry
101 +#endif
103 ;; Protected mode IDT descriptor