Gerd, In another mail with title "MdePkg: Remove Itanium leftover data structure", we are discussing the HOB EFI_SEC_PLATFORM_INFORMATION_RECORD2 that helps share the BIST information with CpuDxe driver. That HOB is of format: <UINT32> ( <UINT32> <UINT32> ) +. Very similar to the format of SMM_BASE_HOB_DATA: <UINT64> <UINT64>+
So, if we use a pattern here to remove the 8K CPU limitation, the same pattern will be used by EFI_SEC_PLATFORM_INFORMATION_RECORD2 as well. How about a new format as below? + Mike and Vincent for comments since the same pattern may be used for EFI_SEC_PLATFORM_INFORMATION_RECORD3. #pragma pack(1) typedef struct { UINT32 CpuIndex; UINT32 NumberOfCpus; // align to EFI_SEC_PLATFORM_INFORMATION_RECORD2.NumberOfCpus UINT64 SmBase[]; } SMM_BASE_HOB_DATA; #pragma pack() For system with less than 8K CPUs, one HOB is produced. CpuIndex is set to 0 indicating the HOB describes the CPU from 0 to NumberOfCpus-1. The HOB list may contains multiple such HOB instances each describing the information for CPU from CpuIndex to CpuIndex + NumberOfCpus - 1. The instance order in the HOB list is random so consumer cannot assume the CpuIndex of first instance is 0. Thanks, Ray > -----Original Message----- > From: Gerd Hoffmann <kra...@redhat.com> > Sent: Wednesday, January 18, 2023 7:19 PM > To: Wu, Jiaxin <jiaxin...@intel.com> > Cc: devel@edk2.groups.io; Dong, Eric <eric.d...@intel.com>; Ni, Ray > <ray...@intel.com>; Zeng, Star <star.z...@intel.com>; Laszlo Ersek > <ler...@redhat.com>; Kumar, Rahul R <rahul.r.ku...@intel.com> > Subject: Re: [PATCH v3 1/5] UefiCpuPkg/SmmBaseHob.h: Add SMM Base HOB > Data > > Hi, > > > +#pragma pack(1) > > +typedef struct { > > + /// > > + /// Describes the Number of all max supported processors. > > + /// > > + UINT64 NumberOfProcessors; > > + /// > > + /// Pointer to SmBase address for each Processors. > > + /// > > + UINT64 SmBase[]; > > +} SMM_BASE_HOB_DATA; > > +#pragma pack() > > HOBs are limited to 64k in size. So this can by design support at most > 8191 processors. Adding such a interface to edk2 doesn't look like a > good idea to me. It probably is not that far off that we'll hit that > limit given that high-end systems with 1024+ processors exist today. > > take care, > Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#98812): https://edk2.groups.io/g/devel/message/98812 Mute This Topic: https://groups.io/mt/96350760/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-