summaryrefslogtreecommitdiffstats
path: root/ArmVirtPkg/ArmVirtQemuKernel.dsc
Commit message (Collapse)AuthorAgeFilesLines
* ArmVirtPkg: Consume MdeLibs.dsc.inc for RegisterFilterLibDandan Bi2021-03-311-0/+2
| | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246 MdeLibs.dsc.inc was added for some basic/default library instances provided by MdePkg and RegisterFilterLibNull Library was also added into it as the first version of MdeLibs.dsc.inc. So update platform dsc to consume MdeLibs.dsc.inc for RegisterFilterLibNull which will be consumed by IoLib and BaseLib. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Leif Lindholm <leif@nuviainc.com> Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org>
* ArmVirtPkg/ArmVirtQemu: Add support for HotPlugJiahui Cen via groups.io2021-01-201-0/+1
| | | | | | | | | | | | | | | It is necessary to add padding for hotplugable PCI Devices like pcie-root-port. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3059 Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Cc: Leif Lindholm <leif@nuviainc.com> Signed-off-by: Jiahui Cen <cenjiahui@huawei.com> Signed-off-by: Yubo Miao <miaoyubo@huawei.com> Message-Id: <20210119011302.10908-12-cenjiahui@huawei.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: Refactor with PciHostBridgeUtilityLibJiahui Cen via groups.io2021-01-201-0/+1
| | | | | | | | | | | | | | | | Eliminate currently duplicated code in ArmVirtPkg with the common utility class PciHostBridgeUtilityLib. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3059 Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Jiahui Cen <cenjiahui@huawei.com> Signed-off-by: Yubo Miao <miaoyubo@huawei.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20210119011302.10908-3-cenjiahui@huawei.com>
* ArmVirtPkg: raise PcdShellFileOperationSize to 128KBLaszlo Ersek2021-01-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Some UEFI shell commands read and write files in chunks. The chunk size is given by "PcdShellFileOperationSize", whose default in "ShellPkg/ShellPkg.dec" is 4KB (0x1000). The virtio-fs daemon of QEMU advertizes a 128KB maximum buffer size by default, for the FUSE_WRITE operation. By raising PcdShellFileOperationSize 32-fold, the number of FUSE write requests shrinks proportionately, when writing large files. And when a Virtio Filesystem is not used, a 128KB chunk size is still not particularly wasteful. Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3125 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com> Message-Id: <20210113085453.10168-4-lersek@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* ArmVirtPkg: include VirtioFsDxe in the ArmVirtQemu* platformsLaszlo Ersek2020-12-211-1/+2
| | | | | | | | | | | | | Include the VirtioFsDxe driver in the ArmVirtPkg platforms that include Virtio10Dxe. (The virtio-fs device is virtio-1.0-only.) Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3097 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20201216211125.19496-3-lersek@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
* ArmVirtPkg/ArmVirtQemuKernel.dsc: Enable MD5 while enable iSCSIGao, Zhichao2020-11-171-1/+4
| | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3003 There is a plan to make MD5 disable as default. The new MACRO ENABLE_MD5_DEPRECATED_INTERFACES would be introduced to enable MD5. Make the definition ahead of the change to avoid build error after the MACRO changed. Enable iSCSI. Signed-off-by: Zhichao Gao <zhichao.gao@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Cc: Leif Lindholm <leif@nuviainc.com> Message-Id: <20201112055558.2348-7-zhichao.gao@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/PrePi: use standard PeCoff routines for self-relocationArd Biesheuvel2020-06-121-6/+4
| | | | | | | | | | | | | | | | | | | Instead of having a GCC specific routine to perform self-relocation based on ELF metadata, use the PE/COFF metadata and the existing PeCoff library routines. This reduces the amount of bespoke assembler code that is a burden to maintain, and is not portable across the set of toolchains we support. This does require some special care, as we have no control over how the C code references global symbols, so we need to emit these references from the calling assembler code. Otherwise, they may be emitted as absolute references, in which case they need to be fixed up themselves, leading to a circular dependency. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com> Acked-by: Jiewen Yao <Jiewen.yao@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Sami Mujawar <Sami.Mujawar@arm.com>
* ArmVirtPkg: control PXEv4 / PXEv6 boot support from the QEMU command lineLaszlo Ersek2020-04-281-0/+13
| | | | | | | | | | | | | | | Port the DSC file changes from the similarly titled OvmfPkg patch in this series to ArmVirtPkg. Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Per Sundstrom <per_sundstrom@yahoo.com> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2681 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20200424075353.8489-8-lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* ArmVirtPkg: Include NVMe support in ArmVirtQemu*Leendert van Doorn2020-04-091-0/+5
| | | | | | | | | Enable support for NVMe storage in ArmVirtQemu/QemVirtQemuKernel in order to simplify booting/installing operating systems that don't support virtio. Signed-off-by: Leif Lindholm <leif@nuviainc.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: incorporate the new QEMU kernel loader driver and libraryArd Biesheuvel2020-03-051-0/+2
| | | | | | | | | Add the QEMU loader DXE driver and client library to the build for our QEMU targeted implementations in ArmVirtPkg. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2566 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: unshare TpmMeasurementLib resolution between platformsArd Biesheuvel2020-03-041-0/+1
| | | | | | | | | | In preparation of conditializing the choice of resolution based on TPM2_ENABLE for ArmVirtQemu, move the TpmMeasurementLib out of the shared .DSC include and into the individual DSCs. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2560 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/PlatformPeiLib: discover the TPM base address from the DTArd Biesheuvel2020-03-041-0/+6
| | | | | | | | | | | | | | | | | Introduce a boolean PCD that tells us whether TPM support is enabled in the build, and if it is, record the TPM base address in the existing routine that traverses the device tree in the platform PEIM. If a TPM is found, install the gOvmfTpmDiscoveredPpiGuid signalling PPI that will unlock the dispatch of OvmfPkg's Tcg2ConfigPei. If TPM2 support is enabled in the build but no TPM2 device is found, install the gPeiTpmInitializationDonePpiGuid PPI, which is normally installed by Tcg2ConfigPei if no TPM2 is found, but in our case Tcg2ConfigPei will never run so let's do it here instead. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2560 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: handle NETWORK_TLS_ENABLE in ArmVirtQemu*Laszlo Ersek2019-06-281-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | Port the [LibraryClasses], [PcdsFixedAtBuild] and [Components] settings that are related to NETWORK_TLS_ENABLE from OvmfPkg to ArmVirtPkg. ArmVirtXen is not modified because it doesn't include the edk2 network stack. (This change is now simpler than it would have been when TianoCore#1009 was originally filed, due to ArmVirtPkg consuming the NetworkPkg include fragments meanwhile, from TianoCore#1293 / commit 157a3b1aa50f.) The usage hints from "OvmfPkg/README", section "HTTPS Boot", apply. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Gary Lin <glin@suse.com> Cc: Guillaume GARDET <guillaume.gardet@arm.com> Cc: Julien Grall <julien.grall@arm.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1009 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Guillaume Gardet <guillaume.gardet@arm.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Tested-by: Gary Lin <glin@suse.com>
* ArmVirtPkg: Update DSC/FDF to use NetworkPkg's include fragment file.Fu Siyuan2019-05-161-28/+24
| | | | | | | | | | | | | | | | | | | | | | This patch updates the platform DSC/FDF files to use the include fragment files provided by NetworkPkg. The feature enabling flags in [Defines] section have been updated to use the NetworkPkg's terms, and the value has been overridden with the original default value on this platform. v2:Add check for NETWORK_SNP_ENABLE and NETWORK_TLS_ENABLE. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Message-Id: <20190516081810.27840-4-shenglei.zhang@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1293 [lersek@redhat.com: add TianoCore Bugzilla reference] [lersek@redhat.com: undo spurious whitespace changes] [lersek@redhat.com: clarify SNP and TLS rejection messages] Signed-off-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: build EnrollDefaultKeys.efiLaszlo Ersek2019-04-301-0/+1
| | | | | | | | | | | | | | | | Having removed VALID_ARCHITECTURES from "OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.inf", it now makes sense to reflect the related platform DSC bits from OvmfPkg to ArmVirtPkg. Build "EnrollDefaultKeys.efi" as part of ArmVirtQemu and ArmVirtQemuKernel (which are the ArmVirtPkg platforms that include SecureBootConfigDxe too). Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1747 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Gary Lin <glin@suse.com>
* ArmVirtPkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-091-7/+1
| | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/PlatformBootManagerLib: display boot option loading/startingLaszlo Ersek2019-02-251-0/+1
| | | | | | | | | | | | | Consume PlatformBmPrintScLib, added earlier in this series. When BdsDxe+UefiBootManagerLib report LoadImage() / StartImage() preparations and return statuses, print the reports to the UEFI console. This allows end-users better visibility into the boot process. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1515418 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg/ArmVirtQemu*: enable minimal Status Code Routing in DXELaszlo Ersek2019-02-251-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The EFI_RETURN_STATUS_EXTENDED_DATA feature from PI-1.7 (<https://mantis.uefi.org/mantis/view.php?id=1885>) enables platform code to learn about boot option failures (loading and launching) via status codes reported by the UEFI Boot Manager. In commit 59541d41633c, we removed all status code support from ArmVirtPkg. Reenable that support now, minimally, just to the extent so we can benefit from the PI-1.7 feature mentioned above: (1) Include the ReportStatusCodeRouterRuntimeDxe driver. This driver produces two protocols, EFI_STATUS_CODE_PROTOCOL and EFI_RSC_HANDLER_PROTOCOL. The former allows DXE phase modules and runtime modules to report (produce) status codes. The latter allows the same types of modules to register callbacks for status code handling (consumption). (Handler registration occurs only at boot time. Status codes are delivered to each handler at runtime as well, unless the handler is unregistered at ExitBootServices().) (2) Resolve ReportStatusCodeLib to a non-Null instance, for DXE_DRIVER modules only. This way DXE_DRIVER modules that use the REPORT_STATUS_CODE_EX() macro and friends will reach EFI_STATUS_CODE_PROTOCOL from point (1). (3) Set PcdReportStatusCodePropertyMask to 3 (the default value is 0). This causes the REPORT_STATUS_CODE_EX() macro and friends to let Progress Codes (bit#0) and Error Codes (bit#1) through to point (1). Debug Codes (bit#2) are filtered out. (4) Include no driver, for now, that registers any status code handler via EFI_RSC_HANDLER_PROTOCOL, from point (1). Status codes that reach ReportStatusCodeRouterRuntimeDxe will be thrown away. (5) Modify only the ArmVirtQemu* platforms. A status code handler will be added to "ArmVirtPkg/Library/PlatformBootManagerLib" in the next patch, and this library instance is not consumed by ArmVirtXen. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1515418 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg/ArmVirtXen: don't set Pcd*ImageVerificationPolicyLaszlo Ersek2019-02-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | According to the PCDs not used by modules or in conditional directives sections of all the build reports for {AARCH64,ARM} x {Xen} x {DEBUG,NOOPT,RELEASE} x {feat-1} (6 builds in total), PcdOptionRomImageVerificationPolicy, PcdFixedMediaImageVerificationPolicy, and PcdRemovableMediaImageVerificationPolicy are not used in any of those builds. Restrict the settings to the ArmVirtQemu and ArmVirtQemuKernel platforms (preserving the -D SECURE_BOOT_ENABLE restriction in the process). ("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".) Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg/ArmVirtXen: don't set PcdTurnOffUsbLegacySupportLaszlo Ersek2019-02-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | According to the PCDs not used by modules or in conditional directives sections of all the build reports for {AARCH64,ARM} x {Xen} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1} (12 builds in total), the PCD is not used in any of those builds. Restrict the setting to the ArmVirtQemu and ArmVirtQemuKernel platforms. ("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".) Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg/ArmVirtXen: don't set PcdTerminalTypeGuidBufferLaszlo Ersek2019-02-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | According to the PCDs not used by modules or in conditional directives sections of all the build reports for {AARCH64,ARM} x {Xen} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1} (12 builds in total), the PCD is not used in any of those builds. Restrict the setting to the ArmVirtQemu and ArmVirtQemuKernel platforms. Restrict the TTY_TERMINAL define similarly. ("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".) Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg: don't set PcdCoreCountLaszlo Ersek2019-02-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | According to the PCDs not used by modules or in conditional directives sections of all the build reports for {AARCH64,ARM} x {Qemu,QemuKernel,Xen} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1} (36 builds in total), the PCD is not used in any of those builds. Remove the setting. ("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".) Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg/{ArmVirtQemu,ArmVirtQemuKernel}: don't set PcdTrustzoneSupportLaszlo Ersek2019-02-131-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | According to the PCDs not used by modules or in conditional directives sections of all the build reports for {AARCH64,ARM} x {Qemu,QemuKernel} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1} (24 builds in total), the PCD is not used in any of those builds. Remove the setting. ("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".) Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg/ArmVirtQemuKernel: don't set PcdCPUCoresStackBaseLaszlo Ersek2019-02-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | According to the PCDs not used by modules or in conditional directives sections of all the build reports for {AARCH64,ARM} x {QemuKernel} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1} (12 builds in total), the PCD is not used in any of those builds. Remove the setting. ("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".) Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg: Remove redundant library instances in ArmVirtQemuKernel.dscFu Siyuan2018-12-181-3/+0
| | | | | | | | | | | | | | | | | Commit 9a67ba261fe9 ("ArmVirtPkg: Replace obsoleted network drivers from platform DSC/FDF") incorrectly added the BaseCryptLib, OpensslLib and IntrinsicLib to "ArmVirtPkg/ArmVirtQemuKernel.dsc", it's redundant and the library instances from "ArmVirt.dsc.inc" is already sufficient. This patch also adjust the order of network drivers in "ArmVirtPkg/ ArmVirtQemuFvMain.fdf.inc" to make it same as the DSC file. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: Replace obsoleted network drivers from platform DSC/FDF.Fu Siyuan2018-12-141-7/+6
| | | | | | | | | | | | | This patch replaces the MdeModulePkg TCP, PXE and iSCSI driver with those ones in NetworkPkg. These 3 drivers in MdeModulePkg are not being actively maintained and will be removed from edk2 master soon. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg/PrePi ARM CLANG35: drop incompatible command line optionArd Biesheuvel2018-12-131-5/+0
| | | | | | | | | | | Drop the -mno-movt command line option override, which is no longer needed, and actually incompatible with versions of Clang before 3.6. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* ArmVirtPkg/PrePiUniCoreRelocatable CLANG38: work around build issuesArd Biesheuvel2018-12-111-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The self-relocating PrePi module that is used by the ArmVirtQemuKernel and ArmVirtXen targets runs the linker in PIE mode so that it emits dynamic relocations into the final image in a way that permits the module to relocate itself into place before calling into the C code. When building these targets using the CLANG38 toolchain, we switch from the BFD to the GOLD linker, which behaves a bit differently when building PIE executables, and insists on emitting GOT indirected symbol references throughout, which means a) that we end up with absolute addresses (which need to be fixed up at load time) for no good reason, and b) we have to add support for handling GOT entries to GenFw if we want to convert them into PE/COFF. So instead, let's emit a shared library. Since the ELF image only serves as the input to GenFw, this does not lead to any loss of functionality, although it does require the -Bsymbolic linker option to be added to ensure that no symbol based dynamic relocations are emitted (which would, e.g., permit lazy binding for shared libraries). So for all other toolchains, the linker option changes are a no-op. Then, we have to convince CLANG38/GOLD that there is no need to refer to symbols via a GOT entry. This is done by forcing hidden visibility for all symbols in all components that make up the PrePi SEC module: this informs the linker that a symbol is never exported or preempted, making it safe to refer to it directly from anywhere in the code, rather than indirectly via a GOT entry. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/ArmVirtQemuKernel ARM: make some PCD settings apply to ARMArd Biesheuvel2018-12-111-11/+9
| | | | | | | | | | Move some PCD settings outs of the [PcdsFixedAtBuild.AARCH64] block, so that they apply to 32-bit ARM as well. Without this change, the ARM build doesn't work. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: drop PcdPrePiCpuMemorySize assignments from all platformsArd Biesheuvel2018-11-291-4/+0
| | | | | | | | | PcdPrePiCpuMemorySize is no longer used so drop the PCD overrides from all platform descriptions in ArmVirtPkg. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/ArmVirtQemu: enable the IPv6 stackLaszlo Ersek2018-07-131-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the IPv6 stack to ArmVirtQemu with a cumulative port of the following OvmfPkg commits: * 36c6413f76e5 "OvmfPkg: enable the IPv6 support", 2014-12-19 * 96302b80d90e "OvmfPkg: Enable Network2 Shell Commands for IPv6", 2016-03-08 * 6d0f8941bdc2 "OvmfPkg: always resolve OpenSslLib, IntrinsicLib and BaseCryptLib", 2017-01-17 * 32e22f20c985 "OvmfPkg: correct the IScsiDxe module included for the IPv6 stack", 2017-01-17 The IPv6-enabled IScsiDxe driver depends on BaseCryptLib, and the "CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf" instance depends on IntrinsicLib and OpensslLib. This is why commit 6d0f8941bdc2 is relevant. However, unlike in OvmfPkg, in ArmVirtPkg we'll precisely track the firmware features that require these library classes. (The OvmfPkg discussion was quite complex, and the OvmfPkg solution was a compromise: <http://mid.mail-archive.com/1484569332-13440-1-git-send-email-jiaxin.wu@intel.com>.) The ArmVirtXen platform is not extended with the relevant drivers because currently it doesn't include any networking support. Cc: Julien Grall <julien.grall@linaro.org> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1007 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg: unify HttpLib resolutions in "ArmVirt.dsc.inc"Laszlo Ersek2018-07-131-4/+0
| | | | | | | | | | | We already resolve a number of networking-related library classes in ArmVirt.dsc.inc; follow suit with HttpLib. Cc: Julien Grall <julien.grall@linaro.org> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1007 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg: add QemuRamfbDxeGerd Hoffmann2018-06-141-0/+2
| | | | | | | | | Add QemuRamfbDxe to dsc and fdf files for ArmVirt package. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: use protocol-based DevicePathLib instance for most DXE modulesLaszlo Ersek2018-04-301-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port OvmfPkg commit 5c3481b0b611e to ArmVirtPkg. Some explanation should be in order (because 5c3481b0b611e doesn't offer any): - The UefiDevicePathLibDevicePathProtocol instance uses the Device Path Utilities Protocol, produced by DevicePathDxe, for formatting and parsing the textual device path representation. This allows for a lighter weight lib instance that gets linked into several DXE modules. In comparison, the more standalone UefiDevicePathLib instance includes the formatting and parsing routines in every client module. - The DXE core needs DevicePathLib before it dispatches DevicePathDxe, so it needs to stick with the standalone instance. - DevicePathDxe itself also needs the standalone instance, for implementing the protocol. - The DXE-phase PCD driver, "MdeModulePkg/Universal/PCD/Dxe/Pcd.inf", depends on DevicePathLib via UefiLib and DxeServicesLib at the least; so with this update, it inherits a dependency on the protocol. In reverse, DevicePathDxe depends on the PCD Protocol, via PcdLib. The cycle is broken by using BasePcdLibNull in DevicePathDxe. That restricts it to FixedAtBuild, Patch, and FeatureFlag PCDs, but that's fine. Example space savings (using ArmVirtQemu and the GCC5 toolchain): - NOOPT: 187KB in FVMAIN, 12KB in FVMAIN_COMPACT - DEBUG: 147KB in FVMAIN, 20KB in FVMAIN_COMPACT - RELEASE: 123KB in FVMAIN, 17KB in FVMAIN_COMPACT Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=940 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg/ArmVirtQemu: hook NvVarStoreFormattedLib into VariableRuntimeDxeLaszlo Ersek2018-04-121-0/+1
| | | | | | | | | | | | | | | In spite of both ArmVirtQemu and ArmVirtQemuKernel formatting the variable store template at build time, link NvVarStoreFormattedLib into VariableRuntimeDxe via NULL class resolution on both platforms. This lets us test the depexes implemented in the previous patches. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Steve Capper <steve.capper@linaro.org> Cc: Supreeth Venkatesh <Supreeth.Venkatesh@arm.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg: add NOOPT target to platform .DSCsArd Biesheuvel2017-12-061-1/+1
| | | | | | | | | In order to allow the ArmVirtPkg platforms to be built using the NOOPT target, add it explicitly to the BUILD_TARGETS define. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: remove ArmPlatformLib implementationsArd Biesheuvel2017-11-231-1/+0
| | | | | | | | These libraries are no longer used, so remove them from the tree. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/ArmVirtQemu: add ArmVirtMemInfoLib implementationArd Biesheuvel2017-11-231-0/+1
| | | | | | | | | | | | | | | | | | | Create a new ArmVirtMemInfoLib for ArmVirtQemuKernel by cloning the existing ArmPlatformGetVirtualMemoryMap () for this platform, (ArmQemuRelocatablePlatformLib *not* ArmVirtPlatformLib), and cleaning it up: - remove support for uncached DRAM mappings - replace EFI_D_xxx with DEBUG_xxx throughout - use a temp variable to hold the top of the physical address space - use AllocatePool () instead of AllocatePages (), given that we use 160 bytes only, and the memory is never freed. In a future patch, we will add this library to the ordinary ArmVirtQemu platform as well. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: remove ArmPlatformSysConfigLib dependencyArd Biesheuvel2017-11-161-6/+0
| | | | | | | | | | | | | Now that the PL031 RTC driver library no longer depends on the ARM platform specific ArmPlatformSysConfigLib, we no longer need to implement ArmPlatform.h or have a resolution for that library. This allows us to get rid of a rather dodgy practice of including platform headers using compiler flags, which is a bad idea at various levels. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/ArmVirtQemu: use non-accelerated CopyMem for VariableRuntimeDxeArd Biesheuvel2017-11-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | The VariableRuntimeDxe driver may use CopyMem () on NOR flash regions, assuming such regions always have full memory semantics. Given that those regions cannot be mapped as ordinary memory on ARM (due to the fact that the NOR flash requires device semantics while in write mode) this prevents us from using BaseMemoryLibOptDxe in VariableRuntimeDxe, since it may use unaligned accesses and/or DC ZVA instructions, both of which are incompatible with mappings using device semantics. Note that there is no way we can work around this by changing the mapping type between 'memory' and 'device' when switching from read to write mode and back, because the runtime mapping is created by the OS, and cannot be changed at will. So let's just switch to the unaccelerated version of BaseMemoryLib which does not have the same problem. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Shannon Zhao <zhaoshenglong@huawei.com>
* ArmVirtPkg/ArmVirtQemu: include UsbMassStorageDxeLaszlo Ersek2017-09-121-0/+1
| | | | | | | | | This is needed for recognizing QEMU's "usb-storage" device model. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg/ArmVirtQemu: port HTTP_BOOT_ENABLE from OvmfPkgLaszlo Ersek2017-09-121-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * From commit ab44a6e833fa ("OvmfPkg: Add HttpBoot support", 2015-08-23): - introduce HTTP_BOOT_ENABLE build define - resolve HttpLib class - include NetworkPkg drivers DnsDxe, HttpDxe, HttpBootDxe * From commit 1a85139d9eac ("OvmfPkg: Build HTTP utilities driver", 2015-08-28): - include NetworkPkg driver HttpUtilitiesDxe * From commit 4b2fb7986d57 ("OvmfPkg: Allow HTTP connections if HTTP Boot enabled", 2017-01-19): - set PcdAllowHttpConnections to TRUE > ## Indicates whether HTTP connections (i.e., unsecured) are permitted or > ## not. > # TRUE - HTTP connections are allowed. Both the "https://" and > # "http://" URI schemes are permitted. > # FALSE - HTTP connections are denied. Only the "https://" URI scheme is > # permitted. > # @Prompt Indicates whether HTTP connections are permitted or not. > gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|FALSE|BOOLEAN|... TLS_ENABLE (for HTTPS) is not ported for the time being. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg: don't build the network stack uselessly for XenLaszlo Ersek2017-09-121-0/+15
| | | | | | | | | | | | | | | | | "ArmVirtXen.fdf" pulls in none of the drivers from "MdeModulePkg/Universal/Network", therefore building them in "ArmVirtXen.dsc", via "ArmVirt.dsc.inc", is wasted work. Move the "MdeModulePkg/Universal/Network" drivers from "ArmVirt.dsc.inc" to "ArmVirtQemu.dsc" and "ArmVirtQemuKernel.dsc". Place the new block between the "Bds" and "SCSI Bus and Disk Driver" blocks, similarly to its context in "ArmVirtQemuFvMain.fdf.inc". Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg: Enable UDF file system supportPaulo Alcantara2017-09-081-1/+2
| | | | | | | | | | | | This patch enables UDF file system support by default. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Paulo Alcantara <pcacjr@zytor.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* ArmVirtPkg: remove QemuVideoDxe from ArmVirtQemu and ArmVirtQemuKernelArd Biesheuvel2017-08-241-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One of the reasons for introducing virtio-gpu support to OvmfPkg and ArmVirtpkg was the fact that under KVM virtualization on ARM, the legacy VGA cannot be used reliably. This is due to an implementation detail of QEMU+KVM, which remaps cached host memory into the guest address space as a framebuffer behind a PCI BAR. Given that the purpose of a memory mapped framebuffer is its side effects, such BARs should never be mapped cacheable in the guest, and the mismatched attributes between host and guest result in a loss of coherency, visible as corruption in the framebuffer image. This issue does not occur under TCG emulation, nor did we expect it to actually bring down the guest under KVM, and so it was deemed harmless to keep support for the VGA device as well. However, as it turns out, the fact that the framebuffer BAR is mapped using device semantics by default may result in unalignment faults when we use the ordinary string copy routines on the contents. In theory, we could work around this by remapping the BAR as write combining, but it appears the generic PCI bus driver does not actually implement this. So let's remove the QemuVideoDxe driver altogether. This may result in loss of functionality for use cases that rely on the framebuffer to be directly addressable (such as EFIFB), but given that this never worked reliably under KVM in the first place, let's not let that stop us from dropping support for it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmVirtPkg: switch to generic ResetSystemRuntimeDxeArd Biesheuvel2017-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | For obscure reasons, ARM platforms use a different implementation of the ResetSystem() runtime service call than other platforms. So let's switch all ArmVirtPkg platforms to the generic version instead. Given that all platforms use an implementation of EfiResetSystemLib [as consumed by the ResetRuntimeDxe in EmbeddedPkg that we are replacing] which is unlikely to be depended upon by out of tree platforms, let's simply modify this library into an implementation of ResetSystemLib instead [which is what the generic driver in MdeModulePkg consumes] This does mean we need to update all clients at the same time, which is why all changes are part of the same patch. As before, warm reset and platform specific reset are mapped onto cold reset (which is the only thing PSCI implements, at least the version we depend on). The new library function EnterS3WithImmediateWake() is left unimplemented, as permitted by the ResetSystemLib library class. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: install EdkiiPlatformHasDeviceTree proto in the 32-bit buildsNerijus Baliūnas2017-05-031-1/+1
| | | | | | | | | | | | | | | | | | Include XenPlatformHasAcpiDtDxe and PlatformHasAcpiDtDxe in the 32-bit builds too. Please see https://bugzilla.tianocore.org/show_bug.cgi?id=524 why it is needed. With this patch my arm uefi VM boots. Fixes: 3a2c1548fe2df4b0b067671e2025da6372063218 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Nerijus Baliūnas <nerijus@users.sourceforge.net> Reviewed-by: Laszlo Ersek <lersek@redhat.com> [lersek@redhat.com: move long subj to commit msg body, add short subj] [lersek@redhat.com: add Fixes reference] [lersek@redhat.com: keep ACPI DXE modules grouped in QEMU DSCs] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: remove ArmCpuLib referencesArd Biesheuvel2017-03-311-6/+0
| | | | | | | | | ArmCpuLib is never used anywhere, and is about to be removed. So remove any references from our .DSC files. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: enable AcpiTableDxe and EFI_ACPI_TABLE_PROTOCOL dynamicallyLaszlo Ersek2017-03-281-0/+1
| | | | | | | | | | | | | | | | In this patch, the ACPI protocol / driver chain is enabled dynamically, when appropriate. This is being done in one larger patch, because ArmVirt.dsc.inc, where AcpiTableDxe is built, is used by all the platform DSCs. No change in behavior should be observable after this patch on any ArmVirtPkg platform. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Leif Lindholm <leif.lindholm@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg/ArmVirtQemu: refer to Shell app via its declared GUIDArd Biesheuvel2017-03-221-1/+0
| | | | | | | | | | | | | | Currently, the file GUID reference of the UEFI Shell app is indirected via the PCD gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile, which is set to a fixed value for our platforms. So instead, use the new symbolic GUID added for this purpose, and drop the reference to this PCD, and to the IntelFrameworkModulePkg package entirely. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>