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 CE1419418FD for ; Tue, 9 Jul 2024 13:15:29 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=zg9ZG9EHc1WOxUZ/f3lDWZn+pAsKLXiq6X3uBnhybx4=; 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=1720530929; v=1; b=hQAgiCDZu90coU9D7b2GA7b9Xod3aUyhd+yW2L0P8wA++Wt1srC6Fj6I3X3/ZXh3/WF41Rpi pSI9xm6XOsSRdhtp0nkCEWxGBw2/aTBqBNYOZ7LOMbw62hYmLDfS1iTqBFDGW+YFoYcn0kHZ8Ky Nnq8BrPi0JnpIgjSpYE5jF19Be96dV9426ysAV6r45intVzuFrWg9Y5ztl//hCgaUWVviUipALJ QdfF0Kyvpp042ARrYGQe/VBj80Me3kbT0/+vXtUrSX9d6YV9+ONuqwfPh3SoaoiBKmGNLvHIZhi LPIwWq1cUM0lXUpUExw4uG5RXZtYID+wTkMmLwGmT4iBQ== X-Received: by 127.0.0.2 with SMTP id YzqgYY7687511x7G0Byo6mA4; Tue, 09 Jul 2024 06:15:28 -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.12764.1720530927648059763 for ; Tue, 09 Jul 2024 06:15:27 -0700 X-Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 469CYJSQ009474; Tue, 9 Jul 2024 13:15:27 GMT X-Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 408w0r9chy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 09 Jul 2024 13:15:26 +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 469DFP1v018463 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 9 Jul 2024 13:15:25 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 06:15:23 -0700 Date: Tue, 9 Jul 2024 14:15:20 +0100 From: "Leif Lindholm" To: , CC: Xiong Yining , Ard Biesheuvel , Graeme Gregory , Chen Baozi Subject: Re: [edk2-devel] [PATCH edk2-platforms v3 5/5] SbsaQemu: introduce helper in PPTT generation Message-ID: References: <20240709-acpi65-v3-0-ee93ba536fcf@linaro.org> <20240709-acpi65-v3-5-ee93ba536fcf@linaro.org> <3514462.yRhR9qJLr4@puchatek.local> MIME-Version: 1.0 In-Reply-To: <3514462.yRhR9qJLr4@puchatek.local> X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-ORIG-GUID: RIQBFhNyW_pnljy77y5lG3E09ZaD_gc8 X-Proofpoint-GUID: RIQBFhNyW_pnljy77y5lG3E09ZaD_gc8 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 06:15:27 -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: 7AkFX2ooNeZfRNTxtfQQQ26wx7686176AA= 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=hQAgiCDZ; 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 15:12:37 +0200, Marcin Juszkiewicz wrote: > Dnia wtorek, 9 lipca 2024 15:00:12 CEST Leif Lindholm via groups.io pisze: > > On Tue, Jul 09, 2024 at 12:47:10 +0200, Marcin Juszkiewicz wrote: > > > Function AddPpttTable() adding PPTT got too long. This change moves part > > > of it into helper function AddCoresToPpttTable() which takes care of > > > generating entries for Core and below (Cache, Thread). > > > > > > Signed-off-by: Marcin Juszkiewicz > > > --- > > > > > > .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c | 237 > > > +++++++++++--------- 1 file changed, 133 insertions(+), 104 deletions(-) > > > > > > diff --git > > > a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c > > > b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c index > > > a7a9664abdcb..a4b2ee2fdcb0 100644 > > > --- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c > > > +++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c > > > @@ -29,6 +29,9 @@ > > > > > > static UINTN GicItsBase; > > > > > > +static UINTN CpuId; > > > +static UINTN CacheId; > > > + > > > > static variables are supposed to have g (global) or m (module) prefix. > > This is local, so m. > > (Yes, that means I missed that when reviewing the GitIts bits.) > > > > Also, why are these in a #pragma pack(1) block? > > Added right after GicItsBase. Moved out of block. I don't think it makes any sense for GicItsBase either, but that's not part of this review. > > > #pragma pack () > > > STATIC > > > > > +UINT32 > > > +AddCoresToPpttTable ( > > > + UINT8 *New, > > > + UINT32 ClusterIndex, > > > + CpuTopology CpuTopo > > > + ) > > done > > > > - ClusterIndex = CoreIndex; > > > + CoresPartSize = AddCoresToPpttTable (New, ClusterIndex, CpuTopo); > > > + ClusterIndex += CoresPartSize; > > > > This sounds like ClisterIndex is no longer an Index after this patch. > > Should it be renamed? > > It is still an Index. CoresPartSize is a size taken by Core/Cache/Thread part > of this Cluster. But doesn't that make it an offset instead of an index? / Leif > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#119844): https://edk2.groups.io/g/devel/message/119844 Mute This Topic: https://groups.io/mt/107120147/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-