public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ray" <ray.ni@intel.com>
To: "Liu, KasimX" <kasimx.liu@intel.com>
Cc: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Dong, Guo" <guo.dong@intel.com>,
	"Lu, James" <james.lu@intel.com>, "Guo, Gua" <gua.guo@intel.com>
Subject: Re: [PATCH] MdeModulePkg: Update the SMBIOS version by UPL
Date: Mon, 8 Aug 2022 03:22:05 +0000	[thread overview]
Message-ID: <MWHPR11MB163115718427A9C860C8E4928C639@MWHPR11MB1631.namprd11.prod.outlook.com> (raw)
In-Reply-To: <MWHPR11MB1631AE570809216E2595085F8C639@MWHPR11MB1631.namprd11.prod.outlook.com>

Re-send to the mailing list.

> -----Original Message-----
> From: Ni, Ray
> Sent: Monday, August 8, 2022 11:20 AM
> To: Liu, KasimX <kasimx.liu@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.liu@intel.com>
> > Sent: Friday, August 5, 2022 4:46 PM
> > To: devel@edk2.groups.io
> > Cc: Liu, KasimX <kasimx.liu@intel.com>; Dong, Guo <guo.dong@intel.com>;
> > Ni, Ray <ray.ni@intel.com>; Lu, James <james.lu@intel.com>; Guo, Gua
> > <gua.guo@intel.com>
> > Subject: [PATCH] MdeModulePkg: Update the SMBIOS version by UPL
> >
> > From: KasimX Liu <kasimx.liu@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.dong@intel.com>
> > Cc: Ray Ni <ray.ni@intel.com>
> > Cc: James Lu <james.lu@intel.com>
> > Cc: Gua Guo <gua.guo@intel.com>
> > Signed-off-by: KasimX Liu <kasimx.liu@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


      parent reply	other threads:[~2022-08-08  3:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05  8:45 [PATCH] MdeModulePkg: Update the SMBIOS version by UPL kasimx.liu
     [not found] ` <DM6PR11MB4027F8D3D941C3E4B849699994639@DM6PR11MB4027.namprd11.prod.outlook.com>
     [not found]   ` <MWHPR11MB1631AE570809216E2595085F8C639@MWHPR11MB1631.namprd11.prod.outlook.com>
2022-08-08  3:22     ` Ni, Ray [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MWHPR11MB163115718427A9C860C8E4928C639@MWHPR11MB1631.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox