Last change
on this file since 78398 was 76553, checked in by vboxsync, 6 years ago |
scm --update-copyright-year
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.5 KB
|
Line | |
---|
1 | ; $Id: pmsetup.inc 76553 2019-01-01 01:45:53Z vboxsync $
|
---|
2 | ;; @file
|
---|
3 | ; Initial system setup which needs to run in protected mode.
|
---|
4 | ;
|
---|
5 |
|
---|
6 | ;
|
---|
7 | ; Copyright (C) 2004-2019 Oracle Corporation
|
---|
8 | ;
|
---|
9 | ; This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | ; available from http://www.virtualbox.org. This file is free software;
|
---|
11 | ; you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | ; General Public License (GPL) as published by the Free Software
|
---|
13 | ; Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | ; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | ; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | ;
|
---|
17 |
|
---|
18 | SVR equ 0FEE000F0h
|
---|
19 | LVT_LINT0 equ 0FEE00350h
|
---|
20 | LVT_LINT1 equ 0FEE00360h
|
---|
21 |
|
---|
22 | public pmode_setup
|
---|
23 |
|
---|
24 | ;; Enable the local APIC and program LINT0/LINT1 entries. Without that,
|
---|
25 | ;; virtual wire interrupts could not be delivered. Note that the APIC must
|
---|
26 | ;; be enabled first because when disabled, all LVTs are forced masked.
|
---|
27 |
|
---|
28 | pmode_setup proc near
|
---|
29 |
|
---|
30 | .386
|
---|
31 | push eax
|
---|
32 | push esi
|
---|
33 | pushf
|
---|
34 | cli ; Interrupts would kill us!
|
---|
35 | call pmode_enter
|
---|
36 |
|
---|
37 | mov eax, cr0 ; Clear CR0.CD and CR0.NW
|
---|
38 | and eax, 09FFFFFFFh
|
---|
39 | mov cr0, eax
|
---|
40 |
|
---|
41 | mov esi, SVR ; Program the SVR -- enable the APIC,
|
---|
42 | mov eax, 010Fh ; set spurious interrupt vector to 15
|
---|
43 | mov [esi], eax
|
---|
44 |
|
---|
45 | mov esi, LVT_LINT0 ; Program LINT0 to ExtINT and unmask
|
---|
46 | mov eax, [esi]
|
---|
47 | and eax, 0FFFE00FFh
|
---|
48 | or ah, 7
|
---|
49 | mov [esi], eax
|
---|
50 |
|
---|
51 | mov esi, LVT_LINT1 ; Program LINT1 to NMI and unmask
|
---|
52 | mov eax, [esi]
|
---|
53 | and eax, 0FFFE00FFh
|
---|
54 | or ah, 4
|
---|
55 | mov [esi], eax
|
---|
56 |
|
---|
57 | call pmode_exit
|
---|
58 | popf
|
---|
59 | pop esi
|
---|
60 | pop eax
|
---|
61 | SET_DEFAULT_CPU_286
|
---|
62 | ret
|
---|
63 |
|
---|
64 | pmode_setup endp
|
---|
65 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.