VirtualBox

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

Last change on this file since 61183 was 60774, checked in by vboxsync, 9 years ago

bs3kit: update / iret

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