summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MdePkg/UefiSpec: separate page access bitmask from SP and CRYPTO capsMalgorzata Kukiello2020-10-101-1/+2
| | | | | | | | | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2982 Operating systems are capable of treating SP and CRYPTO memory capabilities and not as attributes. This means that these capabilites cannot be hidden from OSs. For this reason, the SP and CRYPTO bits should be separated from the bitmask that we use for hiding the page-access attributes. Common mask for ATTRIBUTES was introduced in 3bd5c994c879f78e8e3d5346dc3b627f199291aa Signed-off-by: Malgorzata Kukiello <jacek.kukiello@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Oleksiy Yakovlev <oleksiyy@ami.com> Cc: Ard Biesheuvel (ARM address) <ard.biesheuvel@arm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg: SMBIOS 3.4.0 Update "adding DDR5 definitions".Wang, Sanyo2020-10-101-1/+3
| | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2352 SMBIOS 3.4 spec adds new memory device types (DDR5, LPDDR5) Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Sanyo Wang <sanyo.wang@intel.com> Reviewed-by: Zhiguang Liu <zhiguang.liu@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sean Brogan <sean.brogan@microsoft.com>
* NetworkPkg: Fix possible infinite loop in HTTP msg body parserVladimir Olovyannikov via groups.io2020-10-091-3/+16
| | | | | | | | | | | | | | | | | When an HTTP server sends a non-chunked body data with no Content-Length header, the HttpParserMessageBody in DxeHttpLib gets confused and never sets the Char pointer beyond the body start. This causes "for" loop to never break because the condition of "Char >= Body + BodyLength" is never satisfied. Use BodyLength as the ContentLength for the parser when ContentLength is absent in HTTP response headers. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2941 Signed-off-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com> Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
* NetworkPkg/HttpDxe: TlsChildHandle is not cleared when resetAbner Chang2020-10-091-0/+1
| | | | | | | | | | | | | | | | | | | | | BZ #2909, https://bugzilla.tianocore.org/show_bug.cgi?id=2909 When Http->Configure() is invoked with HttpConfigData set to NULL to reset the EFI HTTP instance, TLS child instance is destroyed but HttpInstance->TlsChildHandle is not set to NULL. After reconfiguring HTTP through Http->Configure() and sending the HTTP request to HTTPS URL, TLS child instance is not recreated because HttpInstance->TlsChildHandle is not NULL. Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Nickle Wang <nickle.wang@hpe.com> Signed-off-by: Abner Chang <abner.chang@hpe.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
* NetworkPkg: Add RngLib entry to .dsc file.Maciej Rabeda2020-10-091-0/+1
| | | | | | | | | | | Recent change to OpensslLib (b5701a4c7a0fb185e0c5b9db9525939c78664bfd) causes NetworkPkg build to fail due to lack of RngLib entry in NetworkPkg's .dsc file. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Signed-off-by: Maciej Rabeda <maciej.rabeda@linux.intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* edk2: Add maintainers to RedfishPkgAbner Chang2020-10-081-0/+5
| | | | | | | | | | | | Signed-off-by: Chang Abner <abner.chang@hpe.com> Cc: Nickle Wang <nickle.wang@hpe.com> Cc: Andrew Fish <afish@apple.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Leif Lindholm <leif@nuviainc.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* RedfishPkg: Initial commit of RedfishPkg.Abner Chang2020-10-083-0/+125
| | | | | | | | | | | | | | | | | Initial version of RedfishPkg. Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Signed-off-by: Wang Fan <fan.wang@intel.com> Signed-off-by: Chang Abner <abner.chang@hpe.com> Cc: Nickle Wang <nickle.wang@hpe.com> Cc: Andrew Fish <afish@apple.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Leif Lindholm <leif@nuviainc.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* MdeModulePkg/HiiDatabase: Do not modify CONST stringJeff Brasen2020-10-071-5/+7
| | | | | | | | Update function behavior to not modify the incoming string that is marked as CONST in the prototype. Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
* OvmfPkg: enable HttpDynamicCommandVladimir Olovyannikov2020-10-018-0/+20
| | | | | | | | | | | Enable HttpDynamicCommand (Shell command "http") for OvmfPkg platforms. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2857 Signed-off-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com> Message-Id: <20200722205434.4348-3-vladimir.olovyannikov@broadcom.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com> [lersek@redhat.com: remove groups.io corruption from Author meta-datum]
* ArmVirtPkg: enable HttpDynamiCommandVladimir Olovyannikov2020-10-013-0/+6
| | | | | | | | | | | Enable HttpDynamicCommand (http Shell command) BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2857 Signed-off-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com> Message-Id: <20200722205434.4348-2-vladimir.olovyannikov@broadcom.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com> [lersek@redhat.com: remove groups.io corruption from Author meta-datum]
* ShellPkg/DynamicCommand: add HttpDynamicCommandVladimir Olovyannikov2020-09-3010-0/+2441
| | | | | | | | | | | | | | | | | | | | | | | | | | Introduce an http client utilizing EDK2 HTTP protocol, to allow fast image downloading from http/https servers. HTTP download speed is usually faster than tftp. The client is based on the same approach as tftp dynamic command, and uses the same UEFI Shell command line parameters. This makes it easy integrating http into existing UEFI Shell scripts. Note that to enable HTTP download, feature Pcd gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections must be set to TRUE. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2860 Signed-off-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com> Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Nd <nd@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com>
* CryptoPkg/BaseCryptLib: add crypto algorithms needed by variable protectionWang, Jian J2020-09-292-5/+5
| | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2594 Crypto algorithms, hkdf-sha256/hmac-sha256/aes, are needed to verify integrity of variable data, derive hmac and encryption keys, and encrypt/decrypt varible. Replacing null version source code with real implementations makes sure we can enable full functionalities of protected variable later. Cc: Xiaoyu Lu <xiaoyux.lu@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Cc: Nishant C Mistry <nishant.c.mistry@intel.com> Signed-off-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* BaseTools: Add RISCV64 bindingNikita2020-09-293-0/+94
| | | | | | | | | | - Add RISCV64 ProcessorBind.h - Add RISCV64 to Makefiles Signed-off-by: Nikita Ermakov <sh1r4s3@mail.si-head.nl> Ack-by: Liming Gao <gaoliming@byosoft.com.cn> Acked-by: Abner Chang <abner.chang@hpe.com>
* MdeModulePkg/XhciDxe: Fix Broken TimeoutsPatrick Henz2020-09-292-28/+94
| | | | | | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2948 Timeouts in the XhciDxe driver are taking longer than expected due to the timeout loops not accounting for code execution time. As en example, 5 second timeouts have been observed to take around 36 seconds to complete. Use SetTimer and Create/CheckEvent from Boot Services to determine when timeout occurred. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Patrick Henz <patrick.henz@hpe.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* Readme.rst: Add EmulatorPkg SECURE_BOOT_ENABLE CI statusMichael D Kinney2020-09-281-0/+18
| | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=2979 Add CI status badges for the EmulatorPkg CI builds with SECURE_BOOT_ENABLE=TRUE for IA32/X64 and DEBUG/RELEASE/NOOPT. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Divneil Rai Wadhawan <divneil.r.wadhawan@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Sean Brogan <sean.brogan@microsoft.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* EmulatorPkg: Add CI build for SECURE_BOOT_ENABLEMichael D Kinney2020-09-283-1/+89
| | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=2979 Add EmulatorPkg CI builds for SECURE_BOOT_ENABLE=TRUE for IA32/X64 and DEBUG/RELEASE/NOOPT. Label these as FULL builds, so if additional build options are added in the future, they can be added to these FULL builds. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Divneil Rai Wadhawan <divneil.r.wadhawan@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Sean Brogan <sean.brogan@microsoft.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* IntelFsp2Pkg GenCfgOpt.py: Initialize IncLines as empty listgaoliming2020-09-251-0/+1
| | | | | | | | | | | IncLines as empty list for the case when InputHeaderFile is not specified. Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Star Zeng <star.zeng@intel.com> Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Chasel Chiu <chasel.chiu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* BaseTools: Set section alignment as zero if its type is AutoBob Feng2020-09-252-16/+2
| | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2881 Currently, the build tool try to read the section alignment from efi file if the section alignment type is Auto. If there is no efi generated, the section alignment will be set to zero. This behavior causes the Makefile to be different between the full build and the incremental build. Since the Genffs can auto get the section alignment from efi file during Genffs procedure, the build tool can just set section alignment as zero. This change can make the autogen makefile consistent for the full build and the incremental build. Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Yuwei Chen<yuwei.chen@intel.com>
* BaseTools: Remove CanSkip calling for incremental buildBob Feng2020-09-251-3/+0
| | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2978 If a module add a new PCD, the pcd token number will be reassigned. The new Pcd token number should be updated to all module's autogen files. CanSkip can only detect a single module's change but not others. CanSkip block the pcd token number update in incremental build, so this patch is going to remove this call. Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Yuwei Chen<yuwei.chen@intel.com>
* BaseTools: Normalize case of pathname when evaluating Macros.Mingyue Liang2020-09-251-2/+4
| | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2880 Currently, When doing the Incremental build, the directory macros extended to absolute path in output Makefile, which is inconsistent with the output of Clean build. When we do macro replacement, we can't replace macro due to inconsistent path case, which results in inconsistent display of incremental build and clean build in makefile.Therefore, the path is converted to achieve the correct macro replacement. Signed-off-by: Mingyue Liang <mingyuex.liang@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Yuwei Chen <yuwei.chen@intel.com>
* BaseTools: Clean the ffs folder before generating files in itBob Feng2020-09-251-0/+3
| | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2965 The content in Guid.xref depends on the files under the corresponding ffs folder.(refer to the commit 5e9256cd7f54ffd6f1fd9837df92a911fcd2d7c2) To make Guid.xref update in the incremental build, clean the files under that ffs folder before generating files in it. Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Yuwei Chen<yuwei.chen@intel.com>
* BaseTools: Add included files to deps_target file.Mingyue Liang2020-09-251-3/+1
| | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2882 After changing the name of the include source file, when doing incremental build, the previous source file is not covered in the. DEPs file, and a build error occurs. The root cause is that the build tools filter out some dependency files, which are listed in inf source section, from the deps_target file. Add those files back to deps_target file to resolve the above problem. Signed-off-by: Mingyue Liang <mingyuex.liang@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Yuwei Chen <yuwei.chen@intel.com>
* EmulatorPkg/host: fix overflow in Multwenyi,xie via groups.io2020-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2947 When calculating memory regions and store the information in the gSystemMemory in file WinHost.c, the code below will cause overflow, because _wtoi (MemorySizeStr) return an int value and SIZE_1MB is also an int value, if MemorySizeStr is lager for example 2048, then result of multiplication will overflow. for (Index = 0, Done = FALSE; !Done; Index++) { // // Save the size of the memory and make a Unicode filename SystemMemory00 // gSystemMemory[Index].Size = _wtoi (MemorySizeStr) * SIZE_1MB; Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com>
* OvmfPkg/README: HTTPS Boot: describe host-side TLS cipher suites forwardingLaszlo Ersek2020-09-221-9/+15
| | | | | | | | | | | | | | | | | | | | | | | In QEMU commit range 4abf70a661a5..69699f3055a5 (later fixed up in QEMU commit 4318432ccd3f), Phil implemented a QEMU facility for exposing the host-side TLS cipher suite configuration to OVMF. The purpose is to control the permitted ciphers in the guest's UEFI HTTPS boot. This complements the forwarding of the host-side crypto policy from the host to the guest -- the other facet was the set of CA certificates (for which p11-kit patches had been upstreamed, on the host side). Mention the new command line options in "OvmfPkg/README". Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Cc: Gary Lin <glin@suse.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2852 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Gary Lin <glin@suse.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200922091827.12617-1-lersek@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
* .mailmap: add entries for Rebecca CranLaszlo Ersek2020-09-221-0/+2
| | | | | | | | | | | | ... for git-shortlog purposes. NOTE: this patch does not introduce a cross-domain mapping; it only maps both email addresses of Rebecca to the full name "Rebecca Cran". Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Cc: Rebecca Cran <rebecca@bsdio.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Rebecca Cran <rebecca@bsdio.com>
* .mailmap: add (another) entry for Liming GaoLaszlo Ersek2020-09-221-0/+1
| | | | | | | | | | | | | ... for git-shortlog purposes. NOTE: this patch does not introduce a cross-domain mapping; it only maps the name "gaoliming" in Liming's new email address to "Liming Gao" (see the Author field on commit aad9cba85fb7). Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* .mailmap: add entry for Matt DeVillierLaszlo Ersek2020-09-221-0/+1
| | | | | | | | | ... for git-shortlog purposes. Cc: Matt DeVillier <matt.devillier@gmail.com> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Matt DeVillier <matt.devillier@gmail.com>
* .mailmap: add entry for Wei6 XuLaszlo Ersek2020-09-221-0/+1
| | | | | | | | | ... for git-shortlog purposes. Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Cc: Wei6 Xu <wei6.xu@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Wei6 Xu <wei6.xu@intel.com>
* .mailmap: add entry for Zhiguang LiuLaszlo Ersek2020-09-221-0/+1
| | | | | | | | | ... for git-shortlog purposes. Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Zhiguang Liu <zhiguang.liu@intel.com>
* .mailmap: add entry for Tom LendackyLaszlo Ersek2020-09-221-0/+1
| | | | | | | | | ... for git-shortlog purposes. Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
* .mailmap: add entry for Zhichao GaoLaszlo Ersek2020-09-221-0/+1
| | | | | | | | | ... for git-shortlog purposes. Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Zhichao Gao <zhichao.gao@intel.com>
* EmulatorPkg: Add RngLib to satisfy dependency of OpensslLibDivneil Rai Wadhawan2020-09-211-0/+1
| | | | | | | | | | | * Recently, OpensslLib [LibraryClasses] has been changed to include RngLib which causes the SECURE_BOOT_ENABLE build to fail in want of RngLib * This patch adds the RngLib for OpensslLib Signed-off-by: Divneil Rai Wadhawan <divneil.r.wadhawan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* EmulatorPkg: Enable support for Secure BootDivneil Rai Wadhawan2020-09-182-2/+49
| | | | | | | | | | | SECURE_BOOT_ENABLE feature flag is introduced to enable Secure Boot. The following gets enabled with this patch: * Secure Boot Menu in "Device Manager" for enrolling keys * Storage space for Authenticated Variables * Authenticated execution of 3rd party images Signed-off-by: Divneil Rai Wadhawan <divneil.r.wadhawan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* MdeModulePkg/NonDiscoverablePciDeviceDxe: Add NULL pointer checkJeff Brasen2020-09-181-0/+4
| | | | | | | | Add check for NULL HostAddress in AllocateBuffer as required by UEFI specification. Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* CryptoPkg: OpensslLib: Use RngLib to generate entropy in rand_poolMatthew Carlson2020-09-188-337/+68
| | | | | | | | | | | | | | | | | | Ref: https://github.com/tianocore/edk2/pull/845 Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1871 Changes OpenSSL to no longer depend on TimerLib and instead use RngLib. This allows platforms to decide for themsevles what sort of entropy source they provide to OpenSSL and TlsLib. Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Xiaoyu Lu <xiaoyux.lu@intel.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com> Signed-off-by: Matthew Carlson <matthewfcarlson@gmail.com>
* ArmVirtPkg: Add RngLib based on TimerLib for CryptoPkgMatthew Carlson2020-09-181-0/+1
| | | | | | | | | | | | | | | | | | Updates the DSC for the ArmVirtPkg platform to add a RngLib that uses the TimerLib. This is due to a later change that adds TimerLib as a dependency for OpenSSL. The TimerLib based RngLib mimics the behavior of OpenSSL previously and it is recommended to switch to a better source of entropy than the system's performance counter. Ref: https://github.com/tianocore/edk2/pull/845 Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1871 Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Cc: Leif Lindholm <leif@nuviainc.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Matthew Carlson <matthewfcarlson@gmail.com>
* OvmfPkg: Add RngLib based on TimerLib for CryptoMatthew Carlson2020-09-185-0/+5
| | | | | | | | | | | | | | | | | | | | Updates the DSC's for Ovmf based platforms to add a RngLib that uses the TimerLib. This is due to a later change that adds TimerLib as a dependency for OpenSSL. The TimerLib based RngLib mimics the behavior of OpenSSL previously and it is recommended to switch to a better source of entropy than the system's performance counter. Ref: https://github.com/tianocore/edk2/pull/845 Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1871 Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Cc: Anthony Perard <anthony.perard@citrix.com> Cc: Julien Grall <julien@xen.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Matthew Carlson <matthewfcarlson@gmail.com>
* MdePkg: BaseRngLibDxe: Add RngLib that uses RngDxeMatthew Carlson2020-09-184-1/+255
| | | | | | | | | | | | | | | | This adds a RngLib that uses the RngProtocol to provide randomness. This means that the RngLib is meant to be used with DXE_DRIVERS. Ref: https://github.com/tianocore/edk2/pull/845 Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1871 Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Matthew Carlson <matthewfcarlson@gmail.com>
* MdePkg: TimerRngLib: Added RngLib that uses TimerLibMatthew Carlson2020-09-184-1/+242
| | | | | | | | | | | | | | | | | | Added a new RngLib that provides random numbers from the TimerLib using the performance counter. This is meant to be used for OpenSSL to replicate past behavior. This should not be used in production as a real source of entropy. Ref: https://github.com/tianocore/edk2/pull/845 Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1871 Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Matthew Carlson <matthewfcarlson@gmail.com>
* MdePkg: Correct EFI_BLOCK_IO_PROTOCOL_REVISION3 valueMichael Kubacki2020-09-181-1/+1
| | | | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2961 The value of EFI_BLOCK_IO_PROTOCOL_REVISION3 is currently 0x00020031. However, the value assigned in the UEFI Specification 2.8B is ((2<<16) | (31)) which is 0x0002001F. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Zhiguang Liu <zhiguang.liu@intel.com>
* OvmfPkg: drop redundant VendorID check in VirtioMmioDeviceLibLeif Lindholm2020-09-171-15/+0
| | | | | | | | | | | | | | | | | | | | | | There is a DEBUG warning printout in VirtioMmioDeviceLib if the current device's VendorID does not match the traditional 16-bit Red Hat PCIe vendor ID used with virtio-pci. The virtio-mmio vendor ID is 32-bit and has no connection to the PCIe registry. Most specifically, this causes a bunch of noise when booting an AArch64 QEMU platform, since QEMU's virtio-mmio implementation used 'QEMU' as the vendor ID: VirtioMmioInit: Warning: The VendorId (0x554D4551) does not match the VirtIo VendorId (0x1AF4). Drop the warning message. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Signed-off-by: Leif Lindholm <leif@nuviainc.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* UefiPayloadPkg: Support variable size MMCONF spaceMarcello Sylvester Bauer2020-09-163-1/+5
| | | | | | | | | | | | | | | | | | | | | The default size is still 256MiB, but will be overwritten by UefiPayloadPkg with the real MMCONF size. e.g.: On embedded AMD platforms the MMCONF window size is usually only 64MiB. Fixes crash on platforms not exposing 256 buses. Tested on: * AMD Stoney Ridge Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Signed-off-by: Marcello Sylvester Bauer <marcello.bauer@9elements.com> Cc: Patrick Rudolph <patrick.rudolph@9elements.com> Cc: Christian Walter <christian.walter@9elements.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com>
* MdePkg: PciExpressLib support variable size MMCONFMarcello Sylvester Bauer2020-09-168-114/+584
| | | | | | | | | | | | | Add support for arbitrary sized MMCONF by introducing a new PCD. Add a return value to point out invalid PCI addresses. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Signed-off-by: Marcello Sylvester Bauer <marcello.bauer@9elements.com> Cc: Patrick Rudolph <patrick.rudolph@9elements.com> Cc: Christian Walter <christian.walter@9elements.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* UefiPayloadPkg: Store the size of the MMCONF windowPatrick Rudolph2020-09-162-0/+4
| | | | | | | | | | | | | | | Store the real size of the Pcie Memory Mapped Address Space. This change is necessary to support variable size of MMCONF spaces. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Signed-off-by: Marcello Sylvester Bauer <marcello.bauer@9elements.com> Cc: Patrick Rudolph <patrick.rudolph@9elements.com> Cc: Christian Walter <christian.walter@9elements.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Guo Dong <guo.dong@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Maurice Ma <maurice.ma@intel.com>
* SecurityPkg/PeiTpmMeasurementLib: remove gEfiTpmDeviceSelectedGuidQi Zhang2020-09-161-2/+1
| | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2963 Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Signed-off-by: Qi Zhang <qi1.zhang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* IntelFsp2WrapperPkg: remove gPeiTpmInitializationDonePpiGuid from DepexQi Zhang2020-09-162-4/+2
| | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2963 Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Cc: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Qi Zhang <qi1.zhang@intel.com> Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
* BaseTools: update IASL extdep to more modern versionMatthew Carlson2020-09-161-3/+3
| | | | | | | | | | | | | | | The IASL extdep is used for CI only and a recent fork of the ACPICA repo was made to make nuget builds more regular and easier to audit. https://dev.azure.com/projectmu/_git/acpica Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Matthew Carlson <matthewfcarlson@gmail.com>
* UefiCpuPkg/RegisterCpuFeaturesLib: Support MpServices2 only case.Chasel Chiu2020-09-143-44/+28
| | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2883 MpServices Ppi can be replaced by MpServices2 Ppi and MpServices2 Ppi is mandatory for RegisterCpuFeaturesLib functionality, basing on this we can drop MpServices Ppi usage from the library and the constraint that both Ppis must be installed. Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Chasel Chiu <chasel.chiu@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* EmulatorPkg:Change DEC_VERSION to DEC_SPECIFICATIONWenyi Xie2020-09-141-1/+1
| | | | | | | | | | | | | edk2 DEC specification document only knows about DEC_SPECIFICATION, so using DEC_VERSION in [Defines] section in EmulatorPkg.dec is not correct. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* UefiPayloadPkg:Remove x86 legacy UART defaultsGuo Dong2020-09-092-2/+2
| | | | | | | | | | | | The BaseSerialPortLib16550 does fallback to a fixed address UART defined by PcdSerialRegisterBase and does not initialize if it is zero. Do not assume a serial port at 0x3F8, otherwise it could cause errors during initialization of a non-existent serial port on non legacy platforms. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Signed-off-by: Marcello Sylvester Bauer <marcello.bauer@9elements.com> Reviewed-by: Maurice Ma <maurice.ma@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com>