public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Zhiguang Liu" <zhiguang.liu@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Ni, Ray" <ray.ni@intel.com>,
	Patrick Rudolph <patrick.rudolph@9elements.com>
Cc: "Chaganty, Rangasai V" <rangasai.v.chaganty@intel.com>,
	"Bi, Dandan" <dandan.bi@intel.com>,
	"Zeng, Star" <star.zeng@intel.com>,
	"Gao, Zhichao" <zhichao.gao@intel.com>,
	"You, Benjamin" <benjamin.you@intel.com>,
	"philipp.deppenwiese@9elements.com"
	<philipp.deppenwiese@9elements.com>,
	"Ma, Maurice" <maurice.ma@intel.com>,
	"Dong, Guo" <guo.dong@intel.com>
Subject: Re: [edk2-devel] [PATCH - resend] MdeModulePkg/Universal/SmbiosDxe: Scan for existing tables
Date: Thu, 1 Apr 2021 04:41:57 +0000	[thread overview]
Message-ID: <PH0PR11MB5048D26A59FA4E55C9E1AAEF907B9@PH0PR11MB5048.namprd11.prod.outlook.com> (raw)
In-Reply-To: <CO1PR11MB49303B9F5B517CBEDBDABC668C989@CO1PR11MB4930.namprd11.prod.outlook.com>

Hi Patrick Rudolph,

I also want this feature that enables Smbios driver to parse and install existing SMBIOS table.
I notice there are some comments about your patch. If you don't have time to refine it, I can keep your signed-off-by, and continue your work based on Ray and Guo's comments.

