summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-10-24DynamicTablesPkg: HOWTO for Handcrafted tablesJose Marinho1-0/+120
Update the DynamicTablesPkg documentation to explain how to specify ACPI tables in RAW format, or when there are no defined table generators. Cc: Sami Mujawar <Sami.Mujawar@arm.com> Cc: Pierre Gondois <pierre.gondois@arm.com> Cc: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@arm.com> Signed-off-by: Jose Marinho <jose.marinho@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2023-10-24RedfishPkg/RedfishDiscoverDxe: remove Redfish false alarmNickle Wang1-6/+10
- It is expected that caller receives EFI_NO_MAPPING status when call issues Configure() to unconfigured network interface. Remove this false alarm in GetSubnetInfo() function. - Fix typos Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
2023-10-24RedfishPkg/RedfishPlatformConfigDxe: add debug message.Nickle Wang1-1/+122
Add debug prints to show HII option name when assert happens. This helps developer to debug assert issue easily while Redfish failed to convert HII value to Redfish value. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
2023-10-23IntelFsp2WrapperPkg: CI: Add PrEval entryJoey Vagedes1-0/+3
Adds a PrEval entry to the package's ci.yaml file which is used to verify if the package uses a particular library instance when that library instance file (INF) is updated. When a library instance file (INF) is updated, PrEval will review each package's DSC as described in the ci.yaml file to determine if the package uses said library instance. If the package does use the library instance, it will be built and tested to ensure the package is not broken from the change. Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Duggapu Chinni B <chinni.b.duggapu@intel.com> Cc: Chen Gang C <gang.c.chen@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Ted Kuo <ted.kuo@intel.com> Cc: Ashraf Ali S <ashraf.ali.s@intel.com> Cc: Susovan Mohapatra <susovan.mohapatra@intel.com> Signed-off-by: Joey Vagedes <joeyvagedes@gmail.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2023-10-23MdeModulePkg: CI: Add PrEval entryJoey Vagedes1-0/+3
Adds a PrEval entry to the package's ci.yaml file which is used to verify if the package uses a particular library instance when that library instance file (INF) is updated. When a library instance file (INF) is updated, PrEval will review each package's DSC as described in the ci.yaml file to determine if the package uses said library instance. If the package does use the library instance, it will be built and tested to ensure the package is not broken from the change. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Joey Vagedes <joeyvagedes@gmail.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2023-10-23MdePkg: CI: Add PrEval entryJoey Vagedes1-0/+3
Adds a PrEval entry to the package's ci.yaml file which is used to verify if the package uses a particular library instance when that library instance file (INF) is updated. When a library instance file (INF) is updated, PrEval will review each package's DSC as described in the ci.yaml file to determine if the package uses said library instance. If the package does use the library instance, it will be built and tested to ensure the package is not broken from the change. 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: Joey Vagedes <joeyvagedes@gmail.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2023-10-23PrmPkg: CI: Add PrEval entryJoey Vagedes1-0/+3
Adds a PrEval entry to the package's ci.yaml file which is used to verify if the package uses a particular library instance when that library instance file (INF) is updated. When a library instance file (INF) is updated, PrEval will review each package's DSC as described in the ci.yaml file to determine if the package uses said library instance. If the package does use the library instance, it will be built and tested to ensure the package is not broken from the change. Cc: Michael Kubacki <mikuback@linux.microsoft.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Joey Vagedes <joeyvagedes@gmail.com> Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2023-10-23RedfishPkg: CI: Add PrEval entryJoey Vagedes1-0/+3
Adds a PrEval entry to the package's ci.yaml file which is used to verify if the package uses a particular library instance when that library instance file (INF) is updated. When a library instance file (INF) is updated, PrEval will review each package's DSC as described in the ci.yaml file to determine if the package uses said library instance. If the package does use the library instance, it will be built and tested to ensure the package is not broken from the change. Cc: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Signed-off-by: Joey Vagedes <joeyvagedes@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com
2023-10-23IntelFsp2Pkg: CI: Add PrEval entryJoey Vagedes1-0/+3
Adds a PrEval entry to the package's ci.yaml file which is used to verify if the package uses a particular library instance when that library instance file (INF) is updated. When a library instance file (INF) is updated, PrEval will review each package's DSC as described in the ci.yaml file to determine if the package uses said library instance. If the package does use the library instance, it will be built and tested to ensure the package is not broken from the change. Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Duggapu Chinni B <chinni.b.duggapu@intel.com> Cc: Ray Han Lim Ng <ray.han.lim.ng@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Ted Kuo <ted.kuo@intel.com> Cc: Ashraf Ali S <ashraf.ali.s@intel.com> Cc: Susovan Mohapatra <susovan.mohapatra@intel.com> Signed-off-by: Joey Vagedes <joeyvagedes@gmail.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2023-10-23FmpDevicePkg: CI: Add PrEval entryJoey Vagedes1-0/+3
Adds a PrEval entry to the package's ci.yaml file which is used to verify if the package uses a particular library instance when that library instance file (INF) is updated. When a library instance file (INF) is updated, PrEval will review each package's DSC as described in the ci.yaml file to determine if the package uses said library instance. If the package does use the library instance, it will be built and tested to ensure the package is not broken from the change. Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Cc: Wei6 Xu <wei6.xu@intel.com> Signed-off-by: Joey Vagedes <joeyvagedes@gmail.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2023-10-23EmbeddedPkg: CI: Add PrEval entryJoey Vagedes1-0/+3
Adds a PrEval entry to the package's ci.yaml file which is used to verify if the package uses a particular library instance when that library instance file (INF) is updated. When a library instance file (INF) is updated, PrEval will review each package's DSC as described in the ci.yaml file to determine if the package uses said library instance. If the package does use the library instance, it will be built and tested to ensure the package is not broken from the change. Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Abner Chang <abner.chang@amd.com> Cc: Daniel Schaefer <git@danielschaefer.me> Signed-off-by: Joey Vagedes <joeyvagedes@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
2023-10-23DynamicTablesPkg: CI: Add PrEval entryJoey Vagedes1-0/+3
Adds a PrEval entry to the package's ci.yaml file which is used to verify if the package uses a particular library instance when that library instance file (INF) is updated. When a library instance file (INF) is updated, PrEval will review each package's DSC as described in the ci.yaml file to determine if the package uses said library instance. If the package does use the library instance, it will be built and tested to ensure the package is not broken from the change. Cc: Sami Mujawar <Sami.Mujawar@arm.com> Cc: Alexei Fedorov <Alexei.Fedorov@arm.com> Cc: Pierre Gondois <pierre.gondois@arm.com> Signed-off-by: Joey Vagedes <joeyvagedes@gmail.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2023-10-23CryptoPkg: CI: Add PrEval entryJoey Vagedes1-0/+3
Adds a PrEval entry to the package's ci.yaml file which is used to verify if the package uses a particular library instance when that library instance file (INF) is updated. When a library instance file (INF) is updated, PrEval will review each package's DSC as described in the ci.yaml file to determine if the package uses said library instance. If the package does use the library instance, it will be built and tested to ensure the package is not broken from the change. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Signed-off-by: Joey Vagedes <joeyvagedes@gmail.com> Reviewed-by: Yi Li <yi1.li@intel.com>
2023-10-23UnitTestFrameworkPkg: CI: Add PrEval entryJoey Vagedes1-0/+3
Adds a PrEval entry to the package's ci.yaml file which is used to verify if the package uses a particular library instance when that library instance file (INF) is updated. When a library instance file (INF) is updated, PrEval will review each package's DSC as described in the ci.yaml file to determine if the package uses said library instance. If the package does use the library instance, it will be built and tested to ensure the package is not broken from the change. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Michael Kubacki <mikuback@linux.microsoft.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Signed-off-by: Joey Vagedes <joeyvagedes@gmail.com> Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-10-23Edk2: edk2-pytools: Update to latest versionsJoey Vagedes1-2/+2
Update to the latest versions of edk2-pytool-extensions and edk2-pytool-library. This introduces a new policy to stuart_pr_eval which, when a change in an INF occurs, will mark any associated DSC that uses this INF to be built during CI. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Michael Kubacki <mikuback@linux.microsoft.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Joey Vagedes <joeyvagedes@gmail.com> Reviewed-by: Michael Kubacki <mikuback@linux.microsoft.com>
2023-10-23DynamicTablesPkg/AmlLib: Enumerate memory attributesJeshua Smith4-14/+56
AmlCodeGenRdQWordMemory's and AmlCodeGenRdDWordMemory's Cacheable and MemoryRangeType parameters treat specific values as having specific meanings as defined by the spec. This change adds enums to map those meanings to their corresponding values. Signed-off-by: Jeshua Smith <jeshuas@nvidia.com> Acked-by: Leif Lindholm <quic_llindhol@quicinc.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2023-10-23DynamicTablesPkg/TableHelperLib: Enhance error handlingJeshua Smith1-14/+33
This patch enhances error handling and reporting in the CM ObjectParser. Specifically: 1. ObjectIDs used as array indexes are checked for being out of bounds, and if so an error message is printed before the assert. 2. An error message is printed for unsupported NameSpaceIDs. 3. Adds support for unimplemented parsers by allowing IDs to list a NULL parser, resulting in an unimplemented message being printed. Signed-off-by: Jeshua Smith <jeshuas@nvidia.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2023-10-23DynamicTablesPkg/TableHelperLib: Fix and improve text handlingJeshua Smith1-33/+143
This fixes two bugs and adds some enhancements to the handling of characters and strings in objects being printed by the CM ObjectParser. Bug fixes: 1. PrintOemID() currently attempts to print characters with "%C", but the correct syntax is (lowercase) "%c". This bug results in "CCCCCC" being printed instead of the actual ASCII characters. 2. PrintString() is being passed a pointer to data in objects, but in some cases this data is the actual string to print and other cases it is a pointer to the string to print. This adds a PrintStringPtr function and uses the correct functions depending on the situation. Enhancements: 1. Some objects contain ASCII characters, which are currently printed as their hex values. This adds functions to print out ASCII character fields as text rather than hex, and uses those functions in several cases where the object data is defined to be ASCII. 2. The PrintOemID() function is replaced with the new identical but more generecically-named PrintChar6() function. Signed-off-by: Jeshua Smith <jeshuas@nvidia.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2023-10-20EmbeddedPkg/NorFlashInfoLib: Update norflash device listJohn Chew1-1/+10
Update Gigadevice norflash list: gd25q16, gd25q32, gd25q64, gd25lq64c, gd25q128, gd25lq128, gd25q256 Add Silicon Kaiser norflash list: sk25lp128 Signed-off-by: John Chew <yuinyee.chew@starfivetech.com> Acked-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-10-20Maintainers.txt: Stop to be reviewer of several modulesNi, Ray1-4/+0
Remove my name from reviewer list of following modules: * MdeModulePkg: Console and Graphics modules * MdeModulePkg: Reset modules * MdeModulePkg: Serial modules * MdeModulePkg: Universal Payload definitions Signed-off-by: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Gua Guo <gua.guo@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
2023-10-19MdePkg/Test: Add DevicePathLib host test moduleMateusz Albecki6-1/+1073
This commit adds host-based unit tests for device path lib. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@bysoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Mateusz Albecki <mateusz.albecki@intel.com> Reviewed-by: Michael D Kinney <Michael.d.kinney@intel.com>
2023-10-19MdePkg/UefiDevicePathLib: Fix AcpiEx print logicMateusz Albecki1-27/+45
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4555 Add logic that checks if the code doesn't overflow ACPI_EXTENDED_HID_DEVICE_PATH node when searching for optional strings. If the string is not provided in the device path node default value of "\0" is used. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@bysoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Mateusz Albecki <mateusz.albecki@intel.com> Reviewed-by: Michael D Kinney <Michael.d.kinney@intel.com>
2023-10-19OvmfPkg/VirtioFsDxe: tolerate opening an abs. pathname rel. to a reg. fileLaszlo Ersek1-3/+14
Referring to a file relative to a regular file makes no sense (or at least it cannot be implemented consistently with how a file is referred to relative to a directory). VirtioFsSimpleFileOpen() has enforced this strictly since the beginning, and a few months ago I reported USWG Mantis ticket #2367 [1] too, for clearing up the related confusion in the UEFI spec. Unfortunately, the shim boot loader contains such a bug [2] [3]. I don't believe the shim bug is ever going to be fixed. We can however relax the check in VirtioFsSimpleFileOpen() a bit: if the pathname that's being opened relative to a regular file is absolute, then the base file is going to be ignored anyway, so we can let the caller's bug slide. This happens to make shim work. Why this matters: UEFI-bootable Linux installer ISOs tend to come with shim and grub in the embedded (ElTorito) FAT image (ESP). Sometimes you want to build upstream shim/grub binaries, but boot the same ISO otherwise. The fastest way for overriding the ESP for this purpose is to copy its original contents to a virtio filesystem, then overwrite the shim and grub binaries from the host side. Note that this is different from direct-booting a kernel (via fw_cfg); the point is to check whether the just-built shim and grub are able to boot the rest of the ISO. [1] https://mantis.uefi.org/mantis/view.php?id=2367 [2] https://bugzilla.redhat.com/show_bug.cgi?id=1966973 [3] https://github.com/rhboot/shim/issues/382 Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20231018172434.91280-1-lersek@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Gerd Hoffmann <kraxel@redhat.com>
2023-10-18BaseTools: trim warning to errorYuwei Chen1-2/+2
As the error is changed to warning, Trim.py will skip the build error when the source code have exactly issue. This patch change warning to error to opens the checking. Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
2023-10-18EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib classLaszlo Ersek1-15/+0
The RealTimeClockLib class header in edk2 mistakenly declares a function called LibRtcVirtualNotifyEvent(). No component ever calls this function crossing module boundaries; all RealTimeClockLib instances in edk2 and edk2-platforms are supposed to register (and do register) their SetVirtualAddressMap() notification functions. At this point, the word "LibRtcVirtualNotifyEvent" no longer occurs in any of edk2, edk2-platforms, even edk2-non-osi, except the library class header proper. Remove the LibRtcVirtualNotifyEvent() function declaration. Build-tested only (with "EmbeddedPkg.dsc"). Cc: Abner Chang <abner.chang@amd.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Daniel Schaefer <git@danielschaefer.me> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20231012091057.108728-6-lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2023-10-18EmbeddedPkg/VirtualRealTimeClockLib: drop LibRtcVirtualNotifyEventLaszlo Ersek1-18/+0
The RealTimeClockLib class header in edk2 mistakenly declares a function called LibRtcVirtualNotifyEvent(). No component ever calls this function crossing module boundaries; all RealTimeClockLib instances in edk2 and edk2-platforms are supposed to register (and do register) their SetVirtualAddressMap() notification functions. In particular, VirtualRealTimeClockLib *itself* doesn't even use LibRtcVirtualNotifyEvent() -- the function is defined with an empty body, clearly in an understandable, but misguided, attempt, to conform to the (bogus) library interface. Remove the function. Build-tested only (with "RiscVVirtQemu.dsc"). Cc: Abner Chang <abner.chang@amd.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Daniel Schaefer <git@danielschaefer.me> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20231012091057.108728-5-lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2023-10-18EmbeddedPkg/TemplateRealTimeClockLib: drop LibRtcVirtualNotifyEventLaszlo Ersek1-24/+0
The RealTimeClockLib class header in edk2 mistakenly declares a function called LibRtcVirtualNotifyEvent(). No component ever calls this function crossing module boundaries; all RealTimeClockLib instances in edk2 and edk2-platforms are supposed to register (and do register) their SetVirtualAddressMap() notification functions. In particular, TemplateRealTimeClockLib *itself* doesn't even use LibRtcVirtualNotifyEvent() -- the function is defined with an empty body, clearly in an understandable, but misguided, attempt, to conform to the (bogus) library interface. Remove the function. Build-tested only (with "EmbeddedPkg.dsc"). Cc: Abner Chang <abner.chang@amd.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Daniel Schaefer <git@danielschaefer.me> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20231012091057.108728-4-lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2023-10-18ArmPlatformPkg/PL031RealTimeClockLib: hide LibRtcVirtualNotifyEventLaszlo Ersek1-2/+3
The RealTimeClockLib class header in edk2 mistakenly declares a function called LibRtcVirtualNotifyEvent(). No component ever calls this function crossing module boundaries; all RealTimeClockLib instances in edk2 and edk2-platforms are supposed to register (and do register) their SetVirtualAddressMap() notification functions. Rename LibRtcVirtualNotifyEvent() to VirtualNotifyEvent(), and make it static, in preparation for removing the LibRtcVirtualNotifyEvent() declaration from the lib class header later. Build- and boot-tested with ArmVirtQemu. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20231012091057.108728-3-lersek@redhat.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2023-10-18PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe: rename LibRtcVirtualNotifyEventLaszlo Ersek1-2/+3
PcatRealTimeClockRuntimeDxe seems to have copied the interface name LibRtcVirtualNotifyEvent() from EmbeddedPkg's RealTimeClockLib class. That's not right, for two reasons: - PcatRealTimeClockRuntimeDxe doesn't consume "EmbeddedPkg.dec" in the first place, - in EmbeddedPkg, the RealTimeClockLib class API LibRtcVirtualNotifyEvent() is about to be eliminated (it's a bogus API). Rename the LibRtcVirtualNotifyEvent() function to VirtualNotifyEvent(), and make it static. Tested with booting OVMF. Cc: Ray Ni <ray.ni@intel.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20231012091057.108728-2-lersek@redhat.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Tested-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2023-10-18RedfishPkg/RedfishDiscoverDxe: introduce PcdRedfishSendReceiveTimeoutNickle Wang3-2/+7
Introduce PCD PcdRedfishSendReceiveTimeout to RedfishDiscoverDxe driver. The SendReceiveTimeout is hard-code value in Redfish discover driver. With this PCD, platform owner can configure timeout value easily. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Igor Kulchytskyy <igork@ami.com>
2023-10-18ArmPkg/ArmPsciMpServices: Add EFI_NOT_READY returnJeff Brasen via groups.io1-1/+3
Add EFI_NOT_READY return if the CPU can not be enabled because the processor is already on. This can occur in normal use if the CPU is still being turned off from a previous call when this is called again. Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
2023-10-17UefiCpuPkg: RISC-V: MMU: Introduce a PCD for SATP modeTuan Phan3-1/+16
Introduce a PCD to control the maximum SATP mode that MMU allowed to use. This PCD helps RISC-V platform set bare or minimum SATP mode during bring up to debug memory map issue. Signed-off-by: Tuan Phan <tphan@ventanamicro.com> Reviewed-by: Dhaval Sharma <dhaval@rivosinc.com> Reviewed-by: Andrei Warkentin <andrei.warkentin@intel.com> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
2023-10-17ShellPkg: Increase PcdShellPrintBufferSize from UINT16 to UINT32Giri Mudusuru3-13/+15
Increase max buffer size to support more than 64K. Signed-off-by: Giri Mudusuru <girim@apple.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Andrew Fish <afish@apple.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
2023-10-16MdeModulePkg: UsbRndis: get rid of magic valuesMike Maslenkin2-21/+25
Replace magic values used for checking Base Class, SubClass and Protocol fields of USB Interface Descriptor. Add definitions for Base Class EFh (Miscellaneous) and RNDIS subclass. These definitions were taken from https://www.usb.org/defined-class-codes Cc: Richard Ho <richardho@ami.com> Cc: Rebecca Cran <rebecca@bsdio.com> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
2023-10-16MdeModulePkg: UsbNetwork: fix Ethernet functional descriptor processingMike Maslenkin5-5/+7
This patch fixes wrong condition because of UINT16 value to integer promotion. NumberMcFilters is UINT16 value, so when bitwise shift operator applied to small integer type, the operation is preceded by integral promotion. This is described in MISRA-C:2004 guideline as Rule 10.5: "If the bitwise operators ~ and << are applied to an operand of underlying type unsigned char or unsigned short, the result shall be immediately cast to the underlying type of the operand." A simple fix for this issue would be the following: if ((UINT16)(UsbEthFunDescriptor.NumberMcFilters << 1) == 0) But this patch proposes to use bitwise AND operation with a proper bit mask rather than shifting to prevent similar mistakes in future. Cc: Richard Ho <richardho@ami.com> Cc: Rebecca Cran <rebecca@bsdio.com> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
2023-10-12UefiCpuPkg/CpuDxe: Eliminate the unused variable.YuanhaoXie1-9/+7
This change does not introduce any functional modifications. Remove the unused mValidMtrrAddressMask and mValidMtrrBitsMask. Reviewed-by: Ray Ni <ray.ni@intel.com> Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Ray Ni <ray.ni@intel.com>
2023-10-12CryptoPkg: Add CryptAes functions based on Mbedtls Add CryptAes APIS.Wenxing Hou1-0/+225
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com>
2023-10-12CryptoPkg: Add basic Readme for BaseCryptLibMbedTlsWenxing Hou1-5/+11
Update Readme for BaseCryptLibMbedTls. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com>
2023-10-12CryptoPkg: Add Mbedtls submodule in CIWenxing Hou5-2/+35
Change CI for new Mbedtls submodule. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
2023-10-12CryptoPkg: Add MD5/SHA1/SHA2 functions based on MbedtlsWenxing Hou5-5/+1130
Add MD5/SHA1/SHA256/SHA384/SHA512 APIs. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com>
2023-10-12CryptoPkg: Add Null functions for building passWenxing Hou24-0/+4086
Add Null functions to build. These feature are not supported now. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com>
2023-10-12CryptoPkg: Add all .inf files for BaseCryptLibMbedTlsWenxing Hou19-1/+1718
Add .inf files and other support files. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com>
2023-10-12CryptoPkg: Add RSA functions based on MbedtlsWenxing Hou8-0/+831
Add RSA APIs. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com>
2023-10-12CryptoPkg: Add HKDF functions based on MbedtlsWenxing Hou2-0/+564
Add HKDF APIs. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com>
2023-10-12CryptoPkg: Add HMAC functions based on MbedtlsWenxing Hou3-13/+1084
Add HMAC APIS. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
2023-10-12CryptoPkg: Add mbedtls_config and MbedTlsLib.infWenxing Hou5-0/+4760
Add MbedTlsLib support. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com>
2023-10-12CryptoPkg: Add mbedtls submodule for EDKIIWenxing Hou2-0/+3
Add mbedtls 3.3.0 as submodule in CryptoPkg. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
2023-10-11RedfishPkg: Use base version SortLib for the specific modulesAbner Chang2-3/+8
BZ #: 4566 Update Redfish modules to use the small footprint version of base SortLib by the means of module scoped subelement <LibraryClass>. With this the platform level SortLib (full version) is not impacted if Redfish.dsc.inc is included in platform DSC. Signed-off-by: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nhi Pham <nhi@os.amperecomputing.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com> Reviewed-by: Nhi Pham <nhi@os.amperecomputing.com> Tested-by: Nhi Pham <nhi@os.amperecomputing.com>
2023-10-09UefiCpuPkg/CpuDxe: Update RefreshMemoryAttributesFromMtrrRay Ni1-273/+36
Old implementation of RefreshMemoryAttributesFromMtrr directly retrieves the MTRR register content and applies the MTRR cache type to GCD database following the precedence order defined by SDM. The code can updated to simply get all the memory cache types for all memory through newly introduced API With the new introduced API MtrrGetMemoryAttributesInMtrrSettings. Benefits: 1. Remove the duplicated logic in CpuDxe driver that handles MTRR details. 2. Let the MtrrLib to handle the case when fixed MTRR is absent. (Old logic cannot handle the case.) Signed-off-by: Ray Ni <ray.ni@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
2023-10-09UefiCpuPkg/MtrrUnitTest: Add Unit test of setting/getting memoryYuanhaoXie1-6/+36
attributes Add Unit test of trrGetMemoryAttributesInMtrrSettings and MtrrSetMemoryAttributesInMtrrSettings. Signed-off-by: Ray Ni <ray.ni@intel.com> Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>