VirtualBox

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

Last change on this file since 60009 was 60000, checked in by vboxsync, 9 years ago

bs3kit: v8086, long, fixes, updates.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 13.8 KB
Line 
1# $Id: Makefile.kmk 60000 2016-03-11 19:12:05Z 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 = VBoxBldProg
41VBoxBs3ObjConverter_SOURCES = $(VBOX_PATH_BS3KIT_SRC)/VBoxBs3ObjConverter.cpp
42
43
44# The boot sector.
45MISCBINS += bs3-bootsector
46bs3-bootsector_TEMPLATE = VBoxBS3KitBS
47bs3-bootsector_SOURCES = bs3-bootsector.asm
48
49
50#
51# Common sources to be compiled into _p16, _p32 and _p64 versions.
52#
53VBOX_BS3KIT_COMMON_SOURCES = \
54 bs3-cmn-A20Disable.asm \
55 bs3-cmn-A20Enable.asm \
56 bs3-cmn-KbdRead.asm \
57 bs3-cmn-KbdWait.asm \
58 bs3-cmn-KbdWrite.asm \
59 bs3-cmn-Shutdown.asm \
60 bs3-cmn-Panic.asm \
61 bs3-cmn-PrintChr.asm \
62 bs3-cmn-Printf.c \
63 bs3-cmn-PrintU32.asm \
64 bs3-cmn-PrintX32.asm \
65 bs3-cmn-PrintStr.c \
66 bs3-cmn-PrintStrColonSpaces.asm \
67 bs3-cmn-PrintStrSpacesColonSpace.c \
68 bs3-cmn-StrFormatV.c \
69 bs3-cmn-StrPrintf.c \
70 bs3-cmn-StrLen.c \
71 bs3-cmn-StrNLen.c \
72 bs3-cmn-StrCpy.c \
73 bs3-cmn-MemCpy.c \
74 bs3-cmn-MemPCpy.c \
75 bs3-cmn-MemMove.c \
76 bs3-cmn-MemZero.asm \
77 bs3-cmn-MemAlloc.c \
78 bs3-cmn-MemAllocZ.c \
79 bs3-cmn-MemFree.c \
80 bs3-cmn-PagingData.c \
81 bs3-cmn-PagingInitRootForPP.c \
82 bs3-cmn-PagingInitRootForPAE.c \
83 bs3-cmn-PagingInitRootForLM.c \
84 bs3-cmn-RegCtxRestore.asm \
85 bs3-cmn-RegCtxConvertToRingX.c \
86 bs3-cmn-RegCtxPrint.c \
87 bs3-cmn-SelProtFar32ToFlat32.c \
88 bs3-cmn-SlabInit.c \
89 bs3-cmn-SlabAlloc.c \
90 bs3-cmn-SlabAllocEx.c \
91 bs3-cmn-SlabFree.c \
92 bs3-cmn-SlabListInit.c \
93 bs3-cmn-SlabListAdd.c \
94 bs3-cmn-SlabListAlloc.c \
95 bs3-cmn-SlabListAllocEx.c \
96 bs3-cmn-SlabListFree.c \
97 bs3-cmn-SwitchToRing0.asm \
98 bs3-cmn-SwitchToRing1.asm \
99 bs3-cmn-SwitchToRing2.asm \
100 bs3-cmn-SwitchToRing3.asm \
101 bs3-cmn-SwitchToRingX.asm \
102 bs3-cmn-SwitchTo16Bit.asm \
103 bs3-cmn-SwitchTo16BitV86.asm \
104 bs3-cmn-SwitchTo32Bit.asm \
105 bs3-cmn-SwitchTo64Bit.asm \
106 bs3-cmn-Syscall.asm \
107 bs3-cmn-TestData.c \
108 bs3-cmn-TestInit.c \
109 bs3-cmn-TestFailed.c \
110 bs3-cmn-TestSkipped.c \
111 bs3-cmn-TestSub.c \
112 bs3-cmn-TestSubDone.c \
113 bs3-cmn-TestSubErrorCount.c \
114 bs3-cmn-TestTerm.c \
115 bs3-cmn-TestSendCmdWithStr.asm \
116 bs3-cmn-TestSendCmdWithU32.asm \
117 bs3-cmn-TestIsVmmDevTestingPresent.asm \
118 bs3-cmn-Trap16Init.c \
119 bs3-cmn-Trap16SetGate.c \
120 bs3-cmn-Trap32Init.c \
121 bs3-cmn-Trap32SetGate.c \
122 bs3-cmn-Trap64SetGate.c \
123 bs3-cmn-TrapDefaultHandler.c \
124 bs3-cmn-TrapPrintFrame.c \
125 bs3-cmn-TrapSetHandler.c \
126 ../../../Runtime/common/asm/ASMBitFirstClear.asm \
127 ../../../Runtime/common/asm/ASMBitFirstSet.asm \
128 ../../../Runtime/common/asm/ASMBitNextClear.asm \
129 ../../../Runtime/common/asm/ASMBitNextSet.asm \
130 ../../../Runtime/common/asm/ASMBitFirstSetU16.asm \
131 ../../../Runtime/common/asm/ASMBitFirstSetU32.asm \
132 ../../../Runtime/common/asm/ASMBitFirstSetU64.asm \
133 ../../../Runtime/common/asm/ASMBitLastSetU16.asm \
134 ../../../Runtime/common/asm/ASMBitLastSetU32.asm \
135 ../../../Runtime/common/asm/ASMBitLastSetU64.asm \
136 ../../../Runtime/common/asm/ASMMemFirstMismatchingU8.asm \
137 ../../../Runtime/common/asm/ASMSerializeInstruction-cpuid.asm \
138 ../../../Runtime/common/asm/ASMSerializeInstruction-iret.asm \
139 ../../../Runtime/common/asm/ASMSerializeInstruction-rdtscp.asm \
140
141# The 16-bit BS3Kit library.
142LIBRARIES += bs3kit-common-16
143bs3kit-common-16_TEMPLATE = VBoxBS3KitImg
144bs3kit-common-16_INSTTYPE = none
145bs3kit-common-16_DEFS = TMPL_PE16 BS3_CMN_ONLY
146bs3kit-common-16_ASDEFS = RT_ASMDEFS_INC_FIRST_FILE
147bs3kit-common-16_SOURCES = $(VBOX_BS3KIT_COMMON_SOURCES) \
148 bs3-system-data.asm \
149 bs3-rm-InitAll.c \
150 bs3-rm-InitMemory.c \
151 bs3-cmn-hexdigits.c \
152 bs3-cmn-CpuDetectData.c \
153 bs3-cmn-PerCpuData.c \
154 bs3-cmn-ConvertRMStackToP16UsingCxReturnToAx.asm \
155 bs3-wc16-U8DR.asm \
156 bs3-wc16-U8DQ.asm \
157 bs3-wc16-I8DR.asm \
158 bs3-wc16-I8DQ.asm \
159 bs3-wc16-I8RS.asm \
160 bs3-wc16-U8RS.asm \
161 bs3-wc16-U8LS.asm \
162 bs3-wc16-U4D.asm \
163 bs3-wc16-I4D.asm \
164 bs3-c16-Trap16Generic.asm
165
166# The 32-bit BS3Kit library.
167LIBRARIES += bs3kit-common-32
168bs3kit-common-32_TEMPLATE = VBoxBS3KitImg32
169bs3kit-common-32_INSTTYPE = none
170bs3kit-common-32_DEFS = TMPL_PE32 BS3_CMN_ONLY
171bs3kit-common-32_ASDEFS = RT_ASMDEFS_INC_FIRST_FILE
172bs3kit-common-32_SOURCES = $(VBOX_BS3KIT_COMMON_SOURCES) \
173 bs3-wc32-U8D.asm \
174 bs3-wc32-I8D.asm \
175 bs3-wc32-I8RS.asm \
176 bs3-wc32-U8RS.asm \
177 bs3-wc32-U8LS.asm \
178 bs3-c32-Trap32Generic.asm
179
180# The 64-bit BS3Kit library.
181LIBRARIES += bs3kit-common-64-asm
182bs3kit-common-64-asm_TEMPLATE = VBoxBS3KitImg64
183bs3kit-common-64_asm_INSTTYPE = none
184bs3kit-common-64-asm_DEFS = TMPL_LM64 BS3_CMN_ONLY
185bs3kit-common-64-asm_ASDEFS = RT_ASMDEFS_INC_FIRST_FILE
186bs3kit-common-64-asm_SOURCES = $(filter %.asm,$(VBOX_BS3KIT_COMMON_SOURCES))
187
188# The 64-bit BS3Kit library.
189LIBRARIES += bs3kit-common-64-c
190bs3kit-common-64-c_TEMPLATE = VBoxBS3KitImg64
191bs3kit-common-64_c_INSTTYPE = none
192bs3kit-common-64-c_DEFS = TMPL_LM64 BS3_CMN_ONLY
193bs3kit-common-64-c_SOURCES = $(filter-out %.asm,$(VBOX_BS3KIT_COMMON_SOURCES))
194
195
196#
197# Common sources to be compiled for each CPU mode.
198#
199VBOX_BS3KIT_MODE_SOURCES = \
200 bs3-mode-Name.asm \
201 bs3-mode-SwitchToRM.asm \
202 bs3-mode-SwitchToPE16.asm \
203 bs3-mode-SwitchToPE16_32.asm \
204 bs3-mode-SwitchToPE16_V86.asm \
205 bs3-mode-SwitchToPE32.asm \
206 bs3-mode-SwitchToPE32_16.asm \
207 bs3-mode-SwitchToPEV86.asm \
208 bs3-mode-SwitchToPP16.asm \
209 bs3-mode-SwitchToPP16_32.asm \
210 bs3-mode-SwitchToPP16_V86.asm \
211 bs3-mode-SwitchToPP32.asm \
212 bs3-mode-SwitchToPP32_16.asm \
213 bs3-mode-SwitchToPPV86.asm \
214 bs3-mode-SwitchToPAE16.asm \
215 bs3-mode-SwitchToPAE16_32.asm \
216 bs3-mode-SwitchToPAE16_V86.asm \
217 bs3-mode-SwitchToPAE32.asm \
218 bs3-mode-SwitchToPAE32_16.asm \
219 bs3-mode-SwitchToPAEV86.asm \
220 bs3-mode-SwitchToLM64.asm \
221 bs3-mode-SwitchToLM32.asm \
222 bs3-mode-SwitchToLM16.asm \
223 bs3-mode-EnteredMode.asm \
224 bs3-mode-PagingGetRootForPP16.asm \
225 bs3-mode-PagingGetRootForPP32.asm \
226 bs3-mode-PagingGetRootForPAE16.asm \
227 bs3-mode-PagingGetRootForPAE32.asm \
228 bs3-mode-PagingGetRootForLM64.asm \
229 bs3-mode-TrapSystemCallHandler.asm \
230 bs3-mode-TestDoModes.c \
231 bs3-mode-TestDoModesHlp.asm \
232
233# The 16-bit real mode BS3Kit library.
234LIBRARIES += bs3kit-rm
235bs3kit-rm_TEMPLATE = VBoxBS3KitImg
236bs3kit-rm_INSTTYPE = none
237bs3kit-rm_DEFS = TMPL_MODE=BS3_MODE_RM
238bs3kit-rm_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
239 bs3-first-rm.asm \
240 bs3-mode-CpuDetect.asm
241
242
243# The 16-bit BS3Kit library for 16-bit protected kernel+tss.
244LIBRARIES += bs3kit-pe16
245bs3kit-pe16_TEMPLATE = VBoxBS3KitImg
246bs3kit-pe16_INSTTYPE = none
247bs3kit-pe16_DEFS = TMPL_MODE=BS3_MODE_PE16
248bs3kit-pe16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
249 bs3-first-pe16.asm \
250# bs3-mode-CpuDetect.asm
251
252# The 32-bit BS3Kit library for 16-bit protected kernel+tss.
253LIBRARIES += bs3kit-pe16_32
254bs3kit-pe16_32_TEMPLATE = VBoxBS3KitImg32
255bs3kit-pe16_32_INSTTYPE = none
256bs3kit-pe16_32_DEFS = TMPL_MODE=BS3_MODE_PE16_32
257bs3kit-pe16_32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
258
259# The v86 BS3Kit library for 16-bit protected kernel+tss.
260LIBRARIES += bs3kit-pe16_v86
261bs3kit-pe16_v86_TEMPLATE = VBoxBS3KitImg
262bs3kit-pe16_v86_INSTTYPE = none
263bs3kit-pe16_v86_DEFS = TMPL_MODE=BS3_MODE_PE16_V86
264bs3kit-pe16_v86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
265
266# The 32-bit BS3Kit library for 32-bit protected kernel+tss.
267LIBRARIES += bs3kit-pe32
268bs3kit-pe32_TEMPLATE = VBoxBS3KitImg32
269bs3kit-pe32_INSTTYPE = none
270bs3kit-pe32_DEFS = TMPL_MODE=BS3_MODE_PE32
271bs3kit-pe32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
272
273# The 16-bit BS3Kit library for 32-bit protected kernel+tss.
274LIBRARIES += bs3kit-pe32_16
275bs3kit-pe32_16_TEMPLATE = VBoxBS3KitImg
276bs3kit-pe32_16_INSTTYPE = none
277bs3kit-pe32_16_DEFS = TMPL_MODE=BS3_MODE_PE32_16
278bs3kit-pe32_16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
279
280# The v8086 BS3Kit library for 32-bit protected kernel+tss.
281LIBRARIES += bs3kit-pev86
282bs3kit-pev86_TEMPLATE = VBoxBS3KitImg
283bs3kit-pev86_INSTTYPE = none
284bs3kit-pev86_DEFS = TMPL_MODE=BS3_MODE_PEV86
285bs3kit-pev86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
286
287
288# The 16-bit BS3Kit library for 16-bit paged protected kernel+tss.
289LIBRARIES += bs3kit-pp16
290bs3kit-pp16_TEMPLATE = VBoxBS3KitImg
291bs3kit-pp16_INSTTYPE = none
292bs3kit-pp16_DEFS = TMPL_MODE=BS3_MODE_PP16
293bs3kit-pp16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
294 bs3-mode-CpuDetect.asm
295
296# The 32-bit BS3Kit library for 16-bit paged protected kernel+tss.
297LIBRARIES += bs3kit-pp16_32
298bs3kit-pp16_32_TEMPLATE = VBoxBS3KitImg32
299bs3kit-pp16_32_INSTTYPE = none
300bs3kit-pp16_32_DEFS = TMPL_MODE=BS3_MODE_PP16_32
301bs3kit-pp16_32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
302
303# The v8086 BS3Kit library for 16-bit paged protected kernel+tss.
304LIBRARIES += bs3kit-pp16_v86
305bs3kit-pp16_v86_TEMPLATE = VBoxBS3KitImg
306bs3kit-pp16_v86_INSTTYPE = none
307bs3kit-pp16_v86_DEFS = TMPL_MODE=BS3_MODE_PP16_V86
308bs3kit-pp16_v86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
309
310# The 32-bit BS3Kit library for 32-bit paged protected kernel+tss.
311LIBRARIES += bs3kit-pp32
312bs3kit-pp32_TEMPLATE = VBoxBS3KitImg32
313bs3kit-pp32_INSTTYPE = none
314bs3kit-pp32_DEFS = TMPL_MODE=BS3_MODE_PP32
315bs3kit-pp32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
316
317# The 16-bit BS3Kit library for 32-bit paged protected kernel+tss.
318LIBRARIES += bs3kit-pp32_16
319bs3kit-pp32_16_TEMPLATE = VBoxBS3KitImg
320bs3kit-pp32_16_INSTTYPE = none
321bs3kit-pp32_16_DEFS = TMPL_MODE=BS3_MODE_PP32_16
322bs3kit-pp32_16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
323
324# The v8086 BS3Kit library for 32-bit paged protected kernel+tss.
325LIBRARIES += bs3kit-ppv86
326bs3kit-ppv86_TEMPLATE = VBoxBS3KitImg
327bs3kit-ppv86_INSTTYPE = none
328bs3kit-ppv86_DEFS = TMPL_MODE=BS3_MODE_PPV86
329bs3kit-ppv86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
330
331
332# The 16-bit BS3Kit library for 16-bit PAE paged protected kernel+tss.
333LIBRARIES += bs3kit-pae16
334bs3kit-pae16_TEMPLATE = VBoxBS3KitImg
335bs3kit-pae16_INSTTYPE = none
336bs3kit-pae16_DEFS = TMPL_MODE=BS3_MODE_PAE16
337bs3kit-pae16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
338 bs3-mode-CpuDetect.asm
339
340# The 16-bit BS3Kit library for 16-bit PAE paged protected kernel+tss.
341LIBRARIES += bs3kit-pae16_32
342bs3kit-pae16_32_TEMPLATE = VBoxBS3KitImg32
343bs3kit-pae16_32_INSTTYPE = none
344bs3kit-pae16_32_DEFS = TMPL_MODE=BS3_MODE_PAE16_32
345bs3kit-pae16_32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
346
347# The v8086 BS3Kit library for 16-bit PAE paged protected kernel+tss.
348LIBRARIES += bs3kit-pae16_v86
349bs3kit-pae16_v86_TEMPLATE = VBoxBS3KitImg
350bs3kit-pae16_v86_INSTTYPE = none
351bs3kit-pae16_v86_DEFS = TMPL_MODE=BS3_MODE_PAE16_V86
352bs3kit-pae16_v86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
353
354# The 32-bit BS3Kit library for 32-bit PAE paged protected kernel+tss.
355LIBRARIES += bs3kit-pae32
356bs3kit-pae32_TEMPLATE = VBoxBS3KitImg32
357bs3kit-pae32_INSTTYPE = none
358bs3kit-pae32_DEFS = TMPL_MODE=BS3_MODE_PAE32
359bs3kit-pae32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
360
361# The 16-bit BS3Kit library for 32-bit PAE paged protected kernel+tss.
362LIBRARIES += bs3kit-pae32_16
363bs3kit-pae32_16_TEMPLATE = VBoxBS3KitImg
364bs3kit-pae32_16_INSTTYPE = none
365bs3kit-pae32_16_DEFS = TMPL_MODE=BS3_MODE_PAE32_16
366bs3kit-pae32_16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
367
368# The v8086 BS3Kit library for 32-bit PAE paged protected kernel+tss.
369LIBRARIES += bs3kit-paev86
370bs3kit-paev86_TEMPLATE = VBoxBS3KitImg
371bs3kit-paev86_INSTTYPE = none
372bs3kit-paev86_DEFS = TMPL_MODE=BS3_MODE_PAEV86
373bs3kit-paev86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
374
375
376# The 16-bit long mode BS3Kit library.
377LIBRARIES += bs3kit-lm16
378bs3kit-lm16_TEMPLATE = VBoxBS3KitImg
379bs3kit-lm16_INSTTYPE = none
380bs3kit-lm16_DEFS = TMPL_MODE=BS3_MODE_LM16
381bs3kit-lm16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
382
383# The 32-bit long mode BS3Kit library.
384LIBRARIES += bs3kit-lm32
385bs3kit-lm32_TEMPLATE = VBoxBS3KitImg32
386bs3kit-lm32_INSTTYPE = none
387bs3kit-lm32_DEFS = TMPL_MODE=BS3_MODE_LM32
388bs3kit-lm32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
389
390# The 64-bit long mode BS3Kit library.
391LIBRARIES += bs3kit-lm64-asm
392bs3kit-lm64-asm_TEMPLATE = VBoxBS3KitImg64
393bs3kit-lm64-asm_INSTTYPE = none
394bs3kit-lm64-asm_DEFS = TMPL_MODE=BS3_MODE_LM64
395bs3kit-lm64-asm_SOURCES = $(filter %.asm,$(VBOX_BS3KIT_MODE_SOURCES))
396
397# The 64-bit long mode BS3Kit library.
398LIBRARIES += bs3kit-lm64-c
399bs3kit-lm64-c_TEMPLATE = VBoxBS3KitImg64
400bs3kit-lm64-c_INSTTYPE = none
401bs3kit-lm64-c_DEFS = TMPL_MODE=BS3_MODE_LM64
402bs3kit-lm64-c_SOURCES = $(filter-out %.asm, $(VBOX_BS3KIT_MODE_SOURCES))
403
404
405#
406# shutdown example.
407#
408MISCBINS += bs3-shutdown
409bs3-shutdown_TEMPLATE = VBoxBS3KitImg
410bs3-shutdown_SOURCES = \
411 bs3-first-pe16.asm \
412 bs3-shutdown.c
413
414
415include $(FILE_KBUILD_SUB_FOOTER)
416
417.PRECIOUS: $(PATH_OBJ)/bs3-shutdown/bs3-shutdown.map
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