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