Last change
on this file since 47631 was 38699, checked in by vboxsync, 13 years ago |
Converted system BIOS to Watcom C.
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.3 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 |
|
---|
17 | LVT0 equ 0FEE00350h
|
---|
18 | LVT1 equ 0FEE00360h
|
---|
19 |
|
---|
20 | public pmode_setup
|
---|
21 |
|
---|
22 | ;; Program LVT0/LVT1 entries in the local APIC. Some Linux kernels (e.g., RHEL4
|
---|
23 | ;; SMP 32-bit) expect the entries to be unmasked in virtual wire mode.
|
---|
24 |
|
---|
25 | pmode_setup proc near
|
---|
26 |
|
---|
27 | .386
|
---|
28 | push eax
|
---|
29 | push esi
|
---|
30 | pushf
|
---|
31 | cli ; Interrupts would kill us!
|
---|
32 | call pmode_enter
|
---|
33 | mov eax, cr0 ; Clear CR0.CD and CR0.NW
|
---|
34 | and eax, 09FFFFFFFh
|
---|
35 | mov cr0, eax
|
---|
36 | mov esi, LVT0 ; Program LVT0 to ExtINT and unmask
|
---|
37 | mov eax, [esi]
|
---|
38 | and eax, 0FFFE00FFh
|
---|
39 | or ah, 7
|
---|
40 | mov [esi], eax
|
---|
41 | mov esi, LVT1 ; Program LVT1 to NMI and unmask
|
---|
42 | mov eax, [esi]
|
---|
43 | and eax, 0FFFE00FFh
|
---|
44 | or ah, 4
|
---|
45 | mov [esi], eax
|
---|
46 | call pmode_exit
|
---|
47 | popf
|
---|
48 | pop esi
|
---|
49 | pop eax
|
---|
50 | .286
|
---|
51 | ret
|
---|
52 |
|
---|
53 | pmode_setup endp
|
---|
Note:
See
TracBrowser
for help on using the repository browser.