From 1803757a9bef854d732764a4235bbf710b665880 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Wed, 21 Jul 2021 11:44:21 +0100 Subject: MdePkg: Add Secure Access Components in the SDEV table 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 Reviewed-by: Liming Gao Reviewed-by: Sami Mujawar --- MdePkg/Include/IndustryStandard/Acpi64.h | 80 ++++++++++++++++++++++---------- 1 file changed, 56 insertions(+), 24 deletions(-) (limited to 'MdePkg/Include/IndustryStandard') diff --git a/MdePkg/Include/IndustryStandard/Acpi64.h b/MdePkg/Include/IndustryStandard/Acpi64.h index cd09300380..4faed17a9e 100644 --- a/MdePkg/Include/IndustryStandard/Acpi64.h +++ b/MdePkg/Include/IndustryStandard/Acpi64.h @@ -1661,15 +1661,16 @@ typedef struct { #define EFI_ACPI_6_4_SECURE_DEVICES_TABLE_REVISION 0x01 /// -/// Secure Devcice types +/// Secure Device types /// -#define EFI_ACPI_6_4_SDEV_TYPE_PCIE_ENDPOINT_DEVICE 0x01 #define EFI_ACPI_6_4_SDEV_TYPE_ACPI_NAMESPACE_DEVICE 0x00 +#define EFI_ACPI_6_4_SDEV_TYPE_PCIE_ENDPOINT_DEVICE 0x01 /// -/// Secure Devcice flags +/// Secure Device flags /// -#define EFI_ACPI_6_4_SDEV_FLAG_ALLOW_HANDOFF BIT0 +#define EFI_ACPI_6_4_SDEV_FLAG_ALLOW_HANDOFF BIT0 +#define EFI_ACPI_6_4_SDEV_FLAG_SECURE_ACCESS_COMPONENTS_PRESENT BIT1 /// /// SDEV Structure Header @@ -1681,32 +1682,63 @@ typedef struct { } EFI_ACPI_6_4_SDEV_STRUCTURE_HEADER; /// -/// PCIe Endpoint Device based Secure Device Structure +/// ACPI_NAMESPACE_DEVICE based Secure Device Structure /// typedef struct { - UINT8 Type; - UINT8 Flags; - UINT16 Length; - UINT16 PciSegmentNumber; - UINT16 StartBusNumber; - UINT16 PciPathOffset; - UINT16 PciPathLength; - UINT16 VendorSpecificDataOffset; - UINT16 VendorSpecificDataLength; -} EFI_ACPI_6_4_SDEV_STRUCTURE_PCIE_ENDPOINT_DEVICE; + EFI_ACPI_6_4_SDEV_STRUCTURE_HEADER Header; + UINT16 DeviceIdentifierOffset; + UINT16 DeviceIdentifierLength; + UINT16 VendorSpecificDataOffset; + UINT16 VendorSpecificDataLength; + UINT16 SecureAccessComponentsOffset; + UINT16 SecureAccessComponentsLength; +} EFI_ACPI_6_4_SDEV_STRUCTURE_ACPI_NAMESPACE_DEVICE; /// -/// ACPI_NAMESPACE_DEVICE based Secure Device Structure +/// Secure Access Component Types +/// +#define EFI_ACPI_6_4_SDEV_SECURE_ACCESS_COMPONENT_TYPE_IDENTIFICATION 0x00 +#define EFI_ACPI_6_4_SDEV_SECURE_ACCESS_COMPONENT_TYPE_MEMORY 0x01 + +/// +/// Identification Based Secure Access Component /// typedef struct { - UINT8 Type; - UINT8 Flags; - UINT16 Length; - UINT16 DeviceIdentifierOffset; - UINT16 DeviceIdentifierLength; - UINT16 VendorSpecificDataOffset; - UINT16 VendorSpecificDataLength; -} EFI_ACPI_6_4_SDEV_STRUCTURE_ACPI_NAMESPACE_DEVICE; + EFI_ACPI_6_4_SDEV_STRUCTURE_HEADER Header; + UINT16 HardwareIdentifierOffset; + UINT16 HardwareIdentifierLength; + UINT16 SubsystemIdentifierOffset; + UINT16 SubsystemIdentifierLength; + UINT16 HardwareRevision; + UINT8 HardwareRevisionPresent; + UINT8 ClassCodePresent; + UINT8 PciCompatibleBaseClass; + UINT8 PciCompatibleSubClass; + UINT8 PciCompatibleProgrammingInterface; +} EFI_ACPI_6_4_SDEV_SECURE_ACCESS_COMPONENT_IDENTIFICATION_STRUCTURE; + +/// +/// Memory-based Secure Access Component +/// +typedef struct { + EFI_ACPI_6_4_SDEV_STRUCTURE_HEADER Header; + UINT32 Reserved; + UINT64 MemoryAddressBase; + UINT64 MemoryLength; +} EFI_ACPI_6_4_SDEV_SECURE_ACCESS_COMPONENT_MEMORY_STRUCTURE; + +/// +/// PCIe Endpoint Device based Secure Device Structure +/// +typedef struct { + EFI_ACPI_6_4_SDEV_STRUCTURE_HEADER Header; + UINT16 PciSegmentNumber; + UINT16 StartBusNumber; + UINT16 PciPathOffset; + UINT16 PciPathLength; + UINT16 VendorSpecificDataOffset; + UINT16 VendorSpecificDataLength; +} EFI_ACPI_6_4_SDEV_STRUCTURE_PCIE_ENDPOINT_DEVICE; /// /// Boot Error Record Table (BERT) -- cgit v1.2.3