[edk2] [PATCH] edksetup.sh: Update help section regarding positional

2018-03-10 Thread Arvind Prasanna
It is possible to source edksetup.sh from another script. If the calling/sourcing script has any positional parameters set, those are incorrectly accounted for in edksetup.sh while sourcing it resulting in the the help section always being shown. This patch updates the help section advising the

[edk2] [PATCH 21/45] OvmfPkg/PlatformDebugLibIoPort: list "DebugLibDetect.h" in the INF files

2018-03-10 Thread Laszlo Ersek
Among other things, "DebugLibDetect.h" declares the PlatformDebugLibIoPortFound() function. The function is called from "DebugLib.c", which is included in both library instances. The function is defined separately per library instance, in "DebugLibDetectRom.c" and "DebugLibDetect.c", respectively.

[edk2] [PATCH 19/45] OvmfPkg/LockBoxLib: list "LockBoxLib.h" in the INF files

2018-03-10 Thread Laszlo Ersek
Among other things, the header file declares the AllocateAcpiNvsPool() function. This function is called from the "LockBoxLib.c" source file (in the implementation of the SaveLockBox() library API), which is built into both library instances. AllocateAcpiNvsPool() is implemented separately per

[edk2] [PATCH 18/45] OvmfPkg/LoadLinuxLib: list "LoadLinuxLib.h" in the INF file

2018-03-10 Thread Laszlo Ersek
The header file declares the InitLinuxDescriptorTables() and SetLinuxDescriptorTables() functions, which are called from "Linux.c" and implemented in "LinuxGdt.c". The header file also declares the JumpToKernel() and JumpToUefiKernel() functions, which are similarly called from "Linux.c". They

[edk2] [PATCH 23/45] OvmfPkg/QemuBootOrderLib: list "ExtraRootBusMap.h" in the INF file

2018-03-10 Thread Laszlo Ersek
The header file declares the CreateExtraRootBusMap(), DestroyExtraRootBusMap(), and MapRootBusPosToBusNr() functions. They are defined in "ExtraRootBusMap.c", and called from "QemuBootOrderLib.c". Cc: Ard Biesheuvel Cc: Jordan Justen

[edk2] [PATCH 25/45] OvmfPkg/VirtioMmioDeviceLib: list "VirtioMmioDevice.h" in the INF file

2018-03-10 Thread Laszlo Ersek
Among other things, the header file declares the functions that implement the VIRTIO_DEVICE_PROTOCOL members over virtio-mmio. The functions are defined in "VirtioMmioDeviceFunctions.c", and referenced in the initialization of "mMmioDeviceProtocolTemplate", in "VirtioMmioDevice.c". Cc: Ard

[edk2] [PATCH 11/45] OvmfPkg/CsmSupportLib: list "LegacyInterrupt.h" in the INF file

2018-03-10 Thread Laszlo Ersek
Among other things, the header file provides (extern) declarations for the EFI_LEGACY_INTERRUPT_PROTOCOL member functions that are defined in "LegacyInterrupt.c". This way "mLegacyInterrupt" can be initialized near the top of "LegacyInterrupt.c", ahead of the member function definitions. Cc: Ard

[edk2] [PATCH 13/45] OvmfPkg/CsmSupportLib: list "LegacyRegion.h" in the INF file

2018-03-10 Thread Laszlo Ersek
Among other things, the header file provides (extern) declarations for the EFI_LEGACY_REGION2_PROTOCOL member functions that are defined in "LegacyRegion.c". This way "mLegacyRegion2" can be initialized near the top of "LegacyRegion.c", ahead of the member function definitions. Cc: Ard Biesheuvel

[edk2] [PATCH 22/45] OvmfPkg/QemuBootOrderLib: sort [Sources*] sections in the INF file

2018-03-10 Thread Laszlo Ersek
This makes it easier to insert future source files. No functional changes. Cc: Ard Biesheuvel Cc: Jordan Justen Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek ---

[edk2] [PATCH 08/45] OvmfPkg/BlockMmioToBlockIoDxe: list "BlockIo.h" in the INF file

2018-03-10 Thread Laszlo Ersek
Among other things, the header file declares the "gBlockMmioToBlockIoComponentName" and "gBlockMmioToBlockIoComponentName2" protocol instance structures. They are defined and initialized in "ComponentName.c" and installed in "BlockIo.c". Cc: Ard Biesheuvel Cc: Jordan

[edk2] [PATCH 12/45] OvmfPkg/CsmSupportLib: list "LegacyPlatform.h" in the INF file

