Re: [edk2-devel] [PATCH v3] MdePkg: Update smbiosview type 9 with SMBIOS 3.5 fields

2022-04-21 Thread Bo Chang Ke
Hi Liming, Mike,

Fix coding style issue,

And create a PR here: https://github.com/tianocore/edk2/pull/2811

The CI checks have passed.

Can you help push this PR?

Thank you very much.

Best Regards.

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Bo Chang Ke
Sent: Thursday, April 21, 2022 6:55 PM
To: devel@edk2.groups.io
Cc: Gao, Liming ; Kinney, Michael D 
; Liu, Zhiguang ; Gao, 
Zhichao ; Bi, Dandan ; Zeng, Star 

Subject: [edk2-devel] [PATCH v3] MdePkg: Update smbiosview type 9 with SMBIOS 
3.5 fields

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3896

update smbiosview type 9 related fileds.

Signed-off-by: Bo Chang Ke 
Cc: Liming Gao 
Cc: Michael D Kinney 
Cc: Zhiguang Liu 
Cc: Zhichao Gao 
Cc: Dandan Bi 
Cc: Star Zeng 
---
 MdePkg/Include/IndustryStandard/SmBios.h | 177 ++-
 1 file changed, 112 insertions(+), 65 deletions(-)

diff --git a/MdePkg/Include/IndustryStandard/SmBios.h 
b/MdePkg/Include/IndustryStandard/SmBios.h
index 2b1567b052..20d62680a5 100644
--- a/MdePkg/Include/IndustryStandard/SmBios.h
+++ b/MdePkg/Include/IndustryStandard/SmBios.h
@@ -1271,71 +1271,85 @@ typedef struct {  /// System Slots - Slot Type  ///  
typedef enum {
-  SlotTypeOther  = 0x01,
-  SlotTypeUnknown= 0x02,
-  SlotTypeIsa= 0x03,
-  SlotTypeMca= 0x04,
-  SlotTypeEisa   = 0x05,
-  SlotTypePci= 0x06,
-  SlotTypePcmcia = 0x07,
-  SlotTypeVlVesa = 0x08,
-  SlotTypeProprietary= 0x09,
-  SlotTypeProcessorCardSlot  = 0x0A,
-  SlotTypeProprietaryMemoryCardSlot  = 0x0B,
-  SlotTypeIORiserCardSlot= 0x0C,
-  SlotTypeNuBus  = 0x0D,
-  SlotTypePci66MhzCapable= 0x0E,
-  SlotTypeAgp= 0x0F,
-  SlotTypeApg2X  = 0x10,
-  SlotTypeAgp4X  = 0x11,
-  SlotTypePciX   = 0x12,
-  SlotTypeAgp8X  = 0x13,
-  SlotTypeM2Socket1_DP   = 0x14,
-  SlotTypeM2Socket1_SD   = 0x15,
-  SlotTypeM2Socket2  = 0x16,
-  SlotTypeM2Socket3  = 0x17,
-  SlotTypeMxmTypeI   = 0x18,
-  SlotTypeMxmTypeII  = 0x19,
-  SlotTypeMxmTypeIIIStandard = 0x1A,
-  SlotTypeMxmTypeIIIHe   = 0x1B,
-  SlotTypeMxmTypeIV  = 0x1C,
-  SlotTypeMxm30TypeA = 0x1D,
-  SlotTypeMxm30TypeB = 0x1E,
-  SlotTypePciExpressGen2Sff_8639 = 0x1F,
-  SlotTypePciExpressGen3Sff_8639 = 0x20,
-  SlotTypePciExpressMini52pinWithBSKO= 0x21,///< PCI Express Mini 
52-pin (CEM spec. 2.0) with bottom-side keep-outs.
-  SlotTypePciExpressMini52pinWithoutBSKO = 0x22,///< PCI Express Mini 
52-pin (CEM spec. 2.0) without bottom-side keep-outs.
-  SlotTypePciExpressMini76pin= 0x23,///< PCI Express Mini 
76-pin (CEM spec. 2.0) Corresponds to Display-Mini card.
-  SlotTypeCXLFlexbus10   = 0x30,
-  SlotTypePC98C20= 0xA0,
-  SlotTypePC98C24= 0xA1,
-  SlotTypePC98E  = 0xA2,
-  SlotTypePC98LocalBus   = 0xA3,
-  SlotTypePC98Card   = 0xA4,
-  SlotTypePciExpress = 0xA5,
-  SlotTypePciExpressX1   = 0xA6,
-  SlotTypePciExpressX2   = 0xA7,
-  SlotTypePciExpressX4   = 0xA8,
-  SlotTypePciExpressX8   = 0xA9,
-  SlotTypePciExpressX16  = 0xAA,
-  SlotTypePciExpressGen2 = 0xAB,
-  SlotTypePciExpressGen2X1   = 0xAC,
-  SlotTypePciExpressGen2X2   = 0xAD,
-  SlotTypePciExpressGen2X4   = 0xAE,
-  SlotTypePciExpressGen2X8   = 0xAF,
-  SlotTypePciExpressGen2X16  = 0xB0,
-  SlotTypePciExpressGen3 = 0xB1,
-  SlotTypePciExpressGen3X1   = 0xB2,
-  SlotTypePciExpressGen3X2   = 0xB3,
-  SlotTypePciExpressGen3X4   = 0xB4,
-  SlotTypePciExpressGen3X8   = 0xB5,
-  SlotTypePciExpressGen3X16  = 0xB6,
-  SlotTypePciExpressGen4 = 0xB8,
-  SlotTypePciExpressGen4X1   = 0xB9,
-  SlotTypePciExpressGen4X2   = 0xBA,
-  SlotTypePciExpressGen4X4   = 0xBB,
-  SlotTypePciExpressGen4X8   = 0xBC,
-  SlotTypePciExpressGen4X16  = 0xBD
+  SlotTypeOther = 0x01,
+  SlotTypeUnknown   = 0x02,
+  SlotTypeIsa   = 0x03,
+  SlotTypeMca   = 0x04,
+  Slo

[edk2-devel] [PATCH v3] ShellPkg: Update smbiosview type 9 with SMBIOS 3.5 fields

2022-04-21 Thread Bo Chang Ke
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3896

update smbiosview type 9 related fileds.

Signed-off-by: Bo Chang Ke 
Cc: Ray Ni 
Cc: Zhichao Gao 
Cc: Liming Gao 
Cc: Michael D Kinney 
---
 .../SmbiosView/PrintInfo.c|   9 +-
 .../SmbiosView/QueryTable.c   | 236 ++
 .../SmbiosView/QueryTable.h   |  36 +++
 .../SmbiosView/SmbiosViewStrings.uni  |   5 +-
 4 files changed, 280 insertions(+), 6 deletions(-)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
index b144600a25..5dbd39ca3b 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
@@ -635,6 +635,10 @@ SmbiosPrintStructure (
 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN 
(STR_SMBIOSVIEW_PRINTINFO_DEV_FUNC_NUM), gShellDebug1HiiHandle, 
PeerGroupPtr[Index].DevFuncNum);
 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN 
(STR_SMBIOSVIEW_PRINTINFO_DATA_BUS_WIDTH), gShellDebug1HiiHandle, 
PeerGroupPtr[Index].DataBusWidth);
   }
+
+  DisplaySystemSlotHeight (Struct->Type9->SlotHeight, Option);
+  DisplaySystemSlotPhysicalWidth (Struct->Type9->SlotPhysicalWidth, 
Option);
+  DisplaySystemSlotInformation (Struct->Type9->SlotInformation, 
Option);
 }
   }
 
@@ -2898,11 +2902,6 @@ DisplaySystemSlotId (
   IN UINT8   Option
   )
 {
-  //
-  // Display slot type first
-  //
-  DisplaySystemSlotType (SlotType, Option);
-
   ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN 
(STR_SMBIOSVIEW_PRINTINFO_SLOT_ID), gShellDebug1HiiHandle);
   //
   // print option
diff --git 
a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
index 7ec6d2b5f1..2e62ae3a34 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
@@ -1447,6 +1447,26 @@ TABLE_ITEM  SystemSlotTypeTable[] = {
 0x23,
 L"PCI Express Mini 76-pin (CEM spec. 2.0) Corresponds to Display-Mini card"
   },
+  {
+0x24,
+L"PCI Express Gen 4 SFF-8639 (U.2)"
+  },
+  {
+0x25,
+L"PCI Express Gen 5 SFF-8639 (U.2)"
+  },
+  {
+0x26,
+L"OCP NIC 3.0 Small Form Factor (SFF)"
+  },
+  {
+0x27,
+L"OCP NIC 3.0 Large Form Factor (LFF)"
+  },
+  {
+0x28,
+L"OCP NIC Prior to 3.0"
+  },
   {
 SlotTypeCXLFlexbus10,
 L"CXL Flexbus 1.0"
@@ -1566,6 +1586,42 @@ TABLE_ITEM  SystemSlotTypeTable[] = {
   {
 SlotTypePciExpressGen4X16,
 L"PCI Express Gen 4 X16"
+  },
+  {
+SlotTypePCIExpressGen5,
+L"PCI Express Gen 5"
+  },
+  {
+SlotTypePCIExpressGen5X1,
+L"PCI Express Gen 5 x1"
+  },
+  {
+SlotTypePCIExpressGen5X2,
+L"PCI Express Gen 5 x2"
+  },
+  {
+SlotTypePCIExpressGen5X4,
+L"PCI Express Gen 5 x4"
+  },
+  {
+SlotTypePCIExpressGen5X8,
+L"PCI Express Gen 5 x8"
+  },
+  {
+SlotTypePCIExpressGen5X16,
+L"PCI Express Gen 5 x16"
+  },
+  {
+SlotTypePCIExpressGen6andBeyond,
+L"PCI Express Gen 6 and Beyond"
+  },
+  {
+SlotTypeEnterpriseandDatacenter1UE1FormFactorSlot,
+L"Enterprise and Datacenter 1U E1 Form Factor Slot"
+  },
+  {
+SlotTypeEnterpriseandDatacenter3E3FormFactorSlot,
+L"Enterprise and Datacenter 3'E3 Form Factor Slot"
   }
 };
 
@@ -1628,6 +1684,96 @@ TABLE_ITEM  SystemSlotDataBusWidthTable[] = {
   }
 };
 
+TABLE_ITEM  SystemSlotPhysicalWidthTable[] = {
+  {
+0x01,
+L" Other"
+  },
+  {
+0x02,
+L" Unknown"
+  },
+  {
+0x03,
+L" 8 bit"
+  },
+  {
+0x04,
+L" 16 bit"
+  },
+  {
+0x05,
+L" 32 bit"
+  },
+  {
+0x06,
+L" 64 bit"
+  },
+  {
+0x07,
+L" 128 bit"
+  },
+  {
+0x08,
+L" 1x or x1"
+  },
+  {
+0x09,
+L" 2x or x2"
+  },
+  {
+0x0A,
+L" 4x or x4"
+  },
+  {
+0x0B,
+L" 8x or x8"
+  },
+  {
+0x0C,
+L" 12x or x12"
+  },
+  {
+0x0D,
+L" 16x or x16"
+  },
+  {
+0x0E,
+L" 32x or x32"
+  }
+};
+
+TABLE_ITEM  SystemSlotInformationTable[] = {
+  {
+0x00,
+L" Others"
+  },
+  {
+0x01,
+L" Gen 1"
+  },
+  {
+0x02,
+L" Gen 2"
+  },
+  {
+0x03,
+L" Gen 3"
+  },
+  {
+0x04,
+L" Gen 4"
+  },
+  {
+0x05,
+L" Gen 5"
+  },
+  {
+0x06,
+L" Gen 6"
+  }
+};
+
 TABLE_ITEM  SystemSlotCurrentUsageTable[] = {
   {
 0x01,
@@ -1670,6 +1816,29 @@

[edk2-devel] [PATCH v3] MdePkg: Update smbiosview type 9 with SMBIOS 3.5 fields

2022-04-21 Thread Bo Chang Ke
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3896

update smbiosview type 9 related fileds.

Signed-off-by: Bo Chang Ke 
Cc: Liming Gao 
Cc: Michael D Kinney 
Cc: Zhiguang Liu 
Cc: Zhichao Gao 
Cc: Dandan Bi 
Cc: Star Zeng 
---
 MdePkg/Include/IndustryStandard/SmBios.h | 177 ++-
 1 file changed, 112 insertions(+), 65 deletions(-)

diff --git a/MdePkg/Include/IndustryStandard/SmBios.h 
b/MdePkg/Include/IndustryStandard/SmBios.h
index 2b1567b052..20d62680a5 100644
--- a/MdePkg/Include/IndustryStandard/SmBios.h
+++ b/MdePkg/Include/IndustryStandard/SmBios.h
@@ -1271,71 +1271,85 @@ typedef struct {
 /// System Slots - Slot Type
 ///
 typedef enum {
-  SlotTypeOther  = 0x01,
-  SlotTypeUnknown= 0x02,
-  SlotTypeIsa= 0x03,
-  SlotTypeMca= 0x04,
-  SlotTypeEisa   = 0x05,
-  SlotTypePci= 0x06,
-  SlotTypePcmcia = 0x07,
-  SlotTypeVlVesa = 0x08,
-  SlotTypeProprietary= 0x09,
-  SlotTypeProcessorCardSlot  = 0x0A,
-  SlotTypeProprietaryMemoryCardSlot  = 0x0B,
-  SlotTypeIORiserCardSlot= 0x0C,
-  SlotTypeNuBus  = 0x0D,
-  SlotTypePci66MhzCapable= 0x0E,
-  SlotTypeAgp= 0x0F,
-  SlotTypeApg2X  = 0x10,
-  SlotTypeAgp4X  = 0x11,
-  SlotTypePciX   = 0x12,
-  SlotTypeAgp8X  = 0x13,
-  SlotTypeM2Socket1_DP   = 0x14,
-  SlotTypeM2Socket1_SD   = 0x15,
-  SlotTypeM2Socket2  = 0x16,
-  SlotTypeM2Socket3  = 0x17,
-  SlotTypeMxmTypeI   = 0x18,
-  SlotTypeMxmTypeII  = 0x19,
-  SlotTypeMxmTypeIIIStandard = 0x1A,
-  SlotTypeMxmTypeIIIHe   = 0x1B,
-  SlotTypeMxmTypeIV  = 0x1C,
-  SlotTypeMxm30TypeA = 0x1D,
-  SlotTypeMxm30TypeB = 0x1E,
-  SlotTypePciExpressGen2Sff_8639 = 0x1F,
-  SlotTypePciExpressGen3Sff_8639 = 0x20,
-  SlotTypePciExpressMini52pinWithBSKO= 0x21,///< PCI Express Mini 
52-pin (CEM spec. 2.0) with bottom-side keep-outs.
-  SlotTypePciExpressMini52pinWithoutBSKO = 0x22,///< PCI Express Mini 
52-pin (CEM spec. 2.0) without bottom-side keep-outs.
-  SlotTypePciExpressMini76pin= 0x23,///< PCI Express Mini 
76-pin (CEM spec. 2.0) Corresponds to Display-Mini card.
-  SlotTypeCXLFlexbus10   = 0x30,
-  SlotTypePC98C20= 0xA0,
-  SlotTypePC98C24= 0xA1,
-  SlotTypePC98E  = 0xA2,
-  SlotTypePC98LocalBus   = 0xA3,
-  SlotTypePC98Card   = 0xA4,
-  SlotTypePciExpress = 0xA5,
-  SlotTypePciExpressX1   = 0xA6,
-  SlotTypePciExpressX2   = 0xA7,
-  SlotTypePciExpressX4   = 0xA8,
-  SlotTypePciExpressX8   = 0xA9,
-  SlotTypePciExpressX16  = 0xAA,
-  SlotTypePciExpressGen2 = 0xAB,
-  SlotTypePciExpressGen2X1   = 0xAC,
-  SlotTypePciExpressGen2X2   = 0xAD,
-  SlotTypePciExpressGen2X4   = 0xAE,
-  SlotTypePciExpressGen2X8   = 0xAF,
-  SlotTypePciExpressGen2X16  = 0xB0,
-  SlotTypePciExpressGen3 = 0xB1,
-  SlotTypePciExpressGen3X1   = 0xB2,
-  SlotTypePciExpressGen3X2   = 0xB3,
-  SlotTypePciExpressGen3X4   = 0xB4,
-  SlotTypePciExpressGen3X8   = 0xB5,
-  SlotTypePciExpressGen3X16  = 0xB6,
-  SlotTypePciExpressGen4 = 0xB8,
-  SlotTypePciExpressGen4X1   = 0xB9,
-  SlotTypePciExpressGen4X2   = 0xBA,
-  SlotTypePciExpressGen4X4   = 0xBB,
-  SlotTypePciExpressGen4X8   = 0xBC,
-  SlotTypePciExpressGen4X16  = 0xBD
+  SlotTypeOther = 0x01,
+  SlotTypeUnknown   = 0x02,
+  SlotTypeIsa   = 0x03,
+  SlotTypeMca   = 0x04,
+  SlotTypeEisa  = 0x05,
+  SlotTypePci   = 0x06,
+  SlotTypePcmcia= 0x07,
+  SlotTypeVlVesa= 0x08,
+  SlotTypeProprietary   = 0x09,
+  SlotTypeProcessorCardSlot = 0x0A,
+  SlotTypeProprietaryMemoryCardSlot = 0x0B,
+  SlotTypeIORiserCardSlot   = 0x0C,
+  SlotTypeNuBus = 0x0D,
+  SlotTypePci66M

[edk2-devel] [PATCH] ShellPkg: Update smbiosview type 0 with SMBIOS 3.5 fields

2022-04-20 Thread Bo Chang Ke
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3906

update smbiosview type 0 related fileds.

Signed-off-by: Bo Chang Ke 
Cc: Ray Ni 
Cc: Zhichao Gao 
---
 .../UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c   | 6 ++
 .../SmbiosView/SmbiosViewStrings.uni| 2 ++
 2 files changed, 8 insertions(+)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
index b144600a25..618bcd1590 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
@@ -1536,6 +1536,12 @@ DisplayBiosCharacteristicsExt2 (
   if (BIT (byte2, 4) != 0) {
 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN 
(STR_SMBIOSVIEW_PRINTINFO_VIRTUAL_MACHINE), gShellDebug1HiiHandle);
   }
+  if (BIT (byte2, 5) != 0) {
+ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN 
(STR_SMBIOSVIEW_PRINTINFO_MCFG_SUPPORTED), gShellDebug1HiiHandle);
+  }
+  if (BIT (byte2, 6) != 0) {
+ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN 
(STR_SMBIOSVIEW_PRINTINFO_MCFG_ENABLED), gShellDebug1HiiHandle);
+  }
 
   ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN 
(STR_SMBIOSVIEW_PRINTINFO_BITS_RSVD_FOR_FUTURE), gShellDebug1HiiHandle, 5);
 } else {
diff --git 
a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni
index 9433e8a25f..5a83e9834b 100644
--- 
a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni
+++ 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni
@@ -163,6 +163,8 @@
 #string STR_SMBIOSVIEW_PRINTINFO_ENABLE_TAR_CONT_DIST   #language 
en-US "Enable Targeted Content Distribution\r\n"
 #string STR_SMBIOSVIEW_PRINTINFO_UEFI_SPEC_SUPPORT  #language 
en-US "UEFI Specification is supported\r\n"
 #string STR_SMBIOSVIEW_PRINTINFO_VIRTUAL_MACHINE#language 
en-US "The SMBIOS table describes a virtual machine\r\n"
+#string STR_SMBIOSVIEW_PRINTINFO_MCFG_SUPPORTED #language 
en-US "Manufacturing mode is supported\r\n"
+#string STR_SMBIOSVIEW_PRINTINFO_MCFG_ENABLED   #language 
en-US "Manufacturing mode is enabled\r\n"
 #string STR_SMBIOSVIEW_PRINTINFO_BITS_RSVD_FOR_FUTURE   #language 
en-US " Bits %d:7 are reserved for future assignment\r\n"
 #string STR_SMBIOSVIEW_PRINTINFO_PROCESSOR_FAMILY   #language 
en-US "Processor Family: "
 #string STR_SMBIOSVIEW_PRINTINFO_OTHER  #language 
en-US "Other\r\n"
-- 
2.32.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89112): https://edk2.groups.io/g/devel/message/89112
Mute This Topic: https://groups.io/mt/90579157/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v2] MdePkg: Update smbiosview type 9 with SMBIOS 3.5 fields

