public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "gaoliming" <gaoliming@byosoft.com.cn>
To: <devel@edk2.groups.io>, <sainadhn@ami.com>
Cc: "'Vasudevan S'" <vasudevans@ami.com>,
	"'Sundaresan S'" <sundaresans@ami.com>, <zhichao.gao@intel.com>
Subject: 回复: [edk2-devel] [PATCH] ShellPkg:Improved Smbios Type 9 data under smbiosview
Date: Fri, 4 Nov 2022 09:08:45 +0800	[thread overview]
Message-ID: <02ff01d8efe9$fcd44da0$f67ce8e0$@byosoft.com.cn> (raw)
In-Reply-To: <20221102043009.1630-1-sainadhn@ami.com>

Sainadh:
  The change is good. Can you create pull request for this change in Edk2
project?

Thanks
Liming
> -----邮件原件-----
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Sainadh
> Nagolu via groups.io
> 发送时间: 2022年11月2日 12:30
> 收件人: devel@edk2.groups.io; Sainadh Nagolu <sainadhn@ami.com>
> 抄送: Vasudevan S <vasudevans@ami.com>; Sundaresan S
> <sundaresans@ami.com>
> 主题: [edk2-devel] [PATCH] ShellPkg:Improved Smbios Type 9 data under
> smbiosview
> 
> Added spec version check while publishing new fields, added Slot Pitch
field
> which was missing and corrected the publishing order as per Smbios spec.
> 
> Signed-off-by: Sainadh Nagolu <sainadhn@ami.com>
> 
> ---
>  .../SmbiosView/PrintInfo.c                     | 18
> ++++++++++++------
>  .../SmbiosView/SmbiosViewStrings.uni           |  2 ++
>  2 files changed, 14 insertions(+), 6 deletions(-)
> 
> diff --git
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
> index bf5306205b..595de36b40 100644
> --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
> +++
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
> @@ -638,12 +638,18 @@ SmbiosPrintStructure (
>              ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN
> (STR_SMBIOSVIEW_PRINTINFO_DATA_BUS_WIDTH), gShellDebug1HiiHandle,
> PeerGroupPtr[Index].DataBusWidth);
> 
>            }
> 
> 
> 
> -          // Since PeerGroups has a variable number of entries, new
fields
> added after PeerGroups are defined in
> 
> -          // a extended structure. Those fields can be referenced using
> SMBIOS_TABLE_TYPE9_EXTENDED structure.
> 
> -          Type9ExtendedStruct = (SMBIOS_TABLE_TYPE9_EXTENDED
> *)((UINT8 *)PeerGroupPtr + (PeerGroupCount * sizeof
> (MISC_SLOT_PEER_GROUP)));
> 
> -          DisplaySystemSlotHeight (Type9ExtendedStruct->SlotHeight,
> Option);
> 
> -          DisplaySystemSlotPhysicalWidth
> (Type9ExtendedStruct->SlotPhysicalWidth, Option);
> 
> -          DisplaySystemSlotInformation
> (Type9ExtendedStruct->SlotInformation, Option);
> 
> +
> 
> +          if (AE_SMBIOS_VERSION (0x3, 0x4)) {
> 
> +              // Since PeerGroups has a variable number of entries, new
> fields added after PeerGroups are defined in
> 
> +              // a extended structure. Those fields can be referenced
> using SMBIOS_TABLE_TYPE9_EXTENDED structure.
> 
> +              Type9ExtendedStruct =
> (SMBIOS_TABLE_TYPE9_EXTENDED *)((UINT8 *)PeerGroupPtr +
> (PeerGroupCount * sizeof (MISC_SLOT_PEER_GROUP)));
> 
> +              DisplaySystemSlotInformation
> (Type9ExtendedStruct->SlotInformation, Option);
> 
> +              DisplaySystemSlotPhysicalWidth
> (Type9ExtendedStruct->SlotPhysicalWidth, Option);
> 
> +              ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN
> (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_PITCH),
> gShellDebug1HiiHandle, Type9ExtendedStruct->SlotPitch);
> 
> +              if (AE_SMBIOS_VERSION (0x3, 0x5)) {
> 
> +                  DisplaySystemSlotHeight
> (Type9ExtendedStruct->SlotHeight, Option);
> 
> +              }
> 
> +          }
> 
>          }
> 
>        }
> 
> 
> 
> diff --git
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewS
> trings.uni
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewS
> trings.uni
> index 68211ce7ab..c24f7d5716 100644
> ---
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewS
> trings.uni
> +++
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewS
> trings.uni
> @@ -1,6 +1,7 @@
>  // /**
> 
>  //
> 
>  // Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
> 
> +// Copyright (c) 1985 - 2022, American Megatrends International LLC.<BR>
> 
>  // (C) Copyright 2014-2015 Hewlett-Packard Development Company,
> L.P.<BR>
> 
>  // (C) Copyright 2015-2019 Hewlett Packard Enterprise Development
> LP<BR>
> 
>  // SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> @@ -417,6 +418,7 @@
>  #string STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_INFORMATION
> #language en-US "System Slot Information: "
> 
>  #string STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_HEIGHT
> #language en-US "System Slot Height: "
> 
>  #string STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_PHYSICAL_WIDTH
> #language en-US "System Slot Physical Width: "
> 
> +#string STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_PITCH
> #language en-US "Slot Pitch: %d\r\n"
> 
>  #string STR_SMBIOSVIEW_QUERYTABLE_ONBOARD_DEVICE_TYPE
> #language en-US "Onboard Device Type: "
> 
>  #string STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_EVENT_LOG_TYPE
> #language en-US "System Event Log Type: "
> 
>  #string STR_SMBIOSVIEW_QUERYTABLE_EVENT_LOG_VAR_DATA_FORMAT
> #language en-US "Event Log Variable Data Format Types: "
> 
> --
> 2.36.0.windows.1
> -The information contained in this message may be confidential and
> proprietary to American Megatrends (AMI). This communication is intended
to
> be read only by the individual or entity to whom it is addressed or by
their
> designee. If the reader of this message is not the intended recipient, you
are
> on notice that any distribution of this message, in any form, is strictly
> prohibited. Please promptly notify the sender by reply e-mail or by
telephone
> at 770-246-8600, and then delete or destroy all copies of the
transmission.
> 
> 
> 
> 




  reply	other threads:[~2022-11-04  1:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-02  4:30 [PATCH] ShellPkg:Improved Smbios Type 9 data under smbiosview Sainadh Nagolu
2022-11-04  1:08 ` gaoliming [this message]
2022-11-04 11:32   ` [edk2-devel] 回复: [edk2-devel] " Sainadh Nagolu
2022-11-07  4:18     ` 回复: " gaoliming
     [not found]     ` <1725327F623FD031.22635@groups.io>
2022-11-08  1:17       ` gaoliming
2022-11-10  3:56         ` [edk2-devel] " Sainadh Nagolu
2022-11-10  7:32           ` 回复: " gaoliming
2022-11-10  7:35             ` [edk2-devel] " Sainadh Nagolu
2022-11-11  0:47               ` 回复: " gaoliming
     [not found]               ` <17266143818D3E06.2299@groups.io>
2022-11-11  3:52                 ` gaoliming
2022-11-11  4:18                   ` [edk2-devel] " Sainadh Nagolu

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='02ff01d8efe9$fcd44da0$f67ce8e0$@byosoft.com.cn' \
    --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