VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk@ 107464

Last change on this file since 107464 was 107102, checked in by vboxsync, 3 months ago

ValidationKit/bootsectors: Implement BS3_ASSERT() to actually do something useful; bugref:9898; bugref:10658; jiraref:VBP-1207

Image size note: this increases image sizes (about +15KB total between
bs3-cpu-instr-{2,3,4}). I've committed changes to make all of the
ValidatonKit/bootsectors images still fit within their constraints.
Some further work may be warranted to either eliminate unneeded asserts;
or wrap them in runtime `if's to shrink and/or coalesce failure strings.

Performance note: completion times for bs3-cpu-instr-{2,3,4} with this
fully disabled vs. are within 2% of each other -- not significant.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 26.9 KB
Line 
1# $Id: Makefile.kmk 107102 2024-11-22 07:57:01Z vboxsync $
2## @file
3# VirtualBox Validation Kit - Bootsector Kit v3
4#
5
6#
7# Copyright (C) 2006-2024 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
37SUB_DEPTH = ../../../../..
38include $(KBUILD_PATH)/subheader.kmk
39
40
41
42# Boot Sector post-link tool (used via the parent Config.kmk).
43BLDPROGS += VBoxBs3Linker
44VBoxBs3Linker_TEMPLATE = VBoxAdvBldProg
45VBoxBs3Linker_SOURCES = $(VBOX_PATH_BS3KIT_SRC)/VBoxBs3Linker.cpp
46
47
48# 64-bit relocation conversion tool (used via the parent Config.kmk).
49BLDPROGS += VBoxBs3ObjConverter
50VBoxBs3ObjConverter_TEMPLATE = VBoxBldProg
51VBoxBs3ObjConverter_DEFS = BS3KIT_BS3CLASS16CODE=$(BS3KIT_BS3CLASS16CODE) IN_RT_R3
52VBoxBs3ObjConverter_SOURCES = \
53 $(VBOX_PATH_BS3KIT_SRC)/VBoxBs3ObjConverter.cpp \
54 $(PATH_ROOT)/src/VBox/Runtime/common/sort/shellsort.cpp
55
56
57# The boot sector for regular floppies.
58MISCBINS += bs3-bootsector
59bs3-bootsector_TEMPLATE = VBoxBS3KitBS
60bs3-bootsector_SOURCES = bs3-bootsector.asm
61
62# The boot sector for 63.5MB floppies.
63MISCBINS += bs3-bootsector-63MB
64bs3-bootsector-63MB_TEMPLATE = VBoxBS3KitBS
65bs3-bootsector-63MB_DEFS = BS3KIT_BOOTSECTOR_SUPPORT_63_5MB_FLOPPIES
66bs3-bootsector-63MB_SOURCES = bs3-bootsector.asm
67
68
69#
70# Common sources to be compiled into _p16, _p32 and _p64 versions.
71#
72VBOX_BS3KIT_COMMON_SOURCES = \
73 bs3-cmn-A20Disable.asm \
74 bs3-cmn-A20Enable.asm \
75 bs3-cmn-Assert.c \
76 bs3-cmn-GetCpuVendor.c \
77 bs3-cmn-GetModeName.c \
78 bs3-cmn-GetModeNameShortLower.c \
79 bs3-cmn-KbdRead.asm \
80 bs3-cmn-KbdWait.asm \
81 bs3-cmn-KbdWrite.asm \
82 bs3-cmn-Shutdown.asm \
83 bs3-cmn-Panic.asm \
84 bs3-cmn-PrintChr.asm \
85 bs3-cmn-Printf.c \
86 bs3-cmn-PrintU32.asm \
87 bs3-cmn-PrintX32.asm \
88 bs3-cmn-PrintStr.c \
89 bs3-cmn-PrintStrN.asm \
90 bs3-cmn-StrFormatV.c \
91 bs3-cmn-StrPrintf.c \
92 bs3-cmn-StrLen.c \
93 bs3-cmn-StrNLen.c \
94 bs3-cmn-StrCpy.c \
95 bs3-cmn-MemChr.asm \
96 bs3-cmn-MemCmp.asm \
97 bs3-cmn-MemCpy.c \
98 bs3-cmn-MemPCpy.c \
99 bs3-cmn-MemMove.c \
100 bs3-cmn-MemSet.asm \
101 bs3-cmn-MemZero.asm \
102 bs3-cmn-MemAlloc.c \
103 bs3-cmn-MemAllocZ.c \
104 bs3-cmn-MemFree.c \
105 bs3-cmn-MemGuardedTestPage.c \
106 bs3-cmn-MemPrintInfo.c \
107 bs3-cmn-PagingData.c \
108 bs3-cmn-PagingInitRootForPP.c \
109 bs3-cmn-PagingInitRootForPAE.c \
110 bs3-cmn-PagingInitRootForLM.c \
111 bs3-cmn-PagingAlias.c \
112 bs3-cmn-PagingProtect.c \
113 bs3-cmn-PagingQueryAddressInfo.c \
114 bs3-cmn-PagingSetupCanonicalTraps.c \
115 bs3-cmn-pic-data.c \
116 bs3-cmn-PicMaskAll.c \
117 bs3-cmn-PicUpdateMask.c \
118 bs3-cmn-PicSetup.c \
119 bs3-cmn-pit.c \
120 bs3-cmn-PitIrqHandler.c \
121 bs3-cmn-RegCtxRestore.asm \
122 bs3-cmn-RegCtxConvertToRingX.c \
123 bs3-cmn-RegCtxConvertV86ToRm.c \
124 bs3-cmn-RegCtxPrint.c \
125 bs3-cmn-RegCtxGetRspSsAsCurPtr.c \
126 bs3-cmn-RegCtxSave.asm \
127 bs3-cmn-RegCtxSaveEx.asm \
128 bs3-cmn-RegCtxSaveForMode.c \
129 bs3-cmn-RegCtxSetGrpSegFromCurPtr.c \
130 bs3-cmn-RegCtxSetGrpSegFromFlat.c \
131 bs3-cmn-RegCtxSetRipCsFromCurPtr.c \
132 bs3-cmn-RegCtxSetRipCsFromFlat.c \
133 bs3-cmn-RegCtxSetRipCsFromLnkPtr.c \
134 bs3-cmn-RegCtxSetGpr.c \
135 bs3-cmn-RegGetCr0.asm \
136 bs3-cmn-RegGetCr2.asm \
137 bs3-cmn-RegGetCr3.asm \
138 bs3-cmn-RegGetCr4.asm \
139 bs3-cmn-RegSetCr0.asm \
140 bs3-cmn-RegSetCr2.asm \
141 bs3-cmn-RegSetCr3.asm \
142 bs3-cmn-RegSetCr4.asm \
143 bs3-cmn-RegGetDr0.asm \
144 bs3-cmn-RegGetDr1.asm \
145 bs3-cmn-RegGetDr2.asm \
146 bs3-cmn-RegGetDr3.asm \
147 bs3-cmn-RegGetDr6.asm \
148 bs3-cmn-RegGetDr7.asm \
149 bs3-cmn-RegGetDrX.asm \
150 bs3-cmn-RegSetDr0.asm \
151 bs3-cmn-RegSetDr1.asm \
152 bs3-cmn-RegSetDr2.asm \
153 bs3-cmn-RegSetDr3.asm \
154 bs3-cmn-RegSetDr6.asm \
155 bs3-cmn-RegSetDr7.asm \
156 bs3-cmn-RegSetDrX.asm \
157 bs3-cmn-RegGetTr.asm \
158 bs3-cmn-RegSetTr.asm \
159 bs3-cmn-RegGetLdtr.asm \
160 bs3-cmn-RegSetLdtr.asm \
161 bs3-cmn-RegGetXcr0.asm \
162 bs3-cmn-RegSetXcr0.asm \
163 bs3-cmn-ExtCtxInit.c \
164 bs3-cmn-ExtCtxSave.asm \
165 bs3-cmn-ExtCtxSaveEx.asm \
166 bs3-cmn-ExtCtxRestore.asm \
167 bs3-cmn-ExtCtxRestoreEx.asm \
168 bs3-cmn-ExtCtxGetSize.c \
169 bs3-cmn-ExtCtxAlloc.c \
170 bs3-cmn-ExtCtxFree.c \
171 bs3-cmn-ExtCtxCopy.c \
172 bs3-cmn-ExtCtxGetFcw.c \
173 bs3-cmn-ExtCtxSetFcw.c \
174 bs3-cmn-ExtCtxGetFsw.c \
175 bs3-cmn-ExtCtxSetFsw.c \
176 bs3-cmn-ExtCtxGetAbridgedFtw.c \
177 bs3-cmn-ExtCtxSetAbridgedFtw.c \
178 bs3-cmn-ExtCtxGetMxCsr.c \
179 bs3-cmn-ExtCtxSetMxCsr.c \
180 bs3-cmn-ExtCtxGetMxCsrMask.c \
181 bs3-cmn-ExtCtxSetMxCsrMask.c \
182 bs3-cmn-ExtCtxGetMm.c \
183 bs3-cmn-ExtCtxSetMm.c \
184 bs3-cmn-ExtCtxGetXmm.c \
185 bs3-cmn-ExtCtxSetXmm.c \
186 bs3-cmn-ExtCtxGetYmm.c \
187 bs3-cmn-ExtCtxSetYmm.c \
188 bs3-cmn-SelFar32ToFlat32.c \
189 bs3-cmn-SelFar32ToFlat32NoClobber.asm \
190 bs3-cmn-SelProtFar32ToFlat32.c \
191 bs3-cmn-SelProtModeCodeToRealMode.asm \
192 bs3-cmn-SelRealModeCodeToProtMode.asm \
193 bs3-cmn-SelRealModeCodeToProtFar16.c \
194 bs3-cmn-SelFlatCodeToRealMode.asm \
195 bs3-cmn-SelFlatCodeToProtFar16.asm \
196 bs3-cmn-SelRealModeDataToProtFar16.asm \
197 bs3-cmn-SelProtFar16DataToRealMode.asm \
198 bs3-cmn-SelRealModeDataToFlat.asm \
199 bs3-cmn-SelProtFar16DataToFlat.asm \
200 bs3-cmn-SelFlatDataToProtFar16.asm \
201 bs3-cmn-SelFlatDataToRealMode.asm \
202 bs3-cmn-SelLnkCodePtrToCurPtr.c \
203 bs3-cmn-SelLnkPtrToCurPtr.c \
204 bs3-cmn-SelLnkPtrToFlat.c \
205 bs3-cmn-SelSetup16BitData.c \
206 bs3-cmn-SelSetup16BitCode.c \
207 bs3-cmn-SelSetup32BitCode.c \
208 bs3-cmn-SelSetupGate.c \
209 bs3-cmn-SelSetupGate64.c \
210 bs3-cmn-SlabInit.c \
211 bs3-cmn-SlabAlloc.c \
212 bs3-cmn-SlabAllocEx.c \
213 bs3-cmn-SlabAllocFixed.c \
214 bs3-cmn-SlabFree.c \
215 bs3-cmn-SlabListInit.c \
216 bs3-cmn-SlabListAdd.c \
217 bs3-cmn-SlabListAlloc.c \
218 bs3-cmn-SlabListAllocEx.c \
219 bs3-cmn-SlabListFree.c \
220 bs3-cmn-SwitchHlpConvRealModeRetfPopBpDecBpAndReturn.asm \
221 bs3-cmn-SwitchHlpConvProtModeRetfPopBpDecBpAndReturn.asm \
222 bs3-cmn-SwitchToRing0.asm \
223 bs3-cmn-SwitchToRing1.asm \
224 bs3-cmn-SwitchToRing2.asm \
225 bs3-cmn-SwitchToRing3.asm \
226 bs3-cmn-SwitchToRingX.asm \
227 bs3-cmn-SwitchTo16Bit.asm \
228 bs3-cmn-SwitchTo16BitV86.asm \
229 bs3-cmn-SwitchTo32Bit.asm \
230 bs3-cmn-SwitchTo64Bit.asm \
231 bs3-cmn-Syscall.asm \
232 bs3-cmn-TestData.c \
233 bs3-cmn-TestInit.c \
234 bs3-cmn-TestFailed.c \
235 bs3-cmn-TestNow.asm \
236 bs3-cmn-TestSkipped.c \
237 bs3-cmn-TestSub.c \
238 bs3-cmn-TestSubDone.c \
239 bs3-cmn-TestSubErrorCount.c \
240 bs3-cmn-TestSubSub.c \
241 bs3-cmn-TestSubSubDone.c \
242 bs3-cmn-TestSubSubErrorCount.c \
243 bs3-cmn-TestTerm.c \
244 bs3-cmn-TestSendCmdWithStr.asm \
245 bs3-cmn-TestSendCmdWithU32.asm \
246 bs3-cmn-TestIsVmmDevTestingPresent.asm \
247 bs3-cmn-TestCheckRegCtxEx.c \
248 bs3-cmn-TestCheckExtCtx.c \
249 bs3-cmn-TestQueryCfgU8.asm \
250 bs3-cmn-TestQueryCfgU16.asm \
251 bs3-cmn-TestQueryCfgU32.asm \
252 bs3-cmn-TestHostPrintf.c \
253 bs3-cmn-TestPrintf.c \
254 bs3-cmn-TestValue.c \
255 bs3-cmn-TrapReInit.c \
256 bs3-cmn-TrapRmV86Init.c \
257 bs3-cmn-TrapRmV86SetGate.c \
258 bs3-cmn-Trap16Init.c \
259 bs3-cmn-Trap16SetGate.c \
260 bs3-cmn-Trap32Init.c \
261 bs3-cmn-Trap32SetGate.c \
262 bs3-cmn-Trap64Init.c \
263 bs3-cmn-Trap64SetGate.c \
264 bs3-cmn-TrapSetDpl.c \
265 bs3-cmn-TrapDefaultHandler.c \
266 bs3-cmn-TrapHandlersData.asm \
267 bs3-cmn-TrapPrintFrame.c \
268 bs3-cmn-TrapSetHandler.c \
269 bs3-cmn-TrapSetHandlerEx.c \
270 bs3-cmn-TrapSetJmp.asm \
271 bs3-cmn-TrapSetJmpAndRestore.c \
272 bs3-cmn-TrapSetJmpAndRestoreInRm.c \
273 bs3-cmn-TrapSetJmpAndRestoreWithRm.c \
274 bs3-cmn-TrapSetJmpAndRestoreWithExtCtx.c \
275 bs3-cmn-TrapSetJmpAndRestoreWithExtCtxAndRm.c \
276 bs3-cmn-TrapUnsetJmp.c \
277 bs3-cmn-UtilSetFullGdtr.asm \
278 bs3-cmn-UtilSetFullIdtr.asm \
279 bs3-cmn-TestDoModesByOneHlp.asm \
280 ../../../Runtime/common/asm/ASMBitFirstClear.asm \
281 ../../../Runtime/common/asm/ASMBitFirstSet.asm \
282 ../../../Runtime/common/asm/ASMBitNextClear.asm \
283 ../../../Runtime/common/asm/ASMBitNextSet.asm \
284 ../../../Runtime/common/asm/ASMBitFirstSetU16.asm \
285 ../../../Runtime/common/asm/ASMBitFirstSetU32.asm \
286 ../../../Runtime/common/asm/ASMBitFirstSetU64.asm \
287 ../../../Runtime/common/asm/ASMBitLastSetU16.asm \
288 ../../../Runtime/common/asm/ASMBitLastSetU32.asm \
289 ../../../Runtime/common/asm/ASMBitLastSetU64.asm \
290 ../../../Runtime/common/asm/ASMMemFirstMismatchingU8.asm \
291 ../../../Runtime/common/asm/ASMSerializeInstruction-cpuid.asm \
292 ../../../Runtime/common/asm/ASMSerializeInstruction-iret.asm \
293 ../../../Runtime/common/asm/ASMSerializeInstruction-rdtscp.asm \
294 ../../../Runtime/common/asm/ASMCpuIdExSlow.asm \
295 ../../../Runtime/common/asm/ASMCpuId.asm \
296 ../../../Runtime/common/asm/ASMCpuId_Idx_ECX.asm \
297 ../../../Runtime/common/asm/ASMWrMsr.asm \
298 ../../../Runtime/common/asm/ASMGetXcr0.asm \
299 ../../../Runtime/common/asm/ASMSetXcr0.asm \
300 ../../../Runtime/common/asm/ASMSetFlags.asm \
301 ../../../Runtime/common/asm/ASMGetFlags.asm \
302 ../../../Runtime/common/asm/ASMMultU64ByU32DivByU32.asm
303
304# The 16-bit BS3Kit library.
305LIBRARIES += bs3kit-common-16
306bs3kit-common-16_TEMPLATE = VBoxBS3KitImg
307bs3kit-common-16_INSTTYPE = none
308bs3kit-common-16_DEFS = TMPL_PE16 BS3_CMN_ONLY
309bs3kit-common-16_ASDEFS = RT_ASMDEFS_INC_FIRST_FILE
310bs3kit-common-16_SOURCES = $(VBOX_BS3KIT_COMMON_SOURCES) \
311 bs3-system-data.asm \
312 bs3-rm-InitAll.c \
313 bs3-rm-InitAllWithHighDlls.c \
314 bs3-rm-InitMemory.c \
315 bs3-rm-InitGdt.c \
316 bs3-rm-InitHighDlls.c \
317 bs3-cmn-hexdigits.c \
318 bs3-cmn-CpuDetectData.c \
319 bs3-cmn-PerCpuData.c \
320 bs3-cmn-ConvertRMStackToP16UsingCxReturnToAx.asm \
321 bs3-cmn-UInt64Div.c \
322 bs3-cmn-UInt32Div.c \
323 bs3-wc16-U8DR.asm \
324 bs3-wc16-U8DQ.asm \
325 bs3-wc16-I8DR.asm \
326 bs3-wc16-I8DQ.asm \
327 bs3-wc16-I8RS.asm \
328 bs3-wc16-U8RS.asm \
329 bs3-wc16-U8LS.asm \
330 bs3-wc16-U4D.asm \
331 bs3-wc16-I4D.asm \
332 bs3-c16-SwitchFromV86To16BitAndCallC.asm \
333 bs3-c16-Trap16Generic.asm \
334 bs3-c16-TrapRmV86Generic.asm \
335 bs3-c16-TrapRmV86Data.c \
336 bs3-c16-CreateHybridFarRet.asm
337bs3kit-common-16_bs3-cmn-UInt64Div.c_CFLAGS = -oh -d0 # -d1+ vs -d0 saves 0x6a3-0x577 = 0x12C (300)!
338
339$(call BS3KIT_FN_GEN_CMN_FARSTUB,bs3kit-common-16,ASMMemFirstMismatchingU8,8)
340$(call BS3KIT_FN_GEN_CMN_FARSTUB,bs3kit-common-16,ASMMemFirstNonZero,6)
341$(call BS3KIT_FN_GEN_CMN_FARSTUB,bs3kit-common-16,ASMCpuIdExSlow,32)
342$(call BS3KIT_FN_GEN_CMN_FARSTUB,bs3kit-common-16,ASMCpuId,20)
343$(call BS3KIT_FN_GEN_CMN_FARSTUB,bs3kit-common-16,ASMWrMsr,12)
344$(call BS3KIT_FN_GEN_CMN_FARSTUB,bs3kit-common-16,ASMSetXcr0,8)
345$(call BS3KIT_FN_GEN_CMN_FARSTUB,bs3kit-common-16,ASMGetXcr0,0)
346-include $(PATH_SUB_CURRENT)/bs3kit-autostubs.kmk # manually generated from headers, see bottom of this file.
347
348# The 32-bit BS3Kit library.
349LIBRARIES += bs3kit-common-32
350bs3kit-common-32_TEMPLATE = VBoxBS3KitImg32
351bs3kit-common-32_INSTTYPE = none
352bs3kit-common-32_DEFS = TMPL_PE32 BS3_CMN_ONLY
353bs3kit-common-32_ASDEFS = RT_ASMDEFS_INC_FIRST_FILE
354bs3kit-common-32_SOURCES = $(VBOX_BS3KIT_COMMON_SOURCES) \
355 bs3-cmn-PagingMapRamAbove4GForLM.c \
356 bs3-cmn-SwitchHlpConvFlatRetToRetfProtMode.asm \
357 bs3-cmn-UInt64Div.c \
358 bs3-wc32-U8D.asm \
359 bs3-wc32-I8D.asm \
360 bs3-wc32-I8RS.asm \
361 bs3-wc32-U8RS.asm \
362 bs3-wc32-U8LS.asm \
363 bs3-wc32-U8M.asm \
364 bs3-c32-Trap32Generic.asm
365
366# The 64-bit BS3Kit library.
367LIBRARIES += bs3kit-common-64
368bs3kit-common-64_TEMPLATE = VBoxBS3KitImg64
369bs3kit-common-64_INSTTYPE = none
370bs3kit-common-64_DEFS = TMPL_LM64 BS3_CMN_ONLY
371bs3kit-common-64_ASDEFS = RT_ASMDEFS_INC_FIRST_FILE
372bs3kit-common-64_SOURCES = $(VBOX_BS3KIT_COMMON_SOURCES) \
373 bs3-cmn-PagingMapRamAbove4GForLM.c \
374 bs3-cmn-SwitchHlpConvFlatRetToRetfProtMode.asm \
375 bs3-c64-Syscall64Generic.asm \
376 bs3-c64-Trap64Generic.asm \
377 ../../../Runtime/common/asm/ASMGetIDTR.asm \
378 ../../../Runtime/common/asm/ASMSetIDTR.asm \
379 ../../../Runtime/common/asm/ASMGetGDTR.asm \
380 ../../../Runtime/common/asm/ASMSetGDTR.asm
381
382
383#
384# Common sources to be compiled for each CPU mode.
385#
386VBOX_BS3KIT_MODE_SOURCES = \
387 bs3-mode-MemCopyFlat.asm \
388 bs3-mode-Name.asm \
389 bs3-mode-NameShortLower.asm \
390 bs3-mode-SwitchToRM.asm \
391 bs3-mode-SwitchToPE16.asm \
392 bs3-mode-SwitchToPE16_32.asm \
393 bs3-mode-SwitchToPE16_V86.asm \
394 bs3-mode-SwitchToPE32.asm \
395 bs3-mode-SwitchToPE32_16.asm \
396 bs3-mode-SwitchToPEV86.asm \
397 bs3-mode-SwitchToPP16.asm \
398 bs3-mode-SwitchToPP16_32.asm \
399 bs3-mode-SwitchToPP16_V86.asm \
400 bs3-mode-SwitchToPP32.asm \
401 bs3-mode-SwitchToPP32_16.asm \
402 bs3-mode-SwitchToPPV86.asm \
403 bs3-mode-SwitchToPAE16.asm \
404 bs3-mode-SwitchToPAE16_32.asm \
405 bs3-mode-SwitchToPAE16_V86.asm \
406 bs3-mode-SwitchToPAE32.asm \
407 bs3-mode-SwitchToPAE32_16.asm \
408 bs3-mode-SwitchToPAEV86.asm \
409 bs3-mode-SwitchToLM64.asm \
410 bs3-mode-SwitchToLM32.asm \
411 bs3-mode-SwitchToLM16.asm \
412 bs3-mode-SwitchTo32BitAndCallC.asm \
413 bs3-mode-EnteredMode.asm \
414 bs3-mode-PagingGetRootForPP16.asm \
415 bs3-mode-PagingGetRootForPP32.asm \
416 bs3-mode-PagingGetRootForPAE16.asm \
417 bs3-mode-PagingGetRootForPAE32.asm \
418 bs3-mode-PagingGetRootForLM64.asm \
419 bs3-mode-TrapInit.c \
420 bs3-mode-TrapSystemCallHandler.asm \
421 bs3-mode-TrapSetJmpAndRestoreInRmAsm.asm \
422 bs3-mode-TestDoModes.c \
423 bs3-mode-TestDoModesByOne.c \
424 bs3-mode-TestDoModesByMax.c \
425 bs3-mode-TestDoModesHlp.asm \
426 bs3-mode-BiosInt15hE820.asm \
427 bs3-mode-DiskQueryGeometry.asm \
428 bs3-mode-DiskRead.asm
429
430# The 16-bit real mode BS3Kit library.
431LIBRARIES += bs3kit-rm
432bs3kit-rm_TEMPLATE = VBoxBS3KitImg
433bs3kit-rm_INSTTYPE = none
434bs3kit-rm_DEFS = TMPL_MODE=BS3_MODE_RM
435bs3kit-rm_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
436 bs3-first-rm.asm \
437 bs3-mode-CpuDetect.asm \
438 bs3-mode-TestDoModesStub.asm \
439 bs3-mode-TestDoModesByOneStub.asm \
440 bs3-mode-TestDoModesByMaxStub.asm
441
442
443# The 16-bit BS3Kit library for 16-bit protected kernel+tss.
444LIBRARIES += bs3kit-pe16
445bs3kit-pe16_TEMPLATE = VBoxBS3KitImg
446bs3kit-pe16_INSTTYPE = none
447bs3kit-pe16_DEFS = TMPL_MODE=BS3_MODE_PE16
448bs3kit-pe16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
449 bs3-first-pe16.asm \
450 bs3-mode-TestDoModesStub.asm \
451 bs3-mode-TestDoModesByOneStub.asm \
452 bs3-mode-TestDoModesByMaxStub.asm
453# bs3-mode-CpuDetect.asm
454
455# The 32-bit BS3Kit library for 16-bit protected kernel+tss.
456LIBRARIES += bs3kit-pe16_32
457bs3kit-pe16_32_TEMPLATE = VBoxBS3KitImg32
458bs3kit-pe16_32_INSTTYPE = none
459bs3kit-pe16_32_DEFS = TMPL_MODE=BS3_MODE_PE16_32
460bs3kit-pe16_32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
461 bs3-mode-TestDoModesStub.asm \
462 bs3-mode-TestDoModesByOneStub.asm \
463 bs3-mode-TestDoModesByMaxStub.asm
464
465# The v86 BS3Kit library for 16-bit protected kernel+tss.
466LIBRARIES += bs3kit-pe16_v86
467bs3kit-pe16_v86_TEMPLATE = VBoxBS3KitImg
468bs3kit-pe16_v86_INSTTYPE = none
469bs3kit-pe16_v86_DEFS = TMPL_MODE=BS3_MODE_PE16_V86
470bs3kit-pe16_v86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
471 bs3-mode-TestDoModesStub.asm \
472 bs3-mode-TestDoModesByOneStub.asm \
473 bs3-mode-TestDoModesByMaxStub.asm
474
475# The 32-bit BS3Kit library for 32-bit protected kernel+tss.
476LIBRARIES += bs3kit-pe32
477bs3kit-pe32_TEMPLATE = VBoxBS3KitImg32
478bs3kit-pe32_INSTTYPE = none
479bs3kit-pe32_DEFS = TMPL_MODE=BS3_MODE_PE32
480bs3kit-pe32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
481 bs3-first-init-all-pe32.asm
482
483# The 16-bit BS3Kit library for 32-bit protected kernel+tss.
484LIBRARIES += bs3kit-pe32_16
485bs3kit-pe32_16_TEMPLATE = VBoxBS3KitImg
486bs3kit-pe32_16_INSTTYPE = none
487bs3kit-pe32_16_DEFS = TMPL_MODE=BS3_MODE_PE32_16
488bs3kit-pe32_16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
489 bs3-mode-TestDoModesStub.asm \
490 bs3-mode-TestDoModesByOneStub.asm \
491 bs3-mode-TestDoModesByMaxStub.asm
492
493# The v8086 BS3Kit library for 32-bit protected kernel+tss.
494LIBRARIES += bs3kit-pev86
495bs3kit-pev86_TEMPLATE = VBoxBS3KitImg
496bs3kit-pev86_INSTTYPE = none
497bs3kit-pev86_DEFS = TMPL_MODE=BS3_MODE_PEV86
498bs3kit-pev86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
499
500# The 16-bit BS3Kit library for 16-bit paged protected kernel+tss.
501LIBRARIES += bs3kit-pp16
502bs3kit-pp16_TEMPLATE = VBoxBS3KitImg
503bs3kit-pp16_INSTTYPE = none
504bs3kit-pp16_DEFS = TMPL_MODE=BS3_MODE_PP16
505bs3kit-pp16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
506 bs3-mode-CpuDetect.asm \
507 bs3-mode-TestDoModesStub.asm \
508 bs3-mode-TestDoModesByOneStub.asm \
509 bs3-mode-TestDoModesByMaxStub.asm
510
511# The 32-bit BS3Kit library for 16-bit paged protected kernel+tss.
512LIBRARIES += bs3kit-pp16_32
513bs3kit-pp16_32_TEMPLATE = VBoxBS3KitImg32
514bs3kit-pp16_32_INSTTYPE = none
515bs3kit-pp16_32_DEFS = TMPL_MODE=BS3_MODE_PP16_32
516bs3kit-pp16_32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
517
518# The v8086 BS3Kit library for 16-bit paged protected kernel+tss.
519LIBRARIES += bs3kit-pp16_v86
520bs3kit-pp16_v86_TEMPLATE = VBoxBS3KitImg
521bs3kit-pp16_v86_INSTTYPE = none
522bs3kit-pp16_v86_DEFS = TMPL_MODE=BS3_MODE_PP16_V86
523bs3kit-pp16_v86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
524
525# The 32-bit BS3Kit library for 32-bit paged protected kernel+tss.
526LIBRARIES += bs3kit-pp32
527bs3kit-pp32_TEMPLATE = VBoxBS3KitImg32
528bs3kit-pp32_INSTTYPE = none
529bs3kit-pp32_DEFS = TMPL_MODE=BS3_MODE_PP32
530bs3kit-pp32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
531 bs3-first-init-all-pp32.asm
532
533# The 16-bit BS3Kit library for 32-bit paged protected kernel+tss.
534LIBRARIES += bs3kit-pp32_16
535bs3kit-pp32_16_TEMPLATE = VBoxBS3KitImg
536bs3kit-pp32_16_INSTTYPE = none
537bs3kit-pp32_16_DEFS = TMPL_MODE=BS3_MODE_PP32_16
538bs3kit-pp32_16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
539 bs3-mode-TestDoModesStub.asm \
540 bs3-mode-TestDoModesByOneStub.asm \
541 bs3-mode-TestDoModesByMaxStub.asm
542
543# The v8086 BS3Kit library for 32-bit paged protected kernel+tss.
544LIBRARIES += bs3kit-ppv86
545bs3kit-ppv86_TEMPLATE = VBoxBS3KitImg
546bs3kit-ppv86_INSTTYPE = none
547bs3kit-ppv86_DEFS = TMPL_MODE=BS3_MODE_PPV86
548bs3kit-ppv86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
549
550
551# The 16-bit BS3Kit library for 16-bit PAE paged protected kernel+tss.
552LIBRARIES += bs3kit-pae16
553bs3kit-pae16_TEMPLATE = VBoxBS3KitImg
554bs3kit-pae16_INSTTYPE = none
555bs3kit-pae16_DEFS = TMPL_MODE=BS3_MODE_PAE16
556bs3kit-pae16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
557 bs3-mode-CpuDetect.asm \
558 bs3-mode-TestDoModesStub.asm \
559 bs3-mode-TestDoModesByOneStub.asm \
560 bs3-mode-TestDoModesByMaxStub.asm
561
562# The 16-bit BS3Kit library for 16-bit PAE paged protected kernel+tss.
563LIBRARIES += bs3kit-pae16_32
564bs3kit-pae16_32_TEMPLATE = VBoxBS3KitImg32
565bs3kit-pae16_32_INSTTYPE = none
566bs3kit-pae16_32_DEFS = TMPL_MODE=BS3_MODE_PAE16_32
567bs3kit-pae16_32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
568
569# The v8086 BS3Kit library for 16-bit PAE paged protected kernel+tss.
570LIBRARIES += bs3kit-pae16_v86
571bs3kit-pae16_v86_TEMPLATE = VBoxBS3KitImg
572bs3kit-pae16_v86_INSTTYPE = none
573bs3kit-pae16_v86_DEFS = TMPL_MODE=BS3_MODE_PAE16_V86
574bs3kit-pae16_v86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
575
576# The 32-bit BS3Kit library for 32-bit PAE paged protected kernel+tss.
577LIBRARIES += bs3kit-pae32
578bs3kit-pae32_TEMPLATE = VBoxBS3KitImg32
579bs3kit-pae32_INSTTYPE = none
580bs3kit-pae32_DEFS = TMPL_MODE=BS3_MODE_PAE32
581bs3kit-pae32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
582
583# The 16-bit BS3Kit library for 32-bit PAE paged protected kernel+tss.
584LIBRARIES += bs3kit-pae32_16
585bs3kit-pae32_16_TEMPLATE = VBoxBS3KitImg
586bs3kit-pae32_16_INSTTYPE = none
587bs3kit-pae32_16_DEFS = TMPL_MODE=BS3_MODE_PAE32_16
588bs3kit-pae32_16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
589 bs3-mode-TestDoModesStub.asm \
590 bs3-mode-TestDoModesByOneStub.asm \
591 bs3-mode-TestDoModesByMaxStub.asm
592
593# The v8086 BS3Kit library for 32-bit PAE paged protected kernel+tss.
594LIBRARIES += bs3kit-paev86
595bs3kit-paev86_TEMPLATE = VBoxBS3KitImg
596bs3kit-paev86_INSTTYPE = none
597bs3kit-paev86_DEFS = TMPL_MODE=BS3_MODE_PAEV86
598bs3kit-paev86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
599
600
601# The 16-bit long mode BS3Kit library.
602LIBRARIES += bs3kit-lm16
603bs3kit-lm16_TEMPLATE = VBoxBS3KitImg
604bs3kit-lm16_INSTTYPE = none
605bs3kit-lm16_DEFS = TMPL_MODE=BS3_MODE_LM16
606bs3kit-lm16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
607 bs3-mode-TestDoModesStub.asm \
608 bs3-mode-TestDoModesByOneStub.asm \
609 bs3-mode-TestDoModesByMaxStub.asm
610
611# The 32-bit long mode BS3Kit library.
612LIBRARIES += bs3kit-lm32
613bs3kit-lm32_TEMPLATE = VBoxBS3KitImg32
614bs3kit-lm32_INSTTYPE = none
615bs3kit-lm32_DEFS = TMPL_MODE=BS3_MODE_LM32
616bs3kit-lm32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
617
618# The 64-bit long mode BS3Kit library.
619LIBRARIES += bs3kit-lm64
620bs3kit-lm64_TEMPLATE = VBoxBS3KitImg64
621bs3kit-lm64_INSTTYPE = none
622bs3kit-lm64_DEFS = TMPL_MODE=BS3_MODE_LM64
623bs3kit-lm64_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
624 bs3-first-init-all-lm64.asm
625
626
627#
628# shutdown example.
629#
630MISCBINS += bs3-shutdown
631bs3-shutdown_TEMPLATE = VBoxBS3KitImg
632bs3-shutdown_SOURCES = \
633 bs3-first-pe16.asm \
634 bs3-shutdown.c
635
636
637#
638# DOS Utilities / Testcases.
639#
640MISCBINS += bs3cpudt
641bs3cpudt_TEMPLATE = VBoxBS3KitUtil
642bs3cpudt_SOURCES = \
643 bs3-first-dosexe.asm \
644 bs3cpudt.c
645
646
647#
648# Rule for regenerating bs3kit-mangling-functions-undef.h.
649#
650bs3kit-mangling-code-undef.h: $(PATH_SUB_CURRENT)/bs3kit-mangling-code-define.h $(MAKEFILE)
651 $(SED) \
652 -e 's/#\( *\)define \([a-zA-Z_][a-zA-Z0-9_]*\) .*$(DOLLAR)/#\1undef \2/' \
653 -e 's/Function needing mangling.*$(DOLLAR)/Undefining function mangling - automatically generated by the $@ makefile rule./' \
654 --output $(dir $<)bs3kit-mangling-code-undef.h \
655 $<
656
657#
658# Rule for regenerating bs3kit-mangling-functions-define.h.
659#
660bs3kit-mangling-code-define.h: \
661 $(PATH_SUB_CURRENT)/bs3kit.h \
662 $(PATH_SUB_CURRENT)/bs3-cmn-paging.h \
663 $(PATH_SUB_CURRENT)/bs3-cmn-test.h \
664 $(MAKEFILE)
665 $(APPEND) -tn "$(dir $<)$@" \
666 '/* $(DOLLAR)Id: $(DOLLAR) */' \
667 '/** @file' \
668 ' * BS3Kit - Function needing mangling - generated by the $@ makefile rule.' \
669 ' */' \
670 '' \
671 '/*' \
672 ' * Copyright (C) 2007-$(VBOX_C_YEAR) Oracle and/or its affiliates.' \
673 ' *' \
674 ' * This file is part of VirtualBox base platform packages, as' \
675 ' * available from https://www.virtualbox.org.' \
676 ' *' \
677 ' * This program is free software; you can redistribute it and/or' \
678 ' * modify it under the terms of the GNU General Public License' \
679 ' * as published by the Free Software Foundation, in version 3 of the' \
680 ' * License.' \
681 ' *' \
682 ' * This program is distributed in the hope that it will be useful, but' \
683 ' * WITHOUT ANY WARRANTY; without even the implied warranty of' \
684 ' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU' \
685 ' * General Public License for more details.' \
686 ' *' \
687 ' * You should have received a copy of the GNU General Public License' \
688 ' * along with this program; if not, see <https://www.gnu.org/licenses>.' \
689 ' *' \
690 ' * The contents of this file may alternatively be used under the terms' \
691 ' * of the Common Development and Distribution License Version 1.0' \
692 ' * (CDDL), a copy of it is provided in the "COPYING.CDDL" file included' \
693 ' * in the VirtualBox distribution, in which case the provisions of the' \
694 ' * CDDL are applicable instead of those of the GPL.' \
695 ' *' \
696 ' * You may elect to license modified versions of this file under the' \
697 ' * terms and conditions of either the GPL or the CDDL or both.' \
698 ' *' \
699 ' * SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0' \
700 ' */' \
701 ''
702 $(SED) -n \
703 -e 's/^ *BS3_CMN_PROTO_STUB([^,]*, *\([a-zA-Z_][a-zA-Z0-9_]*\) *,.*$(DOLLAR)/#define \1 BS3_CMN_MANGLER(\1)/p' \
704 -e 's/^ *BS3_CMN_PROTO_NOSB([^,]*, *\([a-zA-Z_][a-zA-Z0-9_]*\) *,.*$(DOLLAR)/#define \1 BS3_CMN_MANGLER(\1)/p' \
705 -e 's/^ *BS3_CMN_PROTO_FARSTUB([^,]*,[^,]*, *\([a-zA-Z_][a-zA-Z0-9_]*\) *,.*$(DOLLAR)/#define \1 BS3_CMN_MANGLER(\1)/p' \
706 $(filter %.h,$^) | sort >> "$(dir $<)bs3kit-mangling-code-define.h"
707 $(APPEND) -n "$(dir $<)$@" '#ifndef BS3_CMN_ONLY'
708 $(SED) -n \
709 -e 's/^ *BS3_MODE_PROTO_STUB([^,]*, *\([a-zA-Z_][a-zA-Z0-9_]*\) *,.*$(DOLLAR)/# define \1 BS3_MODE_MANGLER(\1)/p' \
710 -e 's/^ *BS3_MODE_PROTO_NOSB([^,]*, *\([a-zA-Z_][a-zA-Z0-9_]*\) *,.*$(DOLLAR)/# define \1 BS3_MODE_MANGLER(\1)/p' \
711 -e 's/^ *BS3_MODE_PROTO_FARSTUB([^,]*,[^,]*, *\([a-zA-Z_][a-zA-Z0-9_]*\) *,.*$(DOLLAR)/# define \1 BS3_MODE_MANGLER(\1)/p' \
712 $(filter %.h,$^) | sort >> "$(dir $<)bs3kit-mangling-code-define.h"
713 $(APPEND) -n "$(dir $<)$@" '#endif /* !BS3_CMN_ONLY */'
714
715#
716# Rule for regenerating bs3kit-autostubs.kmk.
717#
718bs3kit-autostubs.kmk: \
719 $(PATH_SUB_CURRENT)/bs3kit.h \
720 $(PATH_SUB_CURRENT)/bs3-cmn-memory.h \
721 $(PATH_SUB_CURRENT)/bs3-cmn-paging.h \
722 $(PATH_SUB_CURRENT)/bs3-cmn-test.h \
723 $(MAKEFILE)
724 $(APPEND) -tn "$(dir $<)$@" \
725 '# $(DOLLAR)Id: $(DOLLAR)' \
726 '## @file' \
727 '# BS3Kit - Automatic near/far stubs - generated by the $@ makefile rule.' \
728 '#' \
729 '' \
730 '#' \
731 '# Copyright (C) 2007-$(VBOX_C_YEAR) Oracle and/or its affiliates.' \
732 '#' \
733 '# This file is part of VirtualBox base platform packages, as' \
734 '# available from https://www.virtualbox.org.' \
735 '#' \
736 '# This program is free software; you can redistribute it and/or' \
737 '# modify it under the terms of the GNU General Public License' \
738 '# as published by the Free Software Foundation, in version 3 of the' \
739 '# License.' \
740 '#' \
741 '# This program is distributed in the hope that it will be useful, but' \
742 '# WITHOUT ANY WARRANTY; without even the implied warranty of' \
743 '# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU' \
744 '# General Public License for more details.' \
745 '#' \
746 '# You should have received a copy of the GNU General Public License' \
747 '# along with this program; if not, see <https://www.gnu.org/licenses>.' \
748 '#' \
749 '# The contents of this file may alternatively be used under the terms' \
750 '# of the Common Development and Distribution License Version 1.0' \
751 '# (CDDL), a copy of it is provided in the "COPYING.CDDL" file included' \
752 '# in the VirtualBox distribution, in which case the provisions of the' \
753 '# CDDL are applicable instead of those of the GPL.' \
754 '#' \
755 '# You may elect to license modified versions of this file under the' \
756 '# terms and conditions of either the GPL or the CDDL or both.' \
757 '#' \
758 '# SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0' \
759 '#' \
760 ''
761 $(SED) -n \
762 -e '/^ *BS3_CMN_PROTO_STUB/p' \
763 -e '/^ *BS3_CMN_PROTO_FARSTUB/p' \
764 -e '/^ *BS3_MODE_PROTO_STUB/p' \
765 -e '/^ *BS3_MODE_PROTO_FARSTUB/p' \
766 $(filter %.h,$^) \
767 | sort \
768 | $(SED) -n \
769 -e 's/^ *BS3_CMN_PROTO_STUB([^,]*, *\([a-zA-Z_][a-zA-Z0-9_]*\) *,.*$(DOLLAR)/\$(DOLLAR)(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,\1)/p' \
770 -e 's/^ *BS3_MODE_PROTO_STUB([^,]*, *\([a-zA-Z_][a-zA-Z0-9_]*\) *,.*$(DOLLAR)/\$(DOLLAR)(call BS3KIT_FN_GEN_MODE_NEARSTUB,bs3kit-common-16,\1)/p' \
771 -e 's/^ *BS3_CMN_PROTO_FARSTUB( *\([^,]*\),[^,]*, *\([a-zA-Z_][a-zA-Z0-9_]*\) *,.*$(DOLLAR)/\$(DOLLAR)(call BS3KIT_FN_GEN_CMN_FARSTUB,bs3kit-common-16,\2,\1)/p' \
772 -e 's/^ *BS3_MODE_PROTO_FARSTUB( *\([^,]*\),[^,]*, *\([a-zA-Z_][a-zA-Z0-9_]*\) *,.*$(DOLLAR)/\$(DOLLAR)(call BS3KIT_FN_GEN_MODE_FARSTUB,bs3kit-common-16,\2,\1)/p' \
773 --append "$(dir $<)$@"
774
775bs3kit-update:: bs3kit-autostubs.kmk bs3kit-mangling-code-define.h bs3kit-mangling-code-undef.h
776.NOTPARALLEL: bs3kit-autostubs.kmk bs3kit-mangling-code-define.h bs3kit-mangling-code-undef.h
777
778
779include $(FILE_KBUILD_SUB_FOOTER)
780
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