public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Leif Lindholm" <quic_llindhol@quicinc.com>
To: <devel@edk2.groups.io>, <marcin.juszkiewicz@linaro.org>
Cc: Xiong Yining <xiongyining1480@phytium.com.cn>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Graeme Gregory <graeme@xora.org.uk>,
	Chen Baozi <chenbaozi@phytium.com.cn>
Subject: Re: [edk2-devel] [PATCH edk2-platforms v3 5/5] SbsaQemu: introduce helper in PPTT generation
Date: Tue, 9 Jul 2024 14:15:20 +0100	[thread overview]
Message-ID: <Zo036NoHELKlecv0@qc-i7.hemma.eciton.net> (raw)
In-Reply-To: <3514462.yRhR9qJLr4@puchatek.local>

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 <marcin.juszkiewicz@linaro.org>
> > > ---
> > > 
> > >  .../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]
-=-=-=-=-=-=-=-=-=-=-=-



      reply	other threads:[~2024-07-09 13:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-09 10:47 [edk2-devel] [PATCH edk2-platforms v3 0/5] SbsaQemu: Align the PPTT tables with QEMU Marcin Juszkiewicz
2024-07-09 10:47 ` [edk2-devel] [PATCH edk2-platforms v3 1/5] SbsaQemu: get the information of CPU topology via SMC calls Marcin Juszkiewicz
2024-07-09 12:40   ` Leif Lindholm
     [not found]   ` <17E08BE30DD079C5.26166@groups.io>
2024-07-09 12:42     ` Leif Lindholm
2024-07-09 10:47 ` [edk2-devel] [PATCH edk2-platforms v3 2/5] SbsaQemu: align the PPTT tables with QEMU Marcin Juszkiewicz
2024-07-09 12:43   ` Leif Lindholm
2024-07-09 10:47 ` [edk2-devel] [PATCH edk2-platforms v3 3/5] SbsaQemu: update PPTT to ACPI 6.5 Marcin Juszkiewicz
2024-07-09 12:44   ` Leif Lindholm
2024-07-09 10:47 ` [edk2-devel] [PATCH edk2-platforms v3 4/5] SbsaQemu: provide cache info per core in PPTT Marcin Juszkiewicz
2024-07-09 13:01   ` Leif Lindholm
2024-07-10 13:58     ` Jonathan Cameron via groups.io
2024-07-10 14:39       ` Leif Lindholm
2024-07-09 10:47 ` [edk2-devel] [PATCH edk2-platforms v3 5/5] SbsaQemu: introduce helper in PPTT generation Marcin Juszkiewicz
2024-07-09 13:00   ` Leif Lindholm
2024-07-09 13:12     ` Marcin Juszkiewicz
2024-07-09 13:15       ` Leif Lindholm [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zo036NoHELKlecv0@qc-i7.hemma.eciton.net \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox