VirtualBox

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

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

bs3kit: Made the CRx & DRx getters and setters work from rings other than ring-0. Added getters and setters for TR and LDTR.

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