summaryrefslogtreecommitdiffstats
path: root/MdePkg/Include
Commit message (Collapse)AuthorAgeFilesLines
* MdePkg: Improved Smbios Type9 table and Smbios spec v3.5.0 ChangesSainadh Nagolu2022-08-181-31/+40
| | | | | | | | | | In Type9 structure since PeerGroups has a variable number of entries, must not define new fields in the structure.So added an extended structure and defined new fields added after PeerGroups. Also done some improvements to Smbios 3.5.0 spec changes. Signed-off-by: Sainadh Nagolu <sainadhn@ami.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg: IORT header update for IORT Rev E.d specSami Mujawar2022-07-291-8/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bugzilla: 3458 - Add support IORT Rev E.d specification updates (https://bugzilla.tianocore.org/show_bug.cgi?id=3458) The IO Remapping Table, Platform Design Document, Revision E.d, Feb 2022 (https://developer.arm.com/documentation/den0049/) introduces the following updates, collectively including the updates and errata fixes to Rev E, Rev E.a, Rev E.b, Rev E.c: - increments the IORT table revision to 5. - updates the node definition to add an 'Identifier' field. - adds definition of node type 6 - Reserved Memory Range node. - adds definition for Memory Range Descriptors. - adds flag to indicate PRI support for root complexes. - adds flag to indicate if the root complex supports forwarding of PASID information on translated transactions to the SMMU. - adds flag to indicate if the root complex supports PASID. - adds flags to define access privilege and attributes for the memory ranges. Therefore, update the IORT header file to reflect these changes, and also rename the EFI_ACPI_IO_REMAPPING_TABLE_REVISION macro to EFI_ACPI_IO_REMAPPING_TABLE_REVISION_00. Also update the IORT generator in DynamicTablesPkg to fix the compilation errors so that Git Bisect can work. Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* NetworkPkg/HttpBootDxe: Add Support for HTTP Boot Basic AuthenticationSaloni Kasbekar2022-07-192-1/+13
| | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2504 Add support for TLS Client Authentication using Basic Authentication for HTTP Boot Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Signed-off-by: Saloni Kasbekar <saloni.kasbekar@intel.com> Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
* MdePkg/include: Update DMAR definitions to Intel VT-d spec ver4.0Robert Kowalewski2022-07-111-8/+38
| | | | | | | | | | | | | | | | | | | | | | | | | Updated DMAR definitions accordingly to changes in Intel(R) Virtualization Technology for Directed I/O (VT-D) Architecture Specification ver4.0. Added new definition of remapping structure - SIDP. The SoC Integrated Device Property (SIDP) reporting structure identifies devices that have special properties and that may put restrictions on how system software must configure remapping structures that govern such devices in a platform where remapping hardware is enabled. Updated DRHD definition - field 'reserved' is replaced with 'Size'. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3978 Signed-off-by: Robert Kowalewski <robert.kowalewski@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: Jenny Huang <jenny.huang@intel.com> Cc: Sheng Wei <w.sheng@intel.com> Reviewed-by: Sheng Wei <w.sheng@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg/Acpi62: Add bit definitions to NFIT Platform Capabilities StructureMiki Shindo2022-07-013-0/+12
| | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3915 This commit adds each capability bit definition for NFIT Platform Capabilities Structure. The type has been added since ACPI Specification Version 6.2A. Signed-off-by: Miki Shindo <miki.shindo@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> Cc: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg/Acpi62: Add type 7 NFIT Platform Capabilities Structure supportMiki Shindo2022-06-293-0/+39
| | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3915 This commit adds a definition type 7 Platform Capabilities Structure and the struct definition for NFIT Table Structure Types. The type has been added since ACPI Specification Version 6.2A. Signed-off-by: Miki Shindo <miki.shindo@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>
* MdePkg/BaseLib: Add CRC16-ANSI and CRC32c implementationsPedro Falcato2022-06-131-1/+34
| | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3871 Add the CRC16-ANSI and CRC32C implementations previously found at Features/Ext4Pkg/Ext4Dxe/Crc{16,32c}.c to BaseLib. 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: Pedro Falcato <pedro.falcato@gmail.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg: Define CC Measure EventLog ACPI TableMin Xu2022-06-031-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3853 TDVF set up an ACPI table (EFI_CC_EVENTLOG_ACPI_TABLE) to pass the event-log information. The event log created by the TD owner contains the hashes to reconstruct the MRTD and RTMR registers. Please refer to Sec 4.3.3 in blow link: https://www.intel.com/content/dam/develop/external/us/en/documents/ intel-tdx-guest-hypervisor-communication-interface-1.0-344426-002.pdf Please be noted, the definition of EFI_CC_EVENTLOG_ACPI_TABLE is a little different from the above document. This difference is based on below discussion: - https://edk2.groups.io/g/devel/message/87396 - https://edk2.groups.io/g/devel/message/87402 This change will be reflected in the next version of the above document. 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: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Min Xu <min.m.xu@intel.com>
* MdePkg: Remove RVCT supportRebecca Cran2022-05-132-43/+3
| | | | | | | | RVCT is obsolete and no longer used. Remove support for it. Signed-off-by: Rebecca Cran <quic_rcran@quicinc.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
* MdePkg: add SmmCpuRendezvousLib.h and SmmCpuRendezvousLibNull implement.Li, Zhihao2022-05-091-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | REF? https://bugzilla.tianocore.org/show_bug.cgi?id=3912 UefiCpuPkg define a new Protocol with the new services SmmWaitForAllProcessor(), which can be used by SMI handler to optionally wait for other APs to complete SMM rendezvous in relaxed AP mode. VariableSmm and VariableStandaloneMM driver in MdeModulePkg need to use this services but MdeModulePkg can't depend on UefiCpuPkg. Thus, the solution is moving SmmCpuRendezvouslib.h from UefiCpuPkg to MdePkg and creating SmmCpuRendezvousLib NullLib version implementation in MdePkg as dependency for the pkg that can't depend on UefiCpuPkg. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Michael Kubacki <mikuback@linux.microsoft.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Signed-off-by: Zhihao Li <zhihao.li@intel.com> Acked-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg: Update smbiosview type 9 with SMBIOS 3.5 fieldsBo Chang Ke2022-04-221-65/+112
| | | | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3896 update smbiosview type 9 related fileds. Signed-off-by: Bo Chang Ke <bo-changx.ke@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Cc: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg: Add CcProbeLibNullMin Xu2022-04-191-0/+26
| | | | | | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3902 CcProbeLib is used to probe the Confidential Computing guest type. This library is designed to run on SEC / PEI / DXE phases. A null instance of the library always returns CCGuestTypeNonEncrypted. A platform specific CcProbeLib will be implemented, for example, in OvmfPkg. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Min Xu <min.m.xu@intel.com>
* MdePkg: Add CC_GUEST_TYPE in ConfidentialComputingGuestAttr.hMin Xu2022-04-191-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3902 The confidential computing guest type (GUEST_TYPE) was defined in OvmfPkg/Include/WorkArea.h. Now it is to be moved to MdePkg/Include/ConfidentialComputingGuestAttr.h and renamed as CC_GUEST_TYPE. There are 2 reasons for this change. 1. CC_GUEST_TYPE is a generic definition and will be used in CcProbeLib which is defined in MdePkg. 2. Based on the latest edk2 coding style: - First character should be upper case - Must contain lower case characters - No white space characters - Global variable name must start with a 'g' As the first step CC_GUEST_TYPE is defined in this patch. In the next patch GUEST_TYPE will be deleted. This is to make sure the bisect work correctly. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Erdem Aktas <erdemaktas@google.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Min Xu <min.m.xu@intel.com>
* MdePkg: Add macro to check SEV / TDX guestMin Xu2022-04-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3429 Add macros CC_GUEST_IS_SEV / CC_GUEST_IS_TDX to check SEV / TDX guest. 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> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Min Xu <min.m.xu@intel.com>
* MdePkg: Add TdxLib to wrap Tdx operationsMin Xu2022-04-021-0/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3429 TdxLib is created with functions to perform the related Tdx operation. This includes functions for: - TdAcceptPages : Accept pending private pages and initialize the pages to all-0 using the TD ephemeral private key. - TdExtendRtmr : Extend measurement to one of the RTMR registers. - TdSharedPageMask: Get the Td guest shared page mask which indicates it is a Shared or Private page. - TdMaxVCpuNum : Get the maximum number of virtual CPUs. - TdVCpuNum : Get the number of virtual CPUs. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Erdem Aktas <erdemaktas@google.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Min Xu <min.m.xu@intel.com>
* MdePkg: Introduce basic Tdx functions in BaseLibMin Xu2022-04-021-0/+66
| | | | | | | | | | | | | | | | | | | | | | | RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3429 Introduce basic Tdx functions in BaseLib: - TdCall () - TdVmCall () - TdIsEnabled () Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Erdem Aktas <erdemaktas@google.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Min Xu <min.m.xu@intel.com>
* MdePkg: Update Cpuid.h for TdxMin Xu2022-04-021-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3429 Guest software can be designed to run either as a TD, as a legacy virtual machine, or directly on the CPU, based on enumeration of its run-time environment. [TDX-Module] Chap 10.2 defines the flow and the new CPUID leaf 0x21. [TDX-Module] Architecture Specification: Intel(R) Trust Domain Extensions Module, Chap 10.2, 344425-003US, August 2021 https://www.intel.com/content/dam/develop/external/us/en/documents/ tdx-module-1.0-public-spec-v0.931.pdf Cc: Ray Ni <ray.ni@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: Brijesh Singh <brijesh.singh@amd.com> Cc: Erdem Aktas <erdemaktas@google.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Min Xu <min.m.xu@intel.com>
* MdePkg: Add Tdx.hMin Xu2022-04-021-0/+203
| | | | | | | | | | | | | | | | | | | | RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3429 Tdx.h includes the Intel Trust Domain Extension definitions. Detailed information can be found in below document: https://software.intel.com/content/dam/develop/external/us/en/ documents/tdx-module-1eas-v0.85.039.pdf Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Min Xu <min.m.xu@intel.com>
* MdePkg/AcpiXX.h: Update Error Severity type for Generic Error Status BlockHao A Wu2022-03-218-14/+52
| | | | | | | | | | | | | | | | | | | | | | | | | Starting from ACPI Specification Version 5.1 Errata B, the term 'Correctable' is no longer being used as an error severity of the reported error in Chapter 18 APEI. This commit will a) For Acpi40.h & Acpi50.h Add new macro EFI_ACPI_X_X_ERROR_SEVERITY_RECOVERABLE, since both the terms 'Correctable' and 'Recoverable' are used to denote the same error severity. b) Header files starting from Acpi51.h to Acpi64.h Add new macro EFI_ACPI_X_X_ERROR_SEVERITY_RECOVERABLE. Keeps the origin EFI_ACPI_X_X_ERROR_SEVERITY_CORRECTABLE for compatibility consideration, but add comments to mark it as deprecated and should no longer be used. 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> Signed-off-by: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg/Include: Smbios Specification 3.5.0 changesAbdul Lateef Attar via groups.io2022-03-181-4/+140
| | | | | | | | | | | | | | | | | | | | | | Adds following changes 1) Added support for manufacturing mode in BIOS Characteristics Extension Byte 2. 2) Added support for slot height in System Slot Table (type 9). 3) Updated Built-in pointing device interface with USB, I2C and SPI. 4) Updates Onboard Devices Extended Information with wireless LAN, bluetooth, WWAN, eMMC, NVMe and UFC. 5) Added new table Firmware Inventory Information (Type 45) and its corresponding enum values. 6) Added new table String Property Table (Type 46) and its corresponding enum values. 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: Abdul Lateef Attar <abdattar@amd.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg: Remove the macro definitions regarding Opcode.Jason2022-03-012-50/+2
| | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3790 Remove the macro definitions regarding Opcode because new version of NASM tool(e.g. v2.15.05) supports the corresponding instructions. Note: This patch need to be merged after other NASM code change to avoid compilation errors. Signed-off-by: Jason Lou <yun.lou@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>
* MdePkg: MmCommunication2: Update MM communicate2 function descriptionKun Qin2022-01-271-6/+7
| | | | | | | | | | | | | | | | Current MM communicate2 function definition described input arguments `CommBufferPhysical`, `CommBufferVirtual` and `CommSize` as input only, which mismatches with the "input and output type" as in PI specification. This change updated function descriptions of MM communite2 definition to match input argument types. 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: Add registers of boot partition featureMaggie Chu2022-01-071-19/+89
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3757 Add registers of boot partition feature which defined in NVM Express 1.4 Spec Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Maggie Chu <maggie.chu@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg: Introduce CcMeasurementProtocol for CC Guest firmwareMin Xu2021-12-111-0/+302
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-091-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-07549-41774/+39157
| | | | | | | | | | | | 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 OPTIONAL keyword usage styleMichael D Kinney2021-12-0737-221/+211
| | | | | | | | | | | | 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-071-1/+1
| | | | | | | | | | | | 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: 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-081-23/+23
| | | | | | | | | | | | | | 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/BaseLib: Add QuickSort function on BaseLibIanX Kuo2021-10-131-0/+49
| | | | | | | | | | | | 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: MmCommunication: Added definition of MM Communication PPIKun Qin2021-09-301-0/+72
| | | | | | | | | | | | | | | 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-111-12/+15
| | | | | | | | | | | | | | 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>