2018-03-10 Thread Laszlo Ersek
The header file defines types and macros for "LegacyPlatform.c". Cc: Ard Biesheuvel Cc: Jordan Justen Suggested-by: Michael Kinney Ref:

[edk2] [PATCH 17/45] OvmfPkg/BaseMemEncryptSevLib: list "X64/VirtualMemory.h" in the INF file

2018-03-10 Thread Laszlo Ersek
Among other things, the header file declares the InternalMemEncryptSevSetMemoryDecrypted() and InternalMemEncryptSevSetMemoryEncrypted() functions. The functions are called from "X64/MemEncryptSevLib.c", and defined in "X64/VirtualMemory.c". Cc: Ard Biesheuvel Cc:

[edk2] [PATCH 16/45] OvmfPkg/AcpiTimerLib: list "AcpiTimerLib.h" in the INF files

2018-03-10 Thread Laszlo Ersek
The header file declares the InternalAcpiGetTimerTick() function. The function is called from "AcpiTimerLib.c", which is built into all three library instances. The function is defined individually per library instance, in "BaseRomAcpiTimerLib.c", "BaseAcpiTimerLib.c", and "DxeAcpiTimerLib.c"

[edk2] [PATCH 20/45] OvmfPkg/NvVarsFileLib: list "NvVarsFileLib.h" in the INF file

2018-03-10 Thread Laszlo Ersek
The header file declares LoadNvVarsFromFs() and SaveNvVarsToFs(), which are defined in "FsAccess.c" and called from "NvVarsFileLib.c". Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Julien Grall

[edk2] [PATCH 26/45] OvmfPkg/VirtioMmioDeviceLib: improve style of mMmioDeviceProtocolTemplate

2018-03-10 Thread Laszlo Ersek
In edk2, we spell "static" "STATIC", plus objects with static storage duration (esp. protocol templates) should be const-qualified (spelled "CONST") whenever possible. Cc: Ard Biesheuvel Cc: Jordan Justen Contributed-under: TianoCore

[edk2] [PATCH 29/45] OvmfPkg/PlatformPei: list "Cmos.h" in the INF file

2018-03-10 Thread Laszlo Ersek
The header file declares the CmosRead8() and CmosWrite8() functions, which are implemented in "Cmos.c" and called from "MemDetect.c" and "Platform.c". Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Jordan Justen Cc:

[edk2] [PATCH 34/45] OvmfPkg/QemuVideoDxe: sort [Sources*] sections in the INF file

2018-03-10 Thread Laszlo Ersek
This makes it easier to insert future source files. No functional changes. Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Phil Dennis-Jordan Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek

[edk2] [PATCH 05/45] OvmfPkg/AcpiPlatformDxe: list "AcpiPlatform.h" in the INF files

2018-03-10 Thread Laszlo Ersek
Among other things, the header file declares InstallAcpiTables(). This function is called from AcpiPlatformEntryPoint() -- the entry point of both INF files, defined in the common "EntryPoint.c" file --, and it is defined (dependent on INF file) in "AcpiPlatform.c" or "QemuFwCfgAcpiPlatform.c".

[edk2] [PATCH 28/45] OvmfPkg/PlatformDxe: list "PlatformConfig.h" in the INF file

2018-03-10 Thread Laszlo Ersek
The header file declares the PlatformConfigSave() and PlatformConfigLoad() functions (and defines related types and macros). The functions are defined in "PlatformConfig.c" and called from "Platform.c". Cc: Ard Biesheuvel Cc: Jordan Justen

[edk2] [PATCH 03/45] ArmVirtPkg/ArmVirtPrePiUniCoreRelocatable: list "PrePi.h" in INF file

2018-03-10 Thread Laszlo Ersek
Among other things, the header file declares the ArchInitialize() function, which is called from "PrePi.c", and implemented (dependent on architecture) in "AArch64/ArchPrePi.c" and "Arm/ArchPrePi.c". Cc: Ard Biesheuvel Cc: Julien Grall

[edk2] [PATCH 15/45] OvmfPkg/IoMmuDxe: list "AmdSevIoMmu.h" in the INF file

2018-03-10 Thread Laszlo Ersek
The header file declares the AmdSevInstallIoMmuProtocol() function, which is implemented in "AmdSevIoMmu.c" and called from "IoMmuDxe.c". Cc: Ard Biesheuvel Cc: Brijesh Singh Cc: Jordan Justen Suggested-by: Michael

