From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by mx.groups.io with SMTP id smtpd.web11.278.1680908332939203288 for ; Fri, 07 Apr 2023 15:58:53 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@bsdio.com header.s=fm3 header.b=SIl6iBh6; spf=pass (domain: bsdio.com, ip: 64.147.123.25, mailfrom: rebecca@bsdio.com) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 1EB99320084E; Fri, 7 Apr 2023 18:58:50 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 07 Apr 2023 18:58:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdio.com; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:reply-to:sender:subject:subject:to:to; s= fm3; t=1680908329; x=1680994729; bh=hfgrE8yyQEi9OuVEyH2LOgEU/uZT se3XXhqXVYETrtY=; b=SIl6iBh6v27ChLA5FYG0T7acyraSPnoteE6d9/F6Vqr4 4wxQmmq/X6+WLbb9A7GXPgrZyhpCjE5VVrtVFmvWFxGLmstsZg+6Mk7tAA7hCMZi wLMyU4K8BC5i0XLUIcnTqql8QgWrvkNWUDYcG+1VXaULbePhGr+HkO79MR+6Ugyp nbompu0GFaea/QhAr3jHwIHFlOg5dL7CIwfu6ze+WFhs/2phLL0wZp1QB9VSUe+w fbuIEfptHpHgDFJn1jgp9eEdDtwrRK+dTSMiNdJDfj7ZkEs83Zac1jUY+sB4/je6 mImrHgf9Sz5ybwRv0IHjvRSNsUQr6bQPOFaDw53luw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1680908329; x=1680994729; bh=hfgrE8yyQEi9OuVEyH2LOgEU/uZT se3XXhqXVYETrtY=; b=NOVScgYcWLbUwPq1K6UGVCUF2WInOnbG6SA4XDtX/RAh ++Cf5/iNQHtH7K6irNMII2+1HTF9o+GciGFFODQSWDcXODe3RbXdW7DeKwueH026 htlTSAcR/5LHZo09hnFizop0WlAW0ZfYso9SzMJi+IgZZJQgcvbzJLfDK9COuFcy MmvbAty/5YbiHhHt6QvFgGqTNQ1nta3QKXsz39yzXihTVFh9/VxfQtiYiqwk5W+l yTlnVfwoQV2UqkI3KcW2EcEfBKJGJW9RtdRCcTpAz7QJzNO+zLbKCRRM1SwbesMP ZPjYIo7A0RUStVQS0JzYh4/HqoTUhTwV6HMDUPmuKA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejiedgudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffhvfevrhhfjggtgfesthekredttdefjeenucfhrhhomheptfgv sggvtggtrgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrf grthhtvghrnhepgeelvefhleeiieevhfefueethfdtieduueelkeetiefhueehgeffvdfg vefftdffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprhgvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 7 Apr 2023 18:58:48 -0400 (EDT) Message-ID: Date: Fri, 7 Apr 2023 16:58:47 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [edk2-devel] [PATCH v2 1/1] MdePkg: Add new JedecJep106Lib to fetch JEDEC JEP106 manufacturer From: "Rebecca Cran" To: "Kinney, Michael D" , "devel@edk2.groups.io" , "Liu, Zhiguang" , "Gao, Liming" Cc: Rebecca Cran Reply-To: devel@edk2.groups.io, rebecca@bsdio.com References: <20230407161909.43499-1-rebecca@bsdio.com> <20230407161909.43499-2-rebecca@bsdio.com> <1753C85A6247B7C4.11060@groups.io> In-Reply-To: <1753C85A6247B7C4.11060@groups.io> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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. > >