[edk2-devel] [PATCH v2 3/3] UefiCpuPkg/CpuFeature: Introduce First to indicate 1st unit.
Ni, Ray
ray.ni at intel.com
Thu Jan 2 03:14:50 UTC 2020
>
> 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
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#52642): https://edk2.groups.io/g/devel/message/52642
Mute This Topic: https://groups.io/mt/61962261/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list