2022-04-15 Thread Bo Chang Ke
Add Kinney, Michael D and Gao, Liming 

Best Regards.

-Original Message-
From: Gao, Zhichao  
Sent: Thursday, April 14, 2022 10:25 AM
To: Ke, Bo-ChangX ; devel@edk2.groups.io
Cc: Liu, Zhiguang ; Bi, Dandan ; 
Zeng, Star 
Subject: RE: [PATCH v2] MdePkg: Update smbiosview type 9 with SMBIOS 3.5 fields

Reviewed-by: Zhichao Gao 

Thanks,
Zhichao

> -Original Message-
> From: Ke, Bo-ChangX 
> Sent: Wednesday, April 13, 2022 11:14 AM
> To: devel@edk2.groups.io
> Cc: Liu, Zhiguang ; Gao, Zhichao 
> ; Bi, Dandan ; Zeng, Star 
> 
> Subject: [PATCH v2] MdePkg: Update smbiosview type 9 with SMBIOS 3.5 
> fields
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3896
> 
> update smbiosview type 9 related fileds.
> 
> Signed-off-by: Bo Chang Ke 
> Cc: Zhiguang Liu 
> Cc: Zhichao Gao 
> Cc: Dandan Bi 
> Cc: Star Zeng 
> ---
>  MdePkg/Include/IndustryStandard/SmBios.h | 49 
> +++-
>  1 file changed, 48 insertions(+), 1 deletion(-)
> 
> diff --git a/MdePkg/Include/IndustryStandard/SmBios.h
> b/MdePkg/Include/IndustryStandard/SmBios.h
> index 2b1567b052..52f2e35ee9 100644
> --- a/MdePkg/Include/IndustryStandard/SmBios.h
> +++ b/MdePkg/Include/IndustryStandard/SmBios.h
> @@ -1306,6 +1306,11 @@ typedef enum {
>SlotTypePciExpressMini52pinWithBSKO= 0x21,///< PCI Express Mini 
> 52-pin
> (CEM spec. 2.0) with bottom-side keep-outs.
>SlotTypePciExpressMini52pinWithoutBSKO = 0x22,///< PCI Express Mini 52-
> pin (CEM spec. 2.0) without bottom-side keep-outs.
>SlotTypePciExpressMini76pin= 0x23,///< PCI Express Mini 
> 76-pin (CEM
> spec. 2.0) Corresponds to Display-Mini card.
> +  SlotTypePCIExpressGen4SFF_8639 = 0x24,///< U.2
> +  SlotTypePCIExpressGen5SFF_8639 = 0x25,///< U.2
> +  SlotTypeOCPNIC30SmallFormFactor= 0x26,///< SFF
> +  SlotTypeOCPNIC30LargeFormFactor= 0x27,///< LFF
> +  SlotTypeOCPNICPriorto30= 0x28,
>SlotTypeCXLFlexbus10   = 0x30,
>SlotTypePC98C20= 0xA0,
>SlotTypePC98C24= 0xA1,
> @@ -1335,7 +1340,16 @@ typedef enum {
>SlotTypePciExpressGen4X2   = 0xBA,
>SlotTypePciExpressGen4X4   = 0xBB,
>SlotTypePciExpressGen4X8   = 0xBC,
> -  SlotTypePciExpressGen4X16  = 0xBD
> +  SlotTypePciExpressGen4X16  = 0xBD,
> +  SlotTypePCIExpressGen5 = 0xBE,
> +  SlotTypePCIExpressGen5X1   = 0xBF,
> +  SlotTypePCIExpressGen5X2   = 0xC0,
> +  SlotTypePCIExpressGen5X4   = 0xC1,
> +  SlotTypePCIExpressGen5X8   = 0xC2,
> +  SlotTypePCIExpressGen5X16  = 0xC3,
> +  SlotTypePCIExpressGen6andBeyond= 0xC4,
> +  SlotTypeEnterpriseandDatacenter1UE1FormFactorSlot = 0xC5, 
> + SlotTypeEnterpriseandDatacenter3E3FormFactorSlot  = 0xC6
>  } MISC_SLOT_TYPE;
> 
>  ///
> @@ -1358,6 +1372,39 @@ typedef enum {
>SlotDataBusWidth32X = 0x0E ///< Or X32
>  } MISC_SLOT_DATA_BUS_WIDTH;
> 
> +///
> +/// System Slots - Slot Physical Width.
> +///
> +typedef enum {
> +  SlotPhysicalWidthOther   = 0x01,
> +  SlotPhysicalWidthUnknown = 0x02,
> +  SlotPhysicalWidth8Bit= 0x03,
> +  SlotPhysicalWidth16Bit   = 0x04,
> +  SlotPhysicalWidth32Bit   = 0x05,
> +  SlotPhysicalWidth64Bit   = 0x06,
> +  SlotPhysicalWidth128Bit  = 0x07,
> +  SlotPhysicalWidth1X  = 0x08,///< Or X1
> +  SlotPhysicalWidth2X  = 0x09,///< Or X2
> +  SlotPhysicalWidth4X  = 0x0A,///< Or X4
> +  SlotPhysicalWidth8X  = 0x0B,///< Or X8
> +  SlotPhysicalWidth12X = 0x0C,///< Or X12
> +  SlotPhysicalWidth16X = 0x0D,///< Or X16
> +  SlotPhysicalWidth32X = 0x0E ///< Or X32
> +} MISC_SLOT_PHYSICAL_WIDTH;
> +
> +///
> +/// System Slots - Slot Information.
> +///
> +typedef enum {
> +  others = 0x00,
> +  Gen1   = 0x01,
> +  Gen2   = 0x01,
> +  Gen3   = 0x03,
> +  Gen4   = 0x04,
> +  Gen5   = 0x05,
> +  Gen6   = 0x06
> +} MISC_SLOT_INFORMATION;
> +
>  ///
>  /// System Slots - Current Usage.
>  ///
> --
> 2.32.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#88927): https://edk2.groups.io/g/devel/message/88927
Mute This Topic: https://groups.io/mt/90433755/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v2] MdePkg: Update smbiosview type 9 with SMBIOS 3.5 fields

2022-04-12 Thread Bo Chang Ke
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3896

update smbiosview type 9 related fileds.

Signed-off-by: Bo Chang Ke 
Cc: Zhiguang Liu 
Cc: Zhichao Gao 
Cc: Dandan Bi 
Cc: Star Zeng 
---
 MdePkg/Include/IndustryStandard/SmBios.h | 49 +++-
 1 file changed, 48 insertions(+), 1 deletion(-)

diff --git a/MdePkg/Include/IndustryStandard/SmBios.h 
b/MdePkg/Include/IndustryStandard/SmBios.h
index 2b1567b052..52f2e35ee9 100644
--- a/MdePkg/Include/IndustryStandard/SmBios.h
+++ b/MdePkg/Include/IndustryStandard/SmBios.h
@@ -1306,6 +1306,11 @@ typedef enum {
   SlotTypePciExpressMini52pinWithBSKO= 0x21,///< PCI Express Mini 
52-pin (CEM spec. 2.0) with bottom-side keep-outs.
   SlotTypePciExpressMini52pinWithoutBSKO = 0x22,///< PCI Express Mini 
52-pin (CEM spec. 2.0) without bottom-side keep-outs.
   SlotTypePciExpressMini76pin= 0x23,///< PCI Express Mini 
76-pin (CEM spec. 2.0) Corresponds to Display-Mini card.
+  SlotTypePCIExpressGen4SFF_8639 = 0x24,///< U.2
+  SlotTypePCIExpressGen5SFF_8639 = 0x25,///< U.2
+  SlotTypeOCPNIC30SmallFormFactor= 0x26,///< SFF
+  SlotTypeOCPNIC30LargeFormFactor= 0x27,///< LFF
+  SlotTypeOCPNICPriorto30= 0x28,
   SlotTypeCXLFlexbus10   = 0x30,
   SlotTypePC98C20= 0xA0,
   SlotTypePC98C24= 0xA1,
@@ -1335,7 +1340,16 @@ typedef enum {
   SlotTypePciExpressGen4X2   = 0xBA,
   SlotTypePciExpressGen4X4   = 0xBB,
   SlotTypePciExpressGen4X8   = 0xBC,
-  SlotTypePciExpressGen4X16  = 0xBD
+  SlotTypePciExpressGen4X16  = 0xBD,
+  SlotTypePCIExpressGen5 = 0xBE,
+  SlotTypePCIExpressGen5X1   = 0xBF,
+  SlotTypePCIExpressGen5X2   = 0xC0,
+  SlotTypePCIExpressGen5X4   = 0xC1,
+  SlotTypePCIExpressGen5X8   = 0xC2,
+  SlotTypePCIExpressGen5X16  = 0xC3,
+  SlotTypePCIExpressGen6andBeyond= 0xC4,
+  SlotTypeEnterpriseandDatacenter1UE1FormFactorSlot = 0xC5,
+  SlotTypeEnterpriseandDatacenter3E3FormFactorSlot  = 0xC6
 } MISC_SLOT_TYPE;
 
 ///
@@ -1358,6 +1372,39 @@ typedef enum {
   SlotDataBusWidth32X = 0x0E ///< Or X32
 } MISC_SLOT_DATA_BUS_WIDTH;
 
+///
+/// System Slots - Slot Physical Width.
+///
+typedef enum {
+  SlotPhysicalWidthOther   = 0x01,
+  SlotPhysicalWidthUnknown = 0x02,
+  SlotPhysicalWidth8Bit= 0x03,
+  SlotPhysicalWidth16Bit   = 0x04,
+  SlotPhysicalWidth32Bit   = 0x05,
+  SlotPhysicalWidth64Bit   = 0x06,
+  SlotPhysicalWidth128Bit  = 0x07,
+  SlotPhysicalWidth1X  = 0x08,///< Or X1
+  SlotPhysicalWidth2X  = 0x09,///< Or X2
+  SlotPhysicalWidth4X  = 0x0A,///< Or X4
+  SlotPhysicalWidth8X  = 0x0B,///< Or X8
+  SlotPhysicalWidth12X = 0x0C,///< Or X12
+  SlotPhysicalWidth16X = 0x0D,///< Or X16
+  SlotPhysicalWidth32X = 0x0E ///< Or X32
+} MISC_SLOT_PHYSICAL_WIDTH;
+
+///
+/// System Slots - Slot Information.
+///
+typedef enum {
+  others = 0x00,
+  Gen1   = 0x01,
+  Gen2   = 0x01,
+  Gen3   = 0x03,
+  Gen4   = 0x04,
+  Gen5   = 0x05,
+  Gen6   = 0x06
+} MISC_SLOT_INFORMATION;
+
 ///
 /// System Slots - Current Usage.
 ///
-- 
2.32.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#88835): https://edk2.groups.io/g/devel/message/88835
Mute This Topic: https://groups.io/mt/90433755/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v2] ShellPkg: Update smbiosview type 9 with SMBIOS 3.5 fields

2022-04-12 Thread Bo Chang Ke
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3896

update smbiosview type 9 related fileds.

Signed-off-by: Bo Chang Ke 
Cc: Ray Ni 
Cc: Zhichao Gao 
---
 .../SmbiosView/PrintInfo.c|   7 +-
 .../SmbiosView/QueryTable.c   | 237 ++
 .../SmbiosView/QueryTable.h   |  36 +++
 .../SmbiosView/SmbiosViewStrings.uni  |   5 +-
 4 files changed, 280 insertions(+), 5 deletions(-)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
index b144600a25..003892274b 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
@@ -635,6 +635,9 @@ SmbiosPrintStructure (
 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN 
(STR_SMBIOSVIEW_PRINTINFO_DEV_FUNC_NUM), gShellDebug1HiiHandle, 
PeerGroupPtr[Index].DevFuncNum);
 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN 
(STR_SMBIOSVIEW_PRINTINFO_DATA_BUS_WIDTH), gShellDebug1HiiHandle, 
PeerGroupPtr[Index].DataBusWidth);
   }
