VirtualBox

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

Last change on this file since 96966 was 96412, checked in by vboxsync, 2 years ago

update copyright and license notice text in generators

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