Thanks
Zhiguang

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Ni, Ray
> Sent: Wednesday, March 3, 2021 5:15 PM
> To: Patrick Rudolph <patrick.rudolph@9elements.com>
> Cc: devel@edk2.groups.io; Chaganty, Rangasai V
> <rangasai.v.chaganty@intel.com>; Bi, Dandan <dandan.bi@intel.com>; Zeng,
> Star <star.zeng@intel.com>; Gao, Zhichao <zhichao.gao@intel.com>; You,
> Benjamin <benjamin.you@intel.com>;
> philipp.deppenwiese@9elements.com; Ma, Maurice
> <maurice.ma@intel.com>; Dong, Guo <guo.dong@intel.com>
> Subject: Re: [edk2-devel] [PATCH - resend]
> MdeModulePkg/Universal/SmbiosDxe: Scan for existing tables
> 
> I have 5 more comments embedded, can you read and reply?
> 
> > -----Original Message-----
> > From: Patrick Rudolph <patrick.rudolph@9elements.com>
> > Sent: Wednesday, March 3, 2021 4:38 PM
> > To: Ni, Ray <ray.ni@intel.com>
> > Cc: devel@edk2.groups.io; Chaganty, Rangasai V
> > <rangasai.v.chaganty@intel.com>; Bi, Dandan <dandan.bi@intel.com>;
> Zeng,
> > Star <star.zeng@intel.com>; Gao, Zhichao <zhichao.gao@intel.com>; You,
> > Benjamin <benjamin.you@intel.com>;
> > philipp.deppenwiese@9elements.com; Ma, Maurice
> > <maurice.ma@intel.com>; Dong, Guo <guo.dong@intel.com>
> > Subject: Re: [edk2-devel] [PATCH - resend]
> > MdeModulePkg/Universal/SmbiosDxe: Scan for existing tables
> >
> > Hi Ray,
> > thanks for your feedback.
> >
> > Currently a single HOB containing all the SMBIOS table is exported by
> > coreboot.
> > As coreboot doesn't support multiple HOBs with the same ID, #2 isn't a
> > solution.
> >
> > I'll look into passing a HOB instead of using
> > EfiGetSystemConfigurationTable and see if I can get rid of the table
> > shadow copy.
> >
> > Regards,
> > Patrick Rudolph
> >
> > On Wed, Mar 3, 2021 at 9:13 AM Ni, Ray <ray.ni@intel.com> wrote:
> > >
> > > In general, I agree this solution that lets SMBIOS driver directly absorbs
> the
> > SMBIOS table from PEI.
> > > This can eliminate the needs of a separate driver that consumes the HOB
> > and calls SMBIOS protocol to add the SMBIOS structures.
> > >
> > > There are two options for the HOB design:
> > > 1. A single HOB that points to the SMBIOS table.
> > > 2. Multiple HOBs that each points to a SMBIOS structure.
> > >
> > > In my opinion, option #2 is more flexible because it doesn't require the
> > bootloader to consolidate all the SMBIOS structures together.
> > > The CPU module in the bootloader can produce the type 4 and 7
> structures.
> > > The PCI module in the bootloader can produce the type 9 structures.
> > >
> > > But, I am not sure if option #2 is conflict with what coreboot does. Does
> > coreboot produce the whole SMBIOS table in a single buffer?
> > > Option #2 also doesn't care whether it's a SMBIOS 3.0 table or 2.x table.
> > >
> > > >+  Status = EfiGetSystemConfigurationTable (
> > >
> > > 1. Why don't you directly get the data from HOB list? This can eliminate
> the
> > code in BlSupportDxe that gets data in HOB and publishes to
> > > configuration table.
> > >
> > > > +ValidateSmbios20Table(
> > > > +ValidateSmbios30Table(
> > >
> > > 2. I will defer to experts (Dandan, Star and Zhichao) to review whether
> the
> > above two functions are implemented properly.
> > >
> > > >
> > > > +ParseAndAddExistingSmbiosTable(
> > > > +  IN EFI_HANDLE                    ImageHandle,
> > > > +  IN SMBIOS_STRUCTURE_POINTER      Smbios,
> > > > +  IN UINTN                         Length
> > > > +) {
> > > > +  EFI_STATUS                    Status;
> > > > +  CHAR8                         *String;
> > > > +  EFI_SMBIOS_HANDLE             SmbiosHandle;
> > > > +  SMBIOS_STRUCTURE_POINTER      SmbiosEnd;
> > > > +
> > > > +  SmbiosEnd.Raw = Smbios.Raw + Length;
> > > > +
> > > > +  do {
> > > > +    // Check for end marker
> > > > +    if (Smbios.Hdr->Type == 127) {
> > >
> > > 3. Please use SMBIOS_TYPE_END_OF_TABLE instead of hardcode 127.
> > >
> > > >
> > > > +    CopyMem (Smbios.Raw, (VOID *)Smbios30Table, Smbios30Table-
> > > > >TableMaximumSize);
> > >
> > > 4. Should we copy from Smbios30Table->TableAddress instead of
> > Smbios30Table?
> > >
> > > >
> > > > +    Status = ParseAndAddExistingSmbiosTable(ImageHandle, Smbios,
> > > > Smbios30Table->TableMaximumSize);
> > >
> > > 5. Can you explain in specific why SMBIOS table should be duplicated
> > before parsing?
> > >
> > >
> 
> 
> 
> 


  reply	other threads:[~2021-04-01  4:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01 14:32 [PATCH - resend] MdeModulePkg/Universal/SmbiosDxe: Scan for existing tables Patrick Rudolph
2021-03-03  8:13 ` [edk2-devel] " Ni, Ray
2021-03-03  8:37   ` Patrick Rudolph
2021-03-03  9:15     ` Ni, Ray
2021-04-01  4:41       ` Zhiguang Liu [this message]
2021-04-01  5:50         ` Patrick Rudolph
2021-03-03 10:03     ` Ni, Ray
2021-03-03 17:53       ` Guo Dong
2021-03-04  1:03         ` Ni, Ray
2021-03-09  9:05           ` Ni, Ray
2021-03-03 15:29 ` Guo Dong

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=PH0PR11MB5048D26A59FA4E55C9E1AAEF907B9@PH0PR11MB5048.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