Re: [PATCH] UefiCpuPkg/CpuFeature: reduce time complexty to calc CpuInfo.First


Ni, Ray
 

+ FirstPackage = MAX_UINT32;

+ for (PackageIndex = 0; PackageIndex < CpuStatus->PackageCount;
PackageIndex++) {

+ FirstCore[PackageIndex] = MAX_UINT32;

+ for (CoreIndex = 0; CoreIndex < CpuStatus->MaxCoreCount; CoreIndex++)
{

+ FirstThread[PackageIndex * CpuStatus->MaxCoreCount + CoreIndex] =
MAX_UINT32;

+ }

+ }
Could this code block be replaced by a SetMem32(xxx, xxx, MAX_UINT32) call?
Yes. it could. I thought the for loop is more readable. Maybe it doesn't help a lot
on the code readability. Let me send an updated version to use SetMem32.

Join devel@edk2.groups.io to automatically receive all group messages.