VirtualBox

source: vbox/trunk/src/VBox/Devices/PC/BIOS/pmsetup.inc@ 51255

Last change on this file since 51255 was 51057, checked in by vboxsync, 11 years ago

Improved code readability slightly.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.4 KB
Line 
1;; @file
2;; Initial system setup which needs to run in protected mode.
3;;
4
5;;
6;; Copyright (C) 2004-2011 Oracle Corporation
7;;
8;; This file is part of VirtualBox Open Source Edition (OSE), as
9;; available from http://www.virtualbox.org. This file is free software;
10;; you can redistribute it and/or modify it under the terms of the GNU
11;; General Public License (GPL) as published by the Free Software
12;; Foundation, in version 2 as it comes in the "COPYING" file of the
13;; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14;; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15;;
16
17LVT_LINT0 equ 0FEE00350h
18LVT_LINT1 equ 0FEE00360h
19
20public pmode_setup
21
22;; Program LINT0/LINT1 entries in the local APIC. Some Linux kernels (e.g.,
23;; RHEL4 SMP 32-bit) expect the entries to be unmasked in virtual wire mode.
24;; Also make sure APIC timer is masked.
25
26pmode_setup proc near
27
28 .386
29 push eax
30 push esi
31 pushf
32 cli ; Interrupts would kill us!
33 call pmode_enter
34
35 mov eax, cr0 ; Clear CR0.CD and CR0.NW
36 and eax, 09FFFFFFFh
37 mov cr0, eax
38
39 mov esi, LVT_LINT0 ; Program LINT0 to ExtINT and unmask
40 mov eax, [esi]
41 and eax, 0FFFE00FFh
42 or ah, 7
43 mov [esi], eax
44
45 mov esi, LVT_LINT1 ; Program LINT1 to NMI and unmask
46 mov eax, [esi]
47 and eax, 0FFFE00FFh
48 or ah, 4
49 mov [esi], eax
50
51 call pmode_exit
52 popf
53 pop esi
54 pop eax
55 .286
56 ret
57
58pmode_setup endp
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette