root / pc-bios / bios.diff @ fb9f9444
History | View | Annotate | Download (4.9 kB)
1 |
Index: rombios.c
|
---|---|
2 |
===================================================================
|
3 |
RCS file: /cvsroot/bochs/bochs/bios/rombios.c,v
|
4 |
retrieving revision 1.108
|
5 |
diff -u -w -r1.108 rombios.c
|
6 |
--- rombios.c 9 Feb 2004 16:48:50 -0000 1.108
|
7 |
+++ rombios.c 22 May 2004 15:47:51 -0000
|
8 |
@@ -2254,6 +2254,7 @@
|
9 |
type = read_byte(get_SS(),buffer+1) & 0x1f; |
10 |
removable = (read_byte(get_SS(),buffer+0) & 0x80) ? 1 : 0; |
11 |
mode = read_byte(get_SS(),buffer+96) ? ATA_MODE_PIO32 : ATA_MODE_PIO16;
|
12 |
+ blksize = 2048;
|
13 |
|
14 |
write_byte(ebda_seg,&EbdaData->ata.devices[device].device, type); |
15 |
write_byte(ebda_seg,&EbdaData->ata.devices[device].removable, removable); |
16 |
@@ -3378,6 +3379,8 @@
|
17 |
and al,#0x10
|
18 |
mov ah, al |
19 |
|
20 |
+ or ecx, ecx
|
21 |
+ je int1586_tick_end
|
22 |
int1586_tick:
|
23 |
in al, #0x61
|
24 |
and al,#0x10
|
25 |
@@ -3386,6 +3389,7 @@
|
26 |
mov ah, al |
27 |
dec ecx |
28 |
jnz int1586_tick |
29 |
+int1586_tick_end:
|
30 |
ASM_END |
31 |
|
32 |
break;
|
33 |
@@ -3781,7 +3785,17 @@
|
34 |
write_word(ebda_seg, 0x0022, mouse_driver_offset);
|
35 |
write_word(ebda_seg, 0x0024, mouse_driver_seg);
|
36 |
mouse_flags_2 = read_byte(ebda_seg, 0x0027);
|
37 |
+ if (mouse_driver_offset == 0 &&
|
38 |
+ mouse_driver_seg == 0) {
|
39 |
+ /* remove handler */
|
40 |
+ if ( (mouse_flags_2 & 0x80) != 0 ) {
|
41 |
+ mouse_flags_2 &= ~0x80;
|
42 |
+ inhibit_mouse_int_and_events(); // disable IRQ12 and packets
|
43 |
+ }
|
44 |
+ } else {
|
45 |
+ /* install handler */
|
46 |
mouse_flags_2 |= 0x80;
|
47 |
+ }
|
48 |
write_byte(ebda_seg, 0x0027, mouse_flags_2);
|
49 |
CLEAR_CF(); |
50 |
regs.u.r8.ah = 0;
|
51 |
@@ -4409,7 +4423,8 @@
|
52 |
mouse_flags_2 = read_byte(ebda_seg, 0x0027);
|
53 |
|
54 |
if ( (mouse_flags_2 & 0x80) != 0x80 ) { |
55 |
- BX_PANIC("int74_function:\n");
|
56 |
+ // BX_PANIC("int74_function:\n");
|
57 |
+ return;
|
58 |
} |
59 |
|
60 |
package_count = mouse_flags_2 & 0x07;
|
61 |
@@ -8401,57 +8416,69 @@
|
62 |
cmp al, #0x08
|
63 |
jne pci_pro_f09 |
64 |
call pci_pro_select_reg |
65 |
+ push edx
|
66 |
mov dx, di |
67 |
and dx, #0x03
|
68 |
add dx, #0x0cfc
|
69 |
in al, dx |
70 |
+ pop edx
|
71 |
mov cl, al |
72 |
jmp pci_pro_ok |
73 |
pci_pro_f09: ;; read configuration word
|
74 |
cmp al, #0x09
|
75 |
jne pci_pro_f0a |
76 |
call pci_pro_select_reg |
77 |
+ push edx
|
78 |
mov dx, di |
79 |
and dx, #0x02
|
80 |
add dx, #0x0cfc
|
81 |
in ax, dx |
82 |
+ pop edx
|
83 |
mov cx, ax |
84 |
jmp pci_pro_ok |
85 |
pci_pro_f0a: ;; read configuration dword
|
86 |
cmp al, #0x0a
|
87 |
jne pci_pro_f0b |
88 |
call pci_pro_select_reg |
89 |
+ push edx
|
90 |
mov dx, #0x0cfc
|
91 |
in eax, dx |
92 |
+ pop edx
|
93 |
mov ecx, eax |
94 |
jmp pci_pro_ok |
95 |
pci_pro_f0b: ;; write configuration byte
|
96 |
cmp al, #0x0b
|
97 |
jne pci_pro_f0c |
98 |
call pci_pro_select_reg |
99 |
+ push edx
|
100 |
mov dx, di |
101 |
and dx, #0x03
|
102 |
add dx, #0x0cfc
|
103 |
mov al, cl |
104 |
out dx, al |
105 |
+ pop edx
|
106 |
jmp pci_pro_ok |
107 |
pci_pro_f0c: ;; write configuration word
|
108 |
cmp al, #0x0c
|
109 |
jne pci_pro_f0d |
110 |
call pci_pro_select_reg |
111 |
+ push edx
|
112 |
mov dx, di |
113 |
and dx, #0x02
|
114 |
add dx, #0x0cfc
|
115 |
mov ax, cx |
116 |
out dx, ax |
117 |
+ pop edx
|
118 |
jmp pci_pro_ok |
119 |
pci_pro_f0d: ;; write configuration dword
|
120 |
cmp al, #0x0d
|
121 |
jne pci_pro_unknown |
122 |
call pci_pro_select_reg |
123 |
+ push edx
|
124 |
mov dx, #0x0cfc
|
125 |
mov eax, ecx |
126 |
out dx, eax |
127 |
+ pop edx
|
128 |
jmp pci_pro_ok |
129 |
pci_pro_unknown:
|
130 |
mov ah, #0x81
|
131 |
@@ -8468,6 +8495,7 @@
|
132 |
retf |
133 |
|
134 |
pci_pro_select_reg:
|
135 |
+ push edx
|
136 |
mov eax, #0x800000
|
137 |
mov ax, bx |
138 |
shl eax, #8
|
139 |
@@ -8476,6 +8504,7 @@
|
140 |
and al, #0xfc
|
141 |
mov dx, #0x0cf8
|
142 |
out dx, eax |
143 |
+ pop edx
|
144 |
ret |
145 |
|
146 |
use16 386
|
147 |
@@ -8536,57 +8565,69 @@
|
148 |
cmp al, #0x08
|
149 |
jne pci_real_f09 |
150 |
call pci_real_select_reg |
151 |
+ push dx
|
152 |
mov dx, di |
153 |
and dx, #0x03
|
154 |
add dx, #0x0cfc
|
155 |
in al, dx |
156 |
+ pop dx
|
157 |
mov cl, al |
158 |
jmp pci_real_ok |
159 |
pci_real_f09: ;; read configuration word
|
160 |
cmp al, #0x09
|
161 |
jne pci_real_f0a |
162 |
call pci_real_select_reg |
163 |
+ push dx
|
164 |
mov dx, di |
165 |
and dx, #0x02
|
166 |
add dx, #0x0cfc
|
167 |
in ax, dx |
168 |
+ pop dx
|
169 |
mov cx, ax |
170 |
jmp pci_real_ok |
171 |
pci_real_f0a: ;; read configuration dword
|
172 |
cmp al, #0x0a
|
173 |
jne pci_real_f0b |
174 |
call pci_real_select_reg |
175 |
+ push dx
|
176 |
mov dx, #0x0cfc
|
177 |
in eax, dx |
178 |
+ pop dx
|
179 |
mov ecx, eax |
180 |
jmp pci_real_ok |
181 |
pci_real_f0b: ;; write configuration byte
|
182 |
cmp al, #0x0b
|
183 |
jne pci_real_f0c |
184 |
call pci_real_select_reg |
185 |
+ push dx
|
186 |
mov dx, di |
187 |
and dx, #0x03
|
188 |
add dx, #0x0cfc
|
189 |
mov al, cl |
190 |
out dx, al |
191 |
+ pop dx
|
192 |
jmp pci_real_ok |
193 |
pci_real_f0c: ;; write configuration word
|
194 |
cmp al, #0x0c
|
195 |
jne pci_real_f0d |
196 |
call pci_real_select_reg |
197 |
+ push dx
|
198 |
mov dx, di |
199 |
and dx, #0x02
|
200 |
add dx, #0x0cfc
|
201 |
mov ax, cx |
202 |
out dx, ax |
203 |
+ pop dx
|
204 |
jmp pci_real_ok |
205 |
pci_real_f0d: ;; write configuration dword
|
206 |
cmp al, #0x0d
|
207 |
jne pci_real_unknown |
208 |
call pci_real_select_reg |
209 |
+ push dx
|
210 |
mov dx, #0x0cfc
|
211 |
mov eax, ecx |
212 |
out dx, eax |
213 |
+ pop dx
|
214 |
jmp pci_real_ok |
215 |
pci_real_unknown:
|
216 |
mov ah, #0x81
|
217 |
@@ -8599,6 +8640,7 @@
|
218 |
ret |
219 |
|
220 |
pci_real_select_reg:
|
221 |
+ push dx
|
222 |
mov eax, #0x800000
|
223 |
mov ax, bx |
224 |
shl eax, #8
|
225 |
@@ -8607,6 +8649,7 @@
|
226 |
and al, #0xfc
|
227 |
mov dx, #0x0cf8
|
228 |
out dx, eax |
229 |
+ pop dx
|
230 |
ret |
231 |
|
232 |
.align 16
|