+  DisplaySystemSlotHeight (Struct->Type9->SlotHeight, Option);
+  DisplaySystemSlotPhysicalWidth (Struct->Type9->SlotPhysicalWidth, 
Option);
+  DisplaySystemSlotInformation (Struct->Type9->SlotInformation, 
Option);
 }
   }
 
@@ -2898,10 +2901,6 @@ DisplaySystemSlotId (
   IN UINT8   Option
   )
 {
-  //
-  // Display slot type first
-  //
-  DisplaySystemSlotType (SlotType, Option);
 
   ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN 
(STR_SMBIOSVIEW_PRINTINFO_SLOT_ID), gShellDebug1HiiHandle);
   //
diff --git 
a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
index c4a6acb167..95aef61ff4 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
@@ -1447,6 +1447,26 @@ TABLE_ITEM  SystemSlotTypeTable[] = {
 0x23,
 L"PCI Express Mini 76-pin (CEM spec. 2.0) Corresponds to Display-Mini card"
   },
+  {
+0x24,
+L"PCI Express Gen 4 SFF-8639 (U.2)"
+  },
+  {
+0x25,
+L"PCI Express Gen 5 SFF-8639 (U.2)"
+  },
+  {
+0x26,
+L"OCP NIC 3.0 Small Form Factor (SFF)"
+  },
+  {
+0x27,
+L"OCP NIC 3.0 Large Form Factor (LFF)"
+  },
+  {
+0x28,
+L"OCP NIC Prior to 3.0"
+  },
   {
 SlotTypeCXLFlexbus10,
 L"CXL Flexbus 1.0"
@@ -1566,6 +1586,42 @@ TABLE_ITEM  SystemSlotTypeTable[] = {
   {
 SlotTypePciExpressGen4X16,
 L"PCI Express Gen 4 X16"
+  },
+  {
+SlotTypePCIExpressGen5,
+L"PCI Express Gen 5"
+  },
+  {
+SlotTypePCIExpressGen5X1,
+L"PCI Express Gen 5 x1"
+  },
+  {
+SlotTypePCIExpressGen5X2,
+L"PCI Express Gen 5 x2"
+  },
+  {
+SlotTypePCIExpressGen5X4,
+L"PCI Express Gen 5 x4"
+  },
+  {
+SlotTypePCIExpressGen5X8,
+L"PCI Express Gen 5 x8"
+  },
+  {
+SlotTypePCIExpressGen5X16,
+L"PCI Express Gen 5 x16"
+  },
+  {
+SlotTypePCIExpressGen6andBeyond,
+L"PCI Express Gen 6 and Beyond"
+  },
+  {
+SlotTypeEnterpriseandDatacenter1UE1FormFactorSlot,
+L"Enterprise and Datacenter 1U E1 Form Factor Slot"
+  },
+  {
+SlotTypeEnterpriseandDatacenter3E3FormFactorSlot,
+L"Enterprise and Datacenter 3'E3 Form Factor Slot"
   }
 };
 
@@ -1628,6 +1684,96 @@ TABLE_ITEM  SystemSlotDataBusWidthTable[] = {
   }
 };
 
