VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BaseLib/BaseLib.inf

Last change on this file was 108794, checked in by vboxsync, 4 weeks ago

Devices/EFI/FirmwareNew: Merge edk2-stable202502 from the vendor branch and make it build for the important platforms, bugref:4643

  • Property svn:eol-style set to native
File size: 12.2 KB
Line 
1## @file
2# Base Library implementation.
3#
4# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<BR>
5# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
6# Portions copyright (c) 2011 - 2024, Arm Limited. All rights reserved.<BR>
7# Copyright (c) 2020 - 2021, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
8#
9# SPDX-License-Identifier: BSD-2-Clause-Patent
10#
11#
12##
13
14[Defines]
15 INF_VERSION = 0x00010005
16 BASE_NAME = BaseLib
17 MODULE_UNI_FILE = BaseLib.uni
18 FILE_GUID = 27d67720-ea68-48ae-93da-a3a074c90e30
19 MODULE_TYPE = BASE
20 VERSION_STRING = 1.1
21 LIBRARY_CLASS = BaseLib
22
23#
24# VALID_ARCHITECTURES = IA32 X64 EBC ARM AARCH64 RISCV64 LOONGARCH64
25#
26
27[Sources]
28 CheckSum.c
29 SwitchStack.c
30 SwapBytes64.c
31 SwapBytes32.c
32 SwapBytes16.c
33 LongJump.c
34 SetJump.c
35 QuickSort.c
36 RShiftU64.c
37 RRotU64.c
38 RRotU32.c
39 MultU64x64.c
40 MultU64x32.c
41 MultS64x64.c
42 ModU64x32.c
43 LShiftU64.c
44 LRotU64.c
45 LRotU32.c
46 LowBitSet64.c
47 LowBitSet32.c
48 HighBitSet64.c
49 HighBitSet32.c
50 GetPowerOfTwo64.c
51 GetPowerOfTwo32.c
52 DivU64x64Remainder.c
53 DivU64x32Remainder.c
54 DivU64x32.c
55 DivS64x64Remainder.c
56 ARShiftU64.c
57 BitField.c
58 CpuDeadLoop.c
59 Cpu.c
60 LinkedList.c
61 SafeString.c
62 String.c
63 FilePaths.c
64 BaseLibInternals.h
65
66[Sources.Ia32]
67 Ia32/WriteTr.nasm
68 Ia32/Lfence.nasm
69
70 Ia32/Wbinvd.c | MSFT
71 Ia32/WriteMm7.c | MSFT
72 Ia32/WriteMm6.c | MSFT
73 Ia32/WriteMm5.c | MSFT
74 Ia32/WriteMm4.c | MSFT
75 Ia32/WriteMm3.c | MSFT
76 Ia32/WriteMm2.c | MSFT
77 Ia32/WriteMm1.c | MSFT
78 Ia32/WriteMm0.c | MSFT
79 Ia32/WriteLdtr.c | MSFT
80 Ia32/WriteIdtr.c | MSFT
81 Ia32/WriteGdtr.c | MSFT
82 Ia32/WriteDr7.c | MSFT
83 Ia32/WriteDr6.c | MSFT
84 Ia32/WriteDr5.c | MSFT
85 Ia32/WriteDr4.c | MSFT
86 Ia32/WriteDr3.c | MSFT
87 Ia32/WriteDr2.c | MSFT
88 Ia32/WriteDr1.c | MSFT
89 Ia32/WriteDr0.c | MSFT
90 Ia32/WriteCr4.c | MSFT
91 Ia32/WriteCr3.c | MSFT
92 Ia32/WriteCr2.c | MSFT
93 Ia32/WriteCr0.c | MSFT
94 Ia32/WriteMsr64.c | MSFT
95 Ia32/SwapBytes64.c | MSFT
96 Ia32/RRotU64.c | MSFT
97 Ia32/RShiftU64.c | MSFT
98 Ia32/ReadPmc.c | MSFT
99 Ia32/ReadTsc.c | MSFT
100 Ia32/ReadLdtr.c | MSFT
101 Ia32/ReadIdtr.c | MSFT
102 Ia32/ReadGdtr.c | MSFT
103 Ia32/ReadTr.c | MSFT
104 Ia32/ReadSs.c | MSFT
105 Ia32/ReadGs.c | MSFT
106 Ia32/ReadFs.c | MSFT
107 Ia32/ReadEs.c | MSFT
108 Ia32/ReadDs.c | MSFT
109 Ia32/ReadCs.c | MSFT
110 Ia32/ReadMsr64.c | MSFT
111 Ia32/ReadMm7.c | MSFT
112 Ia32/ReadMm6.c | MSFT
113 Ia32/ReadMm5.c | MSFT
114 Ia32/ReadMm4.c | MSFT
115 Ia32/ReadMm3.c | MSFT
116 Ia32/ReadMm2.c | MSFT
117 Ia32/ReadMm1.c | MSFT
118 Ia32/ReadMm0.c | MSFT
119 Ia32/ReadEflags.c | MSFT
120 Ia32/ReadDr7.c | MSFT
121 Ia32/ReadDr6.c | MSFT
122 Ia32/ReadDr5.c | MSFT
123 Ia32/ReadDr4.c | MSFT
124 Ia32/ReadDr3.c | MSFT
125 Ia32/ReadDr2.c | MSFT
126 Ia32/ReadDr1.c | MSFT
127 Ia32/ReadDr0.c | MSFT
128 Ia32/ReadCr4.c | MSFT
129 Ia32/ReadCr3.c | MSFT
130 Ia32/ReadCr2.c | MSFT
131 Ia32/ReadCr0.c | MSFT
132 Ia32/Mwait.c | MSFT
133 Ia32/Monitor.c | MSFT
134 Ia32/ModU64x32.c | MSFT
135 Ia32/MultU64x64.c | MSFT
136 Ia32/MultU64x32.c | MSFT
137 Ia32/LShiftU64.c | MSFT
138 Ia32/LRotU64.c | MSFT
139 Ia32/Invd.c | MSFT
140 Ia32/FxRestore.c | MSFT
141 Ia32/FxSave.c | MSFT
142 Ia32/FlushCacheLine.c | MSFT
143 Ia32/EnablePaging32.c | MSFT
144 Ia32/EnableInterrupts.c | MSFT
145 Ia32/EnableDisableInterrupts.c | MSFT
146 Ia32/DivU64x32Remainder.c | MSFT
147 Ia32/DivU64x32.c | MSFT
148 Ia32/DisablePaging32.c | MSFT
149 Ia32/DisableInterrupts.c | MSFT
150 Ia32/CpuPause.c | MSFT
151 Ia32/CpuIdEx.c | MSFT
152 Ia32/CpuId.c | MSFT
153 Ia32/CpuBreakpoint.c | MSFT
154 Ia32/ARShiftU64.c | MSFT
155 Ia32/EnableCache.c | MSFT
156 Ia32/DisableCache.c | MSFT
157
158
159 Ia32/GccInline.c | GCC
160 Ia32/GccInlinePriv.c | GCC
161 Ia32/Thunk16.nasm
162 Ia32/EnableDisableInterrupts.nasm| GCC
163 Ia32/EnablePaging64.nasm
164 Ia32/DisablePaging32.nasm| GCC
165 Ia32/EnablePaging32.nasm| GCC
166 Ia32/Mwait.nasm| GCC
167 Ia32/Monitor.nasm| GCC
168 Ia32/CpuIdEx.nasm| GCC
169 Ia32/CpuId.nasm| GCC
170 Ia32/LongJump.nasm
171 Ia32/SetJump.nasm
172 Ia32/SwapBytes64.nasm| GCC
173 Ia32/DivU64x64Remainder.nasm
174 Ia32/DivU64x32Remainder.nasm| GCC
175 Ia32/ModU64x32.nasm| GCC
176 Ia32/DivU64x32.nasm| GCC
177 Ia32/MultU64x64.nasm| GCC
178 Ia32/MultU64x32.nasm| GCC
179 Ia32/RRotU64.nasm| GCC
180 Ia32/LRotU64.nasm| GCC
181 Ia32/ARShiftU64.nasm| GCC
182 Ia32/RShiftU64.nasm| GCC
183 Ia32/LShiftU64.nasm| GCC
184 Ia32/EnableCache.nasm| GCC
185 Ia32/DisableCache.nasm| GCC
186 Ia32/RdRand.nasm
187 Ia32/XGetBv.nasm
188 Ia32/XSetBv.nasm
189 Ia32/VmgExit.nasm
190 Ia32/VmgExitSvsm.nasm
191
192 Ia32/DivS64x64Remainder.c
193 Ia32/InternalSwitchStack.c | MSFT
194 Ia32/InternalSwitchStack.nasm | GCC
195 Ia32/Non-existing.c
196 Unaligned.c
197 X86WriteIdtr.c
198 X86WriteGdtr.c
199 X86Thunk.c
200 X86ReadIdtr.c
201 X86ReadGdtr.c
202 X86Msr.c
203 X86MemoryFence.c | MSFT
204 X86GetInterruptState.c
205 X86FxSave.c
206 X86FxRestore.c
207 X86EnablePaging64.c
208 X86EnablePaging32.c
209 X86DisablePaging64.c
210 X86DisablePaging32.c
211 X86RdRand.c
212 X86PatchInstruction.c
213 X86SpeculationBarrier.c
214 IntelTdxNull.c
215
216# VBox - enable this for non-optimized IA32 builds.
217# # Compiler helper (C RunTime) functions
218# ../../../StdLib/LibC/CRT/Ia32/llmul.c | MSFT # __allmul
219# ../../../StdLib/LibC/CRT/Ia32/llshl.c | MSFT # __allshl
220# ../../../StdLib/LibC/CRT/Ia32/ulldiv.c | MSFT # __aulldiv
221# ../../../StdLib/LibC/CRT/Ia32/ullrem.c | MSFT # __aullrem
222# ../../../StdLib/LibC/CRT/Ia32/ullshr.c | MSFT # __aullshr
223# ../../../StdLib/LibC/CRT/Ia32/lldiv.c | MSFT # __alldiv
224# ../../../StdLib/LibC/CRT/Ia32/llrem.c | MSFT # __allrem
225# ../../../StdLib/LibC/CRT/Ia32/lldvrm.c | MSFT # __alldvrm
226# ../../../StdLib/LibC/CRT/Ia32/ulldvrm.c | MSFT # __aulldvrm
227# VBox - end
228
229[Sources.X64]
230 X64/Thunk16.nasm
231 X64/CpuIdEx.nasm
232 X64/CpuId.nasm
233 X64/LongJump.nasm
234 X64/SetJump.nasm
235 X64/SwitchStack.nasm
236 X64/EnableCache.nasm
237 X64/DisableCache.nasm
238 X64/WriteTr.nasm
239 X64/Lfence.nasm
240
241 X64/CpuBreakpoint.c | MSFT
242 X64/WriteMsr64.c | MSFT
243 X64/ReadMsr64.c | MSFT
244 X64/CpuPause.nasm| MSFT
245 X64/DisableInterrupts.nasm| MSFT
246 X64/EnableInterrupts.nasm| MSFT
247 X64/FlushCacheLine.nasm| MSFT
248 X64/Invd.nasm| MSFT
249 X64/Wbinvd.nasm| MSFT
250 X64/Mwait.nasm| MSFT
251 X64/Monitor.nasm| MSFT
252 X64/ReadPmc.nasm| MSFT
253 X64/ReadTsc.nasm| MSFT
254 X64/WriteMm7.nasm| MSFT
255 X64/WriteMm6.nasm| MSFT
256 X64/WriteMm5.nasm| MSFT
257 X64/WriteMm4.nasm| MSFT
258 X64/WriteMm3.nasm| MSFT
259 X64/WriteMm2.nasm| MSFT
260 X64/WriteMm1.nasm| MSFT
261 X64/WriteMm0.nasm| MSFT
262 X64/ReadMm7.nasm| MSFT
263 X64/ReadMm6.nasm| MSFT
264 X64/ReadMm5.nasm| MSFT
265 X64/ReadMm4.nasm| MSFT
266 X64/ReadMm3.nasm| MSFT
267 X64/ReadMm2.nasm| MSFT
268 X64/ReadMm1.nasm| MSFT
269 X64/ReadMm0.nasm| MSFT
270 X64/FxRestore.nasm| MSFT
271 X64/FxSave.nasm| MSFT
272 X64/WriteLdtr.nasm| MSFT
273 X64/ReadLdtr.nasm| MSFT
274 X64/WriteIdtr.nasm| MSFT
275 X64/ReadIdtr.nasm| MSFT
276 X64/WriteGdtr.nasm| MSFT
277 X64/ReadGdtr.nasm| MSFT
278 X64/ReadTr.nasm| MSFT
279 X64/ReadSs.nasm| MSFT
280 X64/ReadGs.nasm| MSFT
281 X64/ReadFs.nasm| MSFT
282 X64/ReadEs.nasm| MSFT
283 X64/ReadDs.nasm| MSFT
284 X64/ReadCs.nasm| MSFT
285 X64/WriteDr7.nasm| MSFT
286 X64/WriteDr6.nasm| MSFT
287 X64/WriteDr5.nasm| MSFT
288 X64/WriteDr4.nasm| MSFT
289 X64/WriteDr3.nasm| MSFT
290 X64/WriteDr2.nasm| MSFT
291 X64/WriteDr1.nasm| MSFT
292 X64/WriteDr0.nasm| MSFT
293 X64/ReadDr7.nasm| MSFT
294 X64/ReadDr6.nasm| MSFT
295 X64/ReadDr5.nasm| MSFT
296 X64/ReadDr4.nasm| MSFT
297 X64/ReadDr3.nasm| MSFT
298 X64/ReadDr2.nasm| MSFT
299 X64/ReadDr1.nasm| MSFT
300 X64/ReadDr0.nasm| MSFT
301 X64/WriteCr4.nasm| MSFT
302 X64/WriteCr3.nasm| MSFT
303 X64/WriteCr2.nasm| MSFT
304 X64/WriteCr0.nasm| MSFT
305 X64/ReadCr4.nasm| MSFT
306 X64/ReadCr3.nasm| MSFT
307 X64/ReadCr2.nasm| MSFT
308 X64/ReadCr0.nasm| MSFT
309 X64/ReadEflags.nasm| MSFT
310
311 X64/TdCall.nasm
312 X64/TdVmcall.nasm
313 X64/TdProbe.c
314
315 X64/Non-existing.c
316 Math64.c
317 Unaligned.c
318 X86WriteIdtr.c
319 X86WriteGdtr.c
320 X86Thunk.c
321 X86ReadIdtr.c
322 X86ReadGdtr.c
323 X86Msr.c
324 X86MemoryFence.c | MSFT
325 X86GetInterruptState.c
326 X86FxSave.c
327 X86FxRestore.c
328 X86EnablePaging64.c
329 X86EnablePaging32.c
330 X86DisablePaging64.c
331 X86DisablePaging32.c
332 X86RdRand.c
333 X86PatchInstruction.c
334 X86SpeculationBarrier.c
335 X64/GccInline.c | GCC
336 X64/GccInlinePriv.c | GCC
337 X64/EnableDisableInterrupts.nasm
338 X64/DisablePaging64.nasm
339 X64/Pvalidate.nasm
340 X64/RdRand.nasm
341 X64/RmpAdjust.nasm
342 X64/XGetBv.nasm
343 X64/XSetBv.nasm
344 X64/VmgExit.nasm
345 X64/VmgExitSvsm.nasm
346 ChkStkGcc.c | GCC
347
348[Sources.EBC]
349 Ebc/CpuBreakpoint.c
350 Ebc/SetJumpLongJump.c
351 Ebc/SwitchStack.c
352 Ebc/SpeculationBarrier.c
353 Unaligned.c
354 Math64.c
355 IntelTdxNull.c
356
357[Sources.ARM]
358 Arm/InternalSwitchStack.c
359 Arm/Unaligned.c
360 Math64.c | MSFT
361
362 Arm/SwitchStack.asm | MSFT
363 Arm/SetJumpLongJump.asm | MSFT
364 Arm/DisableInterrupts.asm | MSFT
365 Arm/EnableInterrupts.asm | MSFT
366 Arm/GetInterruptsState.asm | MSFT
367 Arm/CpuPause.asm | MSFT
368 Arm/CpuBreakpoint.asm | MSFT
369 Arm/MemoryFence.asm | MSFT
370 Arm/SpeculationBarrier.asm | MSFT
371
372 Arm/Math64.S | GCC
373 Arm/SwitchStack.S | GCC
374 Arm/EnableInterrupts.S | GCC
375 Arm/DisableInterrupts.S | GCC
376 Arm/GetInterruptsState.S | GCC
377 Arm/SetJumpLongJump.S | GCC
378 Arm/CpuBreakpoint.S | GCC
379 Arm/MemoryFence.S | GCC
380 Arm/SpeculationBarrier.S | GCC
381 IntelTdxNull.c
382
383[Sources.AARCH64]
384 Arm/InternalSwitchStack.c
385 Arm/Unaligned.c
386 Math64.c
387
388 AArch64/MemoryFence.S | GCC
389 AArch64/SwitchStack.S | GCC
390 AArch64/EnableInterrupts.S | GCC
391 AArch64/DisableInterrupts.S | GCC
392 AArch64/GetInterruptsState.S | GCC
393 AArch64/SetJumpLongJump.S | GCC
394 AArch64/CpuBreakpoint.S | GCC
395 AArch64/SpeculationBarrier.S | GCC
396 AArch64/ArmReadCntPctReg.S | GCC
397 AArch64/ArmReadIdAA64Isar0Reg.S | GCC
398
399 AArch64/MemoryFence.asm | MSFT
400 AArch64/SwitchStack.asm | MSFT
401 AArch64/EnableInterrupts.asm | MSFT
402 AArch64/DisableInterrupts.asm | MSFT
403 AArch64/GetInterruptsState.asm | MSFT
404 AArch64/SetJumpLongJump.asm | MSFT
405 AArch64/CpuBreakpoint.asm | MSFT
406 AArch64/SpeculationBarrier.asm | MSFT
407 AArch64/ArmReadCntPctReg.asm | MSFT
408 AArch64/ArmReadIdAA64Isar0Reg.asm | MSFT
409 IntelTdxNull.c
410
411[Sources.RISCV64]
412 Math64.c
413 Unaligned.c
414 RiscV64/InternalSwitchStack.c
415 RiscV64/CpuBreakpoint.c
416 RiscV64/GetInterruptState.c
417 RiscV64/DisableInterrupts.c
418 RiscV64/EnableInterrupts.c
419 RiscV64/CpuPause.c
420 RiscV64/MemoryFence.S | GCC
421 RiscV64/RiscVSetJumpLongJump.S | GCC
422 RiscV64/SwitchStack.S | GCC
423 RiscV64/RiscVCpuBreakpoint.S | GCC
424 RiscV64/RiscVCpuPause.S | GCC
425 RiscV64/RiscVInterrupt.S | GCC
426 RiscV64/RiscVCacheMgmt.S | GCC
427 RiscV64/CpuScratch.S | GCC
428 RiscV64/ReadTimer.S | GCC
429 RiscV64/RiscVMmu.S | GCC
430 RiscV64/SpeculationBarrier.S | GCC
431 IntelTdxNull.c
432
433[Sources.LOONGARCH64]
434 Math64.c
435 Unaligned.c
436 LoongArch64/Csr.c
437 LoongArch64/InternalSwitchStack.c
438 LoongArch64/AsmCsr.S | GCC
439 LoongArch64/IoCsr.S | GCC
440 LoongArch64/GetInterruptState.S | GCC
441 LoongArch64/EnableInterrupts.S | GCC
442 LoongArch64/DisableInterrupts.S | GCC
443 LoongArch64/Barrier.S | GCC
444 LoongArch64/MemoryFence.S | GCC
445 LoongArch64/CpuBreakpoint.S | GCC
446 LoongArch64/CpuPause.S | GCC
447 LoongArch64/SetJumpLongJump.S | GCC
448 LoongArch64/SwitchStack.S | GCC
449 LoongArch64/ExceptionBase.S | GCC
450 LoongArch64/Cpucfg.S | GCC
451 LoongArch64/ReadStableCounter.S | GCC
452 IntelTdxNull.c
453
454[Packages]
455 MdePkg/MdePkg.dec
456
457[LibraryClasses]
458 PcdLib
459 DebugLib
460 BaseMemoryLib
461
462[LibraryClasses.X64, LibraryClasses.IA32]
463 RegisterFilterLib
464
465[Pcd]
466 gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength ## SOMETIMES_CONSUMES
467 gEfiMdePkgTokenSpaceGuid.PcdMaximumAsciiStringLength ## SOMETIMES_CONSUMES
468 gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength ## SOMETIMES_CONSUMES
469 gEfiMdePkgTokenSpaceGuid.PcdControlFlowEnforcementPropertyMask ## SOMETIMES_CONSUMES
470 gEfiMdePkgTokenSpaceGuid.PcdSpeculationBarrierType ## SOMETIMES_CONSUMES
471
472[FeaturePcd]
473 gEfiMdePkgTokenSpaceGuid.PcdVerifyNodeInList ## CONSUMES
474
475# VBox - enable this for non-optimized IA32 builds.
476#[BuildOptions]
477# MSFT:*_*_*_CC_FLAGS = /GL-
478# VBox - end
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette