1 | # $Id: Makefile.kmk 64550 2016-11-04 09:42:54Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Top-level makefile for the VMM.
|
---|
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 |
|
---|
18 | SUB_DEPTH = ../../..
|
---|
19 | include $(KBUILD_PATH)/subheader.kmk
|
---|
20 |
|
---|
21 | # Include sub-makefiles.
|
---|
22 | ifndef VBOX_ONLY_EXTPACKS
|
---|
23 | include $(PATH_SUB_CURRENT)/tools/Makefile.kmk
|
---|
24 | endif
|
---|
25 | include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
|
---|
26 |
|
---|
27 |
|
---|
28 | # Fail on unsupported hosts.
|
---|
29 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
30 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
31 | $(error 32-bit darwin is no longer a supported VirtualBox host. Go back to 4.3 or older for 32-bit support.)
|
---|
32 | else ifeq ($(KBUILD_TARGET),solaris)
|
---|
33 | $(error 32-bit solaris is no longer a supported VirtualBox host. Go back to 4.2 or older for 32-bit support.)
|
---|
34 | endif
|
---|
35 | endif
|
---|
36 |
|
---|
37 |
|
---|
38 | #
|
---|
39 | # Globals
|
---|
40 | #
|
---|
41 |
|
---|
42 | ## DEFS variable that is picked up by all three VMM targets (R0, R3, RC).
|
---|
43 | # Can be prepended to by setting it in LocalConfig.kmk
|
---|
44 | VMM_COMMON_DEFS ?= VBOX_IN_VMM
|
---|
45 | ifdef VBOX_WITH_2ND_IEM_STEP
|
---|
46 | VMM_COMMON_DEFS += VBOX_WITH_2ND_IEM_STEP
|
---|
47 | endif
|
---|
48 | ifdef VBOX_WITH_3RD_IEM_STEP
|
---|
49 | VMM_COMMON_DEFS += VBOX_WITH_3RD_IEM_STEP
|
---|
50 | endif
|
---|
51 | #ifdef VBOX_WITH_IEM
|
---|
52 | # VMM_COMMON_DEFS += VBOX_WITH_IEM
|
---|
53 | #endif
|
---|
54 | ifdef VBOX_WITH_REM
|
---|
55 | VMM_COMMON_DEFS += VBOX_WITH_REM
|
---|
56 | endif
|
---|
57 | ifdef VBOX_WITH_MULTI_CORE
|
---|
58 | VMM_COMMON_DEFS += VBOX_WITH_MULTI_CORE
|
---|
59 | endif
|
---|
60 | ifdef VBOX_WITH_R0_LOGGING
|
---|
61 | VMM_COMMON_DEFS += VBOX_WITH_R0_LOGGING
|
---|
62 | endif
|
---|
63 | ifdef VBOX_WITH_VMMR0_DISABLE_LAPIC_NMI
|
---|
64 | VMM_COMMON_DEFS += VBOX_WITH_VMMR0_DISABLE_LAPIC_NMI
|
---|
65 | endif
|
---|
66 | ifdef VBOX_WITH_PCI_PASSTHROUGH
|
---|
67 | VMM_COMMON_DEFS += VBOX_WITH_PCI_PASSTHROUGH
|
---|
68 | endif
|
---|
69 | ifdef VBOX_WITH_DTRACE_RC
|
---|
70 | VMM_COMMON_DEFS += VBOX_WITH_DTRACE_RC
|
---|
71 | endif
|
---|
72 | ifdef VBOX_WITH_SAFE_STR
|
---|
73 | VMM_COMMON_DEFS += VBOX_WITH_SAFE_STR
|
---|
74 | endif
|
---|
75 | ifdef VBOX_WITH_RAW_RING1
|
---|
76 | VMM_COMMON_DEFS += VBOX_WITH_RAW_RING1
|
---|
77 | endif
|
---|
78 | ifdef VBOX_WITH_64ON32_IDT
|
---|
79 | VMM_COMMON_DEFS += VBOX_WITH_64ON32_IDT
|
---|
80 | endif
|
---|
81 | ifdef VBOX_WITH_64ON32_CMOS_DEBUG
|
---|
82 | VMM_COMMON_DEFS += VBOX_WITH_64ON32_CMOS_DEBUG
|
---|
83 | endif
|
---|
84 | ifdef VBOXSTRICTRC_STRICT_ENABLED
|
---|
85 | VMM_COMMON_DEFS += VBOXSTRICTRC_STRICT_ENABLED
|
---|
86 | endif
|
---|
87 | ifeq ($(KBUILD_TARGET),amd64)
|
---|
88 | VMM_COMMON_DEFS += VBOX_WITH_MORE_RING0_MEM_MAPPINGS
|
---|
89 | endif
|
---|
90 | ifdef VBOX_WITH_NEW_APIC
|
---|
91 | VMM_COMMON_DEFS += VBOX_WITH_NEW_APIC
|
---|
92 | endif
|
---|
93 | ifdef VBOX_WITH_NEW_IOAPIC
|
---|
94 | VMM_COMMON_DEFS += VBOX_WITH_NEW_IOAPIC
|
---|
95 | endif
|
---|
96 |
|
---|
97 | # VMM_COMMON_DEFS += VBOX_WITH_NS_ACCOUNTING_STATS
|
---|
98 |
|
---|
99 | # Special IEM debug mode which compares the result with HM/REM
|
---|
100 | ifdef IEM_VERIFICATION_MODE
|
---|
101 | VMM_COMMON_DEFS += IEM_VERIFICATION_MODE IEM_VERIFICATION_MODE_FULL IEM_VERIFICATION_MODE_FULL_HM
|
---|
102 | endif
|
---|
103 |
|
---|
104 |
|
---|
105 | #
|
---|
106 | # The VMM DLL.
|
---|
107 | #
|
---|
108 | ifndef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
|
---|
109 | DLLS += VBoxVMM
|
---|
110 | endif
|
---|
111 | VBoxVMM_TEMPLATE = VBoxR3DllNoPic
|
---|
112 | VBoxVMM_SONAME.linux = VBoxVMM.so
|
---|
113 |
|
---|
114 | VBoxVMM_DEFS = IN_VMM_R3 IN_DIS IN_GMM_R3 IN_DBG $(VMM_COMMON_DEFS)
|
---|
115 | ## @todo eliminate IN_GMM_R3
|
---|
116 | ifdef VBOX_WITH_PREALLOC_RAM_BY_DEFAULT
|
---|
117 | VBoxVMM_DEFS += VBOX_WITH_PREALLOC_RAM_BY_DEFAULT
|
---|
118 | endif
|
---|
119 | ifdef VBOX_WITH_VUSB
|
---|
120 | VBoxVMM_DEFS += VBOX_WITH_USB
|
---|
121 | endif
|
---|
122 | ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
123 | VBoxVMM_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
124 | endif
|
---|
125 | ifdef VBOX_WITH_NETSHAPER
|
---|
126 | VBoxVMM_DEFS += VBOX_WITH_NETSHAPER
|
---|
127 | endif
|
---|
128 | ifdef VBOX_WITH_RAW_MODE
|
---|
129 | VBoxVMM_DEFS += VBOX_WITH_RAW_MODE VBOX_WITH_RAW_MODE_NOT_R0
|
---|
130 | endif
|
---|
131 | ifdef VBOX_WITH_VMM_R0_SWITCH_STACK
|
---|
132 | VBoxVMM_DEFS += VMM_R0_SWITCH_STACK
|
---|
133 | endif
|
---|
134 | if "$(KBUILD_TYPE)" == "debug" && "$(USERNAME)" == "bird"
|
---|
135 | VBoxVMM_DEFS += RTMEM_WRAP_TO_EF_APIS
|
---|
136 | endif
|
---|
137 | VBoxVMM_DEFS.darwin = VMM_R0_SWITCH_STACK
|
---|
138 |
|
---|
139 | VBoxVMM_INCS = \
|
---|
140 | include \
|
---|
141 | $(if-expr defined(VBOX_WITH_RAW_MODE),PATM,) \
|
---|
142 | $(VBoxVMM_0_OUTDIR)/CommonGenIncs
|
---|
143 | VBoxVMM_ASINCS = .
|
---|
144 |
|
---|
145 | VBoxVMM_SOURCES = \
|
---|
146 | VBoxVMM.d \
|
---|
147 | VMMR3/CFGM.cpp \
|
---|
148 | VMMR3/CPUM.cpp \
|
---|
149 | VMMR3/CPUMR3CpuId.cpp \
|
---|
150 | VMMR3/CPUMR3Db.cpp \
|
---|
151 | VMMR3/CPUMDbg.cpp \
|
---|
152 | VMMR3/DBGF.cpp \
|
---|
153 | VMMR3/DBGFAddr.cpp \
|
---|
154 | VMMR3/DBGFAddrSpace.cpp \
|
---|
155 | VMMR3/DBGFBp.cpp \
|
---|
156 | VMMR3/DBGFCoreWrite.cpp \
|
---|
157 | VMMR3/DBGFCpu.cpp \
|
---|
158 | VMMR3/DBGFDisas.cpp \
|
---|
159 | VMMR3/DBGFInfo.cpp \
|
---|
160 | VMMR3/DBGFLog.cpp \
|
---|
161 | VMMR3/DBGFMem.cpp \
|
---|
162 | VMMR3/DBGFOS.cpp \
|
---|
163 | VMMR3/DBGFR3PlugIn.cpp \
|
---|
164 | VMMR3/DBGFReg.cpp \
|
---|
165 | VMMR3/DBGFStack.cpp \
|
---|
166 | VMMR3/DBGFR3Cfg.cpp \
|
---|
167 | VMMR3/DBGFR3Trace.cpp \
|
---|
168 | VMMR3/DBGFR3Type.cpp \
|
---|
169 | VMMR3/EM.cpp \
|
---|
170 | VMMR3/EMR3Dbg.cpp \
|
---|
171 | $(if $(VBOX_WITH_RAW_MODE),VMMR3/EMRaw.cpp) \
|
---|
172 | VMMR3/EMHM.cpp \
|
---|
173 | VMMR3/FTM.cpp \
|
---|
174 | VMMR3/GIM.cpp \
|
---|
175 | VMMR3/GIMHv.cpp \
|
---|
176 | VMMR3/GIMKvm.cpp \
|
---|
177 | VMMR3/GIMMinimal.cpp \
|
---|
178 | VMMR3/IEMR3.cpp \
|
---|
179 | VMMR3/IOM.cpp \
|
---|
180 | VMMR3/GMM.cpp \
|
---|
181 | VMMR3/MM.cpp \
|
---|
182 | VMMR3/MMHeap.cpp \
|
---|
183 | VMMR3/MMHyper.cpp \
|
---|
184 | VMMR3/MMPagePool.cpp \
|
---|
185 | VMMR3/MMUkHeap.cpp \
|
---|
186 | VMMR3/PDM.cpp \
|
---|
187 | VMMR3/PDMBlkCache.cpp \
|
---|
188 | VMMR3/PDMDevice.cpp \
|
---|
189 | VMMR3/PDMDevHlp.cpp \
|
---|
190 | VMMR3/PDMDevMiscHlp.cpp \
|
---|
191 | VMMR3/PDMDriver.cpp \
|
---|
192 | VMMR3/PDMLdr.cpp \
|
---|
193 | VMMR3/PDMCritSect.cpp \
|
---|
194 | VMMR3/PDMQueue.cpp \
|
---|
195 | VMMR3/PDMThread.cpp \
|
---|
196 | VMMR3/PGM.cpp \
|
---|
197 | VMMR3/PGMDbg.cpp \
|
---|
198 | VMMR3/PGMR3DbgA.asm \
|
---|
199 | VMMR3/PGMHandler.cpp \
|
---|
200 | VMMR3/PGMMap.cpp \
|
---|
201 | VMMR3/PGMPhys.cpp \
|
---|
202 | VMMR3/PGMPool.cpp \
|
---|
203 | VMMR3/PGMSavedState.cpp \
|
---|
204 | VMMR3/PGMSharedPage.cpp \
|
---|
205 | VMMR3/SELM.cpp \
|
---|
206 | VMMR3/SSM.cpp \
|
---|
207 | VMMR3/STAM.cpp \
|
---|
208 | VMMR3/TM.cpp \
|
---|
209 | VMMR3/TRPM.cpp \
|
---|
210 | VMMR3/VM.cpp \
|
---|
211 | VMMR3/VMEmt.cpp \
|
---|
212 | VMMR3/VMReq.cpp \
|
---|
213 | VMMR3/VMM.cpp \
|
---|
214 | VMMR3/VMMGuruMeditation.cpp \
|
---|
215 | VMMR3/VMMSwitcher.cpp \
|
---|
216 | VMMR3/VMMTests.cpp \
|
---|
217 | VMMR3/HM.cpp \
|
---|
218 | $(if-expr defined(VBOX_WITH_RAW_MODE), \
|
---|
219 | VMMR3/CSAM.cpp \
|
---|
220 | VMMR3/PATM.cpp \
|
---|
221 | VMMR3/PATMPatch.cpp \
|
---|
222 | VMMR3/PATMGuest.cpp \
|
---|
223 | VMMR3/PATMA.asm \
|
---|
224 | VMMR3/PATMSSM.cpp \
|
---|
225 | VMMR3/PATMR3Dbg.cpp \
|
---|
226 | ,) \
|
---|
227 | VMMAll/CPUMAllRegs.cpp \
|
---|
228 | VMMAll/CPUMAllMsrs.cpp \
|
---|
229 | VMMAll/CPUMStack.cpp \
|
---|
230 | VMMAll/DBGFAll.cpp \
|
---|
231 | VMMAll/HMAll.cpp \
|
---|
232 | VMMAll/IEMAll.cpp \
|
---|
233 | VMMAll/IEMAllAImpl.asm \
|
---|
234 | VMMAll/IEMAllAImplC.cpp \
|
---|
235 | VMMAll/IOMAll.cpp \
|
---|
236 | VMMAll/IOMAllMMIO.cpp \
|
---|
237 | VMMAll/MMAll.cpp \
|
---|
238 | VMMAll/MMAllHyper.cpp \
|
---|
239 | VMMAll/MMAllPagePool.cpp \
|
---|
240 | VMMAll/PDMAll.cpp \
|
---|
241 | VMMAll/PDMAllCritSect.cpp \
|
---|
242 | VMMAll/PDMAllCritSectRw.cpp \
|
---|
243 | VMMAll/PDMAllCritSectBoth.cpp \
|
---|
244 | VMMAll/PDMAllQueue.cpp \
|
---|
245 | VMMAll/PGMAll.cpp \
|
---|
246 | VMMAll/PGMAllHandler.cpp \
|
---|
247 | VMMAll/PGMAllMap.cpp \
|
---|
248 | VMMAll/PGMAllPhys.cpp \
|
---|
249 | VMMAll/PGMAllPool.cpp \
|
---|
250 | VMMAll/SELMAll.cpp \
|
---|
251 | VMMAll/EMAll.cpp \
|
---|
252 | VMMAll/EMAllA.asm \
|
---|
253 | VMMAll/FTMAll.cpp \
|
---|
254 | VMMAll/GIMAll.cpp \
|
---|
255 | VMMAll/GIMAllHv.cpp \
|
---|
256 | VMMAll/GIMAllKvm.cpp \
|
---|
257 | VMMAll/TMAll.cpp \
|
---|
258 | VMMAll/TMAllCpu.cpp \
|
---|
259 | VMMAll/TMAllReal.cpp \
|
---|
260 | VMMAll/TMAllVirtual.cpp \
|
---|
261 | VMMAll/TRPMAll.cpp \
|
---|
262 | VMMAll/VMAll.cpp \
|
---|
263 | VMMAll/VMMAll.cpp \
|
---|
264 | VMMAll/VMMAllA.asm \
|
---|
265 | $(if-expr defined(VBOX_WITH_RAW_MODE), \
|
---|
266 | VMMAll/CSAMAll.cpp \
|
---|
267 | VMMAll/PATMAll.cpp \
|
---|
268 | ,)
|
---|
269 | ifdef VBOX_WITH_VUSB
|
---|
270 | VBoxVMM_SOURCES += VMMR3/PDMUsb.cpp
|
---|
271 | endif
|
---|
272 | ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
273 | VBoxVMM_SOURCES += \
|
---|
274 | VMMR3/PDMAsyncCompletion.cpp \
|
---|
275 | VMMR3/PDMAsyncCompletionFile.cpp \
|
---|
276 | VMMR3/PDMAsyncCompletionFileFailsafe.cpp \
|
---|
277 | VMMR3/PDMAsyncCompletionFileNormal.cpp
|
---|
278 | endif
|
---|
279 | ifdef VBOX_WITH_NETSHAPER
|
---|
280 | VBoxVMM_SOURCES += \
|
---|
281 | VMMR3/PDMNetShaper.cpp \
|
---|
282 | VMMAll/PDMAllNetShaper.cpp
|
---|
283 | endif
|
---|
284 | ifdef VBOX_WITH_NEW_APIC
|
---|
285 | VBoxVMM_SOURCES += \
|
---|
286 | VMMR3/APIC.cpp \
|
---|
287 | VMMAll/APICAll.cpp
|
---|
288 | endif
|
---|
289 | ifdef VBOX_WITH_REM
|
---|
290 | VBoxVMM_SOURCES += \
|
---|
291 | VMMAll/REMAll.cpp
|
---|
292 | endif
|
---|
293 | ifdef VBOX_WITH_RAW_MODE
|
---|
294 | VBoxVMM_SOURCES.x86 += \
|
---|
295 | VMMSwitcher/32BitTo32Bit.asm \
|
---|
296 | VMMSwitcher/32BitToPAE.asm \
|
---|
297 | VMMSwitcher/PAETo32Bit.asm \
|
---|
298 | VMMSwitcher/PAEToPAE.asm
|
---|
299 | VBoxVMM_SOURCES.amd64 = \
|
---|
300 | VMMSwitcher/AMD64To32Bit.asm \
|
---|
301 | VMMSwitcher/AMD64ToPAE.asm
|
---|
302 | endif
|
---|
303 | VBoxVMM_SOURCES.x86 += \
|
---|
304 | VMMSwitcher/32BitToAMD64.asm \
|
---|
305 | VMMSwitcher/PAEToAMD64.asm \
|
---|
306 | VMMSwitcher/X86Stub.asm
|
---|
307 | VBoxVMM_SOURCES.amd64 += \
|
---|
308 | VMMSwitcher/AMD64Stub.asm
|
---|
309 |
|
---|
310 | VBoxVMM_LIBS = \
|
---|
311 | $(PATH_STAGE_LIB)/DisasmR3$(VBOX_SUFF_LIB)
|
---|
312 | ifdef VBOX_WITH_DEBUGGER
|
---|
313 | VBoxVMM_LIBS += \
|
---|
314 | $(PATH_STAGE_LIB)/Debugger$(VBOX_SUFF_LIB)
|
---|
315 | endif
|
---|
316 | VBoxVMM_LIBS += \
|
---|
317 | $(LIB_REM) \
|
---|
318 | $(LIB_RUNTIME)
|
---|
319 |
|
---|
320 | VBoxVMM_LIBS.win = $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
|
---|
321 | VBoxVMM_LDFLAGS.linux = -Wl,--no-undefined
|
---|
322 | VBoxVMM_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxVMM.dylib
|
---|
323 | VBoxVMM_LDFLAGS.solaris = -mimpure-text
|
---|
324 |
|
---|
325 | # SSM wish to know the build type, host os and arch.
|
---|
326 | VMMR3/SSM.cpp_DEFS += \
|
---|
327 | KBUILD_TYPE=\"$(KBUILD_TYPE)\" \
|
---|
328 | KBUILD_TARGET=\"$(KBUILD_TARGET)\" \
|
---|
329 | KBUILD_TARGET_ARCH=\"$(KBUILD_TARGET_ARCH)\"
|
---|
330 |
|
---|
331 |
|
---|
332 | #ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
333 | # ifeq ($(KBUILD_HOST), linux)
|
---|
334 | #VBoxVMM_LIBS += aio
|
---|
335 | # endif
|
---|
336 | #endif
|
---|
337 |
|
---|
338 | if "$(USERNAME)" == "bird" && "$(KBUILD_TARGET)" == "win"
|
---|
339 | VBoxVMM_VMMAll/IEMAll.cpp_CXXFLAGS = /FAcs /Fa$(subst /,\\,$(outbase).cod)
|
---|
340 | VBoxVMM_VMMAll/PDMAllCritSect.cpp_CXXFLAGS = /FAcs /Fa$(subst /,\\,$(outbase).cod)
|
---|
341 | endif
|
---|
342 |
|
---|
343 | $(call VBOX_SET_VER_INFO_DLL,VBoxVMM,VirtualBox VMM) # Version info / description.
|
---|
344 |
|
---|
345 |
|
---|
346 | #
|
---|
347 | # Generate macro template for IEM instruction statistics.
|
---|
348 | #
|
---|
349 | VBoxVMM_INTERMEDIATES += $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMInstructionStatisticsTmpl.h
|
---|
350 | VBoxVMM_CLEAN += \
|
---|
351 | $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMInstructionStatisticsTmpl.h.ts \
|
---|
352 | $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMInstructionStatisticsTmpl.h
|
---|
353 | $$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMInstructionStatisticsTmpl.h.ts \
|
---|
354 | +| $$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMInstructionStatisticsTmpl.h: \
|
---|
355 | $(PATH_SUB_CURRENT)/VMMAll/IEMAllInstructions.cpp.h
|
---|
356 | $(QUIET)$(call MSG_GENERATE,VBoxVMM,$@,$<)
|
---|
357 | $(QUIET)$(MKDIR) -p -- "$(dir $@)"
|
---|
358 | $(QUIET)set +e && $(SED) \
|
---|
359 | -e '/IEMOP_MNEMONIC(/!d' \
|
---|
360 | -e 's/^.*IEMOP_MNEMONIC(/IEM_DO_INSTR_STAT(/' \
|
---|
361 | -e 's/;.*$(DOLLAR)//' \
|
---|
362 | --output "[email protected]" $<
|
---|
363 | $(QUIET)$(REDIRECT) -wto "$@" -- sort "[email protected]"
|
---|
364 | $(QUIET)$(RM) -f -- "[email protected]"
|
---|
365 | $(QUIET)$(CP) -v -f --changed -- "$@" "$(patsubst %.ts,%,$@)"
|
---|
366 |
|
---|
367 |
|
---|
368 | if "$(KBUILD_TARGET)" == "win" && !defined(VBOX_ONLY_EXTPACKS_USE_IMPLIBS)
|
---|
369 | #
|
---|
370 | # Debug type info hack for VMCPU, VM and similar.
|
---|
371 | #
|
---|
372 | # The microsoft linker seems to be using the last occurence of the structures
|
---|
373 | # when writing the module PDB file. So, we put the fully complete structures
|
---|
374 | # in a library which is at the end of the library list.
|
---|
375 | #
|
---|
376 | VBoxVMM_LIBS += $(VBoxVMMPdbTypeHack_1_TARGET)
|
---|
377 | VBoxVMM_LDFLAGS += /Export:PdbTypeHack
|
---|
378 |
|
---|
379 | LIBRARIES += VBoxVMMPdbTypeHack
|
---|
380 | VBoxVMMPdbTypeHack_TEMPLATE = $(VBoxVMM_TEMPLATE)
|
---|
381 | VBoxVMMPdbTypeHack_SOURCES = VMMAll/AllPdbTypeHack.cpp
|
---|
382 | VBoxVMMPdbTypeHack_DEFS = $(VBoxVMM_DEFS)
|
---|
383 | VBoxVMMPdbTypeHack_DEFS.win = $(VBoxVMM_DEFS.win)
|
---|
384 | VBoxVMMPdbTypeHack_DEFS.win.x86 = $(VBoxVMM_DEFS.win.x86)
|
---|
385 | VBoxVMMPdbTypeHack_DEFS.win.amd64 = $(VBoxVMM_DEFS.win.amd64)
|
---|
386 | VBoxVMMPdbTypeHack_INCS = $(VBoxVMM_INCS)
|
---|
387 |
|
---|
388 | VBoxVMMPdbTypeHack_INTERMEDIATES += $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMInstructionStatisticsTmpl.h
|
---|
389 | endif
|
---|
390 |
|
---|
391 |
|
---|
392 | if defined(VBOX_WITH_RAW_MODE) && $(intersects $(VBOX_LDR_FMT32), pe lx)
|
---|
393 |
|
---|
394 | #
|
---|
395 | # VMMRCBuiltin.lib
|
---|
396 | #
|
---|
397 | LIBRARIES += VMMRCBuiltin
|
---|
398 | VMMRCBuiltin_TEMPLATE = VBoxRc
|
---|
399 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
400 | VMMRCBuiltin_SOURCES = VMMRC/VMMRCBuiltin.def
|
---|
401 | endif
|
---|
402 | ifeq ($(VBOX_LDR_FMT32),lx)
|
---|
403 | VMMRCBuiltin_SOURCES = $(VMMRCBuiltin_0_OUTDIR)/VMMRCBuiltin.def
|
---|
404 | $$(VMMRCBuiltin_0_OUTDIR)/VMMRCBuiltin.def: $(PATH_SUB_CURRENT)/VMMRC/VMMRCBuiltin.def | $$(dir $$@)
|
---|
405 | $(SED) -e '/not-os2/d' -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' --output $@ $<
|
---|
406 | endif
|
---|
407 |
|
---|
408 |
|
---|
409 | #
|
---|
410 | # VMMRCImp.lib
|
---|
411 | #
|
---|
412 | LIBRARIES += VMMRCImp
|
---|
413 | VMMRCImp_TEMPLATE = VBoxRc
|
---|
414 | VMMRCImp_SOURCES = $(VMMRCImp_0_OUTDIR)/VMMRC.def
|
---|
415 | VMMRCImp_CLEAN = $(VMMRCImp_0_OUTDIR)/VMMRC.def
|
---|
416 |
|
---|
417 | $$(VMMRCImp_0_OUTDIR)/VMMRC.def: $(PATH_SUB_CURRENT)/VMMRC/VMMRC.def | $$(dir $$@)
|
---|
418 | ifeq ($(VBOX_LDR_FMT32),lx)
|
---|
419 | $(SED) \
|
---|
420 | -e '/not-os2/d' \
|
---|
421 | -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' \
|
---|
422 | -e 's/[ \t]DATA[ \t]*/ /' \
|
---|
423 | --output $@ \
|
---|
424 | $<
|
---|
425 | $(APPEND) "$@" ""
|
---|
426 | $(APPEND) "$@" " ___ehInit"
|
---|
427 | else
|
---|
428 | $(SED) \
|
---|
429 | -e '/not-win/d' \
|
---|
430 | -e '/not-$(KBUILD_TARGET_ARCH)/d' \
|
---|
431 | --output $@ $<
|
---|
432 | endif
|
---|
433 |
|
---|
434 | endif # RC && (pe || lx)
|
---|
435 |
|
---|
436 |
|
---|
437 | if1of ($(VBOX_LDR_FMT), pe lx)
|
---|
438 | #
|
---|
439 | # VMMR0Imp.lib
|
---|
440 | #
|
---|
441 | LIBRARIES += VMMR0Imp
|
---|
442 | VMMR0Imp_TEMPLATE = VBoxR0
|
---|
443 | VMMR0Imp_SOURCES = $(VMMR0Imp_0_OUTDIR)/VMMR0.def
|
---|
444 | VMMR0Imp_CLEAN = $(VMMR0Imp_0_OUTDIR)/VMMR0.def
|
---|
445 | ifeq ($(KBUILD_TARGET),win) # Experiment: Let's see how blunt the ones messing our NULL_THUNK_DATA entries on W10 are.
|
---|
446 | VMMR0Imp_POST_CMDS = $(KLIBTWEAKER_EXT) --clear-timestamps --fill-null_thunk_data $(out)
|
---|
447 | endif
|
---|
448 |
|
---|
449 | $$(VMMR0Imp_0_OUTDIR)/VMMR0.def: $(PATH_SUB_CURRENT)/VMMR0/VMMR0.def | $$(dir $$@)
|
---|
450 | ifeq ($(VBOX_LDR_FMT),lx)
|
---|
451 | $(SED) \
|
---|
452 | -e '/not-os2/d' \
|
---|
453 | -e '/not-amd64/d' \
|
---|
454 | -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' \
|
---|
455 | -e 's/[ \t]DATA[ \t]*/ /' \
|
---|
456 | --output $@ $<
|
---|
457 | $(APPEND) "$@" ""
|
---|
458 | $(APPEND) "$@" " ___ehInit"
|
---|
459 | else
|
---|
460 | $(SED) \
|
---|
461 | -e '/not-win/d' \
|
---|
462 | -e '/not-$(KBUILD_TARGET_ARCH)/d' \
|
---|
463 | --output $@ $<
|
---|
464 | endif
|
---|
465 | endif # R0: pe + lx
|
---|
466 |
|
---|
467 |
|
---|
468 | #
|
---|
469 | # VMMR3Imp.lib
|
---|
470 | #
|
---|
471 | IMPORT_LIBS += VMMR3Imp
|
---|
472 | $(call VBOX_GENERATE_IMPORT_TARGET_FN,VMMR3Imp,VBoxVMM,VMMR3/VMMR3.def)
|
---|
473 |
|
---|
474 | ifneq ($(VBOX_LIB_VMM_LAZY),$(LIB_VMM))
|
---|
475 | #
|
---|
476 | # VMMR3LazyImp.lib (experimental)
|
---|
477 | #
|
---|
478 | LIBRARIES += VMMR3LazyImp
|
---|
479 | VMMR3LazyImp_TEMPLATE = VBoxR3Dll
|
---|
480 | VMMR3LazyImp_INST = $(INST_LIB)
|
---|
481 | VMMR3LazyImp_SOURCES = $(VMMR3LazyImp_0_OUTDIR)/VMMR3LazyLoad.asm
|
---|
482 | VMMR3LazyImp_CLEAN = $(VMMR3LazyImp_0_OUTDIR)/VMMR3LazyLoad.asm
|
---|
483 | $$(VMMR3LazyImp_0_OUTDIR)/VMMR3LazyLoad.asm: $(PATH_SUB_CURRENT)/VMMR3/VMMR3.def $(VBOX_DEF_2_LAZY_LOAD) | $$(dir $$@)
|
---|
484 | $(VBOX_DEF_2_LAZY_LOAD) --output $@ --library VBoxVMM $<
|
---|
485 | endif
|
---|
486 |
|
---|
487 |
|
---|
488 | if defined(VBOX_WITH_RAW_MODE) && !defined(VBOX_ONLY_EXTPACKS)
|
---|
489 | #
|
---|
490 | # VMMRC.rc
|
---|
491 | #
|
---|
492 | SYSMODS += VMMRC
|
---|
493 | VMMRC_TEMPLATE = VBoxRc
|
---|
494 | VMMRC_NAME = VMMRC
|
---|
495 |
|
---|
496 | VMMRC_DEFS = IN_VMM_RC IN_RT_RC IN_DIS DIS_CORE_ONLY VBOX_WITH_RAW_MODE VBOX_WITH_RAW_MODE_NOT_R0 IN_SUP_RC \
|
---|
497 | $(VMM_COMMON_DEFS)
|
---|
498 | ifdef VBOX_WITH_VMM_R0_SWITCH_STACK
|
---|
499 | VMMRC_DEFS += VMM_R0_SWITCH_STACK
|
---|
500 | endif
|
---|
501 |
|
---|
502 | VMMRC_INCS = \
|
---|
503 | include \
|
---|
504 | VMMRC \
|
---|
505 | $(if-expr defined(VBOX_WITH_RAW_MODE),PATM,) \
|
---|
506 | $(VBoxVMM_0_OUTDIR)/CommonGenIncs
|
---|
507 |
|
---|
508 | VMMRC_LIBS = \
|
---|
509 | $(PATH_STAGE_LIB)/DisasmRC$(VBOX_SUFF_LIB) \
|
---|
510 | $(PATH_STAGE_LIB)/RuntimeRC$(VBOX_SUFF_LIB) \
|
---|
511 | $(PATH_STAGE_LIB)/SUPRC$(VBOX_SUFF_LIB)
|
---|
512 | ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
|
---|
513 | VMMRC_LIBS += \
|
---|
514 | $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB)
|
---|
515 | endif
|
---|
516 |
|
---|
517 | VMMRC_SOURCES = \
|
---|
518 | VBoxVMM.d \
|
---|
519 | VMMRC/VMMRC0.asm \
|
---|
520 | VMMRC/VMMRCDeps.cpp \
|
---|
521 | VMMRC/CPUMRC.cpp \
|
---|
522 | VMMRC/CPUMRCA.asm \
|
---|
523 | VMMRC/CPUMRCPatchHlp.asm \
|
---|
524 | VMMRC/EMRCA.asm \
|
---|
525 | VMMRC/IOMRC.cpp \
|
---|
526 | VMMRC/MMRamRC.cpp \
|
---|
527 | VMMRC/MMRamRCA.asm \
|
---|
528 | VMMRC/PDMRCDevice.cpp \
|
---|
529 | VMMRC/PGMRC.cpp \
|
---|
530 | VMMRC/SELMRC.cpp \
|
---|
531 | VMMRC/TRPMRC.cpp \
|
---|
532 | VMMRC/TRPMRCHandlers.cpp \
|
---|
533 | VMMRC/TRPMRCHandlersA.asm \
|
---|
534 | VMMRC/VMMRC.cpp \
|
---|
535 | VMMRC/VMMRCA.asm \
|
---|
536 | $(if-expr defined(VBOX_WITH_RAW_MODE), \
|
---|
537 | VMMRC/CSAMRC.cpp \
|
---|
538 | VMMRC/PATMRC.cpp \
|
---|
539 | ,) \
|
---|
540 | VMMRZ/CPUMRZ.cpp \
|
---|
541 | VMMRZ/CPUMRZA.asm \
|
---|
542 | VMMRZ/DBGFRZ.cpp \
|
---|
543 | VMMRZ/PGMRZDynMap.cpp \
|
---|
544 | VMMRZ/VMMRZ.cpp \
|
---|
545 | VMMAll/CPUMAllRegs.cpp \
|
---|
546 | VMMAll/CPUMAllMsrs.cpp \
|
---|
547 | VMMAll/DBGFAll.cpp \
|
---|
548 | VMMAll/IEMAll.cpp \
|
---|
549 | VMMAll/IEMAllAImpl.asm \
|
---|
550 | VMMAll/IEMAllAImplC.cpp \
|
---|
551 | VMMAll/IOMAll.cpp \
|
---|
552 | VMMAll/IOMAllMMIO.cpp \
|
---|
553 | VMMAll/EMAll.cpp \
|
---|
554 | VMMAll/EMAllA.asm \
|
---|
555 | VMMAll/FTMAll.cpp \
|
---|
556 | VMMAll/GIMAll.cpp \
|
---|
557 | VMMAll/GIMAllHv.cpp \
|
---|
558 | VMMAll/GIMAllKvm.cpp \
|
---|
559 | VMMAll/MMAll.cpp \
|
---|
560 | VMMAll/MMAllHyper.cpp \
|
---|
561 | VMMAll/PDMAll.cpp \
|
---|
562 | VMMAll/PDMAllCritSect.cpp \
|
---|
563 | VMMAll/PDMAllCritSectRw.cpp \
|
---|
564 | VMMAll/PDMAllCritSectBoth.cpp \
|
---|
565 | VMMAll/PDMAllQueue.cpp \
|
---|
566 | VMMAll/PGMAll.cpp \
|
---|
567 | VMMAll/PGMAllHandler.cpp \
|
---|
568 | VMMAll/PGMAllMap.cpp \
|
---|
569 | VMMAll/PGMAllPhys.cpp \
|
---|
570 | VMMAll/PGMAllPool.cpp \
|
---|
571 | VMMAll/SELMAll.cpp \
|
---|
572 | VMMAll/TMAll.cpp \
|
---|
573 | VMMAll/TMAllCpu.cpp \
|
---|
574 | VMMAll/TMAllReal.cpp \
|
---|
575 | VMMAll/TMAllVirtual.cpp \
|
---|
576 | VMMAll/TRPMAll.cpp \
|
---|
577 | VMMAll/VMAll.cpp \
|
---|
578 | VMMAll/VMMAll.cpp \
|
---|
579 | VMMAll/VMMAllA.asm \
|
---|
580 | $(if-expr defined(VBOX_WITH_RAW_MODE), \
|
---|
581 | VMMAll/CSAMAll.cpp \
|
---|
582 | VMMAll/PATMAll.cpp \
|
---|
583 | ,)
|
---|
584 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
585 | VMMRC_SOURCES += VMMRC/VMMRC.def
|
---|
586 | endif
|
---|
587 | ifeq ($(VBOX_LDR_FMT32),lx)
|
---|
588 | VMMRC_SOURCES += $(VMMRCImp_0_OUTDIR)/VMMRC.def
|
---|
589 | endif
|
---|
590 | ifdef VBOX_WITH_NEW_APIC
|
---|
591 | VMMRC_SOURCES += \
|
---|
592 | VMMAll/APICAll.cpp
|
---|
593 | endif
|
---|
594 | ifdef VBOX_WITH_REM
|
---|
595 | VMMRC_SOURCES += \
|
---|
596 | VMMAll/REMAll.cpp
|
---|
597 | endif
|
---|
598 |
|
---|
599 | # The very last one.
|
---|
600 | VMMRC_SOURCES += \
|
---|
601 | VMMRC/VMMRC99.asm
|
---|
602 |
|
---|
603 | VMMRC/VMMRCDeps.cpp_CXXFLAGS.win = -Oi- -TC ## @todo rename VMMRCDeps.cpp to .c
|
---|
604 |
|
---|
605 | $(call VBOX_SET_VER_INFO_RC,VMMRC,VirtualBox VMM - raw-mode context parts) # Version info / description.
|
---|
606 |
|
---|
607 | if "$(USERNAME)" == "bird" && "$(KBUILD_TARGET)" == "win"
|
---|
608 | VMMRC_VMMAll/IEMAll.cpp_CXXFLAGS = /FAcs /Fa$(subst /,\\,$(outbase).cod)
|
---|
609 | endif
|
---|
610 |
|
---|
611 | VMMRC_INTERMEDIATES += $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMInstructionStatisticsTmpl.h
|
---|
612 |
|
---|
613 | if "$(KBUILD_TARGET)" == "win"
|
---|
614 | # Debug type info hack for VMCPU, VM and similar. See VBoxVMM for details.
|
---|
615 | VMMRC_LIBS += $(VMMRCPdbTypeHack_1_TARGET)
|
---|
616 | VMMRC_LDFLAGS += /Export:PdbTypeHack
|
---|
617 |
|
---|
618 | LIBRARIES += VMMRCPdbTypeHack
|
---|
619 | VMMRCPdbTypeHack_TEMPLATE = $(VMMRC_TEMPLATE)
|
---|
620 | VMMRCPdbTypeHack_SOURCES = VMMAll/AllPdbTypeHack.cpp
|
---|
621 | VMMRCPdbTypeHack_DEFS = $(VMMRC_DEFS)
|
---|
622 | VMMRCPdbTypeHack_DEFS.win = $(VMMRC_DEFS.win)
|
---|
623 | VMMRCPdbTypeHack_DEFS.win.x86 = $(VMMRC_DEFS.win.x86)
|
---|
624 | VMMRCPdbTypeHack_DEFS.win.amd64 = $(VMMRC_DEFS.win.amd64)
|
---|
625 | VMMRCPdbTypeHack_INCS = $(VMMRC_INCS)
|
---|
626 |
|
---|
627 | VMMRCPdbTypeHack_INTERMEDIATES += $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMInstructionStatisticsTmpl.h
|
---|
628 | endif
|
---|
629 |
|
---|
630 | endif # VBOX_WITH_RAW_MODE && !VBOX_ONLY_EXTPACKS
|
---|
631 |
|
---|
632 |
|
---|
633 | ifndef VBOX_ONLY_EXTPACKS
|
---|
634 | #
|
---|
635 | # VMMR0.r0
|
---|
636 | #
|
---|
637 | SYSMODS += VMMR0
|
---|
638 | VMMR0_TEMPLATE = VBoxR0
|
---|
639 | VMMR0_SYSSUFF = .r0
|
---|
640 |
|
---|
641 | VMMR0_DEFS = IN_VMM_R0 IN_RT_R0 IN_DIS DIS_CORE_ONLY IN_GVMM_R0 IN_GMM_R0 IN_INTNET_R0 \
|
---|
642 | $(VMM_COMMON_DEFS) RTASSERT_HAVE_SHOULD_PANIC
|
---|
643 | ## @todo eliminate IN_GVMM_R0 IN_GMM_R0
|
---|
644 | ifdef VBOX_WITH_PCI_PASSTHROUGH
|
---|
645 | VMMR0_DEFS += IN_PCIRAW_R0
|
---|
646 | endif
|
---|
647 | ifdef VBOX_WITH_TRIPLE_FAULT_HACK
|
---|
648 | VMMR0_DEFS += VBOX_WITH_TRIPLE_FAULT_HACK
|
---|
649 | endif
|
---|
650 | ifdef VBOX_WITH_RAW_MODE
|
---|
651 | VMMR0_DEFS += VBOX_WITH_RAW_MODE
|
---|
652 | endif
|
---|
653 | ifdef VBOX_WITH_VMM_R0_SWITCH_STACK
|
---|
654 | VMMR0_DEFS += VMM_R0_SWITCH_STACK
|
---|
655 | endif
|
---|
656 | if1of ($(KBUILD_TARGET), darwin linux win)
|
---|
657 | VMMR0_DEFS += VMM_R0_TOUCH_FPU
|
---|
658 | endif
|
---|
659 | VMMR0_DEFS.darwin = VMM_R0_SWITCH_STACK
|
---|
660 | VMMR0_DEFS.win.amd64 = VBOX_WITH_KERNEL_USING_XMM
|
---|
661 |
|
---|
662 | ifeq ($(VBOX_LDR_FMT),elf)
|
---|
663 | VMMR0_CXXFLAGS += -Wunused -Wunused-variable -Wno-unused-parameter
|
---|
664 | endif
|
---|
665 |
|
---|
666 | VMMR0_INCS = \
|
---|
667 | include \
|
---|
668 | $(if-expr defined(VBOX_WITH_RAW_MODE),PATM,) \
|
---|
669 | $(VBoxVMM_0_OUTDIR)/CommonGenIncs
|
---|
670 |
|
---|
671 | VMMR0_SOURCES = \
|
---|
672 | VBoxVMM.d \
|
---|
673 | VMMR0/CPUMR0.cpp \
|
---|
674 | VMMR0/CPUMR0A.asm \
|
---|
675 | VMMR0/GIMR0.cpp \
|
---|
676 | VMMR0/GIMR0Hv.cpp \
|
---|
677 | VMMR0/GIMR0Kvm.cpp \
|
---|
678 | VMMR0/GMMR0.cpp \
|
---|
679 | VMMR0/GVMMR0.cpp \
|
---|
680 | VMMR0/HMR0.cpp \
|
---|
681 | VMMR0/HMR0A.asm \
|
---|
682 | VMMR0/HMVMXR0.cpp \
|
---|
683 | VMMR0/HMSVMR0.cpp \
|
---|
684 | VMMR0/PDMR0Device.cpp \
|
---|
685 | VMMR0/PDMR0Driver.cpp \
|
---|
686 | VMMR0/PGMR0.cpp \
|
---|
687 | VMMR0/PGMR0SharedPage.cpp \
|
---|
688 | VMMR0/TRPMR0.cpp \
|
---|
689 | VMMR0/TRPMR0A.asm \
|
---|
690 | VMMR0/VMMR0.cpp \
|
---|
691 | VMMRZ/CPUMRZ.cpp \
|
---|
692 | VMMRZ/CPUMRZA.asm \
|
---|
693 | VMMRZ/DBGFRZ.cpp \
|
---|
694 | VMMRZ/VMMRZ.cpp \
|
---|
695 | VMMAll/CPUMAllRegs.cpp \
|
---|
696 | VMMAll/CPUMAllMsrs.cpp \
|
---|
697 | VMMAll/CPUMStack.cpp \
|
---|
698 | VMMAll/DBGFAll.cpp \
|
---|
699 | VMMAll/EMAll.cpp \
|
---|
700 | VMMAll/EMAllA.asm \
|
---|
701 | VMMAll/FTMAll.cpp \
|
---|
702 | VMMAll/GIMAll.cpp \
|
---|
703 | VMMAll/GIMAllHv.cpp \
|
---|
704 | VMMAll/GIMAllKvm.cpp \
|
---|
705 | VMMAll/HMAll.cpp \
|
---|
706 | VMMAll/IEMAll.cpp \
|
---|
707 | VMMAll/IEMAllAImpl.asm \
|
---|
708 | VMMAll/IEMAllAImplC.cpp \
|
---|
709 | VMMAll/IOMAll.cpp \
|
---|
710 | VMMAll/IOMAllMMIO.cpp \
|
---|
711 | VMMAll/MMAll.cpp \
|
---|
712 | VMMAll/MMAllHyper.cpp \
|
---|
713 | VMMAll/MMAllPagePool.cpp \
|
---|
714 | VMMAll/PDMAll.cpp \
|
---|
715 | VMMAll/PDMAllCritSect.cpp \
|
---|
716 | VMMAll/PDMAllCritSectRw.cpp \
|
---|
717 | VMMAll/PDMAllCritSectBoth.cpp \
|
---|
718 | VMMAll/PDMAllQueue.cpp \
|
---|
719 | VMMAll/PGMAll.cpp \
|
---|
720 | VMMAll/PGMAllHandler.cpp \
|
---|
721 | VMMAll/PGMAllMap.cpp \
|
---|
722 | VMMAll/PGMAllPhys.cpp \
|
---|
723 | VMMAll/PGMAllPool.cpp \
|
---|
724 | VMMAll/SELMAll.cpp \
|
---|
725 | VMMAll/TMAll.cpp \
|
---|
726 | VMMAll/TMAllCpu.cpp \
|
---|
727 | VMMAll/TMAllReal.cpp \
|
---|
728 | VMMAll/TMAllVirtual.cpp \
|
---|
729 | VMMAll/TRPMAll.cpp \
|
---|
730 | VMMAll/VMAll.cpp \
|
---|
731 | VMMAll/VMMAll.cpp \
|
---|
732 | VMMAll/VMMAllA.asm
|
---|
733 | if1of ($(VBOX_LDR_FMT), pe lx)
|
---|
734 | VMMR0_SOURCES += $(VMMR0Imp_0_OUTDIR)/VMMR0.def
|
---|
735 | endif
|
---|
736 | ifdef VBOX_WITH_TRIPLE_FAULT_HACK
|
---|
737 | VMMR0_SOURCES += \
|
---|
738 | VMMR0/VMMR0TripleFaultHack.cpp \
|
---|
739 | VMMR0/VMMR0TripleFaultHackA.asm
|
---|
740 | endif
|
---|
741 | ifdef VBOX_WITH_NETSHAPER
|
---|
742 | VMMR0_SOURCES += \
|
---|
743 | VMMAll/PDMAllNetShaper.cpp
|
---|
744 | endif
|
---|
745 | ifdef VBOX_WITH_NEW_APIC
|
---|
746 | VMMR0_SOURCES += \
|
---|
747 | VMMAll/APICAll.cpp
|
---|
748 | endif
|
---|
749 | ifdef VBOX_WITH_REM
|
---|
750 | VMMR0_SOURCES += \
|
---|
751 | VMMAll/REMAll.cpp
|
---|
752 | endif
|
---|
753 | VMMR0_SOURCES.amd64 = \
|
---|
754 | VMMR0/VMMR0JmpA-amd64.asm
|
---|
755 | VMMR0_SOURCES.x86 = \
|
---|
756 | VMMR0/VMMR0JmpA-x86.asm
|
---|
757 |
|
---|
758 | VMMR0_LIBS = \
|
---|
759 | $(PATH_STAGE_LIB)/ServicesR0$(VBOX_SUFF_LIB) \
|
---|
760 | $(PATH_STAGE_LIB)/RuntimeR0$(VBOX_SUFF_LIB) \
|
---|
761 | $(PATH_STAGE_LIB)/DisasmR0$(VBOX_SUFF_LIB)
|
---|
762 | ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
|
---|
763 | VMMR0_LIBS += \
|
---|
764 | $(PATH_STAGE_LIB)/SUPR0$(VBOX_SUFF_LIB)
|
---|
765 | endif
|
---|
766 |
|
---|
767 | $(call VBOX_SET_VER_INFO_R0,VMMR0,VirtualBox VMM - ring-0 context parts) # Version info / description.
|
---|
768 |
|
---|
769 | if "$(USERNAME)" == "bird" && "$(KBUILD_TARGET)" == "win"
|
---|
770 | VMMR0_VMMAll/IEMAll.cpp_CXXFLAGS = /FAcs /Fa$(subst /,\\,$(outbase).cod)
|
---|
771 | endif
|
---|
772 |
|
---|
773 | VMMR0_INTERMEDIATES += $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMInstructionStatisticsTmpl.h
|
---|
774 |
|
---|
775 | if "$(KBUILD_TARGET)" == "win"
|
---|
776 | # Debug type info hack for VMCPU, VM and similar. See VBoxVMM for details.
|
---|
777 | VMMR0_LIBS += $(VMMR0PdbTypeHack_1_TARGET)
|
---|
778 | VMMR0_LDFLAGS += /Export:PdbTypeHack
|
---|
779 |
|
---|
780 | LIBRARIES += VMMR0PdbTypeHack
|
---|
781 | VMMR0PdbTypeHack_TEMPLATE = $(VMMR0_TEMPLATE)
|
---|
782 | VMMR0PdbTypeHack_SOURCES = VMMAll/AllPdbTypeHack.cpp
|
---|
783 | VMMR0PdbTypeHack_DEFS = $(VMMR0_DEFS)
|
---|
784 | VMMR0PdbTypeHack_DEFS.win = $(VMMR0_DEFS.win)
|
---|
785 | VMMR0PdbTypeHack_DEFS.win.x86 = $(VMMR0_DEFS.win.x86)
|
---|
786 | VMMR0PdbTypeHack_DEFS.win.amd64 = $(VMMR0_DEFS.win.amd64)
|
---|
787 | VMMR0PdbTypeHack_INCS = $(VMMR0_INCS)
|
---|
788 |
|
---|
789 | VMMR0PdbTypeHack_INTERMEDIATES += $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMInstructionStatisticsTmpl.h
|
---|
790 | endif
|
---|
791 |
|
---|
792 | endif # !VBOX_ONLY_EXTPACKS
|
---|
793 |
|
---|
794 |
|
---|
795 |
|
---|
796 | ifndef VBOX_ONLY_EXTPACKS
|
---|
797 | #
|
---|
798 | # SSMStandalone.lib/a for linking with VBoxSVC and other executables.
|
---|
799 | #
|
---|
800 | LIBRARIES += SSMStandalone
|
---|
801 | SSMStandalone_TEMPLATE = VBOXR3EXE
|
---|
802 | SSMStandalone_DEFS = IN_VMM_R3 IN_VMM_STATIC SSM_STANDALONE CPUM_DB_STANDALONE
|
---|
803 | SSMStandalone_INCS = include
|
---|
804 | SSMStandalone_SOURCES = \
|
---|
805 | VMMR3/SSM.cpp \
|
---|
806 | VMMR3/CPUMR3Db.cpp
|
---|
807 | endif # !VBOX_ONLY_EXTPACKS
|
---|
808 |
|
---|
809 |
|
---|
810 | if !defined(VBOX_ONLY_EXTPACKS) \
|
---|
811 | && ( defined(VBOX_WITH_DTRACE_R3) \
|
---|
812 | || defined(VBOX_WITH_DTRACE_R0) \
|
---|
813 | || defined(VBOX_WITH_DTRACE_RC))
|
---|
814 | #
|
---|
815 | # Install the dtrace library files.
|
---|
816 | #
|
---|
817 | INSTALLS += VMMLibDTrace
|
---|
818 | VMMLibDTrace_INST = $(VBOX_INST_DTRACE_LIB)$(KBUILD_TARGET_ARCH)/
|
---|
819 | VMMLibDTrace_SOURCES = \
|
---|
820 | dtrace/lib/vbox-types.d \
|
---|
821 | dtrace/lib/$(KBUILD_TARGET_ARCH)/vbox-arch-types.d \
|
---|
822 | $(VMMLibDTrace_0_OUTDIR)/vm.d \
|
---|
823 | $(VMMLibDTrace_0_OUTDIR)/cpumctx.d \
|
---|
824 | $(VMMLibDTrace_0_OUTDIR)/cpum.d \
|
---|
825 | $(VMMLibDTrace_0_OUTDIR)/CPUMInternal.d \
|
---|
826 | $(VMMLibDTrace_0_OUTDIR)/x86.d \
|
---|
827 |
|
---|
828 |
|
---|
829 | ##
|
---|
830 | # Turn the header $2 into the DTrace library script $1.
|
---|
831 | #
|
---|
832 | define def_vmm_lib_dtrace_preprocess
|
---|
833 | $$$$(VMMLibDTrace_0_OUTDIR)/$1: $2 $$(VBOX_VBOXCPP) | $$$$(dir $$$$@)
|
---|
834 | $$(QUIET)$$(call MSG_GENERATE,VMMLibDTrace,$$@,$$<)
|
---|
835 | $$(QUIET)$(VBOX_VBOXCPP) -d \
|
---|
836 | -D VBOX_FOR_DTRACE_LIB \
|
---|
837 | -D VBOX_FOR_DTRACE_LIB_$(toupper $(KBUILD_TARGET_ARCH)) \
|
---|
838 | -D IN_RING0 \
|
---|
839 | -D RT_C_DECLS_BEGIN= \
|
---|
840 | -D RT_C_DECLS_END= \
|
---|
841 | -D 'RCPTRTYPE(a_Type)=RTRCPTR' \
|
---|
842 | -D 'R3PTRTYPE(a_Type)=RTR3PTR' \
|
---|
843 | -D 'R0PTRTYPE(a_Type)=a_Type' \
|
---|
844 | -D 'AssertCompile(a_Expr)=' \
|
---|
845 | -D 'AssertCompileSize(a_Stuct, a_Size)=' \
|
---|
846 | -D 'bool=uint8_t' \
|
---|
847 | $$(foreach def,\
|
---|
848 | $$(DEFS) \
|
---|
849 | $$(DEFS.$$(KBUILD_TARGET)) \
|
---|
850 | $$(DEFS.$(KBUILD_TARGET_ARCH)) \
|
---|
851 | $$(VMM_COMMON_DEFS) \
|
---|
852 | $$(ARCH_BITS_DEFS)\
|
---|
853 | ,-D '$$(def)') \
|
---|
854 | $$< \
|
---|
855 | $$@
|
---|
856 | $$(QUIET)$$(CHMOD) 644 $$@
|
---|
857 | endef
|
---|
858 | $(evalcall2 def_vmm_lib_dtrace_preprocess,vm.d,$(PATH_ROOT)/include/VBox/vmm/vm.h)
|
---|
859 | $(evalcall2 def_vmm_lib_dtrace_preprocess,cpumctx.d,$(PATH_ROOT)/include/VBox/vmm/cpumctx.h)
|
---|
860 | $(evalcall2 def_vmm_lib_dtrace_preprocess,cpum.d,$(PATH_ROOT)/include/VBox/vmm/cpum.h)
|
---|
861 | $(evalcall2 def_vmm_lib_dtrace_preprocess,CPUMInternal.d,$(PATH_SUB_CURRENT)/include/CPUMInternal.h)
|
---|
862 | $(evalcall2 def_vmm_lib_dtrace_preprocess,x86.d,$(PATH_ROOT)/include/iprt/x86.h)
|
---|
863 |
|
---|
864 | endif
|
---|
865 |
|
---|
866 |
|
---|
867 |
|
---|
868 | #
|
---|
869 | # For vmmGetSvnRev.
|
---|
870 | #
|
---|
871 | VMMAll/VMMAll.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
872 |
|
---|
873 | #
|
---|
874 | # Disable annoying warnings about array subscript above array bounds in aPages[]
|
---|
875 | #
|
---|
876 | ifneq ($(KBUILD_TARGET),win)
|
---|
877 | VMMR3/PGMPool.cpp_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
|
---|
878 | VMMAll/PGMAllPool.cpp_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
|
---|
879 | VMMAll/PGMAll.cpp_CXXFLAGS = -Wno-unused-function
|
---|
880 | VMMAll/IEMAll.cpp_CXXFLAGS = -Wno-unused-function
|
---|
881 | VMMR0/GMMR0.cpp_CXXFLAGS = -Wno-unused-value
|
---|
882 | endif
|
---|
883 |
|
---|
884 | #
|
---|
885 | # Always optimize the interpreter.
|
---|
886 | #
|
---|
887 | if $(USERNAME) != "bird" || "$(KBUILD_TYPE)" == "release" #|| "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.amd64"
|
---|
888 | if1of ($(KBUILD_TARGET), win)
|
---|
889 | # -noover is recognized despite the statement saying otherwise. It silences these warnings:
|
---|
890 | # cl : Command line warning D9025 : overriding '/Od' with '/O2'
|
---|
891 | # cl : Command line warning D9025 : overriding '/Oy-' with '/Oy'
|
---|
892 | VMMAll/IEMAll.cpp_CXXFLAGS += -noover -O2xy
|
---|
893 | else
|
---|
894 | VMMAll/IEMAll.cpp_CXXFLAGS += -O2
|
---|
895 | #VMMAll/IEMAll.cpp_CXXFLAGS += -fno-align-functions -fno-align-jumps -fno-align-loops # Saves a few of percents, not worth it.
|
---|
896 | #VMMAll/IEMAll.cpp_CXXFLAGS += -fno-reorder-blocks # Saves one or two percent ... never mind.
|
---|
897 | VMMAll/IEMAll.cpp_CXXFLAGS += -fomit-frame-pointer # Omitting the frame pointer results in larger code, but it might be worth it. (esp addressing vs ebp?)
|
---|
898 | endif
|
---|
899 | endif # bird wants good stacks
|
---|
900 |
|
---|
901 |
|
---|
902 | # Alias the CPU database entries.
|
---|
903 | $(foreach base,$(notdir $(basename $(wildcard $(PATH_SUB_CURRENT)/VMMR3/cpus/*.h))), $(eval $(base).o $(base).obj: CPUMR3Db.o))
|
---|
904 |
|
---|
905 |
|
---|
906 | #
|
---|
907 | # Test for undefined symbols.
|
---|
908 | #
|
---|
909 | if1of ($(SYSMODS),VMMRC)
|
---|
910 | test-undef-rc:: $(PATH_TARGET)/undef-rc.run
|
---|
911 | OTHERS += $(PATH_TARGET)/undef-rc.run
|
---|
912 | CLEANS += $(PATH_TARGET)/undef-rc.run
|
---|
913 | $(PATH_TARGET)/undef-rc.run: \
|
---|
914 | $$(VMMRC_1_TARGET)
|
---|
915 | ifn1of ($(KBUILD_TARGET), linux solaris)
|
---|
916 | else
|
---|
917 | $(call MSG_L1,VMM: Testing for undefined symbols in VMMRC using nm...)
|
---|
918 | $(QUIET)$(VBOX_NM) $^ 2> /dev/null \
|
---|
919 | | $(SED) -n \
|
---|
920 | -e '/^ *U .*/!d' \
|
---|
921 | -e 's/ *U //' \
|
---|
922 | \
|
---|
923 | -e '/^g_VM\>/d'\
|
---|
924 | -e '/^g_CPUM\>/d'\
|
---|
925 | -e '/^g_Logger\>/d'\
|
---|
926 | -e '/^g_RelLogger\>/d'\
|
---|
927 | -e '/^g_TRPM\>/d'\
|
---|
928 | -e '/^g_TRPMCPU\>/d'\
|
---|
929 | -e '/^g_pSUPGlobalInfoPage\>/d'\
|
---|
930 | -e '/^g_trpmHyperCtxCore\>/d' \
|
---|
931 | -e '/^g_trpmGuestCtxCore\>/d' \
|
---|
932 | \
|
---|
933 | -e 's/\(.*\)$(DOLLAR)/ Undefined symbol: \1/' \
|
---|
934 | -e 'p' \
|
---|
935 | -e 'q 1'
|
---|
936 | endif
|
---|
937 | $(QUIET)$(APPEND) -t $@
|
---|
938 | endif
|
---|
939 |
|
---|
940 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
941 |
|
---|
942 |
|
---|
943 | # Alias the PGM templates to the object in which they are defined.
|
---|
944 | PGMInternal.o \
|
---|
945 | PGMBth.o PGMGst.o PGMShw.o \
|
---|
946 | PGMBth.obj PGMGst.obj PGMShw.obj: PGM.o
|
---|
947 |
|
---|
948 | PGMAllBth.o PGMAllGst.o PGMAllShw.o \
|
---|
949 | PGMAllBth.obj PGMAllGst.obj PGMAllShw.obj: PGMAll.o
|
---|
950 |
|
---|
951 | PGMRCBth.o PGMRCGst.o PGMRCShw.o \
|
---|
952 | PGMRCBth.obj PGMRCGst.obj PGMRCShw.obj: PGMRC.o
|
---|
953 |
|
---|
954 | PGMPhysRWTmpl.o PGMPhysRWTmpl.obj: PGMPhys.o
|
---|
955 |
|
---|
956 | PGMInline.o PGMInline.obj: PGMDbg.o
|
---|
957 |
|
---|
958 | # Alias the IEM templates to the object in which they are instantiated.
|
---|
959 | IEMInternal.o \
|
---|
960 | IEMAllInstructions.cpp.o IEMAllInstructions.cpp.obj \
|
---|
961 | IEMAllCImpl.cpp.o IEMAllCImpl.cpp.obj \
|
---|
962 | IEMAllCImplStrInstr.cpp.o IEMAllCImplStrInstr.cpp.obj: IEMAll.o
|
---|
963 |
|
---|
964 | # Alias the switcher templates.
|
---|
965 | PAEand32Bit.o PAEand32Bit.obj: PAETo32Bit.o PAEToPAE.o 32BitTo32Bit.o PAETo32Bit.o
|
---|
966 | LegacyandAMD64.o LegacyandAMD64.obj: 32BitToAMD64.o PAEToAMD64.o
|
---|
967 | AMD64andLegacy.o AMD64andLegacy.obj: AMD64To32Bit.o AMD64ToPAE.o
|
---|
968 |
|
---|