+TABLE_ITEM  SystemSlotPhysicalWidthTable[] = {
+  {
+0x01,
+L" Other"
+  },
+  {
+0x02,
+L" Unknown"
+  },
+  {
+0x03,
+L" 8 bit"
+  },
+  {
+0x04,
+L" 16 bit"
+  },
+  {
+0x05,
+L" 32 bit"
+  },
+  {
+0x06,
+L" 64 bit"
+  },
+  {
+0x07,
+L" 128 bit"
+  },
+  {
+0x08,
+L" 1x or x1"
+  },
+  {
+0x09,
+L" 2x or x2"
+  },
+  {
+0x0A,
+L" 4x or x4"
+  },
+  {
+0x0B,
+L" 8x or x8"
+  },
+  {
+0x0C,
+L" 12x or x12"
+  },
+  {
+0x0D,
+L" 16x or x16"
+  },
+  {
+0x0E,
+L" 32x or x32"
+  }
+};
+
+TABLE_ITEM  SystemSlotInformationTable[] = {
+  {
+0x00,
+L" Others"
+  },
+  {
+0x01,
+L" Gen 1"
+  },
+  {
+0x02,
+L" Gen 2"
+  },
+  {
+0x03,
+L" Gen 3"
+  },
+  {
+0x04,
+L" Gen 4"
+  },
+  {
+0x05,
+L" Gen 5"
+  },
+  {
+0x06,
+L" Gen 6"
+  }
+};
+
 TABLE_ITEM  SystemSlotCurrentUsageTable[] = {
   {
 0x01,
@@ -1670,6 +1816,30 @@ TABLE_ITEM  SystemSlotLengthTable[] = {
   },
 };
 
+TABLE_I

[edk2-devel] [PATCH] ShellPkg: Update smbiosview type 41 with SMBIOS 3.5 fields

2022-04-11 Thread Bo Chang Ke
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3900

update smbiosview type 41 related fileds.

Signed-off-by: Bo Chang Ke 
Cc: Ray Ni 
Cc: Zhichao Gao 
---
 .../SmbiosView/QueryTable.c   | 24 +++
 1 file changed, 24 insertions(+)

diff --git 
a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
index c4a6acb167..7ec6d2b5f1 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
@@ -1766,6 +1766,30 @@ TABLE_ITEM  OnboardDeviceTypesTable[] = {
 0x0A,
 L"  Sas Controller"
   },
+  {
+0x0B,
+L"  Wireless LAN"
+  },
+  {
+0x0C,
+L"  Bluetooth"
+  },
+  {
+0x0D,
+L"  WWAN"
+  },
+  {
+0x0E,
+L"  embedded Multi-Media Controller"
+  },
+  {
+0x0F,
+L"  NVMe Controller"
+  },
+  {
+0x10,
+L"  UFS Controller"
+  }
 };
 
 TABLE_ITEM  SELTypesTable[] = {
-- 
2.32.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#88687): https://edk2.groups.io/g/devel/message/88687
Mute This Topic: https://groups.io/mt/90339486/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH] ShellPkg: Update smbiosview type 9 with SMBIOS 3.5 fields

2022-04-11 Thread Bo Chang Ke
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3896

update smbiosview type 9 related fileds.

Signed-off-by: Bo Chang Ke 
Cc: Ray Ni 
Cc: Zhichao Gao 
---
 .../SmbiosView/PrintInfo.c|  11 +-
 .../SmbiosView/QueryTable.c   | 238 ++
 .../SmbiosView/QueryTable.h   |  36 +++
 .../SmbiosView/SmbiosViewStrings.uni  |   5 +-
 4 files changed, 285 insertions(+), 5 deletions(-)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
index b144600a25..0fa40dbe0c 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
@@ -637,6 +637,13 @@ SmbiosPrintStructure (
   }
 }
   }
+  if (AE_SMBIOS_VERSION (0x3, 0x2)) {
+if (Struct->Hdr->Length > 0x12) {
+  DisplaySystemSlotHeight(Struct->Type9->SlotHeight, Option);
+  DisplaySystemSlotPhysicalWidth(Struct->Type9->SlotPhysicalWidth, 
Option);
+  DisplaySystemSlotInformation(Struct->Type9->SlotInformation, Option);
+}
+  }
 
   break;
 }
@@ -2898,10 +2905,6 @@ DisplaySystemSlotId (
   IN UINT8   Option
   )
 {
-  //
-  // Display slot type first
-  //
-  DisplaySystemSlotType (SlotType, Option);
 
   ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN 
(STR_SMBIOSVIEW_PRINTINFO_SLOT_ID), gShellDebug1HiiHandle);
   //
diff --git 
a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
index c4a6acb167..96e0e4036a 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
@@ -1447,6 +1447,27 @@ TABLE_ITEM  SystemSlotTypeTable[] = {
 0x23,
 L"PCI Express Mini 76-pin (CEM spec. 2.0) Corresponds to Display-Mini card"
   },
+  {
+0x24,
+L"PCI Express Gen 4 SFF-8639 (U.2)"
+  },
+  {
+0x25,
+L"PCI Express Gen 5 SFF-8639 (U.2)"
+  },
+  {
+0x26,
+L"OCP NIC 3.0 Small Form Factor (SFF)"
+  },
+  {
+0x27,
+L"OCP NIC 3.0 Large Form Factor (LFF)"
+  },
+  {
+0x28,
+L"OCP NIC Prior to 3.0"
+  },
+
   {
 SlotTypeCXLFlexbus10,
 L"CXL Flexbus 1.0"
@@ -1566,6 +1587,42 @@ TABLE_ITEM  SystemSlotTypeTable[] = {
   {
 SlotTypePciExpressGen4X16,
 L"PCI Express Gen 4 X16"
+  },
+  {
+SlotTypePCIExpressGen5,
+L"PCI Express Gen 5"
+  },
+  {
+SlotTypePCIExpressGen5X1,
+L"PCI Express Gen 5 x1"
+  },
+  {
+SlotTypePCIExpressGen5X2,
+L"PCI Express Gen 5 x2"
+  },
+  {
+SlotTypePCIExpressGen5X4,
+L"PCI Express Gen 5 x4"
+  },
+  {
+SlotTypePCIExpressGen5X8,
+L"PCI Express Gen 5 x8"
+  },
+  {
+SlotTypePCIExpressGen5X16,
+L"PCI Express Gen 5 x16"
+  },
+  {
+SlotTypePCIExpressGen6andBeyond,
+L"PCI Express Gen 6 and Beyond"
+  },
+  {
+SlotTypeEnterpriseandDatacenter1UE1FormFactorSlot,
+L"Enterprise and Datacenter 1U E1 Form Factor Slot"
+  },
+  {
+SlotTypeEnterpriseandDatacenter3E3FormFactorSlot,
+L"Enterprise and Datacenter 3'E3 Form Factor Slot"
   }
 };
 
@@ -1628,6 +1685,96 @@ TABLE_ITEM  SystemSlotDataBusWidthTable[] = {
   }
 };
 
