Re-send to the mailing list. > -----Original Message----- > From: Ni, Ray > Sent: Monday, August 8, 2022 11:20 AM > To: Liu, KasimX <kasimx....@intel.com> > Subject: RE: [PATCH] MdeModulePkg: Update the SMBIOS version by UPL > > Kasim, > If you read the existing code in RetrieveSmbiosFromHob(), it only uses the > HOB data when the data is valid. > > Can you update the patch to: > 1. do not change SmbiosDriverEntryPoint(). (the entrypoint sets the initial > version to match to the PCD). > 2. Change the IsValidSmbios20/30Table () to return the version number > stored in hob. > 3. Change RetrieveSmbiosFromHob() to update the version in mPrivateData. > I am not sure if it's ok to update the version after > ParseAndAddExistingSmbiosTable(). Please double check the existing code > logic. > > > Thanks, > Ray > > > > > -----Original Message----- > > From: Liu, KasimX <kasimx....@intel.com> > > Sent: Friday, August 5, 2022 4:46 PM > > To: devel@edk2.groups.io > > Cc: Liu, KasimX <kasimx....@intel.com>; Dong, Guo <guo.d...@intel.com>; > > Ni, Ray <ray...@intel.com>; Lu, James <james...@intel.com>; Guo, Gua > > <gua....@intel.com> > > Subject: [PATCH] MdeModulePkg: Update the SMBIOS version by UPL > > > > From: KasimX Liu <kasimx....@intel.com> > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4013 > > > > For the SMBIOS version can be update by UPL,we create the > > gUniversalPayloadSmbios3TableGuid HOB to store the value then updated > > version. > > > > Cc: Guo Dong <guo.d...@intel.com> > > Cc: Ray Ni <ray...@intel.com> > > Cc: James Lu <james...@intel.com> > > Cc: Gua Guo <gua....@intel.com> > > Signed-off-by: KasimX Liu <kasimx....@intel.com> > > --- > > MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c | 20 > > ++++++++++++++++++-- > > 1 file changed, 18 insertions(+), 2 deletions(-) > > > > diff --git a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c > > b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c > > index 81df59cd0f..5ee76c7129 100644 > > --- a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c > > +++ b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c > > @@ -1746,14 +1746,30 @@ SmbiosDriverEntryPoint ( > > ) { EFI_STATUS Status;+ EFI_HOB_GUID_TYPE *GuidHob;+ > > UNIVERSAL_PAYLOAD_SMBIOS_TABLE *Smbiostable;+ > > SMBIOS_TABLE_3_0_ENTRY_POINT *Smbios30EntryPoint;++ GuidHob = > > NULL;+ Smbiostable = NULL;+ Smbios30EntryPoint = NULL; > > mPrivateData.Signature = SMBIOS_INSTANCE_SIGNATURE; > > mPrivateData.Smbios.Add = SmbiosAdd; > > mPrivateData.Smbios.UpdateString = SmbiosUpdateString; > > mPrivateData.Smbios.Remove = SmbiosRemove; > > mPrivateData.Smbios.GetNext = SmbiosGetNext;- > > mPrivateData.Smbios.MajorVersion = (UINT8)(PcdGet16 > > (PcdSmbiosVersion) >> 8);- mPrivateData.Smbios.MinorVersion = > > (UINT8)(PcdGet16 (PcdSmbiosVersion) & 0x00ff);++ GuidHob = > > GetFirstGuidHob (&gUniversalPayloadSmbios3TableGuid);+ if (GuidHob != > > NULL){+ Smbiostable = (UNIVERSAL_PAYLOAD_SMBIOS_TABLE *) (UINTN > > *)(GET_GUID_HOB_DATA (GuidHob));+ Smbios30EntryPoint = > > (SMBIOS_TABLE_3_0_ENTRY_POINT *)Smbiostable->SmBiosEntryPoint;+ > > mPrivateData.Smbios.MajorVersion = Smbios30EntryPoint- > >MajorVersion;+ > > mPrivateData.Smbios.MinorVersion = Smbios30EntryPoint- > >MinorVersion;+ } > > else {+ mPrivateData.Smbios.MajorVersion = (UINT8)(PcdGet16 > > (PcdSmbiosVersion) >> 8);+ mPrivateData.Smbios.MinorVersion = > > (UINT8)(PcdGet16 (PcdSmbiosVersion) & 0x00ff);+ } InitializeListHead > > (&mPrivateData.DataListHead); InitializeListHead > > (&mPrivateData.AllocatedHandleListHead);-- > > 2.32.0.windows.2
-=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#92187): https://edk2.groups.io/g/devel/message/92187 Mute This Topic: https://groups.io/mt/92831590/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-