VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-instantiate-common.h@ 102157

Last change on this file since 102157 was 98103, checked in by vboxsync, 2 years ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.4 KB
Line 
1/* $Id: bs3-cmn-instantiate-common.h 98103 2023-01-17 14:15:46Z vboxsync $ */
2/** @file
3 * BS3Kit - Common template instantiator body.
4 */
5
6/*
7 * Copyright (C) 2007-2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * The contents of this file may alternatively be used under the terms
26 * of the Common Development and Distribution License Version 1.0
27 * (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
28 * in the VirtualBox distribution, in which case the provisions of the
29 * CDDL are applicable instead of those of the GPL.
30 *
31 * You may elect to license modified versions of this file under the
32 * terms and conditions of either the GPL or the CDDL or both.
33 *
34 * SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
35 */
36
37
38/*
39 * Instantiating common code (c16, c32, c64).
40 * This must be done first.
41 */
42
43/** @def BS3_INSTANTIATING_CMN
44 * @ingroup grp_bs3kit_tmpl
45 * Indicates that we're instantiating common code (c16, c32, c64).
46 */
47#define BS3_INSTANTIATING_CMN
48
49#ifdef BS3_CMN_INSTANTIATE_FILE1
50
51# define BS3_CMN_INSTANTIATE_FILE1_B <BS3_CMN_INSTANTIATE_FILE1>
52
53# if ARCH_BITS == 16 /* 16-bit - real mode. */
54# define TMPL_MODE BS3_MODE_RM
55# include <bs3kit/bs3kit-template-header.h>
56# include BS3_CMN_INSTANTIATE_FILE1_B
57# include <bs3kit/bs3kit-template-footer.h>
58# endif
59
60# if ARCH_BITS == 32 /* 32-bit - paged protected mode. */
61# define TMPL_MODE BS3_MODE_PP32
62# include <bs3kit/bs3kit-template-header.h>
63# include BS3_CMN_INSTANTIATE_FILE1_B
64# include <bs3kit/bs3kit-template-footer.h>
65# endif
66
67# if ARCH_BITS == 64 /* 64-bit. */
68# define TMPL_MODE BS3_MODE_LM64
69# include <bs3kit/bs3kit-template-header.h>
70# include BS3_CMN_INSTANTIATE_FILE1_B
71# include <bs3kit/bs3kit-template-footer.h>
72# endif
73
74#endif
75
76#undef BS3_INSTANTIATING_CMN
77
78
79/*
80 * Instantiating code for each individual mode (rm, pe16, pe16_32, ...).
81 */
82
83/** @def BS3_INSTANTIATING_MODE
84 * @ingroup grp_bs3kit_tmpl
85 * Indicates that we're instantiating mode specific code (rm, pe16, ...).
86 */
87#define BS3_INSTANTIATING_MODE
88
89#ifdef BS3_MODE_INSTANTIATE_FILE1
90
91# define BS3_MODE_INSTANTIATE_FILE1_B <BS3_MODE_INSTANTIATE_FILE1>
92
93# if ARCH_BITS == 16 /* 16-bit */
94
95# define TMPL_MODE BS3_MODE_RM
96# include <bs3kit/bs3kit-template-header.h>
97# include BS3_MODE_INSTANTIATE_FILE1_B
98# include <bs3kit/bs3kit-template-footer.h>
99
100# define TMPL_MODE BS3_MODE_PE16
101# include <bs3kit/bs3kit-template-header.h>
102# include BS3_MODE_INSTANTIATE_FILE1_B
103# include <bs3kit/bs3kit-template-footer.h>
104
105# define TMPL_MODE BS3_MODE_PE16_V86
106# include <bs3kit/bs3kit-template-header.h>
107# include BS3_MODE_INSTANTIATE_FILE1_B
108# include <bs3kit/bs3kit-template-footer.h>
109
110# define TMPL_MODE BS3_MODE_PE32_16
111# include <bs3kit/bs3kit-template-header.h>
112# include BS3_MODE_INSTANTIATE_FILE1_B
113# include <bs3kit/bs3kit-template-footer.h>
114
115# define TMPL_MODE BS3_MODE_PEV86
116# include <bs3kit/bs3kit-template-header.h>
117# include BS3_MODE_INSTANTIATE_FILE1_B
118# include <bs3kit/bs3kit-template-footer.h>
119
120# define TMPL_MODE BS3_MODE_PP16
121# include <bs3kit/bs3kit-template-header.h>
122# include BS3_MODE_INSTANTIATE_FILE1_B
123# include <bs3kit/bs3kit-template-footer.h>
124
125# define TMPL_MODE BS3_MODE_PP16_V86
126# include <bs3kit/bs3kit-template-header.h>
127# include BS3_MODE_INSTANTIATE_FILE1_B
128# include <bs3kit/bs3kit-template-footer.h>
129
130# define TMPL_MODE BS3_MODE_PP32_16
131# include <bs3kit/bs3kit-template-header.h>
132# include BS3_MODE_INSTANTIATE_FILE1_B
133# include <bs3kit/bs3kit-template-footer.h>
134
135# define TMPL_MODE BS3_MODE_PPV86
136# include <bs3kit/bs3kit-template-header.h>
137# include BS3_MODE_INSTANTIATE_FILE1_B
138# include <bs3kit/bs3kit-template-footer.h>
139
140# define TMPL_MODE BS3_MODE_PAE16
141# include <bs3kit/bs3kit-template-header.h>
142# include BS3_MODE_INSTANTIATE_FILE1_B
143# include <bs3kit/bs3kit-template-footer.h>
144
145# define TMPL_MODE BS3_MODE_PAE16_V86
146# include <bs3kit/bs3kit-template-header.h>
147# include BS3_MODE_INSTANTIATE_FILE1_B
148# include <bs3kit/bs3kit-template-footer.h>
149
150# define TMPL_MODE BS3_MODE_PAE32_16
151# include <bs3kit/bs3kit-template-header.h>
152# include BS3_MODE_INSTANTIATE_FILE1_B
153# include <bs3kit/bs3kit-template-footer.h>
154
155# define TMPL_MODE BS3_MODE_PAEV86
156# include <bs3kit/bs3kit-template-header.h>
157# include BS3_MODE_INSTANTIATE_FILE1_B
158# include <bs3kit/bs3kit-template-footer.h>
159
160# define TMPL_MODE BS3_MODE_LM16
161# include <bs3kit/bs3kit-template-header.h>
162# include BS3_MODE_INSTANTIATE_FILE1_B
163# include <bs3kit/bs3kit-template-footer.h>
164
165# endif
166
167# if ARCH_BITS == 32 /* 32-bit */
168
169# define TMPL_MODE BS3_MODE_PE16_32
170# include <bs3kit/bs3kit-template-header.h>
171# include BS3_MODE_INSTANTIATE_FILE1_B
172# include <bs3kit/bs3kit-template-footer.h>
173
174# define TMPL_MODE BS3_MODE_PE32
175# include <bs3kit/bs3kit-template-header.h>
176# include BS3_MODE_INSTANTIATE_FILE1_B
177# include <bs3kit/bs3kit-template-footer.h>
178
179# define TMPL_MODE BS3_MODE_PP16_32
180# include <bs3kit/bs3kit-template-header.h>
181# include BS3_MODE_INSTANTIATE_FILE1_B
182# include <bs3kit/bs3kit-template-footer.h>
183
184# define TMPL_MODE BS3_MODE_PP32
185# include <bs3kit/bs3kit-template-header.h>
186# include BS3_MODE_INSTANTIATE_FILE1_B
187# include <bs3kit/bs3kit-template-footer.h>
188
189# define TMPL_MODE BS3_MODE_PAE16_32
190# include <bs3kit/bs3kit-template-header.h>
191# include BS3_MODE_INSTANTIATE_FILE1_B
192# include <bs3kit/bs3kit-template-footer.h>
193
194# define TMPL_MODE BS3_MODE_PAE32
195# include <bs3kit/bs3kit-template-header.h>
196# include BS3_MODE_INSTANTIATE_FILE1_B
197# include <bs3kit/bs3kit-template-footer.h>
198
199# define TMPL_MODE BS3_MODE_LM32
200# include <bs3kit/bs3kit-template-header.h>
201# include BS3_MODE_INSTANTIATE_FILE1_B
202# include <bs3kit/bs3kit-template-footer.h>
203
204# endif
205
206# if ARCH_BITS == 64 /* 64-bit. */
207# define TMPL_MODE BS3_MODE_LM64
208# include <bs3kit/bs3kit-template-header.h>
209# include BS3_MODE_INSTANTIATE_FILE1_B
210# include <bs3kit/bs3kit-template-footer.h>
211# endif
212
213#endif
214
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