+TABLE_ITEM  SystemSlotPhysicalWidthTable[] = {
+  {
+0x01,
+L" Other"
+  },
+  {
+0x02,
+L" Unknown"
+  },
+  {
+0x03,
+L" 8 bit"
+  },
+  {
+0x04,
+L" 16 bit"
+  },
+  {
+0x05,
+L" 32 bit"
+  },
+  {
+0x06,
+L" 64 bit"
+  },
+  {
+0x07,
+L" 128 bit"
+  },
+  {
+0x08,
+L" 1x or x1"
+  },
+  {
+0x09,
+L" 2x or x2"
+  },
+  {
+0x0A,
+L" 4x or x4"
+  },
+  {
+0x0B,
+L" 8x or x8"
+  },
+  {
+0x0C,
+L" 12x or x12"
+  },
+  {
+0x0D,
+L" 16x or x16"
+  },
+  {
+0x0E,
+L" 32x or x32"
+  }
+};
+
+TABLE_ITEM  SystemSlotInformationTable[] = {
+  {
+0x00,
+L" Others"
+  },
+  {
+0x01,
+L" Gen 1"
+  },
+  {
+0x02,
+L" Gen 2"
+  },
+  {
+0x03,
+L" Gen 3"
+  },
+  {
+0x04,
+L" Gen 4"
+  },
+  {
+0x05,
+L" Gen 5"
+  },
+  {
+0x06,
+L" Gen 6"
+  }
+};
+
 TABLE_ITEM  SystemSlotCurrentUsageTable[] = {
   {
 0x01,
@@ -1670,6 +1817,30 @@ TABLE_ITEM  SystemSlotLengthTable[] = {
   },
 };
 
+TABLE_ITEM  SystemSlotHeightTable[] = {
+  {
+0x00,
+L" Not applicable"
+  },
+  {
+0x01,
+L" Other"
+  },
+  {
+0x02,
+L" Unkown"
+  

[edk2-devel] [PATCH] MdePkg: Update smbiosview type 9 with SMBIOS 3.5 fields

2022-04-11 Thread Bo Chang Ke
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3896

update smbiosview type 9 related fileds.

Signed-off-by: Bo Chang Ke 
Cc: Zhiguang Liu 
Cc: Zhichao Gao 
Cc: Dandan Bi 
Cc: Star Zeng 
---
 MdePkg/Include/IndustryStandard/SmBios.h | 50 +++-
 1 file changed, 49 insertions(+), 1 deletion(-)

diff --git a/MdePkg/Include/IndustryStandard/SmBios.h 
b/MdePkg/Include/IndustryStandard/SmBios.h
index 2b1567b052..cb39470c92 100644
--- a/MdePkg/Include/IndustryStandard/SmBios.h
+++ b/MdePkg/Include/IndustryStandard/SmBios.h
@@ -1306,6 +1306,11 @@ typedef enum {
   SlotTypePciExpressMini52pinWithBSKO= 0x21,///< PCI Express Mini 
52-pin (CEM spec. 2.0) with bottom-side keep-outs.
   SlotTypePciExpressMini52pinWithoutBSKO = 0x22,///< PCI Express Mini 
52-pin (CEM spec. 2.0) without bottom-side keep-outs.
   SlotTypePciExpressMini76pin= 0x23,///< PCI Express Mini 
76-pin (CEM spec. 2.0) Corresponds to Display-Mini card.
+  SlotTypePCIExpressGen4SFF_8639 = 0x24,///< U.2
+  SlotTypePCIExpressGen5SFF_8639 = 0x25,///< U.2
+  SlotTypeOCPNIC30SmallFormFactor= 0x26,///< SFF
+  SlotTypeOCPNIC30LargeFormFactor= 0x27,///< LFF
+  SlotTypeOCPNICPriorto30= 0x28,
   SlotTypeCXLFlexbus10   = 0x30,
   SlotTypePC98C20= 0xA0,
   SlotTypePC98C24= 0xA1,
@@ -1335,7 +1340,17 @@ typedef enum {
   SlotTypePciExpressGen4X2   = 0xBA,
   SlotTypePciExpressGen4X4   = 0xBB,
   SlotTypePciExpressGen4X8   = 0xBC,
-  SlotTypePciExpressGen4X16  = 0xBD
+  SlotTypePciExpressGen4X16  = 0xBD,
+  SlotTypePCIExpressGen5 = 0xBE,
+  SlotTypePCIExpressGen5X1   = 0xBF,
+  SlotTypePCIExpressGen5X2   = 0xC0,
+  SlotTypePCIExpressGen5X4   = 0xC1,
+  SlotTypePCIExpressGen5X8   = 0xC2,
+  SlotTypePCIExpressGen5X16  = 0xC3,
+  SlotTypePCIExpressGen6andBeyond= 0xC4,
+  SlotTypeEnterpriseandDatacenter1UE1FormFactorSlot = 0xC5,
+  SlotTypeEnterpriseandDatacenter3E3FormFactorSlot  = 0xC6
+
 } MISC_SLOT_TYPE;
 
 ///
@@ -1358,6 +1373,39 @@ typedef enum {
   SlotDataBusWidth32X = 0x0E ///< Or X32
 } MISC_SLOT_DATA_BUS_WIDTH;
 
+///
+/// System Slots - Slot Physical Width.
+///
+typedef enum {
+  SlotPhysicalWidthOther   = 0x01,
+  SlotPhysicalWidthUnknown = 0x02,
+  SlotPhysicalWidth8Bit= 0x03,
+  SlotPhysicalWidth16Bit   = 0x04,
+  SlotPhysicalWidth32Bit   = 0x05,
+  SlotPhysicalWidth64Bit   = 0x06,
+  SlotPhysicalWidth128Bit  = 0x07,
+  SlotPhysicalWidth1X  = 0x08,///< Or X1
+  SlotPhysicalWidth2X  = 0x09,///< Or X2
+  SlotPhysicalWidth4X  = 0x0A,///< Or X4
+  SlotPhysicalWidth8X  = 0x0B,///< Or X8
+  SlotPhysicalWidth12X = 0x0C,///< Or X12
+  SlotPhysicalWidth16X = 0x0D,///< Or X16
+  SlotPhysicalWidth32X = 0x0E ///< Or X32
+} MISC_SLOT_PHYSICAL_WIDTH;
+
+///
+/// System Slots - Slot Information.
+///
+typedef enum{
+  others = 0x00,
+  Gen1   = 0x01,
+  Gen2   = 0x01,
+  Gen3   = 0x03,
+  Gen4   = 0x04,
+  Gen5   = 0x05,
+  Gen6   = 0x06
+}MISC_SLOT_INFORMATION;
+
 ///
 /// System Slots - Current Usage.
 ///
-- 
2.32.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#88684): https://edk2.groups.io/g/devel/message/88684
Mute This Topic: https://groups.io/mt/90389767/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH] ShellPkg: Update smbiosview type 9 with SMBIOS 3.5 fields

2022-04-10 Thread Bo Chang Ke
Got it, I'll split it, thank you

Best Regards.

-Original Message-
From: Ni, Ray  
Sent: Monday, April 11, 2022 1:55 PM
To: Zeng, Star ; Ke, Bo-ChangX ; 
devel@edk2.groups.io
Cc: Bi, Dandan ; Gao, Liming ; 
Kinney, Michael D ; Liu, Zhiguang 
; Gao, Zhichao 
Subject: RE: [PATCH] ShellPkg: Update smbiosview type 9 with SMBIOS 3.5 fields

Yes. I also prefer to have two patches.

> -Original Message-
> From: Zeng, Star 
> Sent: Monday, April 11, 2022 11:46 AM
> To: Ke, Bo-ChangX ; devel@edk2.groups.io
> Cc: Bi, Dandan ; Gao, Liming 
> ; Kinney, Michael D 
> ; Liu, Zhiguang ; 
> Ni, Ray ; Gao, Zhichao ; 
> Zeng, Star 
> Subject: RE: [PATCH] ShellPkg: Update smbiosview type 9 with SMBIOS 
> 3.5 fields
> 
> Personally, you'd better to split this one patch to two, one is for MdePkg 
> and another is for ShellPkg.
> Also cc MdePkg and ShellPkg maintainers.
> 
> 
> Thanks,
> Star
> -Original Message-
> From: Ke, Bo-ChangX 
> Sent: Friday, April 8, 2022 1:55 PM
> To: devel@edk2.groups.io
> Cc: Bi, Dandan ; Zeng, Star 
> Subject: [PATCH] ShellPkg: Update smbiosview type 9 with SMBIOS 3.5 
> fields
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3896
> 
> update smbiosview type 9 related fileds.
> 
> Signed-off-by: Bo Chang Ke 
> Cc: Dandan Bi 
> Cc: Star Zeng 
> ---
>  MdePkg/Include/IndustryStandard/SmBios.h  |  50 +++-
>  .../SmbiosView/PrintInfo.c|  11 +-
>  .../SmbiosView/QueryTable.c   | 238 ++
>  .../SmbiosView/QueryTable.h   |  36 +++
>  .../SmbiosView/SmbiosViewStrings.uni  |   5 +-
>  5 files changed, 334 insertions(+), 6 deletions(-)
> 
> diff --git a/MdePkg/Include/IndustryStandard/SmBios.h 
> b/MdePkg/Include/IndustryStandard/SmBios.h
> index 2b1567b052..cb39470c92 100644
> --- a/MdePkg/Include/IndustryStandard/SmBios.h
> +++ b/MdePkg/Include/IndustryStandard/SmBios.h
> @@ -1306,6 +1306,11 @@ typedef enum {
>SlotTypePciExpressMini52pinWithBSKO= 0x21,///< PCI Express Mini 
> 52-pin (CEM spec. 2.0) with bottom-side keep-
> outs.
>SlotTypePciExpressMini52pinWithoutBSKO = 0x22,///< PCI Express Mini 
> 52-pin (CEM spec. 2.0) without bottom-side
> keep-outs.
>SlotTypePciExpressMini76pin= 0x23,///< PCI Express Mini 
> 76-pin (CEM spec. 2.0) Corresponds to Display-Mini
> card.
> +  SlotTypePCIExpressGen4SFF_8639 = 0x24,///< U.2
> +  SlotTypePCIExpressGen5SFF_8639 = 0x25,///< U.2
> +  SlotTypeOCPNIC30SmallFormFactor= 0x26,///< SFF
> +  SlotTypeOCPNIC30LargeFormFactor= 0x27,///< LFF
> +  SlotTypeOCPNICPriorto30= 0x28,
>SlotTypeCXLFlexbus10   = 0x30,
>SlotTypePC98C20= 0xA0,
>SlotTypePC98C24= 0xA1,
> @@ -1335,7 +1340,17 @@ typedef enum {
>SlotTypePciExpressGen4X2   = 0xBA,
>SlotTypePciExpressGen4X4   = 0xBB,
>SlotTypePciExpressGen4X8   = 0xBC,
> -  SlotTypePciExpressGen4X16  = 0xBD
> +  SlotTypePciExpressGen4X16  = 0xBD,
> +  SlotTypePCIExpressGen5 = 0xBE,
> +  SlotTypePCIExpressGen5X1   = 0xBF,
> +  SlotTypePCIExpressGen5X2   = 0xC0,
> +  SlotTypePCIExpressGen5X4   = 0xC1,
> +  SlotTypePCIExpressGen5X8   = 0xC2,
> +  SlotTypePCIExpressGen5X16  = 0xC3,
> +  SlotTypePCIExpressGen6andBeyond= 0xC4,
> +  SlotTypeEnterpriseandDatacenter1UE1FormFactorSlot = 0xC5, 
> + SlotTypeEnterpriseandDatacenter3E3FormFactorSlot  = 0xC6
> +
>  } MISC_SLOT_TYPE;
> 
>  ///
> @@ -1358,6 +1373,39 @@ typedef enum {
>SlotDataBusWidth32X = 0x0E ///< Or X32
>  } MISC_SLOT_DATA_BUS_WIDTH;
> 
> +///
> +/// System Slots - Slot Physical Width.
> +///
> +typedef enum {
> +  SlotPhysicalWidthOther   = 0x01,
> +  SlotPhysicalWidthUnknown = 0x02,
> +  SlotPhysicalWidth8Bit= 0x03,
> +  SlotPhysicalWidth16Bit   = 0x04,
> +  SlotPhysicalWidth32Bit   = 0x05,
> +  SlotPhysicalWidth64Bit   = 0x06,
> +  SlotPhysicalWidth128Bit  = 0x07,
> +  SlotPhysicalWidth1X  = 0x08,///< Or X1
> +  SlotPhysicalWidth2X  = 0x09,///< Or X2
> +  SlotPhysicalWidth4X  = 0x0A,///< Or X4
> +  SlotPhysicalWidth8X  = 0x0B,///< Or X8
> +  SlotPhysicalWidth12X = 0x0C,///< Or X12
> +  SlotPhysicalWidth16X = 0x0D,///< Or X16
> +  SlotPhysicalWidth32X = 0x0E ///< Or X32
> +} MISC_SLOT_PHYSICAL_WIDTH;
> +
> +///
> +/// System Slots - Slot Information.
> +///
> +typedef enum{
> +  others = 0x00,
>

[edk2-devel] [PATCH] ShellPkg: Update smbiosview type 41 with SMBIOS 3.5 fields

2022-04-08 Thread Bo Chang Ke
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3900

update smbiosview type 41 related fileds.

Signed-off-by: Bo Chang Ke 
Cc: Dandan Bi 
Cc: Star Zeng 
---
 .../SmbiosView/QueryTable.c   | 24 +++
 1 file changed, 24 insertions(+)

diff --git 
a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
index c4a6acb167..7ec6d2b5f1 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
@@ -1766,6 +1766,30 @@ TABLE_ITEM  OnboardDeviceTypesTable[] = {
 0x0A,
 L"  Sas Controller"
   },
+  {
+0x0B,
+L"  Wireless LAN"
+  },
+  {
+0x0C,
+L"  Bluetooth"
+  },
+  {
+0x0D,
+L"  WWAN"
+  },
+  {
+0x0E,
+L"  embedded Multi-Media Controller"
+  },
+  {
+0x0F,
+L"  NVMe Controller"
+  },
+  {
+0x10,
+L"  UFS Controller"
+  }
 };
 
 TABLE_ITEM  SELTypesTable[] = {
-- 
2.32.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#88640): https://edk2.groups.io/g/devel/message/88640
Mute This Topic: https://groups.io/mt/90339486/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH] ShellPkg: Update smbiosview type 9 with SMBIOS 3.5 fields

2022-04-07 Thread Bo Chang Ke
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3896

update smbiosview type 9 related fileds.

Signed-off-by: Bo Chang Ke 
Cc: Dandan Bi 
Cc: Star Zeng 
---
 MdePkg/Include/IndustryStandard/SmBios.h  |  50 +++-
 .../SmbiosView/PrintInfo.c|  11 +-
 .../SmbiosView/QueryTable.c   | 238 ++
 .../SmbiosView/QueryTable.h   |  36 +++
 .../SmbiosView/SmbiosViewStrings.uni  |   5 +-
 5 files changed, 334 insertions(+), 6 deletions(-)

diff --git a/MdePkg/Include/IndustryStandard/SmBios.h 
b/MdePkg/Include/IndustryStandard/SmBios.h
index 2b1567b052..cb39470c92 100644
--- a/MdePkg/Include/IndustryStandard/SmBios.h
+++ b/MdePkg/Include/IndustryStandard/SmBios.h
@@ -1306,6 +1306,11 @@ typedef enum {
   SlotTypePciExpressMini52pinWithBSKO= 0x21,///< PCI Express Mini 
52-pin (CEM spec. 2.0) with bottom-side keep-outs.
   SlotTypePciExpressMini52pinWithoutBSKO = 0x22,///< PCI Express Mini 
52-pin (CEM spec. 2.0) without bottom-side keep-outs.
   SlotTypePciExpressMini76pin= 0x23,///< PCI Express Mini 
76-pin (CEM spec. 2.0) Corresponds to Display-Mini card.
+  SlotTypePCIExpressGen4SFF_8639 = 0x24,///< U.2
+  SlotTypePCIExpressGen5SFF_8639 = 0x25,///< U.2
+  SlotTypeOCPNIC30SmallFormFactor= 0x26,///< SFF
+  SlotTypeOCPNIC30LargeFormFactor= 0x27,///< LFF
+  SlotTypeOCPNICPriorto30= 0x28,
   SlotTypeCXLFlexbus10   = 0x30,
   SlotTypePC98C20= 0xA0,
   SlotTypePC98C24= 0xA1,
@@ -1335,7 +1340,17 @@ typedef enum {
   SlotTypePciExpressGen4X2   = 0xBA,
   SlotTypePciExpressGen4X4   = 0xBB,
   SlotTypePciExpressGen4X8   = 0xBC,
-  SlotTypePciExpressGen4X16  = 0xBD
+  SlotTypePciExpressGen4X16  = 0xBD,
+  SlotTypePCIExpressGen5 = 0xBE,
+  SlotTypePCIExpressGen5X1   = 0xBF,
+  SlotTypePCIExpressGen5X2   = 0xC0,
+  SlotTypePCIExpressGen5X4   = 0xC1,
+  SlotTypePCIExpressGen5X8   = 0xC2,
+  SlotTypePCIExpressGen5X16  = 0xC3,
+  SlotTypePCIExpressGen6andBeyond= 0xC4,
+  SlotTypeEnterpriseandDatacenter1UE1FormFactorSlot = 0xC5,
+  SlotTypeEnterpriseandDatacenter3E3FormFactorSlot  = 0xC6
+
 } MISC_SLOT_TYPE;
 
 ///
@@ -1358,6 +1373,39 @@ typedef enum {
   SlotDataBusWidth32X = 0x0E ///< Or X32
 } MISC_SLOT_DATA_BUS_WIDTH;
 
+///
+/// System Slots - Slot Physical Width.
+///
+typedef enum {
+  SlotPhysicalWidthOther   = 0x01,
+  SlotPhysicalWidthUnknown = 0x02,
+  SlotPhysicalWidth8Bit= 0x03,
+  SlotPhysicalWidth16Bit   = 0x04,
+  SlotPhysicalWidth32Bit   = 0x05,
+  SlotPhysicalWidth64Bit   = 0x06,
+  SlotPhysicalWidth128Bit  = 0x07,
+  SlotPhysicalWidth1X  = 0x08,///< Or X1
+  SlotPhysicalWidth2X  = 0x09,///< Or X2
+  SlotPhysicalWidth4X  = 0x0A,///< Or X4
+  SlotPhysicalWidth8X  = 0x0B,///< Or X8
+  SlotPhysicalWidth12X = 0x0C,///< Or X12
+  SlotPhysicalWidth16X = 0x0D,///< Or X16
+  SlotPhysicalWidth32X = 0x0E ///< Or X32
+} MISC_SLOT_PHYSICAL_WIDTH;
+
+///
+/// System Slots - Slot Information.
+///
+typedef enum{
+  others = 0x00,
+  Gen1   = 0x01,
+  Gen2   = 0x01,
+  Gen3   = 0x03,
+  Gen4   = 0x04,
+  Gen5   = 0x05,
+  Gen6   = 0x06
+}MISC_SLOT_INFORMATION;
+
 ///
 /// System Slots - Current Usage.
 ///
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
index b144600a25..0fa40dbe0c 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
@@ -637,6 +637,13 @@ SmbiosPrintStructure (
   }
 }
   }
+  if (AE_SMBIOS_VERSION (0x3, 0x2)) {
+if (Struct->Hdr->Length > 0x12) {
+  DisplaySystemSlotHeight(Struct->Type9->SlotHeight, Option);
+  DisplaySystemSlotPhysicalWidth(Struct->Type9->SlotPhysicalWidth, 
Option);
+  DisplaySystemSlotInformation(Struct->Type9->SlotInformation, Option);
+}
+  }
 
   break;
 }
@@ -2898,10 +2905,6 @@ DisplaySystemSlotId (
   IN UINT8   Option
   )
 {
-  //
-  // Display slot type first
-  //
-  DisplaySystemSlotType (SlotType, Option);
 
   ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN 
(STR_SMBIOSVIEW_PRINTINFO_SLOT_ID), gShellDebug1HiiHandle);
   //
diff --git 
a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
index c4a6acb167..96e0e4036a 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
@@ -1447,6 +1447,27 @@ TABLE_ITEM  SystemSlot

[edk2-devel] [PATCH] ShellPkg: Update smbiosview type 9 with SMBIOS 3.5 fields

2022-04-07 Thread Bo Chang Ke
Signed-off-by: Bo Chang Ke 
Cc: Dandan Bi 
Cc: Star Zeng 
---
 MdePkg/Include/IndustryStandard/SmBios.h  |  50 +++-
 .../SmbiosView/PrintInfo.c|  11 +-
 .../SmbiosView/QueryTable.c   | 238 ++
 .../SmbiosView/QueryTable.h   |  36 +++
 .../SmbiosView/SmbiosViewStrings.uni  |   5 +-
 5 files changed, 334 insertions(+), 6 deletions(-)

diff --git a/MdePkg/Include/IndustryStandard/SmBios.h 
b/MdePkg/Include/IndustryStandard/SmBios.h
index 2b1567b052..cb39470c92 100644
--- a/MdePkg/Include/IndustryStandard/SmBios.h
+++ b/MdePkg/Include/IndustryStandard/SmBios.h
@@ -1306,6 +1306,11 @@ typedef enum {
   SlotTypePciExpressMini52pinWithBSKO= 0x21,///< PCI Express Mini 
52-pin (CEM spec. 2.0) with bottom-side keep-outs.
   SlotTypePciExpressMini52pinWithoutBSKO = 0x22,///< PCI Express Mini 
52-pin (CEM spec. 2.0) without bottom-side keep-outs.
   SlotTypePciExpressMini76pin= 0x23,///< PCI Express Mini 
76-pin (CEM spec. 2.0) Corresponds to Display-Mini card.
+  SlotTypePCIExpressGen4SFF_8639 = 0x24,///< U.2
+  SlotTypePCIExpressGen5SFF_8639 = 0x25,///< U.2
+  SlotTypeOCPNIC30SmallFormFactor= 0x26,///< SFF
+  SlotTypeOCPNIC30LargeFormFactor= 0x27,///< LFF
+  SlotTypeOCPNICPriorto30= 0x28,
   SlotTypeCXLFlexbus10   = 0x30,
   SlotTypePC98C20= 0xA0,
   SlotTypePC98C24= 0xA1,
@@ -1335,7 +1340,17 @@ typedef enum {
   SlotTypePciExpressGen4X2   = 0xBA,
   SlotTypePciExpressGen4X4   = 0xBB,
   SlotTypePciExpressGen4X8   = 0xBC,
-  SlotTypePciExpressGen4X16  = 0xBD
+  SlotTypePciExpressGen4X16  = 0xBD,
+  SlotTypePCIExpressGen5 = 0xBE,
+  SlotTypePCIExpressGen5X1   = 0xBF,
+  SlotTypePCIExpressGen5X2   = 0xC0,
+  SlotTypePCIExpressGen5X4   = 0xC1,
+  SlotTypePCIExpressGen5X8   = 0xC2,
+  SlotTypePCIExpressGen5X16  = 0xC3,
+  SlotTypePCIExpressGen6andBeyond= 0xC4,
+  SlotTypeEnterpriseandDatacenter1UE1FormFactorSlot = 0xC5,
+  SlotTypeEnterpriseandDatacenter3E3FormFactorSlot  = 0xC6
+
 } MISC_SLOT_TYPE;
 
 ///
@@ -1358,6 +1373,39 @@ typedef enum {
   SlotDataBusWidth32X = 0x0E ///< Or X32
 } MISC_SLOT_DATA_BUS_WIDTH;
 
+///
+/// System Slots - Slot Physical Width.
+///
+typedef enum {
+  SlotPhysicalWidthOther   = 0x01,
+  SlotPhysicalWidthUnknown = 0x02,
+  SlotPhysicalWidth8Bit= 0x03,
+  SlotPhysicalWidth16Bit   = 0x04,
+  SlotPhysicalWidth32Bit   = 0x05,
+  SlotPhysicalWidth64Bit   = 0x06,
+  SlotPhysicalWidth128Bit  = 0x07,
+  SlotPhysicalWidth1X  = 0x08,///< Or X1
+  SlotPhysicalWidth2X  = 0x09,///< Or X2
+  SlotPhysicalWidth4X  = 0x0A,///< Or X4
+  SlotPhysicalWidth8X  = 0x0B,///< Or X8
+  SlotPhysicalWidth12X = 0x0C,///< Or X12
+  SlotPhysicalWidth16X = 0x0D,///< Or X16
+  SlotPhysicalWidth32X = 0x0E ///< Or X32
+} MISC_SLOT_PHYSICAL_WIDTH;
+
+///
+/// System Slots - Slot Information.
+///
+typedef enum{
+  others = 0x00,
+  Gen1   = 0x01,
+  Gen2   = 0x01,
+  Gen3   = 0x03,
+  Gen4   = 0x04,
+  Gen5   = 0x05,
+  Gen6   = 0x06
+}MISC_SLOT_INFORMATION;
+
 ///
 /// System Slots - Current Usage.
 ///
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
index b144600a25..0fa40dbe0c 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
@@ -637,6 +637,13 @@ SmbiosPrintStructure (
   }
 }
   }
+  if (AE_SMBIOS_VERSION (0x3, 0x2)) {
+if (Struct->Hdr->Length > 0x12) {
+  DisplaySystemSlotHeight(Struct->Type9->SlotHeight, Option);
+  DisplaySystemSlotPhysicalWidth(Struct->Type9->SlotPhysicalWidth, 
Option);
+  DisplaySystemSlotInformation(Struct->Type9->SlotInformation, Option);
+}
+  }
 
   break;
 }
@@ -2898,10 +2905,6 @@ DisplaySystemSlotId (
   IN UINT8   Option
   )
 {
-  //
-  // Display slot type first
-  //
-  DisplaySystemSlotType (SlotType, Option);
 
   ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN 
(STR_SMBIOSVIEW_PRINTINFO_SLOT_ID), gShellDebug1HiiHandle);
   //
diff --git 
a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
index c4a6acb167..96e0e4036a 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
@@ -1447,6 +1447,27 @@ TABLE_ITEM  SystemSlotTypeTable[] = {
 0x23,
 L"PCI Express Mini 76-pin (CEM spec. 2.0) Corresponds to Di

[edk2-devel] [PATCH] [PATCH v2][Edk2 Platform] UserAuthFeaturePkg: Add boot menu return status code to trigger function.

2021-12-10 Thread Bo Chang Ke
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3764

BIOS password is not required when overriding boot device via F7 hotkey.
Add boot menu return status code in callback function
for ReportStatusCode() notification.

Signed-off-by: Bo Chang Ke 
Cc: Sai Chaganty 
Cc: Liming Gao 
Cc: Dandan Bi 
Cc: Bo Chang Ke 
---
 .../UserAuthenticationDxe.c| 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git 
a/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe.c
 
b/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe.c
index bba2057a96..382d891711 100644
--- 
a/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe.c
+++ 
b/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe.c
@@ -13,6 +13,7 @@ EFI_EVENT   mExitBootServicesEvent  = 
NULL;
 EFI_RSC_HANDLER_PROTOCOL   *mRscHandlerProtocol = NULL;
 USER_AUTHENTICATION_PRIVATE_DATA   *mUserAuthenticationData = NULL;
 EFI_SMM_COMMUNICATION_PROTOCOL *mSmmCommunication   = NULL;
+BOOLEAN   mHotKeyF7pressed = FALSE;
 
 EFI_GUID mUserAuthenticationVendorGuid = USER_AUTHENTICATION_FORMSET_GUID;
 HII_VENDOR_DEVICE_PATH mHiiVendorDevicePath = {
@@ -352,10 +353,19 @@ CheckForPassword (
   IN EFI_STATUS_CODE_DATA *Data  OPTIONAL
   )
 {
-  BOOLEAN   PasswordSet;
+  BOOLEAN   PasswordSet;
+  EFI_INPUT_KEY Key;
+  EFI_STATUSStatus  = EFI_SUCCESS;
 
+  Status = gST->ConIn->ReadKeyStroke (gST->ConIn, );
+
+  if (Key.ScanCode == SCAN_F7 && IsPasswordInstalled()) {
+mHotKeyF7pressed = TRUE;
+  }
   if (((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) &&
-  (Value == (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_PC_USER_SETUP))) {
+ (((Value == (EFI_SOFTWARE_DXE_BS_DRIVER | 
EFI_SW_DXE_BS_PC_READY_TO_BOOT_EVENT)) && mHotKeyF7pressed) ||
+ (Value == (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_PC_USER_SETUP {
+mHotKeyF7pressed = FALSE;
 //
 // Check whether enter setup page.
 //
-- 
2.32.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#84644): https://edk2.groups.io/g/devel/message/84644
Mute This Topic: https://groups.io/mt/87640146/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH] [PATCH v2][Edk2 Platform] UserAuthFeaturePkg: Add boot menu return status code to trigger function.

2021-12-10 Thread Bo Chang Ke
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3764

BIOS password is not required when overriding boot device via F7 hotkey.
Add boot menu return status code in callback function
for ReportStatusCode() notification.

Signed-off-by: Bo Chang Ke 
Cc: Sai Chaganty 
Cc: Liming Gao 
Cc: Dandan Bi 
Cc: Dong, Eric 
Cc: Ke, Bo-ChangX 
---
 .../UserAuthenticationDxe.c| 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git 
a/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe.c
 
b/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe.c
index bba2057a96..382d891711 100644
--- 
a/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe.c
+++ 
b/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe.c
@@ -13,6 +13,7 @@ EFI_EVENT   mExitBootServicesEvent  = 
NULL;
 EFI_RSC_HANDLER_PROTOCOL   *mRscHandlerProtocol = NULL;
 USER_AUTHENTICATION_PRIVATE_DATA   *mUserAuthenticationData = NULL;
 EFI_SMM_COMMUNICATION_PROTOCOL *mSmmCommunication   = NULL;
+BOOLEAN   mHotKeyF7pressed = FALSE;
 
 EFI_GUID mUserAuthenticationVendorGuid = USER_AUTHENTICATION_FORMSET_GUID;
 HII_VENDOR_DEVICE_PATH mHiiVendorDevicePath = {
@@ -352,10 +353,19 @@ CheckForPassword (
   IN EFI_STATUS_CODE_DATA *Data  OPTIONAL
   )
 {
-  BOOLEAN   PasswordSet;
+  BOOLEAN   PasswordSet;
+  EFI_INPUT_KEY Key;
+  EFI_STATUSStatus  = EFI_SUCCESS;
 
+  Status = gST->ConIn->ReadKeyStroke (gST->ConIn, );
+
+  if (Key.ScanCode == SCAN_F7 && IsPasswordInstalled()) {
+mHotKeyF7pressed = TRUE;
+  }
   if (((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) &&
-  (Value == (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_PC_USER_SETUP))) {
+ (((Value == (EFI_SOFTWARE_DXE_BS_DRIVER | 
EFI_SW_DXE_BS_PC_READY_TO_BOOT_EVENT)) && mHotKeyF7pressed) ||
+ (Value == (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_PC_USER_SETUP {
+mHotKeyF7pressed = FALSE;
 //
 // Check whether enter setup page.
 //
-- 
2.32.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#84645): https://edk2.groups.io/g/devel/message/84645
Mute This Topic: https://groups.io/mt/87640146/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-