summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix a warning issue with ARMCC.Andrew Fish2016-04-061-1/+1
| | | | | | | | | | (based on FatPkg commit 5613b9c6a6fdf762ef26f30f22ecabc487e22eb4) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Andrew Fish <afish@apple.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* Fix bug in Unicode colloation that causes ASSERT on BeagleBoard. ↵Andrew Fish2016-04-061-1/+1
| | | | | | | | | | | | PlatformLang or Lang variables are not processed correctly. NULL pointer is passed if no variable exists. (based on FatPkg commit 0e3c94b9ac164caf705cc512a0e865fa0811b531) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Andrew Fish <afish@apple.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* Fix warning generated by GCC.Jordan Justen2016-04-061-0/+2
| | | | | | | | | | | | | These warnings seem to have been triggered by the recent change of EFI_STATUS from INTN to UINTN. (based on FatPkg commit c573d39c2a5627b44826d6f656452e8d097c97ff) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* Use EFI_FILE_PROTOCOL naming in place of EFI_FILEQing Huang2016-04-068-68/+68
| | | | | | | | | | (based on FatPkg commit 9f5ac6912eb71e9037fe05b8bd6bf02b5cee5ac6) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* 1. FAT doesn't support to store time information in its FileLastAccess ↵Kun Gui2016-04-062-5/+6
| | | | | | | | | | | | field. The FileLastAccess only contains date information; 2. Replaced RFC 3066 with RFC 4646. (based on FatPkg commit 716b62054bf10b74949795a3df0d29eaca5a7486) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* gEfiFatPkgTokenSpaceGuid.PcdUnicodeCollationSupport and ↵Qing Huang2016-04-063-31/+10
| | | | | | | | | | | | gEfiFatPkgTokenSpaceGuid.PcdUnicodeCollationSupport (based on FatPkg commit d865610b1f37a1ab84982151c1b1255cd51d1489) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* Refactor to invoke only one GetBestLanguage()Qing Huang2016-04-061-17/+7
| | | | | | | | | | (based on FatPkg commit 25e83a4e8906ef80e428b7c446216faa1ba9e2a7) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* Apply GetBestLanguage() UefiLib to initialize Unicode Collation Protocol.Qing Huang2016-04-063-105/+76
| | | | | | | | | | (based on FatPkg commit 63726907ef8f40b3ffea8aab464d133fa06f1e67) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* Fix a spec conformance issue that "Attributes" should only be checked when ↵Qing Huang2016-04-061-10/+5
| | | | | | | | | | | | OpenMode is Create. (based on FatPkg commit 4a3fecc5dc09ff6da448ffcf57e6a24fbca442f9) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* Add comments in DSC files to explain the function and design of components ↵Leon Li2016-04-061-0/+19
| | | | | | | | | | | | section. (based on FatPkg commit d3768aeea6829c1313f5b228399475ca9233ad2a) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* Removed unused library instances for FAT package DSC fileQing Huang2016-04-061-2/+0
| | | | | | | | | | (based on FatPkg commit ee748ff531258c84282ee6bff27278a7218a96bd) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* Split out Synchronization Library from Base LibraryMichael D Kinney2016-04-061-0/+1
| | | | | | | | | | (based on FatPkg commit 208bfe57ec2113fa1d9c79e029762250497bf0b0) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* Fix the build error caused by recent MdePkg clean upQing Huang2016-04-062-5/+6
| | | | | | | | | | (based on FatPkg commit 89452d777f567e38fb24569dbda2477a05bbcd70) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* Clean up to update the reference of the these macros: EFI_SIGNATURE_16 -> ↵Qing Huang2016-04-061-5/+5
| | | | | | | | | | | | SIGNATURE_16 EFI_SIGNATURE_32 -> SIGNATURE_32 EFI_SIGNATURE_64 -> SIGNATURE_64 EFI_FIELD_OFFSET -> OFFSET_OF EFI_MAX_BIT -> MAX_BIT EFI_MAX_ADDRESS -> MAX_ADDRESS These macros are not defined in UEFI spec. It makes more sense to use the equivalent macros in Base.h to avoid alias. (based on FatPkg commit 80c742a0be4426f9431ef6541268413e0b139368) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* Update for library instance renaming Fix typo in token space GUIDQing Huang2016-04-062-2/+2
| | | | | | | | | | (based on FatPkg commit eedcfacbfb6cae77d3c3da35f05a71f3118e824f) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* Add details comments for the code flow to initialize Unicode Collation (2) ↵Qing Huang2016-04-061-0/+14
| | | | | | | | | | | | support. (based on FatPkg commit 824fb80c85dfcb97662b8807c075c6cf7113b521) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* De-unicode in comment for source files.Qing Huang2016-04-062-2/+2
| | | | | | | | | | (based on FatPkg commit ea0ebff7f3afd5808da4fc6bcdd996a8fc977185) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* Fix a typo when checking the 16-bit alignment of Unicode String.Qing Huang2016-04-061-1/+1
| | | | | | | | | | (based on FatPkg commit 603a10ca818a089b8af594e0f1ef7e1a3e42d938) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* Fix undefined format in debug print statement.Qing Huang2016-04-061-1/+1
| | | | | | | | | | (based on FatPkg commit 407f91e8e23d2ab05bb1f0022974eacc267bb6f1) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* Add preparation for FAR release.Qing Huang2016-04-063-12/+189
| | | | | | | | | | (based on FatPkg commit 231d94be998ca1c72f23d2ac6cd5238e9afdc886) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* Add EDK II Prime FatPkg New Feature: Support both Unicode Collation and ↵Qing Huang2016-04-0626-0/+9754
| | | | | | | | | | | | Unicode Collation 2 Protocols Support both Component Name and Component Name 2 Protocol. (based on FatPkg commit e51cd032db84a6fb1f44a0605f80d96f5fdf4bc6) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* BaseTools: Add support to merge Prebuild and Postbuild into build ProcessYonghong Zhu2016-04-078-22/+268
| | | | | | | | | | | | | | | | | | | | | | | | | | This feature is enhance build tool to incorporate execution of prebuild and postbuild. 1.Prebuild script a.DEFINE PREBUILD in DSC [Defines] section b.Build command -D PREBUILD to override the one in DSC [Defines] section 1)If PREBUILD is a file, then this file will be used as prebuild script. 2)If PREBUILD is empty, then prebuild script will be disabled. 3)If PREBUILD is not defined in [Defines] section and not passed in on command line, then prebuild script is also disabled. 2.Prebuild option a.All options of build tool b.TARGET, ARCH and TOOL_CHAIN_TAG value, Those value will be from target.txt file if they are not in build command line. c.Additional options following prebuild definition. Quotes are needed when these additional options are present. d.Quotes would also be required if the path to the prebuild command contains space or special characters. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Enhance --Pcd which override by build optionYonghong Zhu2016-04-072-1/+3
| | | | | | | | | This patch 1) enhance the help info for --pcd to use " but not '. 2) Add the condition statements for build option Pcd type check. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg/Bds: Fix build failures of VS tool chainRuiyu Ni2016-04-072-1/+2
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Shumin Qiu <shumin.qiu@intel.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
* OvmfPkg: disable PcdHiiOsRuntimeSupportLaszlo Ersek2016-04-063-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Edk2 commit 8a45f80edad4 ("MdeModulePkg: Make HII configuration settings available to OS runtime") implements the optional UEFI feature described in "31.2.11.1 OS Runtime Utilization" in UEFI v2.6. While this feature might show benefits down the road even in QEMU virtual machines, at the moment it only presents drawbacks: - it increases the EfiRuntimeServicesData footprint, - it triggers HII compatibility problems between edk2 and external drivers unconditionally, even if the end-user is not interested in HII and/or in configuring said drivers (see <https://www.redhat.com/archives/vfio-users/2016-March/msg00153.html> and <http://thread.gmane.org/gmane.comp.bios.edk2.devel/9894> for an example). While the feature was being introduced, popular demand for a controlling Feature PCD rose (see <http://thread.gmane.org/gmane.comp.bios.edk2.devel/7626>), which is why we can set it now to FALSE. Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* OvmfPkg: remove PcdMaxHardwareErrorVariableSize from the DSC filesLaszlo Ersek2016-04-063-3/+0
| | | | | | | | | | | | | | | | | | | | | | PcdMaxHardwareErrorVariableSize sets the size limit for individual Hardware Error Record Variables (see "7.2.3 Hardware Error Record Persistence" and "Appendix P, Hardware Error Record Persistence Usage" in the UEFI-2.6 spec). Since Hardware Error Record Persistence is an optional firmware feature, according to the spec, and OVMF does not enable it -- it inherits PcdHwErrStorageSize and PcdHardwareErrorRecordLevel with zero values --, the PcdMaxHardwareErrorVariableSize setting in our DSC files has no effect. Remove it in order to eliminate future confusion. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Star Zeng <star.zeng@intel.com> Suggested-by: Star Zeng <star.zeng@intel.com> Ref: http://thread.gmane.org/gmane.comp.bios.edk2.devel/9743/focus=9780 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* ArmVirtPkg: include Virtio10Dxe from OvmfPkgLaszlo Ersek2016-04-064-0/+4
| | | | | | | | | Cc: Ard Biesheuvel <ard.biesheuvel@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> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* OvmfPkg: include Virtio10DxeLaszlo Ersek2016-04-066-0/+6
| | | | | | | | Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* OvmfPkg: Virtio10Dxe: non-transitional driver for virtio-1.0 PCI devicesLaszlo Ersek2016-04-063-0/+1157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver implements the VIRTIO_DEVICE_PROTOCOL for non-transitional PCI devices, based on the virtio-1.0 specification (csprd05). Non-transitional means that it only binds QEMU's virtio-xxx-pci devices that receive the ",disable-legacy=on,disable-modern=off" properties on the QEMU command line. These devices have distinct PCI Device IDs from those that are bound by VirtioPciDeviceDxe. The central abstraction of this driver is the VIRTIO_1_0_CONFIG type. It is practically a "fat pointer" to a register block. The pointed-to register block - may or may not exist (the latter being mostly useful for virtio-1.0 devices that have no device-specific registers), - lives in one of the device's BARs, - lives in an IO or MMIO BAR, - lives at an offset relative to the BAR start, - has its size also maintained. Such VIRTIO_1_0_CONFIG "fat pointers" (i.e., the locations of the register blocks) are parsed from vendor capabilities that reside in the device's standard PCI capabilities list (in PCI config space). Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Jordan Justen <jordan.l.justen@intel.com>
* OvmfPkg: VirtioNetDxe: adapt virtio-net packet header size to virtio-1.0Laszlo Ersek2016-04-062-8/+30
| | | | | | | | | | | | | | | | | | | | | | In virtio-0.9.5, the size of the virtio-net packet header depends on whether the VIRTIO_NET_F_MRG_RXBUF feature is negotiated -- the "num_buffers" field is only appended to the header if the feature is negotiated. Since we never negotiate this feature, VirtioNetDxe never allocates room for the "num_buffers" field. With virtio-1.0, the "num_buffers" field is always there (although it doesn't carry useful information without VIRTIO_NET_F_MRG_RXBUF). Adapt the buffers that depend on the virtio-net header size (otherwise we have skewed / truncated packets). Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* OvmfPkg: VirtioScsiDxe: adapt feature negotiation to virtio-1.0Laszlo Ersek2016-04-061-7/+20
| | | | | | | | | | | | | | | | | | Relative to virtio-0.9.5, virtio-1.0 reverses the order of queue discovery and feature negotiation. In virtio-1.0, feature negotiation has to complete first, and the device can also reject a self-inconsistent feature request through the new VSTAT_FEATURES_OK status bit. (For example if the driver requests a higher level feature but clears a prerequisite feature.) Furthermore, we retain the VIRTIO_F_VERSION_1 feature bit if the VIRTIO_DEVICE_PROTOCOL provider has high enough revision. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* OvmfPkg: VirtioRngDxe: adapt feature negotiation to virtio-1.0Laszlo Ersek2016-04-061-7/+20
| | | | | | | | | | | | | | | | | | Relative to virtio-0.9.5, virtio-1.0 reverses the order of queue discovery and feature negotiation. In virtio-1.0, feature negotiation has to complete first, and the device can also reject a self-inconsistent feature request through the new VSTAT_FEATURES_OK status bit. (For example if the driver requests a higher level feature but clears a prerequisite feature.) Furthermore, we retain the VIRTIO_F_VERSION_1 feature bit if the VIRTIO_DEVICE_PROTOCOL provider has high enough revision. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* OvmfPkg: VirtioNetDxe: adapt feature negotiation to virtio-1.0Laszlo Ersek2016-04-061-4/+19
| | | | | | | | | | | | | | | | | | Relative to virtio-0.9.5, virtio-1.0 reverses the order of queue discovery and feature negotiation. In virtio-1.0, feature negotiation has to complete first, and the device can also reject a self-inconsistent feature request through the new VSTAT_FEATURES_OK status bit. (For example if the driver requests a higher level feature but clears a prerequisite feature.) Furthermore, we retain the VIRTIO_F_VERSION_1 feature bit if the VIRTIO_DEVICE_PROTOCOL provider has high enough revision. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* OvmfPkg: VirtioBlkDxe: adapt feature negotiation to virtio-1.0Laszlo Ersek2016-04-061-5/+20
| | | | | | | | | | | | | | | | | | Relative to virtio-0.9.5, virtio-1.0 reverses the order of queue discovery and feature negotiation. In virtio-1.0, feature negotiation has to complete first, and the device can also reject a self-inconsistent feature request through the new VSTAT_FEATURES_OK status bit. (For example if the driver requests a higher level feature but clears a prerequisite feature.) Furthermore, we retain the VIRTIO_F_VERSION_1 feature bit if the VIRTIO_DEVICE_PROTOCOL provider has high enough revision. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* OvmfPkg: VirtioLib: add Virtio10WriteFeatures() functionLaszlo Ersek2016-04-062-0/+121
| | | | | | | | | | | | | | | | In VirtIo 1.0, a device can reject a self-inconsistent feature bitmap through the new VSTAT_FEATURES_OK status bit. (For example if the driver requests a higher level feature but clears a prerequisite feature.) This function is a small wrapper around VIRTIO_DEVICE_PROTOCOL.SetGuestFeatures() that also verifies if the VirtIo 1.0 device accepts the feature bitmap. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* OvmfPkg: IndustryStandard: add definitions from the VirtIo 1.0 specLaszlo Ersek2016-04-064-2/+115
| | | | | | | | | | | | | | | | | | | | | | These header files are intentionally minimal, and intentionally kept apart from the VirtIo 0.9.5 headers. The header inclusion chains end up like this (the Virtio10*.h header files in the middle are new): Virtio.h -> Virtio10.h -> Virtio095.h ^ ^ | | VirtioNet.h -> Virtio10Net.h -> Virtio095Net.h Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Jordan Justen <jordan.l.justen@intel.com>
* OvmfPkg: IndustryStandard: factor out Virtio095Net.hLaszlo Ersek2016-04-062-78/+100
| | | | | | | | | | | | | | | | | | | | | | | In the upcoming virtio-1.0 series, we'll introduce "Virtio10Net.h". However, the "VirtioNet.h" header file should continue to expose the Virtio Network Device specific type and macro definitions for all virtio versions that OvmfPkg supports. Therefore extract "Virtio095Net.h" like this: VirtioNet.h -> Virtio095Net.h so that in the upcoming patches, we can insert "Virtio10Net.h" in the middle of the inclusion chain. This follows the example of "Acpi.h" and "Pci.h" under "MdePkg/Include/IndustryStandard". Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Suggested-by: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* OvmfPkg: IndustryStandard: factor out Virtio095.hLaszlo Ersek2016-04-062-155/+179
| | | | | | | | | | | | | | | | | | | | | | In the upcoming virtio-1.0 series, we'll introduce "Virtio10.h". However, the "Virtio.h" header file should continue to expose the generic type and macro definitions for all virtio versions that OvmfPkg supports. Therefore extract "Virtio095.h" like this: Virtio.h -> Virtio095.h so that in the upcoming patches, we can insert "Virtio10.h" in the middle of the inclusion chain. This follows the example of "Acpi.h" and "Pci.h" under "MdePkg/Include/IndustryStandard". Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Suggested-by: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* OvmfPkg: VirtioRngDxe: clear all feature bits more explicitlyLaszlo Ersek2016-04-061-1/+2
| | | | | | | | | | | | | | This too is in preparation for the following patches. After this patch, all four drivers manage their feature bits with explicit masking. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* OvmfPkg: VirtioBlkDxe: don't clear non-negotiable feature bitsLaszlo Ersek2016-04-061-5/+4
| | | | | | | | | | | | | VirtioBlkDxe only recognizes virtio-block feature bits that the device offers non-negotiably. Nonetheless, in preparation for the following patches, don't try to clear them even for simplicity. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* OvmfPkg: VIRTIO_DEVICE_PROTOCOL: pass VRING object to SetQueueAddress()Laszlo Ersek2016-04-069-24/+21
| | | | | | | | | | | | | | | | In virtio-1.0, it is not enough to pass the base address of the virtio queue to the hypervisor (as a frame number); instead it will want the addresses of the descriptor table, the available ring, and the used ring separately. Pass the VRING object to the SetQueueAddress() member function; this will enable a virtio-1.0 implementation. Convert the current producers and consumers to this prototype. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* OvmfPkg: VIRTIO_DEVICE_PROTOCOL: remove GetQueueAddress() memberLaszlo Ersek2016-04-067-77/+0
| | | | | | | | | | | | | This function was never consumed by drivers, and the current prototype is unsupportable with virtio-1.0. Remove the function from the protocol definition, and drop the current (unused) implementations. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* OvmfPkg: VIRTIO_DEVICE_PROTOCOL: widen the Features bitmap to 64 bitsLaszlo Ersek2016-04-0610-20/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The virtio-1.0 spec widens the Features bitmap to 64 bits. Modify the declarations of the GetDeviceFeatures() and SetGuestFeatures() protocol member functions accordingly. Normally, a protocol cannot be changed in incompatible ways if the GUID stays the same; however, we've always been extremely clear that VIRTIO_DEVICE_PROTOCOL is internal to edk2. See for example the top of "OvmfPkg/Include/Protocol/VirtioDevice.h". In this patch, all producers and consumers of the GetDeviceFeatures() and SetGuestFeatures() protocol members are updated. The drivers that currently produce these members are "legacy" drivers (in virtio-1.0 terminology), and they cannot (and will not) handle feature bits above BIT31. Therefore their conversion is only for compatibility with the modified protocol interface. The consumers will be responsible for checking the VIRTIO_DEVICE_PROTOCOL.Revision field, and for not passing feature bits that these backends cannot handle. The VirtioMmioGetDeviceFeatures() implementation stores the result of an MmioRead32() call with normal assignment, so it needs no change beyond adapting its prototype. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* MdeModulePkg/Bds: Fix a boot hang due to Ram Disk boot supportRuiyu Ni2016-04-061-1/+5
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
* BaseTools: cache the defined Guid tool to improve the performanceYonghong Zhu2016-04-062-3/+8
| | | | | | | | | | | Current GenFds Tool class GuidSection() is parsing the tools_def.txt for every GUID'ed section that has a GUID defined tool, it cause a bad performance. so this patch cache the defined Guid tool to improve the performance. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg/Bds: Memory Bins don't count the memory used by RAM DiskNi, Ruiyu2016-04-063-9/+27
| | | | | | | | | | | MemoryTypeInformation don't count the reserved memory used by RAM Disk, but it still check all types of memory and do reset when any type of memory size changes. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
* MdeModulePkg/Bds: Free resources after ram disk boot finishesNi, Ruiyu2016-04-063-5/+152
| | | | | | | | | | The resource free includes to un-register the ram disk device and free the memory occupied by the ram disk. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
* MdeModulePkg/Bds: Allocate reserved memory for RAM Disk boot mediaNi, Ruiyu2016-04-062-89/+95
| | | | | | | | | | Use reserved memory to hold the buffer for the RAM disk to follow the ACPI spec requirement. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
* SecurityPkg OpalPasswordSupportLib: Add comments for the used protocol in ↵Eric Dong2016-04-061-1/+1
| | | | | | | | inf file. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg OpalPasswordSupportLib: Remove the hard code debug build option.Eric Dong2016-04-061-3/+0
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>