From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 0A30E7803D7 for ; Tue, 9 Jul 2024 10:47:41 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=IUec5LWSw7anKUIkr2dT/Ql5r/ccalrtS5l1CYY+ntE=; c=relaxed/simple; d=groups.io; h=From:Date:Subject:MIME-Version:Message-Id:References:In-Reply-To:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20240206; t=1720522061; v=1; b=zTYlddE7pUhItC0R8v1hxEy0L+9trt99z3EvW2myFexwy+A9h6mUazZpuOBoradDnneOWomx zQmJk4WRHj0ZQ9e4ch25Wovh2Xojq34j2GoMf7aMyjAbEzLnIsV13/XnDVm4n3BZ++NHpx+KgTr O9U9gxuFMXW46nP+TKA8PAcszjP4FN5teVXIWj2AyeLUFtcrInDqOhH/OGSrZkvksEEg/dxiaO9 lCCGO7pUw5kxFwrwr29dMZVO1xBnri0Y0HEFOQx5fdSml+sZET2p/uMxTfsQ5JCmXkQct3O2AKL Yqbx+EpryB3BIl/UMQw6MRqXu5h3DBA/wL+IDljKwzoPw== X-Received: by 127.0.0.2 with SMTP id vw3GYY7687511xJ0k1hpyXYs; Tue, 09 Jul 2024 03:47:40 -0700 X-Received: from muminek.juszkiewicz.com.pl (muminek.juszkiewicz.com.pl [213.251.184.221]) by mx.groups.io with SMTP id smtpd.web10.10111.1720522059660902259 for ; Tue, 09 Jul 2024 03:47:40 -0700 X-Received: from localhost (localhost [127.0.0.1]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTP id BB793260CE5; Tue, 9 Jul 2024 12:47:37 +0200 (CEST) X-Virus-Scanned: Debian amavis at juszkiewicz.com.pl X-Received: from muminek.juszkiewicz.com.pl ([127.0.0.1]) by localhost (muminek.juszkiewicz.com.pl [127.0.0.1]) (amavis, port 10024) with ESMTP id DU-9rlk-ZZR0; Tue, 9 Jul 2024 12:47:36 +0200 (CEST) X-Received: from applejack.lan (83.8.74.165.ipv4.supernova.orange.pl [83.8.74.165]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTPSA id AB13A260837; Tue, 9 Jul 2024 12:47:34 +0200 (CEST) From: "Marcin Juszkiewicz" Date: Tue, 09 Jul 2024 12:47:08 +0200 Subject: [edk2-devel] [PATCH edk2-platforms v3 3/5] SbsaQemu: update PPTT to ACPI 6.5 MIME-Version: 1.0 Message-Id: <20240709-acpi65-v3-3-ee93ba536fcf@linaro.org> References: <20240709-acpi65-v3-0-ee93ba536fcf@linaro.org> In-Reply-To: <20240709-acpi65-v3-0-ee93ba536fcf@linaro.org> To: devel@edk2.groups.io Cc: Xiong Yining , Marcin Juszkiewicz , Leif Lindholm , Ard Biesheuvel , Graeme Gregory , Chen Baozi Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Tue, 09 Jul 2024 03:47:40 -0700 Resent-From: marcin.juszkiewicz@linaro.org Reply-To: devel@edk2.groups.io,marcin.juszkiewicz@linaro.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 8QtRVVXqBkYNmz3jdMXNKM2sx7686176AA= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=zTYlddE7; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=linaro.org (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io ACPI 6.5 is the newest version of specification so far. The only change to make is handling of CacheId (has to be unique and higher than zero). Signed-off-by: Marcin Juszkiewicz --- .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.h | 4 +- .../Include/IndustryStandard/SbsaQemuAcpi.h | 46 ++++--- .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c | 127 ++++++++++------= ---- 3 files changed, 94 insertions(+), 83 deletions(-) diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.= h b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.h index 085c681ba55f..5aaf02e3ca30 100644 --- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.h +++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.h @@ -90,8 +90,8 @@ typedef struct { =20 #define SBSAQEMU_ACPI_PROCESSOR_HIERARCHY_NODE_STRUCTURE_INIT(Flags, Paren= t, ACPIProcessorID, NumberOfPrivateResources) \ { = \ - EFI_ACPI_6_3_PPTT_TYPE_PROCESSOR, = /* Type */ \ - sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR) + NumberOfPrivateResour= ces * sizeof (UINT32), /* Length */ \ + EFI_ACPI_6_5_PPTT_TYPE_PROCESSOR, = /* Type */ \ + sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR) + NumberOfPrivateResour= ces * sizeof (UINT32), /* Length */ \ { EFI_ACPI_RESERVED_BYTE, EFI_ACPI_RESERVED_BYTE }, = /* Reserved */ \ Flags, = /* Flags */ \ Parent, = /* Parent */ \ diff --git a/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h = b/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h index 2f87591e737a..fa2e2b30bb7d 100644 --- a/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h +++ b/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h @@ -87,13 +87,13 @@ typedef struct { #define SBSAQEMU_L2_CACHE_ASSC 8 =20 #define CLUSTER_INDEX (sizeof (EFI_ACPI_DESCRIPTION_HEADER)) -#define L1_D_CACHE_INDEX (CLUSTER_INDEX + sizeof (EFI_ACPI_6_3_PPTT_STRUC= TURE_PROCESSOR)) -#define L1_I_CACHE_INDEX (L1_D_CACHE_INDEX + sizeof (EFI_ACPI_6_3_PPTT_ST= RUCTURE_CACHE)) -#define L2_CACHE_INDEX (L1_I_CACHE_INDEX + sizeof (EFI_ACPI_6_3_PPTT_ST= RUCTURE_CACHE)) +#define L1_D_CACHE_INDEX (CLUSTER_INDEX + sizeof (EFI_ACPI_6_5_PPTT_STRUC= TURE_PROCESSOR)) +#define L1_I_CACHE_INDEX (L1_D_CACHE_INDEX + sizeof (EFI_ACPI_6_5_PPTT_ST= RUCTURE_CACHE)) +#define L2_CACHE_INDEX (L1_I_CACHE_INDEX + sizeof (EFI_ACPI_6_5_PPTT_ST= RUCTURE_CACHE)) =20 #define SBSAQEMU_ACPI_PPTT_L1_D_CACHE_STRUCT { = \ - EFI_ACPI_6_3_PPTT_TYPE_CACHE, = \ - sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE), = \ + EFI_ACPI_6_5_PPTT_TYPE_CACHE, = \ + sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE), = \ { EFI_ACPI_RESERVED_BYTE, EFI_ACPI_RESERVED_BYTE }, = \ { = \ 1, /* SizePropertyValid */ = \ @@ -103,22 +103,24 @@ typedef struct { 1, /* CacheTypeValid */ = \ 1, /* WritePolicyValid */ = \ 1, /* LineSizeValid */ = \ + 1, /* CacheIdValid */ = \ }, = \ 0, /* NextLevelOfCache */ = \ SBSAQEMU_L1_D_CACHE_SIZE, /* Size */ = \ SBSAQEMU_L1_D_CACHE_SETS, /* NumberOfSets */ = \ SBSAQEMU_L1_D_CACHE_ASSC, /* Associativity */ = \ { = \ - EFI_ACPI_6_2_CACHE_ATTRIBUTES_ALLOCATION_READ_WRITE, = \ - EFI_ACPI_6_2_CACHE_ATTRIBUTES_CACHE_TYPE_DATA, = \ - EFI_ACPI_6_2_CACHE_ATTRIBUTES_WRITE_POLICY_WRITE_BACK, = \ + EFI_ACPI_6_5_CACHE_ATTRIBUTES_ALLOCATION_READ_WRITE, = \ + EFI_ACPI_6_5_CACHE_ATTRIBUTES_CACHE_TYPE_DATA, = \ + EFI_ACPI_6_5_CACHE_ATTRIBUTES_WRITE_POLICY_WRITE_BACK, = \ }, = \ - 64 /* LineSize */ = \ + 64, /* LineSize */ = \ + 0 /* CacheId */ = \ } =20 #define SBSAQEMU_ACPI_PPTT_L1_I_CACHE_STRUCT { = \ - EFI_ACPI_6_3_PPTT_TYPE_CACHE, = \ - sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE), = \ + EFI_ACPI_6_5_PPTT_TYPE_CACHE, = \ + sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE), = \ { EFI_ACPI_RESERVED_BYTE, EFI_ACPI_RESERVED_BYTE }, = \ { = \ 1, /* SizePropertyValid */ = \ @@ -128,22 +130,24 @@ typedef struct { 1, /* CacheTypeValid */ = \ 1, /* WritePolicyValid */ = \ 1, /* LineSizeValid */ = \ + 1, /* CacheIdValid */ = \ }, = \ 0, /* NextLevelOfCache */ = \ SBSAQEMU_L1_I_CACHE_SIZE, /* Size */ = \ SBSAQEMU_L1_I_CACHE_SETS, /* NumberOfSets */ = \ SBSAQEMU_L1_I_CACHE_ASSC, /* Associativity */ = \ { = \ - EFI_ACPI_6_3_CACHE_ATTRIBUTES_ALLOCATION_READ, = \ - EFI_ACPI_6_3_CACHE_ATTRIBUTES_CACHE_TYPE_INSTRUCTION, = \ + EFI_ACPI_6_5_CACHE_ATTRIBUTES_ALLOCATION_READ, = \ + EFI_ACPI_6_5_CACHE_ATTRIBUTES_CACHE_TYPE_INSTRUCTION, = \ 0, = \ }, = \ - 64 /* LineSize */ = \ + 64, /* LineSize */ = \ + 0 /* CacheId */ = \ } =20 #define SBSAQEMU_ACPI_PPTT_L2_CACHE_STRUCT { = \ - EFI_ACPI_6_3_PPTT_TYPE_CACHE, = \ - sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE), = \ + EFI_ACPI_6_5_PPTT_TYPE_CACHE, = \ + sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE), = \ { EFI_ACPI_RESERVED_BYTE, EFI_ACPI_RESERVED_BYTE }, = \ { = \ 1, /* SizePropertyValid */ = \ @@ -153,17 +157,19 @@ typedef struct { 1, /* CacheTypeValid */ = \ 1, /* WritePolicyValid */ = \ 1, /* LineSizeValid */ = \ + 1, /* CacheIdValid */ = \ }, = \ 0, /* NextLevelOfCache */ = \ SBSAQEMU_L2_CACHE_SIZE, /* Size */ = \ SBSAQEMU_L2_CACHE_SETS, /* NumberOfSets */ = \ SBSAQEMU_L2_CACHE_ASSC, /* Associativity */ = \ { = \ - EFI_ACPI_6_2_CACHE_ATTRIBUTES_ALLOCATION_READ_WRITE, = \ - EFI_ACPI_6_2_CACHE_ATTRIBUTES_CACHE_TYPE_UNIFIED, = \ - EFI_ACPI_6_2_CACHE_ATTRIBUTES_WRITE_POLICY_WRITE_BACK, = \ + EFI_ACPI_6_5_CACHE_ATTRIBUTES_ALLOCATION_READ_WRITE, = \ + EFI_ACPI_6_5_CACHE_ATTRIBUTES_CACHE_TYPE_UNIFIED, = \ + EFI_ACPI_6_5_CACHE_ATTRIBUTES_WRITE_POLICY_WRITE_BACK, = \ }, = \ - 64 /* LineSize */ = \ + 64, /* LineSize */ = \ + 0 /* CacheId */ = \ } =20 #endif diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.= c b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c index 465a69d7328c..cf0102d11f1f 100644 --- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c +++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c @@ -506,35 +506,36 @@ AddPpttTable ( UINT8 *New; UINT32 CpuId; CpuTopology CpuTopo; + UINT32 CacheId; =20 GetCpuTopology (&CpuTopo); =20 - EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE L1DCache =3D SBSAQEMU_ACPI_PPTT_L1_D_= CACHE_STRUCT; - EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE L1ICache =3D SBSAQEMU_ACPI_PPTT_L1_I_= CACHE_STRUCT; - EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE L2Cache =3D SBSAQEMU_ACPI_PPTT_L2_CA= CHE_STRUCT; + EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE L1DCache =3D SBSAQEMU_ACPI_PPTT_L1_D_= CACHE_STRUCT; + EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE L1ICache =3D SBSAQEMU_ACPI_PPTT_L1_I_= CACHE_STRUCT; + EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE L2Cache =3D SBSAQEMU_ACPI_PPTT_L2_CA= CHE_STRUCT; =20 - EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR_FLAGS SocketFlags =3D { - EFI_ACPI_6_3_PPTT_PACKAGE_PHYSICAL, - EFI_ACPI_6_3_PPTT_PROCESSOR_ID_INVALID, - EFI_ACPI_6_3_PPTT_PROCESSOR_IS_NOT_THREAD, - EFI_ACPI_6_3_PPTT_NODE_IS_NOT_LEAF, - EFI_ACPI_6_3_PPTT_IMPLEMENTATION_IDENTICAL + EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR_FLAGS SocketFlags =3D { + EFI_ACPI_6_5_PPTT_PACKAGE_PHYSICAL, + EFI_ACPI_6_5_PPTT_PROCESSOR_ID_INVALID, + EFI_ACPI_6_5_PPTT_PROCESSOR_IS_NOT_THREAD, + EFI_ACPI_6_5_PPTT_NODE_IS_NOT_LEAF, + EFI_ACPI_6_5_PPTT_IMPLEMENTATION_IDENTICAL }; =20 - EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR_FLAGS ClusterFlags =3D { - EFI_ACPI_6_3_PPTT_PACKAGE_NOT_PHYSICAL, - EFI_ACPI_6_3_PPTT_PROCESSOR_ID_INVALID, - EFI_ACPI_6_3_PPTT_PROCESSOR_IS_NOT_THREAD, - EFI_ACPI_6_3_PPTT_NODE_IS_NOT_LEAF, - EFI_ACPI_6_3_PPTT_IMPLEMENTATION_IDENTICAL + EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR_FLAGS ClusterFlags =3D { + EFI_ACPI_6_5_PPTT_PACKAGE_NOT_PHYSICAL, + EFI_ACPI_6_5_PPTT_PROCESSOR_ID_INVALID, + EFI_ACPI_6_5_PPTT_PROCESSOR_IS_NOT_THREAD, + EFI_ACPI_6_5_PPTT_NODE_IS_NOT_LEAF, + EFI_ACPI_6_5_PPTT_IMPLEMENTATION_IDENTICAL }; =20 - EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR_FLAGS CoreFlags =3D { - EFI_ACPI_6_3_PPTT_PACKAGE_NOT_PHYSICAL, - EFI_ACPI_6_3_PPTT_PROCESSOR_ID_VALID, - EFI_ACPI_6_3_PPTT_PROCESSOR_IS_NOT_THREAD, - EFI_ACPI_6_3_PPTT_NODE_IS_LEAF, - EFI_ACPI_6_3_PPTT_IMPLEMENTATION_IDENTICAL + EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR_FLAGS CoreFlags =3D { + EFI_ACPI_6_5_PPTT_PACKAGE_NOT_PHYSICAL, + EFI_ACPI_6_5_PPTT_PROCESSOR_ID_VALID, + EFI_ACPI_6_5_PPTT_PROCESSOR_IS_NOT_THREAD, + EFI_ACPI_6_5_PPTT_NODE_IS_LEAF, + EFI_ACPI_6_5_PPTT_IMPLEMENTATION_IDENTICAL }; =20 if (CpuTopo.Threads > 1) { @@ -543,31 +544,31 @@ AddPpttTable ( CoreFlags.NodeIsALeaf =3D EFI_ACPI_6_5_PPTT_NODE_IS_NOT_LEAF; } =20 - EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR_FLAGS ThreadFlags =3D { - EFI_ACPI_6_3_PPTT_PACKAGE_NOT_PHYSICAL, - EFI_ACPI_6_3_PPTT_PROCESSOR_ID_VALID, - EFI_ACPI_6_3_PPTT_PROCESSOR_IS_THREAD, - EFI_ACPI_6_3_PPTT_NODE_IS_LEAF, - EFI_ACPI_6_3_PPTT_IMPLEMENTATION_IDENTICAL + EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR_FLAGS ThreadFlags =3D { + EFI_ACPI_6_5_PPTT_PACKAGE_NOT_PHYSICAL, + EFI_ACPI_6_5_PPTT_PROCESSOR_ID_VALID, + EFI_ACPI_6_5_PPTT_PROCESSOR_IS_THREAD, + EFI_ACPI_6_5_PPTT_NODE_IS_LEAF, + EFI_ACPI_6_5_PPTT_IMPLEMENTATION_IDENTICAL }; =20 EFI_ACPI_DESCRIPTION_HEADER Header =3D SBSAQEMU_ACPI_HEADER ( - EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_STRUCTURE_SIGNATURE= , + EFI_ACPI_6_5_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_STRUCTURE_SIGNATURE= , EFI_ACPI_DESCRIPTION_HEADER, - EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_REVISION + EFI_ACPI_6_5_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_REVISION ); =20 TableSize =3D sizeof (EFI_ACPI_DESCRIPTION_HEADER) + - CpuTopo.Sockets * (sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCE= SSOR) + - CpuTopo.Clusters * (sizeof (EFI_ACPI_6_3_= PPTT_STRUCTURE_PROCESSOR) + - sizeof (EFI_ACPI_6_3_= PPTT_STRUCTURE_CACHE) * 3 + - CpuTopo.Cores * (size= of (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR) + + CpuTopo.Sockets * (sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCE= SSOR) + + CpuTopo.Clusters * (sizeof (EFI_ACPI_6_5_= PPTT_STRUCTURE_PROCESSOR) + + sizeof (EFI_ACPI_6_5_= PPTT_STRUCTURE_CACHE) * 3 + + CpuTopo.Cores * (size= of (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR) + size= of (UINT32) * 2))); =20 if (CpuTopo.Threads > 1) { TableSize +=3D CpuTopo.Sockets * CpuTopo.Clusters * CpuTopo.Cores * Cp= uTopo.Threads * - sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR); + sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR); } =20 Status =3D gBS->AllocatePages ( @@ -593,48 +594,52 @@ AddPpttTable ( UINT32 SocketIndex, ClusterIndex, CoreIndex, L1DCacheIndex, L1ICacheInd= ex, L2CacheIndex; =20 CpuId =3D 0; + CacheId =3D 1; // 0 is not a valid Cache ID. SocketIndex =3D sizeof (EFI_ACPI_DESCRIPTION_HEADER); for (SocketNum =3D 0; SocketNum < CpuTopo.Sockets; SocketNum++) { // Add the Socket PPTT structure - EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR Socket =3D SBSAQEMU_ACPI_PROCES= SOR_HIERARCHY_NODE_STRUCTURE_INIT ( + EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR Socket =3D SBSAQEMU_ACPI_PROCES= SOR_HIERARCHY_NODE_STRUCTURE_INIT ( SocketFlags, 0, 0, 0 ); - CopyMem (New, &Socket, sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR))= ; - New +=3D sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR); + CopyMem (New, &Socket, sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR))= ; + New +=3D sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR); =20 - ClusterIndex =3D SocketIndex + sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PRO= CESSOR); + ClusterIndex =3D SocketIndex + sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PRO= CESSOR); for (ClusterNum =3D 0; ClusterNum < CpuTopo.Clusters; ClusterNum++) { - L1DCacheIndex =3D ClusterIndex + sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE= _PROCESSOR); - L1ICacheIndex =3D L1DCacheIndex + sizeof (EFI_ACPI_6_3_PPTT_STRUCTUR= E_CACHE); - L2CacheIndex =3D L1ICacheIndex + sizeof (EFI_ACPI_6_3_PPTT_STRUCTUR= E_CACHE); - CoreIndex =3D L2CacheIndex + sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE= _CACHE); + L1DCacheIndex =3D ClusterIndex + sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE= _PROCESSOR); + L1ICacheIndex =3D L1DCacheIndex + sizeof (EFI_ACPI_6_5_PPTT_STRUCTUR= E_CACHE); + L2CacheIndex =3D L1ICacheIndex + sizeof (EFI_ACPI_6_5_PPTT_STRUCTUR= E_CACHE); + CoreIndex =3D L2CacheIndex + sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE= _CACHE); =20 // Add the Cluster PPTT structure - EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR Cluster =3D SBSAQEMU_ACPI_PRO= CESSOR_HIERARCHY_NODE_STRUCTURE_INIT ( + EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR Cluster =3D SBSAQEMU_ACPI_PRO= CESSOR_HIERARCHY_NODE_STRUCTURE_INIT ( ClusterFlags, SocketIndex, 0, 0 ); - CopyMem (New, &Cluster, sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSO= R)); - New +=3D sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR); + CopyMem (New, &Cluster, sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSO= R)); + New +=3D sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR); =20 // Add L1 D Cache structure - CopyMem (New, &L1DCache, sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE))= ; - ((EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE *)New)->NextLevelOfCache =3D L2C= acheIndex; - New +=3D siz= eof (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE); + L1DCache.CacheId =3D CacheId++; + CopyMem (New, &L1DCache, sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE))= ; + ((EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE *)New)->NextLevelOfCache =3D L2C= acheIndex; + New +=3D siz= eof (EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE); =20 // Add L1 I Cache structure - CopyMem (New, &L1ICache, sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE))= ; - ((EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE *)New)->NextLevelOfCache =3D L2C= acheIndex; - New +=3D siz= eof (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE); + L1ICache.CacheId =3D CacheId++; + CopyMem (New, &L1ICache, sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE))= ; + ((EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE *)New)->NextLevelOfCache =3D L2C= acheIndex; + New +=3D siz= eof (EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE); =20 // Add L2 Cache structure - CopyMem (New, &L2Cache, sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE)); - New +=3D sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE); + L2Cache.CacheId =3D CacheId++; + CopyMem (New, &L2Cache, sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE)); + New +=3D sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE); =20 for (CoreNum =3D 0; CoreNum < CpuTopo.Cores; CoreNum++) { UINT32 *PrivateResourcePtr; @@ -646,14 +651,14 @@ AddPpttTable ( CoreCpuId =3D 0; } =20 - EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR Core =3D SBSAQEMU_ACPI_PROC= ESSOR_HIERARCHY_NODE_STRUCTURE_INIT ( + EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR Core =3D SBSAQEMU_ACPI_PROC= ESSOR_HIERARCHY_NODE_STRUCTURE_INIT ( CoreFlags, ClusterIndex, CoreCpuId, 2 ); - CopyMem (New, &Core, sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR= )); - New +=3D sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR); + CopyMem (New, &Core, sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR= )); + New +=3D sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR); =20 PrivateResourcePtr =3D (UINT32 *)New; PrivateResourcePtr[0] =3D L1DCacheIndex; @@ -665,21 +670,21 @@ AddPpttTable ( } else { // Add the Thread PPTT structure for (ThreadNum =3D 0; ThreadNum < CpuTopo.Threads; ThreadNum++) = { - EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR Thread =3D SBSAQEMU_ACP= I_PROCESSOR_HIERARCHY_NODE_STRUCTURE_INIT ( + EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR Thread =3D SBSAQEMU_ACP= I_PROCESSOR_HIERARCHY_NODE_STRUCTURE_INIT ( ThreadFlags, CoreIndex, CpuId, 0 ); - CopyMem (New, &Thread, sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PRO= CESSOR)); - New +=3D sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR); + CopyMem (New, &Thread, sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PRO= CESSOR)); + New +=3D sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR); CpuId++; } =20 - CoreIndex +=3D CpuTopo.Threads * sizeof (EFI_ACPI_6_3_PPTT_STRU= CTURE_PROCESSOR); + CoreIndex +=3D CpuTopo.Threads * sizeof (EFI_ACPI_6_5_PPTT_STRU= CTURE_PROCESSOR); } =20 - CoreIndex +=3D sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR) + si= zeof (UINT32) * 2; + CoreIndex +=3D sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR) + si= zeof (UINT32) * 2; } =20 ClusterIndex =3D CoreIndex; --=20 2.45.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#119832): https://edk2.groups.io/g/devel/message/119832 Mute This Topic: https://groups.io/mt/107120144/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-