[edk2] [PATCH 00/45] ArmVirtPkg, OvmfPkg: list module-internal headers in INF files

2018-03-10 Thread Laszlo Ersek
Repo: https://github.com/lersek/edk2.git Branch: hdr_inf_cleanup In , Mike explained why it's a good idea to list module-internal *.h files in the [Sources*] sections of the INF files: On

[edk2] [PATCH 01/45] ArmVirtPkg/PlatformBootManagerLib: list "PlatformBm.h" in INF file

2018-03-10 Thread Laszlo Ersek
The header file declares TryRunningQemuKernel(), defined in "QemuKernel.c" and called from "PlatformBm.c". Cc: Ard Biesheuvel Suggested-by: Michael Kinney Ref:

[edk2] [PATCH 14/45] OvmfPkg/EmuVariableFvbRuntimeDxe: list "Fvb.h" in the INF file

2018-03-10 Thread Laszlo Ersek
Among other things, the header file provides (extern) declarations for the EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL member functions that are defined in "Fvb.c". This way "mEmuVarsFvb.FwVolBlockInstance" can be initialized near the top of "Fvb.c", ahead of the member function definitions. Cc: Anthony

[edk2] [PATCH 04/45] OvmfPkg/AcpiPlatformDxe: sort [Sources*] sections in the INF files

2018-03-10 Thread Laszlo Ersek
This makes it easier to insert future source files, and to see the source files that are unique to either INF file. No functional changes. Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Julien Grall

[edk2] [PATCH 02/45] ArmVirtPkg/ArmVirtPrePiUniCoreRelocatable: sort [Sources*] sections in INF

2018-03-10 Thread Laszlo Ersek
This makes it easier to insert future source files. No functional changes. Cc: Ard Biesheuvel Cc: Julien Grall Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek ---

[edk2] [PATCH 07/45] OvmfPkg/AcpiPlatformDxe: list "QemuLoader.h" in the INF files

2018-03-10 Thread Laszlo Ersek
"QemuLoader.h" defines the command structures of QEMU's ACPI linker/loader. The client code is in "QemuFwCfgAcpi.c", which is part of both builds of this driver. Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Jordan Justen

[edk2] [PATCH 09/45] OvmfPkg/CsmSupportLib: sort [Sources*] sections in the INF file

2018-03-10 Thread Laszlo Ersek
This makes it easier to insert future source files. No functional changes. Cc: Ard Biesheuvel Cc: Jordan Justen Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek ---

[edk2] [PATCH 06/45] OvmfPkg/AcpiPlatformDxe: don't #include "QemuLoader.h" in "Qemu.c"

2018-03-10 Thread Laszlo Ersek
We added initial support for QEMU's ACPI linker/loader in commit a618eaa1f45d ("OvmfPkg: AcpiPlatformDxe: don't rely on unstable QEMU interface", 2014-06-19). This commit defined the command structures in the new file "QemuLoader.h", and #included the header in the preexistent "Qemu.c" file, where

[edk2] [PATCH 44/45] OvmfPkg/XenPvBlkDxe: sort [Sources*] sections in the INF file

2018-03-10 Thread Laszlo Ersek
This makes it easier to insert future source files. No functional changes. Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Julien Grall Contributed-under: TianoCore

[edk2] [PATCH 41/45] OvmfPkg/VirtioPciDeviceDxe: list "VirtioPciDevice.h" in the INF file

2018-03-10 Thread Laszlo Ersek
Among other things, the header file declares the functions that implement the VIRTIO_DEVICE_PROTOCOL members over virtio-pci (v0.9.5). The functions are defined in "VirtioPciFunctions.c", and referenced in the initialization of "mDeviceProtocolTemplate", in "VirtioPciDevice.c". Cc: Ard Biesheuvel

[edk2] [PATCH 27/45] OvmfPkg/PlatformDxe: list "Platform.h" in the INF file

2018-03-10 Thread Laszlo Ersek
The header file defines HII-related macros and types that are shared between the form description in "PlatformForms.vfr" and the HII driver logic "Platform.c". Cc: Ard Biesheuvel Cc: Jordan Justen Suggested-by: Michael Kinney

[edk2] [PATCH 31/45] OvmfPkg/PlatformPei: list "Xen.h" in the INF file

2018-03-10 Thread Laszlo Ersek
The header defines the OVMF_INFO_PHYSICAL_ADDRESS macro and the EFI_XEN_OVMF_INFO structure, which are used in "Xen.c". Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Julien Grall

[edk2] [PATCH 38/45] OvmfPkg/Virtio10Dxe: list "Virtio10.h" in the INF file

