public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ray" <ray.ni@intel.com>
To: "Zeng, Star" <star.zeng@intel.com>,
	Ray Ni <niruiyu@users.noreply.github.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Dong, Eric" <eric.dong@intel.com>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: Re: [PATCH v2 3/3] UefiCpuPkg/CpuFeature: Introduce First to indicate 1st unit.
Date: Thu, 2 Jan 2020 03:14:50 +0000	[thread overview]
Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C3D170B@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB048310404960B6@shsmsx102.ccr.corp.intel.com>

> 
> Need some patches to update individual InitializeFunc() for features.
> These patches can be a separated patch series.
> 
Yes.

> >
> > The patch adds a new field Fist to indicate the CPU's location in
> 
> "Firt" should be "First".
Will fix the typo in next version of patch or pushing.

> > +  //
> > +  // Set First.Die/Tile/Module for each thread assuming:
> > +  //  single Die under each package, single Tile under each Die, single
> Module
> > under each Tile
> 
> This assumption needs to be addressed in this or a separated patch series.

The assumption will be fixed after the below changes are merged to trunk.
https://github.com/tianocore/edk2-staging/tree/cpu/6-level


> > +  for (PackageIndex = 0; PackageIndex < CpuStatus->PackageCount;
> > PackageIndex++) {
> > +    //
> > +    // Set First.Core for each thread in the first core of each package.
> > +    //
> > +    First = MAX_UINT32;
> > +    for (ProcessorNumber = 0; ProcessorNumber < NumberOfCpus;
> > ProcessorNumber++) {
> > +      Location = &CpuFeaturesData-
> > >InitOrder[ProcessorNumber].CpuInfo.ProcessorInfo.Location;
> > +      if (Location->Package == PackageIndex) {
> 
> Here the code is assuming Location->Package starts from 0 and consecutive.

CpuStatus->PackageCount is assigned in CpuInitDataInitialize():
>  CpuStatus->PackageCount    = Package + 1;
>  CpuStatus->MaxCoreCount    = Core + 1;
>  CpuStatus->MaxThreadCount  = Thread + 1;
So PackageCount actually is the value of max package ID + 1.
With that, the code change isn't assuming Location->Package starts from 0 and consecutive.

> 
> Here the code is assuming Location->Package and Location->Core start from
> 0 and consecutive.
> We could not have this assumption, this patch is to resolve this assumption.
Similarly, The code change above isn't assuming Location->Core starts from 0 and consecutive.

> 
> 
> Thanks,
> Star
> 


  reply	other threads:[~2020-01-02  3:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-26  6:15 [PATCH v2 0/3] UefiCpuPkg/CpuFeature: Introduce First to indicate 1st unit Ray Ni
2019-11-26  6:15 ` [PATCH v2 1/3] UefiCpuPkg/RegisterCpuFeaturesLib: Delete CPU_FEATURE_[BEFORE|AFTER] Ray Ni
2019-12-25  9:35   ` Zeng, Star
2019-11-26  6:15 ` [PATCH v2 2/3] UefiCpuPkg/RegisterCpuFeaturesLib: Rename [Before|After]FeatureBitMask Ray Ni
2019-12-25  9:44   ` [edk2-devel] " Zeng, Star
2019-11-26  6:15 ` [PATCH v2 3/3] UefiCpuPkg/CpuFeature: Introduce First to indicate 1st unit Ray Ni
2019-12-25  9:58   ` Zeng, Star
2020-01-02  3:14     ` Ni, Ray [this message]
2020-02-03  5:59       ` Zeng, Star
2020-02-12  6:08   ` Dong, Eric
2020-02-13  8:04 ` [edk2-devel] [PATCH v2 0/3] " Dong, Eric
2020-02-13 14:15   ` Ni, Ray
2020-02-13 23:13     ` Laszlo Ersek

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=734D49CCEBEEF84792F5B80ED585239D5C3D170B@SHSMSX104.ccr.corp.intel.com \
    --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