VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-xcpt-1.asm@ 106061

Last change on this file since 106061 was 106061, checked in by vboxsync, 8 weeks ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.9 KB
Line 
1; $Id: bootsector2-cpu-xcpt-1.asm 106061 2024-09-16 14:03:52Z vboxsync $
2;; @file
3; Bootsector test for basic exception stuff.
4;
5; Recommended (but not necessary):
6; VBoxManage setextradata bs-cpu-xcpt-1 VBoxInternal/Devices/VMMDev/0/Config/TestingEnabled 1
7;
8
9;
10; Copyright (C) 2007-2024 Oracle and/or its affiliates.
11;
12; This file is part of VirtualBox base platform packages, as
13; available from https://www.virtualbox.org.
14;
15; This program is free software; you can redistribute it and/or
16; modify it under the terms of the GNU General Public License
17; as published by the Free Software Foundation, in version 3 of the
18; License.
19;
20; This program is distributed in the hope that it will be useful, but
21; WITHOUT ANY WARRANTY; without even the implied warranty of
22; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23; General Public License for more details.
24;
25; You should have received a copy of the GNU General Public License
26; along with this program; if not, see <https://www.gnu.org/licenses>.
27;
28; The contents of this file may alternatively be used under the terms
29; of the Common Development and Distribution License Version 1.0
30; (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
31; in the VirtualBox distribution, in which case the provisions of the
32; CDDL are applicable instead of those of the GPL.
33;
34; You may elect to license modified versions of this file under the
35; terms and conditions of either the GPL or the CDDL or both.
36;
37; SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
38;
39
40
41;*******************************************************************************
42;* Header Files *
43;*******************************************************************************
44%include "iprt/asmdefs.mac"
45%include "iprt/x86.mac"
46%include "VBox/VMMDevTesting.mac"
47
48
49;*******************************************************************************
50;* Defined Constants And Macros *
51;*******************************************************************************
52;; Base address at which we can start testing page tables and page directories.
53%define TST_SCRATCH_PD_BASE BS2_MUCK_ABOUT_BASE
54;; Base address at which we can start testing the page pointer table.
55%define TST_SCRATCH_PDPT_BASE (1 << X86_PDPT_SHIFT)
56;; Base address at which we can start testing the page map level 4.
57%define TST_SCRATCH_PML4_BASE ((1 << X86_PML4_SHIFT) + TST_SCRATCH_PD_BASE)
58
59
60;
61; Include and execute the init code.
62;
63 %define BS2_INIT_RM
64 %define BS2_WITH_TRAPS
65 %define BS2_INC_RM
66 %define BS2_INC_PE16
67 %define BS2_INC_PE32
68 %define BS2_INC_PP16
69 %define BS2_INC_PP32
70 %define BS2_INC_PAE16
71 %define BS2_INC_PAE32
72 %define BS2_INC_LM16
73 %define BS2_INC_LM32
74 %define BS2_INC_LM64
75 %define BS2_WITH_TRAPRECS
76 %include "bootsector2-common-init-code.mac"
77
78
79;
80; The main() function.
81;
82BEGINPROC main
83 BITS 16
84 ;
85 ; Test prologue.
86 ;
87 mov ax, .s_szTstName
88 call TestInit_r86
89 call Bs2EnableA20_r86
90
91
92 ;
93 ; Execute the tests
94 ;
95%if 1
96 call NAME(DoTestsForMode_rm_pe32)
97%endif
98%if 1
99 call NAME(DoTestsForMode_rm_pp32)
100%endif
101%if 1
102 call NAME(DoTestsForMode_rm_pae32)
103%endif
104%if 1
105 call NAME(DoTestsForMode_rm_lm64)
106%endif
107
108 ;
109 ; We're done.
110 ;
111 call TestTerm_r86
112 ret
113
114.s_szTstName:
115 db 'tstCpuXcpt1', 0
116ENDPROC main
117
118
119;
120; Instantiate the template code.
121;
122%include "bootsector2-template-footer.mac" ; reset the initial environemnt.
123
124%define TMPL_PE32
125%include "bootsector2-cpu-xcpt-1-template.mac"
126%define TMPL_PP32
127%include "bootsector2-cpu-xcpt-1-template.mac"
128%define TMPL_PAE32
129%include "bootsector2-cpu-xcpt-1-template.mac"
130%define TMPL_LM64
131%include "bootsector2-cpu-xcpt-1-template.mac"
132
133
134;
135; End sections and image.
136;
137%include "bootsector2-common-end.mac"
138
Note: See TracBrowser for help on using the repository browser.

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