summaryrefslogtreecommitdiffstats
path: root/MdePkg
Commit message (Collapse)AuthorAgeFilesLines
* MdePkg: Introduce CcMeasurementProtocol for CC Guest firmwareMin Xu2021-12-112-0/+308
| | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3625 CC guest is a Confidential Computing guest. If CC Guest firmware supports measurement and an event is created, CC Guest firmware is designed to report the event log with the same data structure in TCG-Platform-Firmware-Profile specification with EFI_TCG2_EVENT_LOG_FORMAT_TCG_2 format. The CC Guest firmware supports measurement. It is designed to produce EFI_CC_MEASUREMENT_PROTOCOL with new GUID EFI_CC_MEASUREMENT_PROTOCOL_GUID to report event log and provides hash capability. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Ken Lu <ken.lu@intel.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Min Xu <min.m.xu@intel.com>
* MdePkg: Remove PPTT ID type structureChris Jones2021-12-101-16/+0
| | | | | | | | | | | | | Bugzilla: 3697 (https://bugzilla.tianocore.org/show_bug.cgi?id=3697) The ACPI 6.3A specification deprecated the PPTT ID type structure (type 2) therefore remove it from Acpi64.h. Mantis ID: 2072 (https://mantis.uefi.org/mantis/view.php?id=2072) Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* MdePkg: Add missing Cache ID (in)valid defineChris Jones2021-12-101-0/+2
| | | | | | | | | | | | | Bugzilla: 3697 (https://bugzilla.tianocore.org/show_bug.cgi?id=3697) Add Cache ID valid/invalid defines to Acpi64.h which were not initially added when the CacheIdValid field was added to EFI_ACPI_6_4_PPTT_STRUCTURE_CACHE_FLAGS. Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* MdePkg/GHCB: increase the GHCB protocol max versionBrijesh Singh2021-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275 Now that OvmfPkg supports version 2 of the GHCB specification, bump the protocol version. Cc: Michael Roth <michael.roth@amd.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Min Xu <min.m.xu@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Erdem Aktas <erdemaktas@google.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Ray Ni <ray.ni@intel.com> Acked-by: Jiewen Yao <Jiewen.yao@intel.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
* MdePkg: Define ConfidentialComputingGuestAttrBrijesh Singh via groups.io2021-12-092-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275 While initializing APs, the MpInitLib may need to know whether the guest is running with active AMD SEV or Intel TDX memory encryption. Add a new ConfidentialComputingGuestAttr PCD that can be used to query the memory encryption attribute. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Michael Roth <michael.roth@amd.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Min Xu <min.m.xu@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Erdem Aktas <erdemaktas@google.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Ray Ni <ray.ni@intel.com> Suggested-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
* MdePkg: Apply uncrustify changesMichael Kubacki2021-12-07975-57957/+55848
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the MdePkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg: Change complex DEBUG_CODE() to DEBUG_CODE_BEGIN/END()Michael D Kinney2021-12-071-2/+2
| | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3767 Update use of DEBUG_CODE(Expression) if Expression is a complex code block with if/while/for/case statements that use {}. Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg: Change OPTIONAL keyword usage styleMichael D Kinney2021-12-0787-469/+450
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3760 Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params. Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg: Change use of EFI_D_* to DEBUG_*Michael D Kinney2021-12-076-31/+29
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3739 Update all use of EFI_D_* defines in DEBUG() macros to DEBUG_* defines. Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg: Update YAML to ignore specific ECC files/errorsMichael D Kinney2021-11-301-1/+33
| | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3749 Update package YAML files to ignore ECC errors that are already present. These issues must be fixed in the future, but should not block source code changes for these known issues. Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg: Fix ACPI memory aggregator/device type mismatchChris Jones2021-11-097-21/+21
| | | | | | | | | | | | | Bugzilla: 3578 (https://bugzilla.tianocore.org/show_bug.cgi?id=3579) Since the Common Memory Device (formerly Memory Aggregator Device) was introduced in ACPI 5.0, the edk2 type values have not matched the values defined in the ACPI specification. Fix this discrepancy by aligning the code to match the specification. Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg: Reproduce builds across source format changesMichael D Kinney2021-11-082-24/+24
| | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3688 * Use DEBUG_LINE_NUMBER instead of __LINE__. * Use DEBUG_EXPRESSION_STRING instead of #Expression. Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Tested-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg/Include: Enhance DebugLib to support reproduce buildsMichael D Kinney2021-11-081-4/+39
| | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3688 * Add DEBUG_LINE_NUMBER define to DebugLib.h that is by default mapped to __LINE__. A build can define DEBUG_LINE_NUMBER to use a fixed value. * Add DEBUG_EXPRESSION_STRING(Expression) macros to DebugLib.h that is by default mapped to #Expression. A build can define DEBUG_EXPRESSION_STRING_VALUE to set all expression strings to a fixed string value. Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Tested-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg Cpuid.h: Define CPUID.(EAX=7,ECX=0):EDX[30]Zeng, Star2021-10-281-2/+2
| | | | | | | | | | | | This patch follows new Intel SDM to define CPUID.(EAX=7,ECX=0):EDX[30]. Signed-off-by: Star Zeng <star.zeng@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: Ray Ni <ray.ni@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Ray Ni <ray.ni@intel.com>
* MdePkg: Add PcdPciMmio32(64)Translation PCDsAbner Chang2021-10-141-0/+8
| | | | | | | | | | | | | | | | | | | | | | PcdPciMmio32Translation and PcdPciMmio64Translation PCDs are added to MdePkg as the common PCDs for ARM and RSIC-V archs. The one under ArmPkg is removed in the next patch. Signed-off-by: Abner Chang <abner.chang@hpe.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: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Daniel Schaefer <daniel.schaefer@hpe.com> Cc: Sunil V L <sunilvl@ventanamicro.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Daniel Schaefer <daniel.schaefer@hpe.com> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
* MdePkg: Add PcdPciIoTranslation PCDAbner Chang2021-10-141-0/+4
| | | | | | | | | | | | | | | | | | | | | This PCD is moved from ArmPkg that is used to set the base address of PCI MMIO window that provides I/O access. We relocate this PCD because this PCD is common to ARM and RSIC-V arch. Signed-off-by: Abner Chang <abner.chang@hpe.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: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Daniel Schaefer <daniel.schaefer@hpe.com> Cc: Sunil V L <sunilvl@ventanamicro.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Daniel Schaefer <daniel.schaefer@hpe.com> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
* MdePkg/BaseLib: Add QuickSort function on BaseLibIanX Kuo2021-10-134-1/+168
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3675 Add QuickSort function into BaseLib Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: IanX Kuo <ianx.kuo@intel.com>
* MdePkg: Add ProcessorUpgradeSocketLGA4677 from SMBIOS 3.5.0Zeng, Star2021-10-121-2/+5
| | | | | | | | | | This patch adds ProcessorUpgradeSocketLGA4677 definition into Smbios.h from SMBIOS 3.5.0. It also adds ProcessorUpgradeSocketLGA4189 and ProcessorUpgradeSocketLGA1200 definitions into from SMBIOS 3.4.0. Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg: CI YAML: Added new GUID to ignore duplicate listKun Qin2021-09-301-1/+2
| | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3629 SMM Communication PPI GUID from MdeModulePkg is defined the same as MM Communication PPI GUID from MdePkg, according to PI Spec v1.5 and onward. After introduction of MM Communication PPI definitions, an update in the ignore duplicate list is needed to avoid breaking CI build. 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: Kun Qin <kuqin12@gmail.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg: MmCommunication: Added definition of MM Communication PPIKun Qin2021-09-302-0/+75
| | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3629 MM Communication PPI was defined in PI Specification since v1.5. This change added definition of such PPI and related GUIDs into MdePkg. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Signed-off-by: Kun Qin <kuqin12@gmail.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg: Fix DEVICE_SECURITY_EVENT_DATA_HEADER version definitionyi1 li2021-09-291-1/+1
| | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3646 According to latest TCG PFP spec 1.05 revision 23, (https://trustedcomputinggroup.org/resource/pc-client-specific -platform-firmware-profile-specification/), 10.2.7 DEVICE_SECURITY_EVENT_DATA Structure, the version should be 1. Signed-off-by: yi1 li <yi1.li@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg:Update IndustryStandard/Nvme.h with Nvme amdin controller datazhoucheng2021-08-301-1/+10
| | | | | | | | | | | | Update Nvme data structure Signed-off-by: Cheng Zhou <zhoucheng@phytium.com.cn> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Hao A Wu <hao.a.wu@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>
* MdePkg: Fix broken coding style in Acpi64.hChris Jones2021-08-112-12/+17
| | | | | | | | | | | | | | Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) Fix a coding style issue raised by EccCheck. This issue (error code 7008) has been fixed by moving a nested union out of its structure. Also add Acpi64.h to the "IgnoreFiles" list to stop the CI flagging naming errors present prior to ACPI 64. Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* MdePkg: Add Cache ID to PPTTChris Jones2021-08-111-2/+4
| | | | | | | | | | | | Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) Make changes to ACPI 6.4 header according to the latest specification: - ACPI 6.4 January 2021, Table 5.137, Table 5.140, Table 5.141 - Mantis ID 2138 (https://mantis.uefi.org/mantis/view.php?id=2138) Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* MdePkg: Add Secure Access Components in the SDEV tableChris Jones2021-08-111-24/+56
| | | | | | | | | | | | Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) Make changes to ACPI 6.4 header according to the latest specification: - ACPI 6.4 January 2021, Section 5.2.26.1.1 - Mantis ID 2111 (https://mantis.uefi.org/mantis/view.php?id=2111) Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* MdePkg: Add the Platform Health Assessment Table (PHAT)Chris Jones2021-08-111-0/+79
| | | | | | | | | | | | Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) Make changes to ACPI 6.4 header according to the latest specification: - ACPI 6.4 January 2021, Table 5.5, Section 5.2.30 - Mantis ID 2094 (https://mantis.uefi.org/mantis/view.php?id=2094) Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* MdePkg: Add Multiprocessor Wakeup structureChris Jones2021-08-111-1/+28
| | | | | | | | | | | | Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) Make changes to ACPI 6.4 header according to the latest specification: - ACPI 6.4 January 2021, Table 5.21, Section 5.2.12.19 - Mantis ID 2087 (https://mantis.uefi.org/mantis/view.php?id=2087) Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* MdePkg: Add 'Type 5' PCC structureChris Jones2021-08-111-0/+29
| | | | | | | | | | | | Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) Make changes to ACPI 6.4 header according to the latest specification: - ACPI 6.4 January 2021, Section 14.1.7, Section 14.4 - Mantis ID 2010 (https://mantis.uefi.org/mantis/view.php?id=2010) Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* MdePkg: Add flags and MinTransferSize to Generic InitiatorChris Jones2021-08-111-3/+6
| | | | | | | | | | | | Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) Make changes to ACPI 6.4 header according to the latest specification: - ACPI 6.4 January 2021, Table 5.59, Section 5.2.27.1 & Section 5.2.27.4 - Mantis ID 1991 (https://mantis.uefi.org/mantis/view.php?id=1991) Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* MdePkg: Remove DPPT tableChris Jones2021-08-111-5/+0
| | | | | | | | | | | | Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) Make changes to ACPI 6.4 header according to the latest specification: - ACPI 6.4 January 2021, Table 5.5 - Mantis ID 2133 (https://mantis.uefi.org/mantis/view.php?id=2133) Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* MdePkg: Add SPA Location Cookie field to SPA Range structureChris Jones2021-08-111-0/+6
| | | | | | | | | | | | | | | | Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) Make changes to ACPI 6.4 header according to the latest specification: - ACPI 6.4 January 2021, Section 5.2.25.2 System Physical Address (SPA) Range Structure, Table 5.109 - Mantis ID 1988 (https://mantis.uefi.org/mantis/view.php?id=1988) Also added a blank line between #defines and structure definitions to improve readability. Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* MdePkg: Update PMTT to ACPI 6.4Chris Jones2021-08-111-42/+47
| | | | | | | | | | | | Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) Make changes to ACPI 6.4 header according to the latest specification: - ACPI 6.4 January 2021, Section 5.2.21.12 - Mantis ID 1975 (https://mantis.uefi.org/mantis/view.php?id=1975) Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* MdePkg: Rename SBSA Generic Watchdog to Arm Generic WatchdogChris Jones2021-08-111-7/+7
| | | | | | | | | | | | Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) Make changes to ACPI 6.4 header according to the latest specification: - ACPI 6.4 January 2021, Section 5.2.24, Table 5.100 & Section 5.2.24.2 - Mantis ID 2126 (https://mantis.uefi.org/mantis/view.php?id=2126) Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* MdePkg: Increment FADT versionChris Jones2021-08-111-1/+1
| | | | | | | | | | | | Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) Make changes to ACPI 6.4 header according to the latest specification: - ACPI 6.4 January 2021, Table 5-9 - Mantis ID 2105 (https://mantis.uefi.org/mantis/view.php?id=2105) Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* MdePkg: Add ACPI 6.4 header fileChris Jones2021-08-112-2/+2969
| | | | | | | | | | | | | | | | | | | | | | Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) This patch introduces a header file for the ACPI specification version 6.4. Currently it is based on the Acpi63.h header file however makes six changes: 1. Replace all occurences of "6_3"/"6.3" with "6_4/6.4". 2. Remove the trailing underscore from the header guard in accordance with the EDK2 coding standards, section 5.3.5. 3. Make Acpi64.h the latest ACPI definition included by Acpi.h. 4. Fix the BGRT Status field comment to match the ACPI 6.3A spec. 5. Fix several typos where definitions were named "PMMT" when it should be "PMTT". 6. Fix a typo: "PPTT Platform Communication Channel" should be "PDTT Platform Communication Channel". Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* MdePkg: add definition of LINUX_EFI_INITRD_MEDIA_GUIDJeff Brasen2021-08-052-0/+35
| | | | | | | | | | | | | | Add LINUX_EFI_INITRD_MEDIA_GUID to our collection of GUID definitions, it can be used in a media device path to specify a Linux style initrd that can be loaded by the OS using the LoadFile2 protocol. Move these defines to MdePkg from OvmfPkg as these are relevant to non-OVMF targets as well. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2564 Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org>
* MdePkg/BaseLib: Add MemoryFence implementation for RiscV64Abner Chang2021-07-212-1/+24
| | | | | | | | | | | Cc: Abner Chang <abner.chang@hpe.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: Leif Lindholm <leif@nuviainc.com> Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com> Reviewed-by: Abner Chang <abner.chang@hpe.com> Acked-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg/Include: Smbios Specification 3.4.0 changesgthotala2021-07-201-10/+20
| | | | | | | | | | | | | | The following changes were addressed, 1. Smbios specs 3.4.0 table-51 bit5&6, these fields moved from specific MemoryArrayLocationCXLFlexbus10AddonCard to generic MemoryArrayLocationCXLAddonCard to address both CXL1.0 and 2.0 CXL revisions. 2. Smbios specs 3.4.0 table-79, The memory technology name changed from MemoryTechnologyIntelPersistentMemory to MemoryTechnologyIntelOptanePersistentMemory. Signed-off-by: Thotala Gopi <gopi.thotala@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg/Include: Add STATIC_ASSERT for L'' and L"" stringsMichael D Kinney2021-07-091-1/+3
| | | | | | | | | | | Add STATIC_ASSERT() macros to verify that the compiler is configured correctly for the use of L'' and L"" strings. Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Bret Barkelew <bret.barkelew@microsoft.com>
* MdePkg : Add IPMI Macro and Structure Defintions to resolve build errorsmanickavasakam karpagavinayagam2021-06-302-0/+22
| | | | | | | | | | | | | | | | | Build error reported for missing structures IPMI_SET_BOOT_OPTIONS_RESPONSE, EFI_IPMI_MSG_GET_BMC_EXEC_RSP, macro EFI_FIRMWARE_GET_BMC_EXECUTION_CONTEXT EFI_FIRMWARE_BMC_IN_FULL_RUNTIME/EFI_FIRMWARE_BMC_IN_FORCED_UPDATE_MODE when using edk2-platforms\Features\Intel\OutOfBandManagement\IpmiFeaturePkg Rename EFI_IPMI_MSG_GET_BMC_EXEC_RSPB, EFI_FIRMWARE_GET_BMC_EXECUTION_CONTEXT EFI_FIRMWARE_BMC_IN_FORCED_UPDATE_MODE to IPMI_MSG_GET_BMC_EXEC_RSPB,IPMI_GET_BMC_EXECUTION_CONTEXT IPMI_BMC_IN_FORCED_UPDATE_MODE Signed-off-by: Manickavasakam Karpagavinayagam <manickavasakamk@ami.com> Reviewed-by: Isaac Oram <isaac.w.oram@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg: MmConfiguration: Added definition of MM Configuration PPIKun Qin2021-06-292-0/+65
| | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3440 MM Configuration PPI was defined in PI Specification since v1.5. This change added definition of such PPI and related GUIDs into MdePkg. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Kun Qin <kuqin12@gmail.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg: MmConfiguration: Move definition of EFI_MM_RESERVED_MMRAM_REGIONKun Qin2021-06-292-16/+16
| | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3440 The definition of EFI_MM_RESERVED_MMRAM_REGION, according to PI Spec 1.5 is also referenced in EFI_PEI_MM_CONFIGURATION_PPI. Defining this structure as is will enforce any potential usage of MM Configuration PPI interface to include <Protocol/MmConfiguration.h>. This change moves this structure definition to PiMultiPhase.h, which is already included by Protocol/MmConfiguration.h through PiMmCis.h. It also paves way for introducing Ppi/MmConfiguration.h with proper dependency. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Kun Qin <kuqin12@gmail.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg/BaseLib: Fix AsmReadSs() with GCC toolchainSatoshi Tanda2021-06-042-2/+2
| | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3405 AsmReadSs() in Ia32/GccInlinePriv.c and X64/GccInlinePriv.c return the DS segment selector value instead of SS. Signed-off-by: Satoshi Tanda <tanda.sat@gmail.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* MdePkg/MdeModulePkg: Move AML_NAME_SEG_SIZE definitionPierre Gondois2021-06-021-1/+6
| | | | | | | | | | | | | | | | | | | | A NameSeg is made 4 chars. Cf. ACPI 6.4 s20.2.2 "Name Objects Encoding": NameSeg := <leadnamechar namechar namechar namechar> Notice that NameSegs shorter than 4 characters are filled with trailing underscores (‘_’s). AML_NAME_SEG_SIZE is currently defined in: - DynamicTablesPkg/Library/Common/AmlLib/AmlDefines.h - MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.h Since the value can be inferred from the ACPI specification and to avoid multiple definitions, move it to MdePkg/Include/IndustryStandard/ Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* MdePkg: Update DBG2 and SPCR header with NVIDIA 16550 SubtypeAshish Singhal2021-06-012-0/+6
| | | | | | | | | | Add macros for NVIDIA 16550 UART specific debug port subtype in both DBG2 as well as SPCR header file. Signed-off-by: Ashish Singhal <ashishsingha@nvidia.com> Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sunny Wang <sunny.wang@arm.com>
* MdePkg: Add new 16550-compatible Serial Port Subtypes to DBG2Marcin Wojtas2021-06-012-0/+6
| | | | | | | | | | | | | | | The Microsoft Debug Port Table 2 (DBG2) specification revision May 31, 2017 adds support for 16550-compatible Serial Port Subtype with parameters defined in Generic Address Structure (GAS) [1] Reflect that in the EDK2 headers. [1] https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/acpi-debug-port-table Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sunny Wang <sunny.wang@arm.com>
* MdePkg: MmControl: Fix function and structure definition mismatchesKun Qin2021-06-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3397 Current Ppi/MmControl.h file has structure definition of "struct _PEI_MM_CONTROL_PPI". This name mismatches with its definition in PI Specification v1.7 (Errata) as "struct _EFI_PEI_MM_CONTROL_PPI". In addition, field types "PEI_MM_ACTIVATE" and "PEI_MM_DEACTIVATE" used in "struct _PEI_MM_CONTROL_PPI" mismatches with the definition of "EFI_PEI_MM_ACTIVATE" and "EFI_PEI_MM_DEACTIVATE" in the PI spec. This change fixes these mismatches by using the PI spec defined names. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Fixes: 6f33f7a262314af35e2b99c849e08928ea49aa55 Signed-off-by: Kun Qin <kuqin12@gmail.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg/BaseLib: add support for RMPADJUST instructionTom Lendacky2021-05-294-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275 The RMPADJUST instruction will be used by the SEV-SNP guest to modify the RMP permissions for a guest page. See AMD APM volume 3 for further details. Cc: James Bottomley <jejb@linux.ibm.com> Cc: Min Xu <min.m.xu@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Erdem Aktas <erdemaktas@google.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com> Message-Id: <20210519181949.6574-9-brijesh.singh@amd.com>
* MdePkg/BaseLib: add support for PVALIDATE instructionBrijesh Singh2021-05-294-0/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275 The PVALIDATE instruction validates or rescinds validation of a guest page RMP entry. Upon completion, a return code is stored in EAX, rFLAGS bits OF, ZF, AF, PF and SF are set based on this return code. If the instruction completed succesfully, the rFLAGS bit CF indicates if the contents of the RMP entry were changed or not. For more information about the instruction see AMD APM volume 3. Cc: James Bottomley <jejb@linux.ibm.com> Cc: Min Xu <min.m.xu@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Erdem Aktas <erdemaktas@google.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com> Message-Id: <20210519181949.6574-8-brijesh.singh@amd.com>
* MdePkg/Register/Amd: define GHCB macros for SNP AP creationTom Lendacky2021-05-291-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275 Version 2 of GHCB introduces NAE for creating AP when SEV-SNP is enabled in the guest VM. See the GHCB specification, Table 5 "List of Supported Non-Automatic Events" and sections 4.1.9 and 4.3.2, for further details. While at it, define the VMSA state save area that is required for creating the AP. The save area format is defined in AMD APM volume 2, Table B-4 (there is a mistake in the table that defines the size of the reserved area at offset 0xc8 as a dword, when it is actually a word). The format of the save area segment registers is further defined in AMD APM volume 2, sections 10 and 15.5. Cc: James Bottomley <jejb@linux.ibm.com> Cc: Min Xu <min.m.xu@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Erdem Aktas <erdemaktas@google.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com> Message-Id: <20210519181949.6574-7-brijesh.singh@amd.com> [lersek@redhat.com: fix typo in BZ reference]