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 99AF174004F for ; Tue, 9 Jul 2024 12:44:59 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=c4Fy4rmjmPhic3agXvDCtV3MH5XUbDg9vPa8tcYSCcw=; c=relaxed/simple; d=groups.io; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version:In-Reply-To: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-Disposition; s=20240206; t=1720529099; v=1; b=4SrZhI+BUrFBHqxbNUhRPlkfog7izSmpA6YsvtKuqBBDfsJAgfos8iHHj08dgI3RAzVNiZc9 clcovnZe3xEKQ7/LLuTqU/xaM+YsdxCCrIzuw/aVW4y2No0NPqy/tdeTIu/dZEndkZvDV/qXXKp MPwGnEb2Rjur4RllP1+WNxWrvA7lHFhGFaRN0z5rz5TrHKdGn31MgOcT65pycNuxokuIpF8gSfi xAINOZ+jqy0+ViVpouOjBWKsOUjWfRHR+KLOYUhHdsJOON/uqd4YW+4ATsySYhYasWIEymwWS5D sAOf+wxbey2IJRJ57DUiSgdd62Zdc6FnRN1mtPQJVAgVA== X-Received: by 127.0.0.2 with SMTP id wRAyYY7687511xg9fHKwCLks; Tue, 09 Jul 2024 05:44:58 -0700 X-Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by mx.groups.io with SMTP id smtpd.web10.12114.1720529097434565290 for ; Tue, 09 Jul 2024 05:44:57 -0700 X-Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 469Bb95c001911; Tue, 9 Jul 2024 12:44:56 GMT X-Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 406wgwpdch-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 09 Jul 2024 12:44:56 +0000 (GMT) X-Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA01.qualcomm.com (8.17.1.19/8.17.1.19) with ESMTPS id 469Cit0l006642 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 9 Jul 2024 12:44:55 GMT X-Received: from qc-i7.hemma.eciton.net (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Tue, 9 Jul 2024 05:44:53 -0700 Date: Tue, 9 Jul 2024 13:44:50 +0100 From: "Leif Lindholm" To: Marcin Juszkiewicz CC: , Xiong Yining , Ard Biesheuvel , Graeme Gregory , Chen Baozi Subject: Re: [edk2-devel] [PATCH edk2-platforms v3 3/5] SbsaQemu: update PPTT to ACPI 6.5 Message-ID: References: <20240709-acpi65-v3-0-ee93ba536fcf@linaro.org> <20240709-acpi65-v3-3-ee93ba536fcf@linaro.org> MIME-Version: 1.0 In-Reply-To: <20240709-acpi65-v3-3-ee93ba536fcf@linaro.org> X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-GUID: qMth00bbKCqlV77qW18Ume1rvUtUaZTV X-Proofpoint-ORIG-GUID: qMth00bbKCqlV77qW18Ume1rvUtUaZTV 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 05:44:57 -0700 Resent-From: quic_llindhol@quicinc.com Reply-To: devel@edk2.groups.io,quic_llindhol@quicinc.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: yAENgzl958B6Xmr5rvzVFR4lx7686176AA= Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=4SrZhI+B; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=quicinc.com (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 On Tue, Jul 09, 2024 at 12:47:08 +0200, Marcin Juszkiewicz wrote: > ACPI 6.5 is the newest version of specification so far. The only change "The only functional change..." With that: Reviewed-by: Leif Lindholm / Leif > 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 { > > #define SBSAQEMU_ACPI_PROCESSOR_HIERARCHY_NODE_STRUCTURE_INIT(Flags, Parent, ACPIProcessorID, NumberOfPrivateResources) \ > { \ > - EFI_ACPI_6_3_PPTT_TYPE_PROCESSOR, /* Type */ \ > - sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR) + NumberOfPrivateResources * sizeof (UINT32), /* Length */ \ > + EFI_ACPI_6_5_PPTT_TYPE_PROCESSOR, /* Type */ \ > + sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR) + NumberOfPrivateResources * 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 > > #define CLUSTER_INDEX (sizeof (EFI_ACPI_DESCRIPTION_HEADER)) > -#define L1_D_CACHE_INDEX (CLUSTER_INDEX + sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR)) > -#define L1_I_CACHE_INDEX (L1_D_CACHE_INDEX + sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE)) > -#define L2_CACHE_INDEX (L1_I_CACHE_INDEX + sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE)) > +#define L1_D_CACHE_INDEX (CLUSTER_INDEX + sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR)) > +#define L1_I_CACHE_INDEX (L1_D_CACHE_INDEX + sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE)) > +#define L2_CACHE_INDEX (L1_I_CACHE_INDEX + sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE)) > > #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 */ \ > } > > #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 */ \ > } > > #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 */ \ > } > > #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; > > GetCpuTopology (&CpuTopo); > > - EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE L1DCache = SBSAQEMU_ACPI_PPTT_L1_D_CACHE_STRUCT; > - EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE L1ICache = SBSAQEMU_ACPI_PPTT_L1_I_CACHE_STRUCT; > - EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE L2Cache = SBSAQEMU_ACPI_PPTT_L2_CACHE_STRUCT; > + EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE L1DCache = SBSAQEMU_ACPI_PPTT_L1_D_CACHE_STRUCT; > + EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE L1ICache = SBSAQEMU_ACPI_PPTT_L1_I_CACHE_STRUCT; > + EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE L2Cache = SBSAQEMU_ACPI_PPTT_L2_CACHE_STRUCT; > > - EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR_FLAGS SocketFlags = { > - 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 = { > + 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 > }; > > - EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR_FLAGS ClusterFlags = { > - 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 = { > + 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 > }; > > - EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR_FLAGS CoreFlags = { > - 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 = { > + 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 > }; > > if (CpuTopo.Threads > 1) { > @@ -543,31 +544,31 @@ AddPpttTable ( > CoreFlags.NodeIsALeaf = EFI_ACPI_6_5_PPTT_NODE_IS_NOT_LEAF; > } > > - EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR_FLAGS ThreadFlags = { > - 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 = { > + 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 > }; > > EFI_ACPI_DESCRIPTION_HEADER Header = > 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 > ); > > TableSize = sizeof (EFI_ACPI_DESCRIPTION_HEADER) + > - CpuTopo.Sockets * (sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR) + > - CpuTopo.Clusters * (sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR) + > - sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE) * 3 + > - CpuTopo.Cores * (sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR) + > + CpuTopo.Sockets * (sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR) + > + CpuTopo.Clusters * (sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR) + > + sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE) * 3 + > + CpuTopo.Cores * (sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR) + > sizeof (UINT32) * 2))); > > if (CpuTopo.Threads > 1) { > TableSize += CpuTopo.Sockets * CpuTopo.Clusters * CpuTopo.Cores * CpuTopo.Threads * > - sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR); > + sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR); > } > > Status = gBS->AllocatePages ( > @@ -593,48 +594,52 @@ AddPpttTable ( > UINT32 SocketIndex, ClusterIndex, CoreIndex, L1DCacheIndex, L1ICacheIndex, L2CacheIndex; > > CpuId = 0; > + CacheId = 1; // 0 is not a valid Cache ID. > SocketIndex = sizeof (EFI_ACPI_DESCRIPTION_HEADER); > for (SocketNum = 0; SocketNum < CpuTopo.Sockets; SocketNum++) { > // Add the Socket PPTT structure > - EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR Socket = SBSAQEMU_ACPI_PROCESSOR_HIERARCHY_NODE_STRUCTURE_INIT ( > + EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR Socket = SBSAQEMU_ACPI_PROCESSOR_HIERARCHY_NODE_STRUCTURE_INIT ( > SocketFlags, > 0, > 0, > 0 > ); > - CopyMem (New, &Socket, sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR)); > - New += sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR); > + CopyMem (New, &Socket, sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR)); > + New += sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR); > > - ClusterIndex = SocketIndex + sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR); > + ClusterIndex = SocketIndex + sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR); > for (ClusterNum = 0; ClusterNum < CpuTopo.Clusters; ClusterNum++) { > - L1DCacheIndex = ClusterIndex + sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR); > - L1ICacheIndex = L1DCacheIndex + sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE); > - L2CacheIndex = L1ICacheIndex + sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE); > - CoreIndex = L2CacheIndex + sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE); > + L1DCacheIndex = ClusterIndex + sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR); > + L1ICacheIndex = L1DCacheIndex + sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE); > + L2CacheIndex = L1ICacheIndex + sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE); > + CoreIndex = L2CacheIndex + sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE); > > // Add the Cluster PPTT structure > - EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR Cluster = SBSAQEMU_ACPI_PROCESSOR_HIERARCHY_NODE_STRUCTURE_INIT ( > + EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR Cluster = SBSAQEMU_ACPI_PROCESSOR_HIERARCHY_NODE_STRUCTURE_INIT ( > ClusterFlags, > SocketIndex, > 0, > 0 > ); > - CopyMem (New, &Cluster, sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR)); > - New += sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR); > + CopyMem (New, &Cluster, sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR)); > + New += sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR); > > // 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 = L2CacheIndex; > - New += sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE); > + L1DCache.CacheId = CacheId++; > + CopyMem (New, &L1DCache, sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE)); > + ((EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE *)New)->NextLevelOfCache = L2CacheIndex; > + New += sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE); > > // 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 = L2CacheIndex; > - New += sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE); > + L1ICache.CacheId = CacheId++; > + CopyMem (New, &L1ICache, sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE)); > + ((EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE *)New)->NextLevelOfCache = L2CacheIndex; > + New += sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE); > > // Add L2 Cache structure > - CopyMem (New, &L2Cache, sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE)); > - New += sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE); > + L2Cache.CacheId = CacheId++; > + CopyMem (New, &L2Cache, sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE)); > + New += sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_CACHE); > > for (CoreNum = 0; CoreNum < CpuTopo.Cores; CoreNum++) { > UINT32 *PrivateResourcePtr; > @@ -646,14 +651,14 @@ AddPpttTable ( > CoreCpuId = 0; > } > > - EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR Core = SBSAQEMU_ACPI_PROCESSOR_HIERARCHY_NODE_STRUCTURE_INIT ( > + EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR Core = SBSAQEMU_ACPI_PROCESSOR_HIERARCHY_NODE_STRUCTURE_INIT ( > CoreFlags, > ClusterIndex, > CoreCpuId, > 2 > ); > - CopyMem (New, &Core, sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR)); > - New += sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR); > + CopyMem (New, &Core, sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR)); > + New += sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR); > > PrivateResourcePtr = (UINT32 *)New; > PrivateResourcePtr[0] = L1DCacheIndex; > @@ -665,21 +670,21 @@ AddPpttTable ( > } else { > // Add the Thread PPTT structure > for (ThreadNum = 0; ThreadNum < CpuTopo.Threads; ThreadNum++) { > - EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR Thread = SBSAQEMU_ACPI_PROCESSOR_HIERARCHY_NODE_STRUCTURE_INIT ( > + EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR Thread = SBSAQEMU_ACPI_PROCESSOR_HIERARCHY_NODE_STRUCTURE_INIT ( > ThreadFlags, > CoreIndex, > CpuId, > 0 > ); > - CopyMem (New, &Thread, sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR)); > - New += sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR); > + CopyMem (New, &Thread, sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR)); > + New += sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR); > CpuId++; > } > > - CoreIndex += CpuTopo.Threads * sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR); > + CoreIndex += CpuTopo.Threads * sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR); > } > > - CoreIndex += sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR) + sizeof (UINT32) * 2; > + CoreIndex += sizeof (EFI_ACPI_6_5_PPTT_STRUCTURE_PROCESSOR) + sizeof (UINT32) * 2; > } > > ClusterIndex = CoreIndex; > > -- > 2.45.2 > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#119839): https://edk2.groups.io/g/devel/message/119839 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] -=-=-=-=-=-=-=-=-=-=-=-