Last change
on this file since 56292 was 56292, checked in by vboxsync, 9 years ago |
Devices: Updated (C) year.
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.5 KB
|
Line | |
---|
1 | ;; @file
|
---|
2 | ;; Initial system setup which needs to run in protected mode.
|
---|
3 | ;;
|
---|
4 |
|
---|
5 | ;;
|
---|
6 | ;; Copyright (C) 2004-2015 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 |
|
---|
17 | SVR equ 0FEE000F0h
|
---|
18 | LVT_LINT0 equ 0FEE00350h
|
---|
19 | LVT_LINT1 equ 0FEE00360h
|
---|
20 |
|
---|
21 | public pmode_setup
|
---|
22 |
|
---|
23 | ;; Enable the local APIC and program LINT0/LINT1 entries. Without that,
|
---|
24 | ;; virtual wire interrupts could not be delivered. Note that the APIC must
|
---|
25 | ;; be enabled first because when disabled, all LVTs are forced masked.
|
---|
26 |
|
---|
27 | pmode_setup proc near
|
---|
28 |
|
---|
29 | .386
|
---|
30 | push eax
|
---|
31 | push esi
|
---|
32 | pushf
|
---|
33 | cli ; Interrupts would kill us!
|
---|
34 | call pmode_enter
|
---|
35 |
|
---|
36 | mov eax, cr0 ; Clear CR0.CD and CR0.NW
|
---|
37 | and eax, 09FFFFFFFh
|
---|
38 | mov cr0, eax
|
---|
39 |
|
---|
40 | mov esi, SVR ; Program the SVR -- enable the APIC,
|
---|
41 | mov eax, 010Fh ; set spurious interrupt vector to 15
|
---|
42 | mov [esi], eax
|
---|
43 |
|
---|
44 | mov esi, LVT_LINT0 ; Program LINT0 to ExtINT and unmask
|
---|
45 | mov eax, [esi]
|
---|
46 | and eax, 0FFFE00FFh
|
---|
47 | or ah, 7
|
---|
48 | mov [esi], eax
|
---|
49 |
|
---|
50 | mov esi, LVT_LINT1 ; Program LINT1 to NMI and unmask
|
---|
51 | mov eax, [esi]
|
---|
52 | and eax, 0FFFE00FFh
|
---|
53 | or ah, 4
|
---|
54 | mov [esi], eax
|
---|
55 |
|
---|
56 | call pmode_exit
|
---|
57 | popf
|
---|
58 | pop esi
|
---|
59 | pop eax
|
---|
60 | .286
|
---|
61 | ret
|
---|
62 |
|
---|
63 | pmode_setup endp
|
---|
Note:
See
TracBrowser
for help on using the repository browser.