VirtualBox

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

Last change on this file since 64734 was 64734, checked in by vboxsync, 8 years ago

bs3kit: Bs3PagingQueryAddressInfo

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