VirtualBox

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

Last change on this file since 69111 was 69111, checked in by vboxsync, 7 years ago

(C) year

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