From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"rebecca@bsdio.com" <rebecca@bsdio.com>,
"Liu, Zhiguang" <zhiguang.liu@intel.com>,
"Gao, Liming" <gaoliming@byosoft.com.cn>
Cc: Rebecca Cran <rebecca@quicinc.com>,
"Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] [PATCH v2 1/1] MdePkg: Add new JedecJep106Lib to fetch JEDEC JEP106 manufacturer
Date: Fri, 7 Apr 2023 23:06:44 +0000 [thread overview]
Message-ID: <CO1PR11MB49292145979A17BEB0E27397D2969@CO1PR11MB4929.namprd11.prod.outlook.com> (raw)
In-Reply-To: <ac43de0e-7cac-5c50-1ab6-f51d70d748a6@bsdio.com>
Which struct? That macro only applies to global variables, not structure declarations.
Mike
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Rebecca Cran
> Sent: Friday, April 7, 2023 3:59 PM
> To: Kinney, Michael D <michael.d.kinney@intel.com>; devel@edk2.groups.io; Liu, Zhiguang <zhiguang.liu@intel.com>; Gao, Liming
> <gaoliming@byosoft.com.cn>
> Cc: Rebecca Cran <rebecca@quicinc.com>
> Subject: Re: [edk2-devel] [PATCH v2 1/1] MdePkg: Add new JedecJep106Lib to fetch JEDEC JEP106 manufacturer
>
> I guess GLOBAL_REMOVE_IF_UNREFERENCED should be added to the struct too?
>
>
> On 4/7/23 4:42 PM, Rebecca Cran wrote:
> > On 4/7/23 2:25 PM, Kinney, Michael D wrote:
> >> Comments below.
> >>
> >> Hopefully this lib would only be used by modules that get compressed.
> > I guess so, but that's for the user to decide.
> >>
> >> Might add GLOBAL_REMOVE_IF_UNREFERENCED to the arrays of strings to
> >> help the optimizer remove the data that is not referenced.
> >
> > Good idea - I'll add that.
> >
> >>> +CONST CHAR8 *
> >>> +EFIAPI
> >>> +Jep106GetManufacturerName (
> >>> + IN UINT8 Code,
> >>> + IN UINT8 ContinuationBytes
> >>> + )
> >>> +{
> >>> + UINTN Index;
> >>> + CONST JEDEC_MANUFACTURERS *ManufacturersBank;
> >>> +
> >>> + Index = 0;
> >>> +
> >>> + if (ContinuationBytes >= JEP106_MANUFACTURERS_NUM_BANKS) {
> >>> + ASSERT (0);
> >> Do you really want an ASSERT() from this? If this is data from a DIMM
> >> I doubt we want platform to ASSERT(). Perhaps just return NULL?
> > I'll remove it. I added it for validation when I was writing the SPD
> > parsing library.
> >>> +UINTN
> >>> +EFIAPI
> >>> +Jep106GetLongestManufacturerName (
> >>> + VOID
> >>> + )
> >> Why is this API needed? Wouldn’t you really just need the
> >> longest of the ones present in the current boot to build the
> >> SMBIOS record?. Not the longest of all in the banks?
> >
> > I added it because it's useful to know the maximum possible size of
> > the strings that could be in the SMBIOS Type 17 table before doing the
> > SPD parsing.
> >
> > I'll remove it for now, and if it's really needed I can add it back in.
> >
> >
>
>
>
>
next prev parent reply other threads:[~2023-04-07 23:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-07 16:19 [PATCH v2 0/1] MdePkg: Add new JedecJep106Lib to fetch JEDEC JEP106 manufacturer Rebecca Cran
2023-04-07 16:19 ` [PATCH v2 1/1] " Rebecca Cran
2023-04-07 20:25 ` Michael D Kinney
2023-04-07 22:42 ` Rebecca Cran
[not found] ` <1753C85A6247B7C4.11060@groups.io>
2023-04-07 22:58 ` [edk2-devel] " Rebecca Cran
2023-04-07 23:06 ` Michael D Kinney [this message]
2023-04-07 23:10 ` Rebecca Cran
2023-04-07 23:18 ` Michael D Kinney
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=CO1PR11MB49292145979A17BEB0E27397D2969@CO1PR11MB4929.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