2018-03-10 Thread Laszlo Ersek
The header file defines macros and types that are private to the driver and are used by the sole C file of the driver. Cc: Ard Biesheuvel Cc: Jordan Justen Suggested-by: Michael Kinney Ref:

[edk2] [PATCH 39/45] OvmfPkg/VirtioBlkDxe: list "VirtioBlk.h" in the INF file

2018-03-10 Thread Laszlo Ersek
Among other things, the header file defines macros and types that are private to the driver and are used by the sole C file of the driver. Cc: Ard Biesheuvel Cc: Jordan Justen Suggested-by: Michael Kinney Ref:

[edk2] [PATCH 45/45] OvmfPkg/XenPvBlkDxe: list "DriverBinding.h" in the INF file

2018-03-10 Thread Laszlo Ersek
The header file provides (extern) declarations for the EFI_DRIVER_BINDING_PROTOCOL member functions that are defined in "XenPvBlkDxe.c". This way "gXenPvBlkDxeDriverBinding" can be initialized near the top of "XenPvBlkDxe.c", ahead of the member function definitions. Cc: Anthony Perard

[edk2] [PATCH 40/45] OvmfPkg/VirtioNetDxe: list "VirtioNet.h" in the INF file

2018-03-10 Thread Laszlo Ersek
The header file declares several functions and global variables that are shared between various translation units in this module. The header file also defines macros and types that are private to the driver. Cc: Ard Biesheuvel Cc: Jordan Justen

[edk2] [PATCH 32/45] OvmfPkg/QemuFlashFvbServicesRuntimeDxe: list "FwBlockService.h" in INFs

2018-03-10 Thread Laszlo Ersek
Among other things, the header file provides (extern) declarations for the EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL member functions that are defined in "FwBlockService.c". This way "mFvbDeviceTemplate.FwVolBlockInstance" can be initialized near the top of "FwBlockService.c", ahead of the member

[edk2] [PATCH 37/45] OvmfPkg/QemuVideoDxe: list "VbeShim.h" in the INF file

2018-03-10 Thread Laszlo Ersek
The header file is manually generated with "VbeShim.sh" (from the IA32 assembly code in "VbeShim.asm"), to be included by "VbeShim.c". "VbeShim.c" is linked into the driver only for the IA32 and X64 architectures: while the InstallVbeShim() function that "VbeShim.c" defines is declared commonly

[edk2] [PATCH 33/45] OvmfPkg/QemuFlashFvbServicesRuntimeDxe: list "QemuFlash.h" in INF files

2018-03-10 Thread Laszlo Ersek
Among other things, the header file declares functions that are called from the FVB protocol member functions in "FwBlockService.c", and defined in "QemuFlash.c". Both C files are listed in both "FvbServicesSmm.inf" and "FvbServicesRuntimeDxe.inf", thus add the header file to both INF files as

[edk2] [PATCH 35/45] OvmfPkg/QemuVideoDxe: list "Qemu.h" in the INF file

2018-03-10 Thread Laszlo Ersek
Among many other things, "Qemu.h" declares the QemuVideoGraphicsOutputConstructor() and QemuVideoGraphicsOutputDestructor() functions, which are defined in "Gop.c", and called from "Driver.c". Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Phil

[edk2] [PATCH 43/45] OvmfPkg/VirtioScsiDxe: list "VirtioScsi.h" in the INF file

2018-03-10 Thread Laszlo Ersek
Among other things, the header file defines macros and types that are private to the driver and are used by the sole C file of the driver. Cc: Ard Biesheuvel Cc: Jordan Justen Suggested-by: Michael Kinney Ref:

[edk2] [PATCH 42/45] OvmfPkg/VirtioRngDxe: list "VirtioRng.h" in the INF file

2018-03-10 Thread Laszlo Ersek
The header file defines macros and types that are private to the driver and are used by the sole C file of the driver. Cc: Ard Biesheuvel Cc: Jordan Justen Suggested-by: Michael Kinney Ref:

[edk2] [PATCH 36/45] OvmfPkg/QemuVideoDxe: list "UnalignedIoInternal.h" in the INF file

2018-03-10 Thread Laszlo Ersek
The header file declares the UnalignedIoWrite32() and UnalignedIoRead32() functions. The functions are called from VmwareSvgaWrite() and VmwareSvgaRead() in the common "Driver.c" source file. The UnalignedIo*32() functions are defined with inline assembly, C-language compiler intrinsics, or as