Changeset 24246 in vbox for trunk/src/VBox/Devices/PC
- Timestamp:
- Nov 2, 2009 12:09:40 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS/rombios.c
r22168 r24246 11141 11141 ret 11142 11142 11143 #define LVT0 0xFEE00350 11144 #define LVT1 0xFEE00360 11145 11146 ;; Program LVT0/LVT1 entries in the local APIC. Some Linux kernels (e.g., RHEL4 11147 ;; SMP 32-bit) expect the entries to be unmasked in virtual wire mode. 11148 11149 setup_lapic: 11150 pushf 11151 cli ;; Interrupts would kill us! 11152 call pmode_enter 11153 mov esi, #LVT0 ;; Program LVT0 to ExtINT and unmask 11154 mov eax, [esi] 11155 and eax, #0xfffe00ff 11156 or ah, #0x07 11157 mov [esi], eax 11158 mov esi, #LVT1 ;; Program LVT1 to NMI and unmask 11159 mov eax, [esi] 11160 and eax, #0xfffe00ff 11161 or ah, #0x04 11162 mov [esi], eax 11163 call pmode_exit 11164 popf 11165 ret 11166 11167 ;; Enter and exit minimal protected-mode environment. May only be called from 11168 ;; the F000 segment (16-bit). Does not switch stacks. Must be run with disabled 11169 ;; interrupts(!). On return from pmode_enter, DS contains a selector which can 11170 ;; address the entire 4GB address space. 11171 11172 pmode_enter: 11173 push cs 11174 pop ds 11175 lgdt [pmbios_gdt_desc] 11176 mov eax, cr0 11177 or al, #0x1 11178 mov cr0, eax 11179 JMP_AP(0x20, really_enter_pm) 11180 really_enter_pm: 11181 mov ax, #0x18 11182 mov ds, ax 11183 ret 11184 11185 pmode_exit: 11186 mov eax, cr0 11187 and al, #0xfe 11188 mov cr0, eax 11189 JMP_AP(0xF000, really_exit_pm) 11190 really_exit_pm: 11191 ret 11192 11193 pmbios_gdt_desc: 11194 dw 0x30 11195 dw pmbios_gdt 11196 dw 0x000f 11197 11198 pmbios_gdt: 11199 dw 0, 0, 0, 0 11200 dw 0, 0, 0, 0 11201 dw 0xffff, 0, 0x9b00, 0x00cf ; 32 bit flat code segment (0x10) 11202 dw 0xffff, 0, 0x9300, 0x00cf ; 32 bit flat data segment (0x18) 11203 dw 0xffff, 0, 0x9b0f, 0x0000 ; 16 bit code segment base=0xf0000 limit=0xffff 11204 dw 0xffff, 0, 0x9300, 0x0000 ; 16 bit data segment base=0x0 limit=0xffff 11205 11143 11206 ;; for 'C' strings and other data, insert them here with 11144 11207 ;; a the following hack: … … 11469 11532 call pcibios_init_irqs 11470 11533 #endif 11534 call setup_lapic 11471 11535 call rom_scan 11472 11536
Note:
See TracChangeset
for help on using the changeset viewer.