1 | ; $Id: bootsector2-cpu-xcpt-2.asm 69111 2017-10-17 14:26:02Z vboxsync $
|
---|
2 | ;; @file
|
---|
3 | ; Bootsector test for debug exceptions.
|
---|
4 | ;
|
---|
5 | ; Recommended (but not necessary):
|
---|
6 | ; VBoxManage setextradata bs-cpu-xcpt-2 VBoxInternal/Devices/VMMDev/0/Config/TestingEnabled 1
|
---|
7 | ;
|
---|
8 |
|
---|
9 | ;
|
---|
10 | ; Copyright (C) 2007-2017 Oracle Corporation
|
---|
11 | ;
|
---|
12 | ; This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
13 | ; available from http://www.virtualbox.org. This file is free software;
|
---|
14 | ; you can redistribute it and/or modify it under the terms of the GNU
|
---|
15 | ; General Public License (GPL) as published by the Free Software
|
---|
16 | ; Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
17 | ; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
18 | ; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
19 | ;
|
---|
20 | ; The contents of this file may alternatively be used under the terms
|
---|
21 | ; of the Common Development and Distribution License Version 1.0
|
---|
22 | ; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
23 | ; VirtualBox OSE distribution, in which case the provisions of the
|
---|
24 | ; CDDL are applicable instead of those of the GPL.
|
---|
25 | ;
|
---|
26 | ; You may elect to license modified versions of this file under the
|
---|
27 | ; terms and conditions of either the GPL or the CDDL or both.
|
---|
28 | ;
|
---|
29 |
|
---|
30 |
|
---|
31 | ;*******************************************************************************
|
---|
32 | ;* Header Files *
|
---|
33 | ;*******************************************************************************
|
---|
34 | %include "iprt/asmdefs.mac"
|
---|
35 | %include "iprt/x86.mac"
|
---|
36 | %include "VBox/VMMDevTesting.mac"
|
---|
37 |
|
---|
38 |
|
---|
39 | ;
|
---|
40 | ; Include and execute the init code.
|
---|
41 | ;
|
---|
42 | %define BS2_INIT_RM
|
---|
43 | %define BS2_WITH_TRAPS
|
---|
44 | %define BS2_INC_RM
|
---|
45 | %define BS2_INC_PE16
|
---|
46 | %define BS2_INC_PE32
|
---|
47 | %define BS2_INC_PP16
|
---|
48 | %define BS2_INC_PP32
|
---|
49 | %define BS2_INC_PAE16
|
---|
50 | %define BS2_INC_PAE32
|
---|
51 | %define BS2_INC_LM16
|
---|
52 | %define BS2_INC_LM32
|
---|
53 | %define BS2_INC_LM64
|
---|
54 | %define BS2_WITH_TRAPRECS
|
---|
55 | %define BS2_WITH_XCPT_DB_CLEARING_TF
|
---|
56 | %include "bootsector2-common-init-code.mac"
|
---|
57 |
|
---|
58 |
|
---|
59 | ;
|
---|
60 | ; The main() function.
|
---|
61 | ;
|
---|
62 | BEGINPROC main
|
---|
63 | BITS 16
|
---|
64 | ;
|
---|
65 | ; Test prologue.
|
---|
66 | ;
|
---|
67 | mov ax, .s_szTstName
|
---|
68 | call TestInit_r86
|
---|
69 | call Bs2EnableA20_r86
|
---|
70 | cli ; raw-mode hack
|
---|
71 |
|
---|
72 |
|
---|
73 | ;
|
---|
74 | ; Execute the tests
|
---|
75 | ;
|
---|
76 | %if 1
|
---|
77 | call NAME(DoTestsForMode_rm_pe32)
|
---|
78 | %endif
|
---|
79 | %if 1
|
---|
80 | call NAME(DoTestsForMode_rm_pp32)
|
---|
81 | %endif
|
---|
82 | %if 1
|
---|
83 | call NAME(DoTestsForMode_rm_pae32)
|
---|
84 | %endif
|
---|
85 | %if 1
|
---|
86 | call NAME(DoTestsForMode_rm_lm64)
|
---|
87 | %endif
|
---|
88 |
|
---|
89 | ;
|
---|
90 | ; We're done.
|
---|
91 | ;
|
---|
92 | call TestTerm_r86
|
---|
93 | ret
|
---|
94 |
|
---|
95 | .s_szTstName:
|
---|
96 | db 'tstCpuXcpt2', 0
|
---|
97 | ENDPROC main
|
---|
98 |
|
---|
99 |
|
---|
100 | ;
|
---|
101 | ; Instantiate the template code.
|
---|
102 | ;
|
---|
103 | %include "bootsector2-template-footer.mac" ; reset the initial environemnt.
|
---|
104 |
|
---|
105 | %define TMPL_PE32
|
---|
106 | %include "bootsector2-cpu-xcpt-2-template.mac"
|
---|
107 | %define TMPL_PP32
|
---|
108 | %include "bootsector2-cpu-xcpt-2-template.mac"
|
---|
109 | %define TMPL_PAE32
|
---|
110 | %include "bootsector2-cpu-xcpt-2-template.mac"
|
---|
111 | %define TMPL_LM64
|
---|
112 | %include "bootsector2-cpu-xcpt-2-template.mac"
|
---|
113 |
|
---|
114 |
|
---|
115 | ;
|
---|
116 | ; End sections and image.
|
---|
117 | ;
|
---|
118 | %include "bootsector2-common-end.mac"
|
---|
119 |
|
---|