On 02/26/20 16:46, Duran, Leo wrote: > BTW, > > I also considered adding a flag to CPU_MP_DATA to make the usage of > PlatformId a bit more explicit. > E.g., something like CpuMpData->CpuData[ProcessorNumber].IsValidPlatformId... > So the init code would look like this: > > // > // NOTE: PlatformId is not relevant on AMD platforms. > // > if (StandardSignatureIsAuthenticAMD ()) { > CpuMpData->CpuData[ProcessorNumber].IsValidPlatformId = FALSE; > else { > PlatformIdMsr.Uint64 = AsmReadMsr64 (MSR_IA32_PLATFORM_ID); > CpuMpData->CpuData[ProcessorNumber].PlatformId = > (UINT8)PlatformIdMsr.Bits.PlatformId; > CpuMpData->CpuData[ProcessorNumber].IsValidPlatformId = TRUE; > } > > This way "IsValidPlatformId" could be checked prior to using "PlatformId". > Anyway, that seemed a bit overkill, so I opted against it... thoughts?
I think a global flag is justified; in the above approach, "IsValidPlatformId" would not vary across "ProcessorNumber", so it does look like useless generality. Thanks Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#54889): https://edk2.groups.io/g/devel/message/54889 Mute This Topic: https://groups.io/mt/71541516/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-