summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-09-28SecurityPkg/SecureBootConfigImpl.c: Secure Boot DBX UI Enhancementchenc25-31/+1150
Use 2-level format to display signature list and signature data. Support batch delete operation to delete signature list or signature data. Display more useful information for each signature data. Contributed-under: TianoCore Contribution Agreement 1.0 Cc: Zhang Chao B <chao.b.zhang@intel.com> Cc: Long Qin <qin.long@intel.com> Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Long Qin <qin.long@intel.com> Reviewed-by: Zhang Chao B <chao.b.zhang@intel.com>
2017-09-28MdeModulePkg/PciBusDxe: Enable Bus Master on P2P bridges on demandRuiyu Ni3-10/+32
The patch dynamically enables Bus Master on P2P bridges only when requested by a device driver through PciIo.Attribute() to enable the Bus Master. Signed-off-by: Sean Brogan <sean.brogan@microsoft.com> Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com>
2017-09-28SecurityPkg\SmmTcg2PhysicalPresenceLib.c Handle reserved or unimplemented PP ↵Zhang, Chao B1-7/+7
Operation Several PP operations < 128(Vendor Specific) are reserved or unimplemented. Follow TCG PC Client Platform Physical Presence Interface Specification to return not implemented. https://trustedcomputinggroup.org/wp-content/uploads/Physical-Presence-Interface_1-30_0-52.pdf Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-09-28BaseTools: Fix the regression bug to build single moduleYonghong Zhu1-0/+12
The bug is introduced by 1b8eca to collect single module's build time. Now the fix solution is copied from Platform build. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-09-27MdeModulePkg/UdfDxe: Resolve potential NULL pointer dereferenceHao Wu1-1/+6
Within function GetAllocationDescriptorLsn(): The call to GetPdFromLongAd() may return NULL and it will be later dereferenced in GetShortAdLsn(). This commit adds ASSERT to resolve the potential NULL pointer dereference. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Paulo Alcantara <pcacjr@zytor.com>
2017-09-27BaseTools: add support for BIOS build with binary cacheYonghong Zhu3-9/+189
Add three new options: --hash enables hash-based caching during build process. when --hash is enabled, build tool will base on the module hash value to do the incremental build, without --hash, build tool will base on the timestamp to do the incremental build. --hash option use md5 method to get every hash value, DSC/FDF, tools_def.txt, build_rule.txt and build command are calculated as global hash value, Package DEC and its include header files are calculated as package hash value, Module source files and its INF file are calculated as module hash value. Library hash value will combine the global hash value and its dependent package hash value. Driver hash value will combine the global hash value, its dependent package hash value and its linked library hash value. When --hash and --binary-destination are specified, build tool will copy generated binary files for each module into the directory specified by binary-destination at the build phase. Binary-destination directory caches all generated binary files. When --hash and --binary-source are specified, build tool will try to get the binary files from the binary source directory at the build phase.If the cached binary has the same hash value, it will be directly used. Otherwise, build tool will compile the source files and generate the binary files. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-09-27UefiCpuPkg/CpuCommonFeaturesLib: Add check for input parameter.Eric Dong2-0/+4
The ConfigData parameter initialized in *GetConfigData function should not be NULL in later *Support, *Initilize function, so just add ASSERT code check in these functions. Cc: Ming Shao <ming.shao@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-09-27UefiCpuPkg/CpuDxe: Add missing function description commentsDandan Bi1-0/+3
Cc: Eric Dong <eric.dong@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
2017-09-26Maintainers.txt: add Xen reviewer for ArmVirtPkgLeif Lindholm1-0/+1
Add Julien Grall as a reviewer for ArmVirtPkg for the purpose of reviewing patches affecting Xen. Cc: Julien Grall <julien.grall@arm.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Acked-by: Julien Grall <julien.grall@linaro.org>
2017-09-26Maintainers.txt: add Xen reviewers to OvmfPkgLeif Lindholm1-0/+2
A lack of reviewers with Xen experience for OvmfPkg has been expressed. The Xen community has put forward two volunteers. Cc: Anthony Perard <anthony.perard@citrix.com> Cc: Julien Grall <julien.grall@arm.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Julien Grall <julien.grall@linaro.org>
2017-09-26Maintainers.txt: add Ard Biesheuvel as OvmfPkg maintainerLeif Lindholm1-0/+1
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2017-09-26IntelFrameworkModulePkg FwVolDxe: Support FFS_ATTRIB_DATA_ALIGNMENT_2Star Zeng2-14/+62
Follow PI 1.6 spec to support FFS_ATTRIB_DATA_ALIGNMENT_2 for FFS alignment extended to support maximum 16MB. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-09-26MdeModulePkg Core: Support FFS_ATTRIB_DATA_ALIGNMENT_2Star Zeng2-23/+49
Follow PI 1.6 spec to support FFS_ATTRIB_DATA_ALIGNMENT_2 for FFS alignment extended to support maximum 16MB. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-09-26MdePkg PiFirmwareFile.h: Add FFS_ATTRIB_DATA_ALIGNMENT_2 definitionStar Zeng1-2/+3
Follow PI 1.6 spec to add FFS_ATTRIB_DATA_ALIGNMENT_2 definition for FFS alignment extended to support maximum 16MB. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-09-26BaseTools: report build time measured by module of EDKII BuildYonghong Zhu3-11/+92
In the build report, we add AutoGen Phase, Make Phase and GenFds Phase time duration in the Platform Summary section, and we also add a item in Module section to display module and library's build time. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-09-26MdeModulePkg/DxeCore: Add check to ensure no possible NULL ptr derefHao Wu1-0/+1
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-09-25MdeModulePkg/UDF: Fix creation of UDF logical partitionPaulo Alcantara5-568/+606
Do not reserve entire block device size for an UDF file system - instead, reserve the appropriate space (UDF logical volume space) for it. Additionally, only create a logical partition for UDF logical volumes that are currently supported by EDK2 UDF file system implementation. For instance, an UDF volume with a single LVD and a single Physical (Type 1) Partition will be supported. Cc: Eric Dong <eric.dong@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Reported-by: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Paulo Alcantara <pcacjr@zytor.com> Tested-by: Hao Wu <hao.a.wu@intel.com> Build-tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Build-tested-by: Star Zeng <star.zeng@intel.com> Build-tested-by: Paulo Alcantara <paulo@hp.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-09-25MdePkg: Add UDF volume structure definitionsPaulo Alcantara1-5/+92
This patch adds a few more UDF volume structures in order to detect an UDF file system which is supported by current EDK2 UDF file system implementation in Partition driver. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Paulo Alcantara <pcacjr@zytor.com> Build-tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Tested-by: Hao Wu <hao.a.wu@intel.com> Build-tested-by: Star Zeng <star.zeng@intel.com> Build-tested-by: Paulo Alcantara <paulo@hp.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-09-25BaseTools: extend FFS alignment to 16MYonghong Zhu12-56/+140
Current FFS only supports 64KiB alignment for data, Per PI 1.6 requirement, we extend FFS alignment to 16M. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-09-25ShellPkg/dh: Refine the dump outputRuiyu Ni2-68/+69
The patch doesn't change any real functionality. Only the indent width and EOL are changed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-09-25ShellPkg/dh: Modify the dump of UsbIo protocolHuajing Li1-2/+2
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-09-25ShellPkg/dh: Modify the dump of UsbIo protocolHuajing Li2-2/+64
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-09-25ShellPkg/dh: Modify the dump of PciIo protocolHuajing Li2-2/+96
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-09-25ShellPkg/dh: Modify the dump of GraphicsOutput protocolHuajing Li1-18/+18
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-09-25ShellPkg/dh: Modify the dump of DebugSupport protocolHuajing Li2-1/+68
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-09-25ShellPkg/dh: Modify the dump of BlockIo protocolHuajing Li2-1/+80
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-09-25ShellPkg/dh: Modify the dump of BusSpecificDriverOverride protocolHuajing Li2-2/+81
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-09-25ShellPkg/dh: Modify the dump of LoadedImage protocolHuajing Li4-12/+21
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-09-25ShellPkg/dh: Modify the dump of "ImageDevicePath" and "DevicePath"Huajing Li1-22/+46
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-09-25ShellPkg/dh: Display the protocol instance pointer value for "-v"Huajing Li1-0/+13
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-09-25ShellPkg/dh: fix the error display "Child Controllers" to "Managing".Huajing Li2-3/+4
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-09-25ShellPkg/dh: change the key information color from blue to hilightHuajing Li1-20/+20
The blue text is very hard to see. Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-09-25ShellPkg/dh: display all the protocol names in a single lineHuajing Li2-12/+25
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-09-25CryptoPkg: Add new API to retrieve commonName of X.509 certificateQin Long5-8/+234
v3: Add extra CommonNameSize check since OpenSSL didn't check this input parameter. (One openssl issue was filed to address this risk: https://github.com/openssl/openssl/issues/4392) v2: Update function interface to return RETURN_STATUS to represent different error cases. Add one new API (X509GetCommonName()) to retrieve the subject commonName string from one X.509 certificate. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ting Ye <ting.ye@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qin Long <qin.long@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
2017-09-23IntelSiliconPkg/VTdPmrPei: Add EndOfPei callback for S3Jiewen Yao2-2/+59
In S3 resume, before system transfer to waking vector, the VTdPmr need turn off VTd protection based upon VTdPolicy. Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-09-23IntelSiliconPkg/dec: Clarify VTdPolicy.Jiewen Yao1-2/+2
Clarify the VTdPolicy is for both PEI and DXE. Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-09-23IntelSiliconPkg/VTdDxe: Clean up DXE flush memory.Jiewen Yao2-4/+9
Make sure the context table are flush to memory. Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-09-22ShellPkg/DmpStore: fix GCC/CLANG build failureLaszlo Ersek1-1/+1
> ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c:525:66: error: > passing argument 2 of 'gEfiShellProtocol->GetGuidName' from incompatible > pointer type [-Werror=incompatible-pointer-types] > > Status = gEfiShellProtocol->GetGuidName(&FoundVarGuid, &GuidName); > ^ > ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c:525:66: note: > expected 'const CHAR16 ** {aka const short unsigned int **}' but > argument is of type 'CHAR16 ** {aka short unsigned int **}' Pointer-to-(pointer-to-CHAR16) and pointer-to-(pointer-to-const-CHAR16) are incompatible types; GCC and CLANG are right to complain. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Steven Shi <steven.shi@intel.com> Reported-by: Jenkins Build Host <jenkins@kraxel.org> Reported-by: Steven Shi <steven.shi@intel.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=716 Fixes: 09e8678380aaaf0a5ef59179ff59e0a045d1b0bf Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-09-22OvmfPkg/VirtioNetDxe: log debug message in VirtioNetExitBoot()Laszlo Ersek1-0/+1
The other four virtio device drivers (VirtioBlkDxe, VirtioGpuDxe, VirtioRngDxe, VirtioScsiDxe) log such messages at this point; follow suit. Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Brijesh Singh <brijesh.singh@amd.com>
2017-09-22OvmfPkg/VirtioNetDxe: document Rx/Tx allocs and mappings on Init/ShutdownLaszlo Ersek1-4/+8
Document the following actions on the EfiSimpleNetworkStarted <-> EfiSimpleNetworkInitialized state transitions: * from commit 46b11f00ac70 ("OvmfPkg/VirtioNetDxe: alloc RxBuf using AllocateSharedPages()", 2017-09-14): VirtioNetInitRx -> { VirtIo->AllocateSharedPages, VirtioMapAllBytesInSharedBuffer } VirtioNetShutdownRx -> { VirtIo->UnmapSharedBuffer, VirtIo->FreeSharedPages } * from commit 891f016c1b99 ("OvmfPkg/VirtioNetDxe: dynamically alloc transmit header", 2017-09-14): VirtioNetInitTx -> { VirtIo->AllocateSharedPages, VirtioMapAllBytesInSharedBuffer } VirtioNetShutdownTx -> { VirtIo->UnmapSharedBuffer, VirtIo->FreeSharedPages } Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Brijesh Singh <brijesh.singh@amd.com>
2017-09-22OvmfPkg/QemuBootOrderLib: recognize "usb-storage" devices in XHCI portsLaszlo Ersek1-0/+44
The feature is primarily useful for modern AARCH64 guests that have no built-in virtio block / SCSI drivers; as on "qemu-system-aarch64 -M virt", there are no IDE or AHCI controllers that could be used as fallback. XHCI is available in "-M virt" however, and because XHCI predates AARCH64 by several years, said guests are expected to have built-in drivers for it. Other device models ("usb-uas", "usb-bot") are out of scope for now, similarly to USB1.x (UHCI) and USB2 (EHCI) host controllers, and similarly to USB hubs (which are USB1.1 only). In particular, port mapping between EHCI and companion UHCI controllers is very complex; it even leads to PCI slot/function differences between the OpenFirmware device paths exported by QEMU and the the UEFI device paths generated by edk2. The number of ports on the XHCI controller defaults to 4, but it can be raised via the "p3" property to 15. In addition, several XHCI controllers can be grouped into a single-slot, multi-function PCI device. These allow for a good number of usb-storage devices, while their desired boot order remains recognizable to this patch. In the example below, we create two XHCI controllers, grouped into PCI slot 00:02 as functions 0 and 1. Both controllers are given 15 ports. We attach a "usb-storage" device to controller 1 at port 3 (ports are 1-based in QEMU, 0-based in edk2), and attach another "usb-storage" device to controller 2 at port 9. QEMU command line options (NB. they apply equally to aarch64/virt and x86_64/{i440fx,q35}): -device qemu-xhci,id=xhci1,p3=15,addr=02.0,multifunction=on \ -device qemu-xhci,id=xhci2,p3=15,addr=02.1 \ \ -drive id=disk1,if=none,format=qcow2,$DISK1_OPTIONS \ -drive id=disk2,if=none,format=qcow2,$DISK2_OPTIONS \ \ -device usb-storage,drive=disk1,bus=xhci1.0,port=3,bootindex=1 \ -device usb-storage,drive=disk2,bus=xhci2.0,port=9,bootindex=2 \ Libvirt domain XML fragment: <controller type='usb' index='1' model='qemu-xhci' ports='15'> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/> </controller> <controller type='usb' index='2' model='qemu-xhci' ports='15'> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/> </controller> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='...'/> <target dev='sda' bus='usb'/> <boot order='1'/> <address type='usb' bus='1' port='3'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='...'/> <target dev='sdb' bus='usb'/> <boot order='2'/> <address type='usb' bus='2' port='9'/> </disk> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2017-09-22MdeModulePkg/SetupBrowser:Add NULL check before using a pointerDandan Bi1-5/+5
Add NULL pointer check before using a pointer to avoid possible NULL pointer dereference. Cc: Eric Dong <eric.dong@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
2017-09-22UefiCpuPkg/CpuDxe: Fix GCC build warningJian J Wang1-2/+6
There're uninitialized variables warning reported by GCC. This patch will fix it. The original commit is c1cab54ce57c2608b8b3ea051c7041f036f21153 Cc: Hao Wu <hao.a.wu@intel.com> Cc: Anthony PERARD <anthony.perard@citrix.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
2017-09-22ShellPkg/dmpstore: Show name of known variable vendor GUIDHuajing Li2-4/+14
Change "dmpstore" to show name of known variable vendor GUID. The name is got from ShellProtocol.GetGuidName(). Cc: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-09-22MdeModulePkg/DxeCore: Fixed Interface returned by CoreOpenProtocolAmit Kumar1-13/+23
Change since v4: Revise the patch based on V4 sent by Amit Kumar 1) Only return the corresponding protocol interface in *Interface if the return status is EFI_SUCCESS or EFI_ALREADY_STARTED. 2) Interface is returned unmodified for all error conditions except EFI_UNSUPPORTED and EFI_ALREADY_STARTED, NULL will be returned in *Interface when EFI_UNSUPPORTED and Attributes is not EFI_OPEN_PROTOCOL_TEST_PROTOCOL, the protocol interface will be returned in *Interface when EFI_ALREADY_STARTED. Change since v3: 1) Fixed issue when Attributes = EFI_OPEN_PROTOCOL_TEST_PROTOCOL and Inteface = NULL case. [Reported by:star.zeng at intel.com] Change Since v2: 1) Modified to use EFI_ERROR to get status code Change since v1: 1) Fixed typo protocal to protocol 2) Fixed coding style Cc: Laszlo Ersek <lersek@redhat.com> Cc: Amit Kumar <amit.ak@samsung.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Gabriel Somlo <gsomlo@gmail.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Amit Kumar <amit.ak@samsung.com> Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Gabriel Somlo <gsomlo@gmail.com>
2017-09-21MdeModulePkg/SetupBrowser: Handle questions with Bit VarStoreDandan Bi4-42/+219
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=545 For oneof/numeric/CheckBox(storage can be Bit VarStore) If the question value can be updated and shown correctly in UI page, we need do enhancements in following cases: 1. Parse the Ifr data to get the bit VarStore info correctly. 2. Set/get value to/from bit VarStore correctly. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-09-21MdeModulePkg/HiiDatabase: Handle questions with Bit VarStoreDandan Bi3-36/+319
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=545 For oneof/numeric/checkbox, their storage may be bit field. When generating <ConfigAltResp> string to get default value for these questions, we need to parse the Ifr data to get the bit Varstore info,and then generating the correct <ConfigAltResp> string. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-09-21MdeModulePkg/UefiHiiLib: Validate question with bit fieldsDandan Bi3-77/+182
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=545 In UefiHiiLib, there are codes to validate the current setting of questions, now update the logic to handle question with bit storage. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-09-21MdeModulePkg: Add GUID/flags to implement BitField supportDandan Bi2-1/+23
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=545 Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-09-21BaseTool/VfrCompiler: Support Bit fields in EFI/Buffer VarStoreDandan Bi8-490/+1196
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=545 Enhance VfrCompiler to parse following case: 1. EFI/Buffer VarStore can contain bit fields in their structure. 2. For question Oneof/Checkbox/numeric, their storage can be bit fields of an EFI VarStore/Buffer VarStore. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>