root / pc-bios / bios.diff @ caa88be0
History | View | Annotate | Download (7.5 kB)
1 | 3ea8749d | aurel32 | ? _rombios_.c
|
---|---|---|---|
2 | 3ea8749d | aurel32 | ? _rombiosl_.c
|
3 | 3ea8749d | aurel32 | ? biossums
|
4 | 3ea8749d | aurel32 | ? rombios.s
|
5 | 3ea8749d | aurel32 | ? rombios.sym
|
6 | 3ea8749d | aurel32 | ? rombios.txt
|
7 | 3ea8749d | aurel32 | ? rombios16.bin
|
8 | 3ea8749d | aurel32 | ? rombios32.bin
|
9 | 3ea8749d | aurel32 | ? rombios32.out
|
10 | 3ea8749d | aurel32 | ? rombiosl.s
|
11 | 3ea8749d | aurel32 | ? rombiosl.sym
|
12 | 3ea8749d | aurel32 | ? rombiosl.txt
|
13 | 3ea8749d | aurel32 | Index: BIOS-bochs-latest
|
14 | 3ea8749d | aurel32 | ===================================================================
|
15 | 3ea8749d | aurel32 | RCS file: /cvsroot/bochs/bochs/bios/BIOS-bochs-latest,v
|
16 | 3ea8749d | aurel32 | retrieving revision 1.173
|
17 | 3ea8749d | aurel32 | diff -u -d -p -r1.173 BIOS-bochs-latest
|
18 | 3ea8749d | aurel32 | Binary files /tmp/cvsItPJ31 and BIOS-bochs-latest differ
|
19 | 3ea8749d | aurel32 | Index: BIOS-bochs-legacy
|
20 | 3ea8749d | aurel32 | ===================================================================
|
21 | 3ea8749d | aurel32 | RCS file: /cvsroot/bochs/bochs/bios/BIOS-bochs-legacy,v
|
22 | 3ea8749d | aurel32 | retrieving revision 1.33
|
23 | 3ea8749d | aurel32 | diff -u -d -p -r1.33 BIOS-bochs-legacy
|
24 | 3ea8749d | aurel32 | Binary files /tmp/cvsMYE2Kz and BIOS-bochs-legacy differ
|
25 | acb98efb | aurel32 | Index: rombios.c
|
26 | acb98efb | aurel32 | ===================================================================
|
27 | acb98efb | aurel32 | RCS file: /cvsroot/bochs/bochs/bios/rombios.c,v
|
28 | e6e514c5 | aurel32 | retrieving revision 1.207
|
29 | e6e514c5 | aurel32 | diff -u -d -p -r1.207 rombios.c
|
30 | e6e514c5 | aurel32 | --- rombios.c 21 Apr 2008 14:22:01 -0000 1.207
|
31 | 3ea8749d | aurel32 | +++ rombios.c 28 Apr 2008 07:53:57 -0000
|
32 | e6e514c5 | aurel32 | @@ -4404,22 +4404,25 @@ BX_DEBUG_INT15("case default:\n"); |
33 | acb98efb | aurel32 | #endif // BX_USE_PS2_MOUSE |
34 | e6e514c5 | aurel32 | |
35 | e6e514c5 | aurel32 | |
36 | acb98efb | aurel32 | -void set_e820_range(ES, DI, start, end, type)
|
37 | acb98efb | aurel32 | +void set_e820_range(ES, DI, start, end, extra_start, extra_end, type)
|
38 | acb98efb | aurel32 | Bit16u ES; |
39 | acb98efb | aurel32 | Bit16u DI; |
40 | acb98efb | aurel32 | Bit32u start; |
41 | acb98efb | aurel32 | Bit32u end; |
42 | acb98efb | aurel32 | + Bit8u extra_start;
|
43 | acb98efb | aurel32 | + Bit8u extra_end;
|
44 | acb98efb | aurel32 | Bit16u type; |
45 | acb98efb | aurel32 | { |
46 | acb98efb | aurel32 | write_word(ES, DI, start); |
47 | acb98efb | aurel32 | write_word(ES, DI+2, start >> 16); |
48 | acb98efb | aurel32 | - write_word(ES, DI+4, 0x00);
|
49 | acb98efb | aurel32 | + write_word(ES, DI+4, extra_start);
|
50 | acb98efb | aurel32 | write_word(ES, DI+6, 0x00); |
51 | e6e514c5 | aurel32 | |
52 | acb98efb | aurel32 | end -= start; |
53 | acb98efb | aurel32 | + extra_end -= extra_start;
|
54 | acb98efb | aurel32 | write_word(ES, DI+8, end);
|
55 | acb98efb | aurel32 | write_word(ES, DI+10, end >> 16); |
56 | acb98efb | aurel32 | - write_word(ES, DI+12, 0x0000);
|
57 | acb98efb | aurel32 | + write_word(ES, DI+12, extra_end);
|
58 | acb98efb | aurel32 | write_word(ES, DI+14, 0x0000); |
59 | e6e514c5 | aurel32 | |
60 | acb98efb | aurel32 | write_word(ES, DI+16, type);
|
61 | e6e514c5 | aurel32 | @@ -4432,7 +4435,9 @@ int15_function32(regs, ES, DS, FLAGS)
|
62 | acb98efb | aurel32 | Bit16u ES, DS, FLAGS; |
63 | acb98efb | aurel32 | { |
64 | acb98efb | aurel32 | Bit32u extended_memory_size=0; // 64bits long |
65 | acb98efb | aurel32 | + Bit32u extra_lowbits_memory_size=0;
|
66 | acb98efb | aurel32 | Bit16u CX,DX; |
67 | acb98efb | aurel32 | + Bit8u extra_highbits_memory_size=0;
|
68 | e6e514c5 | aurel32 | |
69 | acb98efb | aurel32 | BX_DEBUG_INT15("int15 AX=%04x\n",regs.u.r16.ax);
|
70 | e6e514c5 | aurel32 | |
71 | e6e514c5 | aurel32 | @@ -4506,11 +4511,18 @@ ASM_END
|
72 | acb98efb | aurel32 | extended_memory_size += (1L * 1024 * 1024); |
73 | acb98efb | aurel32 | } |
74 | e6e514c5 | aurel32 | |
75 | acb98efb | aurel32 | + extra_lowbits_memory_size = inb_cmos(0x5c);
|
76 | acb98efb | aurel32 | + extra_lowbits_memory_size <<= 8;
|
77 | acb98efb | aurel32 | + extra_lowbits_memory_size |= inb_cmos(0x5b);
|
78 | acb98efb | aurel32 | + extra_lowbits_memory_size *= 64;
|
79 | acb98efb | aurel32 | + extra_lowbits_memory_size *= 1024;
|
80 | acb98efb | aurel32 | + extra_highbits_memory_size = inb_cmos(0x5d);
|
81 | acb98efb | aurel32 | +
|
82 | acb98efb | aurel32 | switch(regs.u.r16.bx)
|
83 | acb98efb | aurel32 | { |
84 | acb98efb | aurel32 | case 0: |
85 | acb98efb | aurel32 | set_e820_range(ES, regs.u.r16.di, |
86 | acb98efb | aurel32 | - 0x0000000L, 0x0009fc00L, 1);
|
87 | acb98efb | aurel32 | + 0x0000000L, 0x0009fc00L, 0, 0, 1);
|
88 | acb98efb | aurel32 | regs.u.r32.ebx = 1;
|
89 | acb98efb | aurel32 | regs.u.r32.eax = 0x534D4150;
|
90 | acb98efb | aurel32 | regs.u.r32.ecx = 0x14;
|
91 | e6e514c5 | aurel32 | @@ -4519,7 +4531,7 @@ ASM_END
|
92 | acb98efb | aurel32 | break;
|
93 | acb98efb | aurel32 | case 1: |
94 | acb98efb | aurel32 | set_e820_range(ES, regs.u.r16.di, |
95 | acb98efb | aurel32 | - 0x0009fc00L, 0x000a0000L, 2);
|
96 | acb98efb | aurel32 | + 0x0009fc00L, 0x000a0000L, 0, 0, 2);
|
97 | acb98efb | aurel32 | regs.u.r32.ebx = 2;
|
98 | acb98efb | aurel32 | regs.u.r32.eax = 0x534D4150;
|
99 | acb98efb | aurel32 | regs.u.r32.ecx = 0x14;
|
100 | e6e514c5 | aurel32 | @@ -4528,7 +4540,7 @@ ASM_END
|
101 | acb98efb | aurel32 | break;
|
102 | acb98efb | aurel32 | case 2: |
103 | acb98efb | aurel32 | set_e820_range(ES, regs.u.r16.di, |
104 | acb98efb | aurel32 | - 0x000e8000L, 0x00100000L, 2);
|
105 | acb98efb | aurel32 | + 0x000e8000L, 0x00100000L, 0, 0, 2);
|
106 | acb98efb | aurel32 | regs.u.r32.ebx = 3;
|
107 | acb98efb | aurel32 | regs.u.r32.eax = 0x534D4150;
|
108 | acb98efb | aurel32 | regs.u.r32.ecx = 0x14;
|
109 | e6e514c5 | aurel32 | @@ -4539,7 +4551,7 @@ ASM_END
|
110 | e6e514c5 | aurel32 | #if BX_ROMBIOS32
|
111 | acb98efb | aurel32 | set_e820_range(ES, regs.u.r16.di, |
112 | acb98efb | aurel32 | 0x00100000L,
|
113 | acb98efb | aurel32 | - extended_memory_size - ACPI_DATA_SIZE, 1);
|
114 | acb98efb | aurel32 | + extended_memory_size - ACPI_DATA_SIZE ,0, 0, 1);
|
115 | acb98efb | aurel32 | regs.u.r32.ebx = 4;
|
116 | e6e514c5 | aurel32 | #else
|
117 | e6e514c5 | aurel32 | set_e820_range(ES, regs.u.r16.di, |
118 | e6e514c5 | aurel32 | @@ -4555,7 +4567,7 @@ ASM_END
|
119 | acb98efb | aurel32 | case 4: |
120 | acb98efb | aurel32 | set_e820_range(ES, regs.u.r16.di, |
121 | acb98efb | aurel32 | extended_memory_size - ACPI_DATA_SIZE, |
122 | acb98efb | aurel32 | - extended_memory_size, 3); // ACPI RAM
|
123 | acb98efb | aurel32 | + extended_memory_size ,0, 0, 3); // ACPI RAM
|
124 | acb98efb | aurel32 | regs.u.r32.ebx = 5;
|
125 | acb98efb | aurel32 | regs.u.r32.eax = 0x534D4150;
|
126 | acb98efb | aurel32 | regs.u.r32.ecx = 0x14;
|
127 | e6e514c5 | aurel32 | @@ -4565,7 +4577,20 @@ ASM_END
|
128 | acb98efb | aurel32 | case 5: |
129 | acb98efb | aurel32 | /* 256KB BIOS area at the end of 4 GB */
|
130 | acb98efb | aurel32 | set_e820_range(ES, regs.u.r16.di, |
131 | acb98efb | aurel32 | - 0xfffc0000L, 0x00000000L, 2);
|
132 | acb98efb | aurel32 | + 0xfffc0000L, 0x00000000L ,0, 0, 2);
|
133 | acb98efb | aurel32 | + if (extra_highbits_memory_size || extra_lowbits_memory_size)
|
134 | acb98efb | aurel32 | + regs.u.r32.ebx = 6;
|
135 | acb98efb | aurel32 | + else
|
136 | acb98efb | aurel32 | + regs.u.r32.ebx = 0;
|
137 | acb98efb | aurel32 | + regs.u.r32.eax = 0x534D4150;
|
138 | acb98efb | aurel32 | + regs.u.r32.ecx = 0x14;
|
139 | acb98efb | aurel32 | + CLEAR_CF();
|
140 | acb98efb | aurel32 | + return;
|
141 | acb98efb | aurel32 | + case 6:
|
142 | acb98efb | aurel32 | + /* Maping of memory above 4 GB */
|
143 | acb98efb | aurel32 | + set_e820_range(ES, regs.u.r16.di, 0x00000000L,
|
144 | acb98efb | aurel32 | + extra_lowbits_memory_size, 1, extra_highbits_memory_size
|
145 | acb98efb | aurel32 | + + 1, 1);
|
146 | acb98efb | aurel32 | regs.u.r32.ebx = 0;
|
147 | acb98efb | aurel32 | regs.u.r32.eax = 0x534D4150;
|
148 | acb98efb | aurel32 | regs.u.r32.ecx = 0x14;
|
149 | a7e6f8ba | bellard | Index: rombios.h
|
150 | a7e6f8ba | bellard | ===================================================================
|
151 | a7e6f8ba | bellard | RCS file: /cvsroot/bochs/bochs/bios/rombios.h,v
|
152 | 6cc9215e | aurel32 | retrieving revision 1.6
|
153 | 6cc9215e | aurel32 | diff -u -d -p -r1.6 rombios.h
|
154 | 6cc9215e | aurel32 | --- rombios.h 26 Jan 2008 09:15:27 -0000 1.6
|
155 | 3ea8749d | aurel32 | +++ rombios.h 28 Apr 2008 07:53:57 -0000
|
156 | a7e6f8ba | bellard | @@ -19,7 +19,7 @@
|
157 | a7e6f8ba | bellard | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
158 | d4afc623 | bellard | |
159 | a7e6f8ba | bellard | /* define it to include QEMU specific code */
|
160 | a7e6f8ba | bellard | -//#define BX_QEMU
|
161 | a7e6f8ba | bellard | +#define BX_QEMU
|
162 | d4afc623 | bellard | |
163 | 597a0559 | bellard | #ifndef LEGACY
|
164 | 597a0559 | bellard | # define BX_ROMBIOS32 1 |
165 | a7e6f8ba | bellard | Index: rombios32.c
|
166 | a7e6f8ba | bellard | ===================================================================
|
167 | a7e6f8ba | bellard | RCS file: /cvsroot/bochs/bochs/bios/rombios32.c,v
|
168 | e6e514c5 | aurel32 | retrieving revision 1.26
|
169 | e6e514c5 | aurel32 | diff -u -d -p -r1.26 rombios32.c
|
170 | e6e514c5 | aurel32 | --- rombios32.c 8 Apr 2008 16:41:18 -0000 1.26
|
171 | 3ea8749d | aurel32 | +++ rombios32.c 28 Apr 2008 07:53:58 -0000
|
172 | e6e514c5 | aurel32 | @@ -478,7 +478,12 @@ void smp_probe(void) |
173 | 6cc9215e | aurel32 | sipi_vector = AP_BOOT_ADDR >> 12;
|
174 | 6cc9215e | aurel32 | writel(APIC_BASE + APIC_ICR_LOW, 0x000C4600 | sipi_vector);
|
175 | a7e6f8ba | bellard | |
176 | 6cc9215e | aurel32 | +#ifndef BX_QEMU
|
177 | 6cc9215e | aurel32 | delay_ms(10);
|
178 | 6cc9215e | aurel32 | +#else
|
179 | 6cc9215e | aurel32 | + while (cmos_readb(0x5f) + 1 != readw((void *)CPU_COUNT_ADDR))
|
180 | 6cc9215e | aurel32 | + ;
|
181 | e3e97e7c | bellard | +#endif
|
182 | 6cc9215e | aurel32 | |
183 | 6cc9215e | aurel32 | smp_cpus = readw((void *)CPU_COUNT_ADDR);
|
184 | 6cc9215e | aurel32 | } |
185 | 3ea8749d | aurel32 | @@ -1423,9 +1428,8 @@ void acpi_bios_init(void) |
186 | 3ea8749d | aurel32 | fadt->pm1_evt_len = 4;
|
187 | 3ea8749d | aurel32 | fadt->pm1_cnt_len = 2;
|
188 | 3ea8749d | aurel32 | fadt->pm_tmr_len = 4;
|
189 | 3ea8749d | aurel32 | - fadt->plvl2_lat = cpu_to_le16(50);
|
190 | 3ea8749d | aurel32 | - fadt->plvl3_lat = cpu_to_le16(50);
|
191 | 3ea8749d | aurel32 | - fadt->plvl3_lat = cpu_to_le16(50);
|
192 | 3ea8749d | aurel32 | + fadt->plvl2_lat = cpu_to_le16(0x0fff); // C2 state not supported
|
193 | 3ea8749d | aurel32 | + fadt->plvl3_lat = cpu_to_le16(0x0fff); // C3 state not supported
|
194 | 3ea8749d | aurel32 | /* WBINVD + PROC_C1 + PWR_BUTTON + SLP_BUTTON + FIX_RTC */
|
195 | 3ea8749d | aurel32 | fadt->flags = cpu_to_le32((1 << 0) | (1 << 2) | (1 << 4) | (1 << 5) | (1 << 6)); |
196 | 3ea8749d | aurel32 | acpi_build_table_header((struct acpi_table_header *)fadt, "FACP", |