[edk2-devel] [edk2-platforms][PATCH 3/4] JadePkg: Refactor SmbiosPlatformDxe

Minh Nguyen via groups.io minhnguyen1=os.amperecomputing.com at groups.io
Wed May 24 00:40:36 UTC 2023


This refactor is derrived from ArmPkg/SMBIOS and customize to adapt
with platform. These changes help to separate each Type of SMBIOS table
into individual modules. It makes the structure of SmbiosPlatformDxe
module clear and easier to add new type of table.

Signed-off-by: Minh Nguyen <minhnguyen1 at os.amperecomputing.com>
---
 Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf                           |   27 +-
 Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.h                             |  201 ++++
 Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c                             | 1083 ++++++++------------
 Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxeDataTable.c                    |   72 ++
 Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type08/PlatformPortConnectorData.c              |  142 +++
 Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type08/PlatformPortConnectorFunction.c          |   57 ++
 Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type09/PlatformSystemSlotData.c                 |  268 +++++
 Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type09/PlatformSystemSlotFunction.c             |   58 ++
 Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type11/PlatformOemStringData.c                  |   42 +
 Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type11/PlatformOemStringFunction.c              |   57 ++
 Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type24/PlatformHardwareSecurityData.c           |   42 +
 Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type24/PlatformHardwareSecurityFunction.c       |   57 ++
 Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type38/PlatformIpmiDeviceData.c                 |   46 +
 Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type38/PlatformIpmiDeviceFunction.c             |   39 +
 Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type41/PlatformOnboardDevicesExtendedData.c     |   47 +
 Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type41/PlatformOnboardDevicesExtendedFunction.c |   57 ++
 Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxeStrings.uni                    |   21 +
 Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type08/PlatformPortConnector.uni                |   22 +
 Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type09/PlatformSystemSlot.uni                   |   20 +
 Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type11/PlatformOemString.uni                    |   11 +
 Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type41/PlatformOnboardDevicesExtended.uni       |   10 +
 21 files changed, 1735 insertions(+), 644 deletions(-)

diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
old mode 100644
new mode 100755
index 549aa38b1774..83ff918fc42d
--- a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
+++ b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
@@ -15,7 +15,22 @@ [Defines]
   ENTRY_POINT                    = SmbiosPlatformDxeEntry
 
 [Sources]
+  SmbiosPlatformDxe.h
   SmbiosPlatformDxe.c
+  SmbiosPlatformDxeDataTable.c
+  SmbiosPlatformDxeStrings.uni
+  Type08/PlatformPortConnectorData.c
+  Type08/PlatformPortConnectorFunction.c
+  Type09/PlatformSystemSlotData.c
+  Type09/PlatformSystemSlotFunction.c
+  Type11/PlatformOemStringData.c
+  Type11/PlatformOemStringFunction.c
+  Type24/PlatformHardwareSecurityData.c
+  Type24/PlatformHardwareSecurityFunction.c
+  Type38/PlatformIpmiDeviceData.c
+  Type38/PlatformIpmiDeviceFunction.c
+  Type41/PlatformOnboardDevicesExtendedData.c
+  Type41/PlatformOnboardDevicesExtendedFunction.c
 
 [Packages]
   ArmPkg/ArmPkg.dec
@@ -25,19 +40,23 @@ [Packages]
   Silicon/Ampere/AmpereSiliconPkg/AmpereSiliconPkg.dec
 
 [LibraryClasses]
+  AmpereCpuLib
   BaseLib
   BaseMemoryLib
   DebugLib
+  HiiLib
   MemoryAllocationLib
+  NVParamLib
+  #IOExpanderLib
   UefiBootServicesTableLib
   UefiDriverEntryPoint
   UefiLib
 
 [Protocols]
-  gEfiSmbiosProtocolGuid                     ## CONSUMED
+  gEfiSmbiosProtocolGuid                            ## CONSUMED
 
-[Pcd]
-  gArmTokenSpaceGuid.PcdFdSize
+[Guids]
+  gCpuConfigFormSetGuid
 
 [Depex]
-  gEfiSmbiosProtocolGuid
+  TRUE
diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.h b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.h
new file mode 100644
index 000000000000..df7d44ffecb6
--- /dev/null
+++ b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.h
@@ -0,0 +1,201 @@
+/** @file
+  Header file for the SmbiosPlatformDxe Driver.
+
+  Based on files under Nt32Pkg/MiscSubClassPlatformDxe/
+
+  Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
+  Copyright (c) 2021, NUVIA Inc. All rights reserved.<BR>
+  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2015, Hisilicon Limited. All rights reserved.<BR>
+  Copyright (c) 2015, Linaro Limited. All rights reserved.<BR>
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef SMBIOS_PLATFORM_DXE_H_
+#define SMBIOS_PLATFORM_DXE_H_
+
+#include <Protocol/Smbios.h>
+#include <IndustryStandard/SmBios.h>
+
+#define NULL_TERMINATED_TYPE             0xFF
+#define NULL_TERMINATED_TOKEN            0xFFFF
+
+#define END_OF_SMBIOS_TABLE_TYPE         127
+#define SMBIOS_UNICODE_STRING_MAX_LENGTH (SMBIOS_STRING_MAX_LENGTH * sizeof (CHAR16))
+
+typedef enum {
+  ADDITIONAL_STR_INDEX_1 = 1,
+  ADDITIONAL_STR_INDEX_2,
+  ADDITIONAL_STR_INDEX_3,
+  ADDITIONAL_STR_INDEX_4,
+  ADDITIONAL_STR_INDEX_5,
+  ADDITIONAL_STR_INDEX_6,
+  ADDITIONAL_STR_INDEX_7,
+  ADDITIONAL_STR_INDEX_8,
+  ADDITIONAL_STR_INDEX_9,
+  ADDITIONAL_STR_INDEX_MAX
+} ADDITIONAl_STR_INDEX;
+
+//
+// Data table entry update function.
+//
+typedef EFI_STATUS (EFIAPI SMBIOS_PLATFORM_DXE_DATA_FUNCTION)(
+  IN VOID *RecordData,
+  IN VOID *StrToken
+);
+
+#pragma pack(1)
+//
+//  Data table entry definition.
+//
+typedef struct {
+  //
+  // Intermediate input data for SMBIOS record
+  //
+  VOID                              *RecordData;
+  VOID                              *StrToken;
+  SMBIOS_PLATFORM_DXE_DATA_FUNCTION *Function;
+} SMBIOS_PLATFORM_DXE_DATA_TABLE;
+
+typedef struct {
+  UINT16 TokenArray[ADDITIONAL_STR_INDEX_MAX];
+  UINT8  TokenLen;
+} STR_TOKEN_INFO;
+#pragma pack()
+
+//
+// SMBIOS table extern definitions.
+//
+#define SMBIOS_PLATFORM_DXE_TABLE_EXTERNS(SMBIOS_TYPE, BASE_NAME) \
+extern SMBIOS_TYPE BASE_NAME ## Data[]; \
+extern STR_TOKEN_INFO BASE_NAME ## StrToken[]; \
+extern SMBIOS_PLATFORM_DXE_DATA_FUNCTION BASE_NAME ## Function;
+
+//
+// SMBIOS data table entries.
+//
+// This is used to define tables for structure pointer, functions and
+// string Tokens in order to iterate through the list of tables, populate
+// them and add them into the system.
+#define SMBIOS_PLATFORM_DXE_TABLE_ENTRY_DATA_AND_FUNCTION(BASE_NAME) \
+{ \
+  BASE_NAME ## Data, \
+  BASE_NAME ## StrToken, \
+  BASE_NAME ## Function \
+}
+
+//
+// Global definition macros.
+//
+#define SMBIOS_PLATFORM_DXE_TABLE_DATA(SMBIOS_TYPE, BASE_NAME) \
+  SMBIOS_TYPE BASE_NAME ## Data[]
+
+#define SMBIOS_PLATFORM_DXE_STRING_TOKEN_DATA(BASE_NAME) \
+  STR_TOKEN_INFO BASE_NAME ## StrToken[]
+
+#define SMBIOS_PLATFORM_DXE_TABLE_FUNCTION(BASE_NAME) \
+  EFI_STATUS EFIAPI BASE_NAME ## Function( \
+  IN VOID *RecordData, \
+  IN VOID *StrToken \
+  )
+
+/**
+  Adds an SMBIOS record.
+
+  @param  Buffer                 The data for the SMBIOS record.
+                                 The format of the record is determined by
+                                 EFI_SMBIOS_TABLE_HEADER.Type. The size of the
+                                 formatted area is defined by EFI_SMBIOS_TABLE_HEADER.Length
+                                 and either followed by a double-null (0x0000) or a set
+                                 of null terminated strings and a null.
+  @param  SmbiosHandle           A unique handle will be assigned to the SMBIOS record
+                                 if not NULL.
+
+  @retval EFI_SUCCESS            Record was added.
+  @retval EFI_OUT_OF_RESOURCES   Record was not added due to lack of system resources.
+  @retval EFI_ALREADY_STARTED    The SmbiosHandle passed in was already in use.
+  @retval EFI_INVALID_PARAMETER  Buffer is NULL.
+**/
+EFI_STATUS
+SmbiosPlatformDxeAddRecord (
+  IN     UINT8             *Buffer,
+  IN OUT EFI_SMBIOS_HANDLE *SmbiosHandle OPTIONAL
+  );
+
+/**
+  Fetches a list of the specified SMBIOS Table types.
+
+  @param[in]   SmbiosType   The type of table to fetch.
+  @param[out]  HandleArray  The array of handles.
+  @param[out]  HandleCount  Number of handles in the array.
+**/
+VOID
+SmbiosPlatformDxeGetLinkTypeHandle (
+  IN  UINT8         SmbiosType,
+  OUT SMBIOS_HANDLE **HandleArray,
+  OUT UINTN         *HandleCount
+  );
+
+/**
+  Create SMBIOS Table Record with additional strings.
+
+  @param[out]  TableRecord    Table Record is created.
+  @param[in]   InputData      Input Table from Data Table.
+  @param[in]   TableTypeSize  Size of Table with specified type.
+  @param[in]   StrToken       Pointer to Token of additional strings in HII Database.
+**/
+VOID
+SmbiosPlatformDxeCreateTable (
+  OUT VOID           **TableRecord,
+  IN  VOID           **InputData,
+  IN  UINT8          TableTypeSize,
+  IN  STR_TOKEN_INFO *StrToken
+  );
+
+/**
+  Save default strings of HII Database in case multiple tables with the same type using
+  these data for setting additional strings. After using, default strings will be set
+  back again in HII Database for other tables with the same type to use.
+
+  @param[in]  StrToken     Pointer to Token of additional strings in HII Database.
+
+  @retval     EFI_SUCCESS  Saved default strings of HII Database successfully.
+              Other        Failed to save default strings of HII Database.
+**/
+EFI_STATUS
+SmbiosPlatformDxeSaveHiiDefaultString (
+  IN STR_TOKEN_INFO *StrToken
+  );
+
+/**
+  Restore default strings of HII Database after using for setting additional strings.
+
+  @param[in]  StrToken     Pointer to Token of additional strings in HII Database.
+
+  @retval     EFI_SUCCESS  Restore default strings off HII Database successfully.
+              Other        Failed to restore default strings of HII Database.
+**/
+EFI_STATUS
+SmbiosPlatformDxeRestoreHiiDefaultString (
+  IN STR_TOKEN_INFO *StrToken
+  );
+
+//
+// Data Table Array
+//
+extern SMBIOS_PLATFORM_DXE_DATA_TABLE mSmbiosPlatformDxeDataTable[];
+
+//
+// Data Table Array Entries
+//
+extern UINTN mSmbiosPlatformDxeDataTableEntries;
+
+//
+// HII Database Handle
+//
+extern EFI_HII_HANDLE mSmbiosPlatformDxeHiiHandle;
+
+extern UINT8  SmbiosPlatformDxeStrings[];
+
+#endif // SMBIOS_PLATFORM_DXE_H_
diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c
index 448912f146ec..faa49cf9ca6b 100644
--- a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c
+++ b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c
@@ -1,657 +1,46 @@
 /** @file
+  This driver parses the mSmbiosPlatformDxeDataTable structure
+  and reports any generated data using SMBIOS protocol.
 
-  Copyright (c) 2020 - 2023, Ampere Computing LLC. All rights reserved.<BR>
+  Based on files under Nt32Pkg/MiscSubClassPlatformDxe/
 
+  Copyright (c) 2022, Ampere Computing LLC. All rights reserved.<BR>
+  Copyright (c) 2021, NUVIA Inc. All rights reserved.<BR>
+  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2015, Hisilicon Limited. All rights reserved.<BR>
+  Copyright (c) 2015, Linaro Limited. All rights reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
-#include <Uefi.h>
-
-#include <Guid/SmBios.h>
 #include <Library/BaseLib.h>
 #include <Library/BaseMemoryLib.h>
 #include <Library/DebugLib.h>
+#include <Library/HiiLib.h>
 #include <Library/MemoryAllocationLib.h>
 #include <Library/PrintLib.h>
 #include <Library/UefiBootServicesTableLib.h>
-#include <Protocol/Smbios.h>
 
-#define CHASSIS_VERSION_TEMPLATE    "None               \0"
-#define CHASSIS_SERIAL_TEMPLATE     "Serial Not Set     \0"
-#define CHASSIS_ASSET_TAG_TEMPLATE  "Asset Tag Not Set  \0"
+#include "SmbiosPlatformDxe.h"
 
-#define TYPE8_ADDITIONAL_STRINGS      \
-  "VGA1 - Rear VGA Connector\0"       \
-  "DB-15 Male (VGA)         \0"
+#define SIZE_OF_HII_DATABASE_DEFAULT_STRINGS \
+ADDITIONAL_STR_INDEX_MAX * SMBIOS_UNICODE_STRING_MAX_LENGTH
 
-#define TYPE9_ADDITIONAL_STRINGS       \
-  "Socket 0 Riser 1 x32 - Slot 1\0"
+STATIC EFI_HANDLE          mSmbiosPlatformDxeImageHandle;
+STATIC EFI_STRING          mDefaultHiiDatabaseStr;
+STATIC EFI_SMBIOS_PROTOCOL *mPlatformDxeSmbios = NULL;
 
-#define TYPE11_ADDITIONAL_STRINGS       \
-  "www.amperecomputing.com\0"
-
-#define TYPE41_ADDITIONAL_STRINGS       \
-  "Onboard VGA\0"
-
-#define ADDITIONAL_STR_INDEX_1    0x01
-#define ADDITIONAL_STR_INDEX_2    0x02
-#define ADDITIONAL_STR_INDEX_3    0x03
-#define ADDITIONAL_STR_INDEX_4    0x04
-#define ADDITIONAL_STR_INDEX_5    0x05
-#define ADDITIONAL_STR_INDEX_6    0x06
-
-//
-// Type definition and contents of the default SMBIOS table.
-// This table covers only the minimum structures required by
-// the SMBIOS specification (section 6.2, version 3.0)
-//
-#pragma pack(1)
-typedef struct {
-  SMBIOS_TABLE_TYPE8 Base;
-  CHAR8              Strings[sizeof (TYPE8_ADDITIONAL_STRINGS)];
-} ARM_TYPE8;
-
-typedef struct {
-  SMBIOS_TABLE_TYPE9 Base;
-  CHAR8              Strings[sizeof (TYPE9_ADDITIONAL_STRINGS)];
-} ARM_TYPE9;
-
-typedef struct {
-  SMBIOS_TABLE_TYPE11 Base;
-  CHAR8               Strings[sizeof (TYPE11_ADDITIONAL_STRINGS)];
-} ARM_TYPE11;
-
-typedef struct {
-  SMBIOS_TABLE_TYPE41 Base;
-  CHAR8               Strings[sizeof (TYPE41_ADDITIONAL_STRINGS)];
-} ARM_TYPE41;
-
-#pragma pack()
-
-// Type 8 Port Connector Information
-STATIC CONST ARM_TYPE8 mArmDefaultType8Vga = {
-  {
-    {                                             // SMBIOS_STRUCTURE Hdr
-      EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION, // UINT8 Type
-      sizeof (SMBIOS_TABLE_TYPE8),                // UINT8 Length
-      SMBIOS_HANDLE_PI_RESERVED,
-    },
-    ADDITIONAL_STR_INDEX_1,       // InternalReferenceDesignator String
-    PortConnectorTypeDB15Female,  // InternalConnectorType;
-    ADDITIONAL_STR_INDEX_2,       // ExternalReferenceDesignator String
-    PortTypeOther,                // ExternalConnectorType;
-    PortTypeVideoPort,            // PortType;
-  },
-  "VGA1 - Rear VGA Connector\0" \
-  "DB-15 Male (VGA)\0"
-};
-
-// Type 8 Port Connector Information
-STATIC CONST ARM_TYPE8 mArmDefaultType8USBFront = {
-  {
-    {                                             // SMBIOS_STRUCTURE Hdr
-      EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION, // UINT8 Type
-      sizeof (SMBIOS_TABLE_TYPE8),                // UINT8 Length
-      SMBIOS_HANDLE_PI_RESERVED,
-    },
-    ADDITIONAL_STR_INDEX_1,       // InternalReferenceDesignator String
-    PortConnectorTypeUsb,         // InternalConnectorType;
-    ADDITIONAL_STR_INDEX_2,       // ExternalReferenceDesignator String
-    PortTypeOther,                // ExternalConnectorType;
-    PortTypeUsb,                  // PortType;
-  },
-  "Front Panel USB 3.0\0"  \
-  "USB\0"
-};
-
-// Type 8 Port Connector Information
-STATIC CONST ARM_TYPE8 mArmDefaultType8USBRear = {
-  {
-    {                                             // SMBIOS_STRUCTURE Hdr
-      EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION, // UINT8 Type
-      sizeof (SMBIOS_TABLE_TYPE8),                // UINT8 Length
-      SMBIOS_HANDLE_PI_RESERVED,
-    },
-    ADDITIONAL_STR_INDEX_1,       // InternalReferenceDesignator String
-    PortConnectorTypeUsb,         // InternalConnectorType;
-    ADDITIONAL_STR_INDEX_2,       // ExternalReferenceDesignator String
-    PortTypeOther,                // ExternalConnectorType;
-    PortTypeUsb,                  // PortType;
-  },
-  "Rear Panel USB 3.0\0"   \
-  "USB\0"
-};
-
-// Type 8 Port Connector Information
-STATIC CONST ARM_TYPE8 mArmDefaultType8NetRJ45 = {
-  {
-    {                                             // SMBIOS_STRUCTURE Hdr
-      EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION, // UINT8 Type
-      sizeof (SMBIOS_TABLE_TYPE8),                // UINT8 Length
-      SMBIOS_HANDLE_PI_RESERVED,
-    },
-    ADDITIONAL_STR_INDEX_1,       // InternalReferenceDesignator String
-    PortConnectorTypeRJ45,        // InternalConnectorType;
-    ADDITIONAL_STR_INDEX_2,       // ExternalReferenceDesignator String
-    PortConnectorTypeRJ45,        // ExternalConnectorType;
-    PortTypeNetworkPort,          // PortType;
-  },
-  "RJ1 - BMC RJ45 Port\0" \
-  "RJ45 Connector\0"
-};
-
-// Type 8 Port Connector Information
-STATIC CONST ARM_TYPE8 mArmDefaultType8NetOcp = {
-  {
-    {                                             // SMBIOS_STRUCTURE Hdr
-      EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION, // UINT8 Type
-      sizeof (SMBIOS_TABLE_TYPE8),                // UINT8 Length
-      SMBIOS_HANDLE_PI_RESERVED,
-    },
-    ADDITIONAL_STR_INDEX_1,       // InternalReferenceDesignator String
-    PortTypeOther,                // InternalConnectorType;
-    ADDITIONAL_STR_INDEX_2,       // ExternalReferenceDesignator String
-    PortTypeOther,                // ExternalConnectorType;
-    PortTypeNetworkPort,          // PortType;
-  },
-  "OCP1 - OCP NIC 3.0 Connector\0"  \
-  "OCP NIC 3.0\0"
-};
-
-// Type 8 Port Connector Information
-STATIC CONST ARM_TYPE8 mArmDefaultType8Uart = {
-  {
-    {                                             // SMBIOS_STRUCTURE Hdr
-      EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION, // UINT8 Type
-      sizeof (SMBIOS_TABLE_TYPE8),                // UINT8 Length
-      SMBIOS_HANDLE_PI_RESERVED,
-    },
-    ADDITIONAL_STR_INDEX_1,        // InternalReferenceDesignator String
-    PortTypeOther,                 // InternalConnectorType;
-    ADDITIONAL_STR_INDEX_2,        // ExternalReferenceDesignator String
-    PortConnectorTypeDB9Female,    // ExternalConnectorType;
-    PortTypeSerial16550Compatible, // PortType;
-  },
-  "UART1 - BMC UART5 Connector\0"  \
-  "DB-9 female\0"
-};
-
-// Type 9 System Slots
-STATIC ARM_TYPE9 mArmDefaultType9Sk0RiserX32Slot1 = {
-  {
-    {                               // SMBIOS_STRUCTURE Hdr
-      EFI_SMBIOS_TYPE_SYSTEM_SLOTS, // UINT8 Type
-      sizeof (SMBIOS_TABLE_TYPE9),  // UINT8 Length
-      SMBIOS_HANDLE_PI_RESERVED,
-    },
-    ADDITIONAL_STR_INDEX_1,
-    SlotTypePciExpressGen3,
-    SlotDataBusWidth16X,
-    SlotUsageAvailable,
-    SlotLengthLong,
-    0,
-    {0, 0, 1}, // Provides 3.3 Volts
-    {1},       // PME
-    0,
-    0,
-    0,
-  },
-  "S0 Riser 1 x32 - Slot 1\0"
-};
-
-// Type 9 System Slots
-STATIC ARM_TYPE9 mArmDefaultType9Sk0RiserX32Slot2 = {
-  {
-    {                               // SMBIOS_STRUCTURE Hdr
-      EFI_SMBIOS_TYPE_SYSTEM_SLOTS, // UINT8 Type
-      sizeof (SMBIOS_TABLE_TYPE9),  // UINT8 Length
-      SMBIOS_HANDLE_PI_RESERVED,
-    },
-    ADDITIONAL_STR_INDEX_1,
-    SlotTypePciExpressGen3,
-    SlotDataBusWidth8X,
-    SlotUsageAvailable,
-    SlotLengthLong,
-    0,
-    {0, 0, 1}, // Provides 3.3 Volts
-    {1},       // PME
-    4,
-    0,
-    0,
-  },
-  "S0 Riser x32 - Slot 2\0"
-};
-
-// Type 9 System Slots
-STATIC ARM_TYPE9 mArmDefaultType9Sk0RiserX32Slot3 = {
-  {
-    {                               // SMBIOS_STRUCTURE Hdr
-      EFI_SMBIOS_TYPE_SYSTEM_SLOTS, // UINT8 Type
-      sizeof (SMBIOS_TABLE_TYPE9),  // UINT8 Length
-      SMBIOS_HANDLE_PI_RESERVED,
-    },
-    ADDITIONAL_STR_INDEX_1,
-    SlotTypePciExpressGen3,
-    SlotDataBusWidth8X,
-    SlotUsageAvailable,
-    SlotLengthLong,
-    0,
-    {0, 0, 1}, // Provides 3.3 Volts
-    {1},       // PME
-    5,
-    0,
-    0,
-  },
-  "S0 Riser x32 - Slot 3\0"
-};
-
-// Type 9 System Slots
-STATIC ARM_TYPE9 mArmDefaultType9Sk1RiserX24Slot1 = {
-  {
-    {                               // SMBIOS_STRUCTURE Hdr
-      EFI_SMBIOS_TYPE_SYSTEM_SLOTS, // UINT8 Type
-      sizeof (SMBIOS_TABLE_TYPE9),  // UINT8 Length
-      SMBIOS_HANDLE_PI_RESERVED,
-    },
-    ADDITIONAL_STR_INDEX_1,
-    SlotTypePciExpressGen3,
-    SlotDataBusWidth8X,
-    SlotUsageAvailable,
-    SlotLengthLong,
-    0,
-    {0, 0, 1}, // Provides 3.3 Volts
-    {1},       // PME
-    7,
-    0,
-    0,
-  },
-  "S1 Riser x24 - Slot 1\0"
-};
-
-// Type 9 System Slots
-STATIC ARM_TYPE9 mArmDefaultType9Sk1RiserX24Slot2 = {
-  {
-    {                               // SMBIOS_STRUCTURE Hdr
-      EFI_SMBIOS_TYPE_SYSTEM_SLOTS, // UINT8 Type
-      sizeof (SMBIOS_TABLE_TYPE9),  // UINT8 Length
-      SMBIOS_HANDLE_PI_RESERVED,
-    },
-    ADDITIONAL_STR_INDEX_1,
-    SlotTypePciExpressGen3,
-    SlotDataBusWidth8X,
-    SlotUsageAvailable,
-    SlotLengthLong,
-    0,
-    {0, 0, 1}, // Provides 3.3 Volts
-    {1},       // PME
-    8,
-    0,
-    0,
-  },
-  "S1 Riser x24 - Slot 2\0"
-};
-
-// Type 9 System Slots
-STATIC ARM_TYPE9 mArmDefaultType9Sk1RiserX24Slot3 = {
-  {
-    {                               // SMBIOS_STRUCTURE Hdr
-      EFI_SMBIOS_TYPE_SYSTEM_SLOTS, // UINT8 Type
-      sizeof (SMBIOS_TABLE_TYPE9),  // UINT8 Length
-      SMBIOS_HANDLE_PI_RESERVED,
-    },
-    ADDITIONAL_STR_INDEX_1,
-    SlotTypePciExpressGen3,
-    SlotDataBusWidth8X,
-    SlotUsageAvailable,
-    SlotLengthLong,
-    0,
-    {0, 0, 1}, // Provides 3.3 Volts
-    {1},       // PME
-    9,
-    0,
-    0,
-  },
-  "S1 Riser x24 - Slot 3\0"
-};
-
-// Type 9 System Slots
-STATIC ARM_TYPE9 mArmDefaultType9Sk1RiserX8Slot1 = {
-  {
-    {                               // SMBIOS_STRUCTURE Hdr
-      EFI_SMBIOS_TYPE_SYSTEM_SLOTS, // UINT8 Type
-      sizeof (SMBIOS_TABLE_TYPE9),  // UINT8 Length
-      SMBIOS_HANDLE_PI_RESERVED,
-    },
-    ADDITIONAL_STR_INDEX_1,
-    SlotTypePciExpressGen3,
-    SlotDataBusWidth8X,
-    SlotUsageAvailable,
-    SlotLengthLong,
-    0,
-    {0, 0, 1}, // Provides 3.3 Volts
-    {1},       // PME
-    8,
-    0,
-    0,
-  },
-  "S1 Riser x8 - Slot 1\0"
-};
-
-// Type 9 System Slots
-STATIC ARM_TYPE9 mArmDefaultType9Sk0OcpNic = {
-  {
-    {                               // SMBIOS_STRUCTURE Hdr
-      EFI_SMBIOS_TYPE_SYSTEM_SLOTS, // UINT8 Type
-      sizeof (SMBIOS_TABLE_TYPE9),  // UINT8 Length
-      SMBIOS_HANDLE_PI_RESERVED,
-    },
-    ADDITIONAL_STR_INDEX_1,
-    SlotTypePciExpressGen3,
-    SlotDataBusWidth16X,
-    SlotUsageAvailable,
-    SlotLengthLong,
-    0,
-    {0, 0, 1}, // Provides 3.3 Volts
-    {1},       // PME
-    1,
-    0,
-    0,
-  },
-  "S0 OCP NIC 3.0\0"
-};
-
-// Type 9 System Slots
-STATIC ARM_TYPE9 mArmDefaultType9Sk1NvmeM2Slot1 = {
-  {
-    {                               // SMBIOS_STRUCTURE Hdr
-      EFI_SMBIOS_TYPE_SYSTEM_SLOTS, // UINT8 Type
-      sizeof (SMBIOS_TABLE_TYPE9),  // UINT8 Length
-      SMBIOS_HANDLE_PI_RESERVED,
-    },
-    ADDITIONAL_STR_INDEX_1,
-    SlotTypePciExpressGen3,
-    SlotDataBusWidth4X,
-    SlotUsageAvailable,
-    SlotLengthLong,
-    0,
-    {0, 0, 1}, // Provides 3.3 Volts
-    {1},       // PME
-    5,
-    0,
-    0,
-  },
-  "S1 NVMe M.2 - Slot 1\0"
-};
-
-// Type 9 System Slots
-STATIC ARM_TYPE9 mArmDefaultType9Sk1NvmeM2Slot2 = {
-  {
-    {                               // SMBIOS_STRUCTURE Hdr
-      EFI_SMBIOS_TYPE_SYSTEM_SLOTS, // UINT8 Type
-      sizeof (SMBIOS_TABLE_TYPE9),  // UINT8 Length
-      SMBIOS_HANDLE_PI_RESERVED,
-    },
-    ADDITIONAL_STR_INDEX_1,
-    SlotTypePciExpressGen3,
-    SlotDataBusWidth4X,
-    SlotUsageAvailable,
-    SlotLengthLong,
-    0,
-    {0, 0, 1}, // Provides 3.3 Volts
-    {1},       // PME
-    5,
-    0,
-    0,
-  },
-  "S1 NVMe M.2 - Slot 2\0"
-};
-
-// Type 11 OEM Strings
-STATIC ARM_TYPE11 mArmDefaultType11 = {
-  {
-    {                               // SMBIOS_STRUCTURE Hdr
-      EFI_SMBIOS_TYPE_OEM_STRINGS,  // UINT8 Type
-      sizeof (SMBIOS_TABLE_TYPE11), // UINT8 Length
-      SMBIOS_HANDLE_PI_RESERVED,
-    },
-    ADDITIONAL_STR_INDEX_1
-  },
-  TYPE11_ADDITIONAL_STRINGS
-};
-
-// Type 24 Hardware Security
-STATIC SMBIOS_TABLE_TYPE24 mArmDefaultType24 = {
-  {                                    // SMBIOS_STRUCTURE Hdr
-    EFI_SMBIOS_TYPE_HARDWARE_SECURITY, // UINT8 Type
-    sizeof (SMBIOS_TABLE_TYPE24),      // UINT8 Length
-    SMBIOS_HANDLE_PI_RESERVED,
-  },
-  0
-};
-
-// Type 38 IPMI Device Information
-STATIC SMBIOS_TABLE_TYPE38 mArmDefaultType38 = {
-  {                                          // SMBIOS_STRUCTURE Hdr
-    EFI_SMBIOS_TYPE_IPMI_DEVICE_INFORMATION, // UINT8 Type
-    sizeof (SMBIOS_TABLE_TYPE38),            // UINT8 Length
-    SMBIOS_HANDLE_PI_RESERVED,
-  },
-  IPMIDeviceInfoInterfaceTypeSSIF,
-  0x20,
-  0x20,
-  0xFF,
-  0x20
-};
-
-// Type 41 Onboard Devices Extended Information
-STATIC ARM_TYPE41 mArmDefaultType41 = {
-  {
-    { // SMBIOS_STRUCTURE Hdr
-      EFI_SMBIOS_TYPE_ONBOARD_DEVICES_EXTENDED_INFORMATION,
-      sizeof (SMBIOS_TABLE_TYPE41),
-      SMBIOS_HANDLE_PI_RESERVED,
-    },
-    1,
-    0x83,  // OnBoardDeviceExtendedTypeVideo, Enabled
-    1,
-    4,
-    2,
-    0,
-  },
-  TYPE41_ADDITIONAL_STRINGS
-};
-
-// Type 42 System Boot Information
-STATIC SMBIOS_TABLE_TYPE42 mArmDefaultType42 = {
-  { // SMBIOS_STRUCTURE Hdr
-    EFI_SMBIOS_TYPE_MANAGEMENT_CONTROLLER_HOST_INTERFACE,
-    sizeof (SMBIOS_TABLE_TYPE42),
-    SMBIOS_HANDLE_PI_RESERVED,
-  },
-  MCHostInterfaceTypeOemDefined,
-  4,
-  {0xFF, 0, 0, 0}
-};
-
-STATIC CONST VOID *DefaultCommonTables[] =
-{
-  &mArmDefaultType8Vga,
-  &mArmDefaultType8USBFront,
-  &mArmDefaultType8USBRear,
-  &mArmDefaultType8NetRJ45,
-  &mArmDefaultType8NetOcp,
-  &mArmDefaultType8Uart,
-  &mArmDefaultType9Sk0RiserX32Slot1,
-  &mArmDefaultType9Sk0RiserX32Slot2,
-  &mArmDefaultType9Sk0RiserX32Slot3,
-  &mArmDefaultType9Sk1RiserX24Slot1,
-  &mArmDefaultType9Sk1RiserX24Slot2,
-  &mArmDefaultType9Sk1RiserX24Slot3,
-  &mArmDefaultType9Sk1RiserX8Slot1,
-  &mArmDefaultType9Sk0OcpNic,
-  &mArmDefaultType9Sk1NvmeM2Slot1,
-  &mArmDefaultType9Sk1NvmeM2Slot2,
-  &mArmDefaultType11,
-  &mArmDefaultType24,
-  &mArmDefaultType38,
-  &mArmDefaultType41,
-  &mArmDefaultType42,
-  NULL
-};
-
-typedef struct {
-  CHAR8 MonthNameStr[4]; // example "Jan", Compiler build date, month
-  CHAR8 DigitStr[3];     // example "01", Smbios date format, month
-} MonthStringDig;
-
-STATIC
-UINTN
-GetStringPackSize (
-  CHAR8 *StringPack
-  )
-{
-  UINTN StrCount;
-  CHAR8 *StrStart;
-
-  if ((*StringPack == 0) && (*(StringPack + 1) == 0)) {
-    return 0;
-  }
-
-  // String section ends in double-null (0000h)
-  for (StrCount = 0, StrStart = StringPack;
-       ((*StrStart != 0) || (*(StrStart + 1) != 0)); StrStart++, StrCount++)
-  {
-  }
-
-  return StrCount + 2; // Included the double NULL
-}
-
-// Update String at String number to String Pack
-EFI_STATUS
-UpdateStringPack (
-  CHAR8 *StringPack,
-  CHAR8 *String,
-  UINTN StringNumber
-  )
-{
-  CHAR8 *StrStart;
-  UINTN StrIndex;
-  UINTN InputStrLen;
-  UINTN TargetStrLen;
-  UINTN BufferSize;
-  CHAR8 *Buffer;
-
-  StrStart = StringPack;
-  for (StrIndex = 1; StrIndex < StringNumber; StrStart++) {
-    // A string ends in 00h
-    if (*StrStart == 0) {
-      StrIndex++;
-    }
-    // String section ends in double-null (0000h)
-    if ((*StrStart == 0) && (*(StrStart + 1) == 0)) {
-      return EFI_NOT_FOUND;
-    }
-  }
-
-  if (*StrStart == 0) {
-    StrStart++;
-  }
-
-  InputStrLen = AsciiStrLen (String);
-  TargetStrLen = AsciiStrLen (StrStart);
-  BufferSize = GetStringPackSize (StrStart + TargetStrLen + 1);
-
-  // Replace the String if length matched
-  // OR this is the last string
-  if (InputStrLen == TargetStrLen || (BufferSize == 0)) {
-    CopyMem (StrStart, String, InputStrLen);
-  }
-  // Otherwise, buffer is needed to apply new string
-  else {
-    Buffer = AllocateZeroPool (BufferSize);
-    if (Buffer == NULL) {
-      return EFI_OUT_OF_RESOURCES;
-    }
-
-    CopyMem (Buffer, StrStart + TargetStrLen + 1, BufferSize);
-    CopyMem (StrStart, String, InputStrLen + 1);
-    CopyMem (StrStart + InputStrLen + 1, Buffer, BufferSize);
-
-    FreePool (Buffer);
-  }
-
-  return EFI_SUCCESS;
-}
-
-/**
-   Install a whole table worth of structures
-
-   @param  Smbios               SMBIOS protocol.
-   @param  DefaultTables        A pointer to the default SMBIOS table structure.
-**/
-EFI_STATUS
-InstallStructures (
-  IN       EFI_SMBIOS_PROTOCOL *Smbios,
-  IN CONST VOID                *DefaultTables[]
-  )
-{
-  EFI_STATUS        Status = EFI_SUCCESS;
-  EFI_SMBIOS_HANDLE SmbiosHandle;
-  UINTN             TableIndex;
-
-  ASSERT (Smbios != NULL);
-
-  for (TableIndex = 0; DefaultTables[TableIndex] != NULL; TableIndex++) {
-    SmbiosHandle = ((EFI_SMBIOS_TABLE_HEADER *)DefaultTables[TableIndex])->Handle;
-    Status = Smbios->Add (
-                       Smbios,
-                       NULL,
-                       &SmbiosHandle,
-                       (EFI_SMBIOS_TABLE_HEADER *)DefaultTables[TableIndex]
-                       );
-    if (EFI_ERROR (Status)) {
-      DEBUG ((DEBUG_ERROR, "%a: adding %d failed\n", __FUNCTION__, TableIndex));
-
-      // stop adding rather than continuing
-      return Status;
-    }
-  }
-
-  return EFI_SUCCESS;
-}
-
-/**
-   Install all structures from the DefaultTables structure
-
-   @param  Smbios               SMBIOS protocol
-
-**/
-EFI_STATUS
-InstallAllStructures (
-  IN EFI_SMBIOS_PROTOCOL *Smbios
-  )
-{
-  EFI_STATUS Status = EFI_SUCCESS;
-
-  ASSERT (Smbios != NULL);
-
-  // Install Tables
-  Status = InstallStructures (Smbios, DefaultCommonTables);
-  ASSERT_EFI_ERROR (Status);
-
-  return Status;
-}
+EFI_HII_HANDLE      mSmbiosPlatformDxeHiiHandle;
 
 /**
-   Installs SMBIOS information for ARM platforms
-
-   @param ImageHandle     Module's image handle
-   @param SystemTable     Pointer of EFI_SYSTEM_TABLE
+  Standard EFI driver point. This driver parses the mSmbiosPlatformDataTable
+  structure and reports any generated data using SMBIOS protocol.
 
-   @retval EFI_SUCCESS    Smbios data successfully installed
-   @retval Other          Smbios data was not installed
+  @param  ImageHandle          Handle for the image of this driver.
+  @param  SystemTable          Pointer to the EFI System Table.
 
+  @retval EFI_SUCCESS          The data was successfully stored.
+          EFI_OUT_OF_RESOURCES There is no remaining memory to satisfy the request.
 **/
 EFI_STATUS
 EFIAPI
@@ -660,24 +49,438 @@ SmbiosPlatformDxeEntry (
   IN EFI_SYSTEM_TABLE *SystemTable
   )
 {
-  EFI_STATUS          Status;
-  EFI_SMBIOS_PROTOCOL *Smbios;
+  UINTN      Index;
+  EFI_STATUS Status;
+
+  mSmbiosPlatformDxeImageHandle = ImageHandle;
+
+  //
+  // Allocate buffer to save default strings of HII Database
+  //
+  mDefaultHiiDatabaseStr = AllocateZeroPool (SIZE_OF_HII_DATABASE_DEFAULT_STRINGS);
+  if (mDefaultHiiDatabaseStr == NULL) {
+    DEBUG ((
+      DEBUG_ERROR,
+      "[%a]:[%dL] HII Database String allocates memory resource failed.\n",
+      __func__,
+      __LINE__
+      ));
+    return EFI_OUT_OF_RESOURCES;
+  }
 
   //
-  // Find the SMBIOS protocol
+  // Locate SMBIOS protocol and get HII Database Handle
   //
   Status = gBS->LocateProtocol (
                   &gEfiSmbiosProtocolGuid,
                   NULL,
-                  (VOID **)&Smbios
+                  (VOID **)&mPlatformDxeSmbios
                   );
-
   if (EFI_ERROR (Status)) {
+    DEBUG ((
+      DEBUG_ERROR,
+      "[%a]:[%dL] Could not locate SMBIOS protocol. %r\n",
+      __func__,
+      __LINE__,
+      Status
+      ));
     return Status;
   }
 
-  Status = InstallAllStructures (Smbios);
-  DEBUG ((DEBUG_ERROR, "SmbiosPlatform install - %r\n", Status));
+  mSmbiosPlatformDxeHiiHandle = HiiAddPackages (
+                                  &gEfiCallerIdGuid,
+                                  mSmbiosPlatformDxeImageHandle,
+                                  SmbiosPlatformDxeStrings,
+                                  NULL
+                                  );
+  if (mSmbiosPlatformDxeHiiHandle == NULL) {
+    return EFI_OUT_OF_RESOURCES;
+  }
+
+  //
+  // Iterate through all Data Tables of each Type and call
+  // function pointer to create and add Table accordingly
+  //
+  for (Index = 0; Index < mSmbiosPlatformDxeDataTableEntries; Index++) {
+    Status = (*mSmbiosPlatformDxeDataTable[Index].Function)(
+                mSmbiosPlatformDxeDataTable[Index].RecordData,
+                mSmbiosPlatformDxeDataTable[Index].StrToken
+                );
+    if (EFI_ERROR (Status)) {
+      DEBUG ((
+        DEBUG_ERROR,
+        "[%a]:[%dL] Could not install SMBIOS Table Type%d. %r\n",
+        __func__,
+        __LINE__,
+        ((EFI_SMBIOS_TABLE_HEADER *)(mSmbiosPlatformDxeDataTable[Index].RecordData))->Type,
+        Status
+        ));
+    }
+  }
+
+  //
+  // Free buffer after all Tables were installed
+  //
+  FreePool (mDefaultHiiDatabaseStr);
+
+  return Status;
+}
+
+/**
+  Adds an SMBIOS record.
+
+  @param  Buffer                 The data for the SMBIOS record.
+                                 The format of the record is determined by
+                                 EFI_SMBIOS_TABLE_HEADER.Type. The size of the
+                                 formatted area is defined by EFI_SMBIOS_TABLE_HEADER.Length
+                                 and either followed by a double-null (0x0000) or a set
+                                 of null terminated strings and a null.
+  @param  SmbiosHandle           A unique handle will be assigned to the SMBIOS record
+                                 if not NULL.
+
+  @retval EFI_SUCCESS            Record was added.
+  @retval EFI_OUT_OF_RESOURCES   Record was not added due to lack of system resources.
+  @retval EFI_ALREADY_STARTED    The SmbiosHandle passed in was already in use.
+  @retval EFI_INVALID_PARAMETER  Buffer is NULL.
+**/
+EFI_STATUS
+SmbiosPlatformDxeAddRecord (
+  IN UINT8                 *Buffer,
+  IN OUT EFI_SMBIOS_HANDLE *SmbiosHandle OPTIONAL
+  )
+{
+  EFI_STATUS        Status;
+  EFI_SMBIOS_HANDLE Handle;
+
+  if (Buffer == NULL) {
+    DEBUG ((
+      DEBUG_ERROR,
+      "[%a]:[%dL] Buffer is NULL - Invalid parameter. %r\n",
+      __func__,
+      __LINE__
+      ));
+    return EFI_INVALID_PARAMETER;
+  }
+
+  Handle = SMBIOS_HANDLE_PI_RESERVED;
+  if (SmbiosHandle != NULL) {
+    Handle = *SmbiosHandle;
+  }
+
+  Status = mPlatformDxeSmbios->Add (
+                                 mPlatformDxeSmbios,
+                                 NULL,
+                                 &Handle,
+                                 (EFI_SMBIOS_TABLE_HEADER *)Buffer
+                                 );
+  if (EFI_ERROR (Status)) {
+    DEBUG ((
+      DEBUG_ERROR,
+      "[%a]:[%dL] SMBIOS Type%d Table Log Failed! %r\n",
+      __func__,
+      __LINE__,
+      ((EFI_SMBIOS_TABLE_HEADER *)Buffer)->Type,
+      Status
+      ));
+  }
+  if (SmbiosHandle != NULL) {
+    *SmbiosHandle = Handle;
+  }
+
+  return Status;
+}
+
+/**
+  Fetches the number of handles of the specified SMBIOS type.
+
+  @param  SmbiosType The type of SMBIOS record to look for.
+
+  @retval UINTN      The number of handles.
+**/
+STATIC
+UINTN
+GetHandleCount (
+  IN UINT8 SmbiosType
+  )
+{
+  UINTN                   HandleCount;
+  EFI_STATUS              Status;
+  EFI_SMBIOS_HANDLE       SmbiosHandle;
+  EFI_SMBIOS_TABLE_HEADER *Record;
+
+  HandleCount = 0;
+  SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED;
+  // Iterate through entries to get the number
+  do {
+    Status = mPlatformDxeSmbios->GetNext (
+                                   mPlatformDxeSmbios,
+                                   &SmbiosHandle,
+                                   &SmbiosType,
+                                   &Record,
+                                   NULL
+                                   );
+
+    if (Status == EFI_SUCCESS) {
+      HandleCount++;
+    }
+  } while (Status != EFI_NOT_FOUND);
+
+  return HandleCount;
+}
+
+/**
+  Fetches a list of the specified SMBIOS Table types.
+
+  @param[in]   SmbiosType   The type of table to fetch.
+  @param[out]  HandleArray  The array of handles.
+  @param[out]  HandleCount  Number of handles in the array.
+**/
+VOID
+SmbiosPlatformDxeGetLinkTypeHandle (
+  IN  UINT8         SmbiosType,
+  OUT SMBIOS_HANDLE **HandleArray,
+  OUT UINTN         *HandleCount
+  )
+{
+  UINTN                   Index;
+  EFI_STATUS              Status;
+  EFI_SMBIOS_HANDLE       SmbiosHandle;
+  EFI_SMBIOS_TABLE_HEADER *Record;
+
+  if (SmbiosType > END_OF_SMBIOS_TABLE_TYPE) {
+    DEBUG ((
+      DEBUG_ERROR,
+      "[%a]:[%dL] Invalid SMBIOS Type.\n",
+      __func__,
+      __LINE__
+      ));
+  }
+
+  *HandleCount = GetHandleCount (SmbiosType);
+  *HandleArray = AllocateZeroPool (sizeof (SMBIOS_HANDLE) * (*HandleCount));
+  if (*HandleArray == NULL) {
+    DEBUG ((
+      DEBUG_ERROR,
+      "[%a]:[%dL] HandleArray allocates memory resource failed.\n",
+      __func__,
+      __LINE__
+      ));
+    *HandleCount = 0;
+    return;
+  }
+
+  SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED;
+
+  for (Index = 0; Index < (*HandleCount); Index++) {
+    Status = mPlatformDxeSmbios->GetNext (
+                                   mPlatformDxeSmbios,
+                                   &SmbiosHandle,
+                                   &SmbiosType,
+                                   &Record,
+                                   NULL
+                                   );
+
+    if (Status == EFI_SUCCESS) {
+      (*HandleArray)[Index] = Record->Handle;
+    } else {
+      // It should never reach here
+      ASSERT (FALSE);
+      break;
+    }
+  }
+}
+
+/**
+  Create SMBIOS Table Record with additional strings.
+
+  @param[out]  TableRecord    Table Record is created.
+  @param[in]   InputData      Input Table from Data Table.
+  @param[in]   TableTypeSize  Size of Table with specified type.
+  @param[in]   StrToken       Pointer to Token of additional strings in HII Database.
+**/
+VOID
+SmbiosPlatformDxeCreateTable (
+  OUT VOID           **TableRecord,
+  IN  VOID           **InputData,
+  IN  UINT8          TableTypeSize,
+  IN  STR_TOKEN_INFO *StrToken
+  )
+{
+  CHAR8      *StrStart;
+  UINT8      TableSize;
+  UINT8      SmbiosAdditionalStrLen;
+  UINT8      Index;
+  EFI_STRING SmbiosAdditionalStr;
+
+  if (*InputData == NULL ||
+      StrToken == NULL ||
+      TableTypeSize < sizeof (EFI_SMBIOS_TABLE_HEADER)
+      )
+  {
+    DEBUG ((
+      DEBUG_ERROR,
+      "[%a]:[%dL] Invalid parameter to create SMBIOS Table\n",
+      __func__,
+      __LINE__
+      ));
+    return;
+  }
+
+  //
+  // Calculate size of Table.
+  //
+  if (StrToken->TokenLen != 0) {
+    TableSize = TableTypeSize + 1; // Last byte is Null-terminated for Table with Null-terminated additional strings
+    for (Index = 0; Index < StrToken->TokenLen; Index++) {
+      SmbiosAdditionalStr = HiiGetPackageString (
+                              &gEfiCallerIdGuid,
+                              StrToken->TokenArray[Index],
+                              NULL
+                              );
+      TableSize += StrLen (SmbiosAdditionalStr) + 1;
+      FreePool (SmbiosAdditionalStr);
+    }
+  } else {
+    TableSize = TableTypeSize + 1 + 1; // Double-null for Table with no additional strings
+  }
+
+  //
+  // Allocate Table and copy strings from
+  // HII Database for additional strings.
+  //
+  *TableRecord = AllocateZeroPool (TableSize);
+  if (*TableRecord == NULL) {
+    return;
+  }
+  CopyMem (*TableRecord, *InputData, TableTypeSize);
+  StrStart = (CHAR8 *)(*TableRecord + TableTypeSize);
+  for (Index = 0; Index < StrToken->TokenLen; Index++) {
+    SmbiosAdditionalStr = HiiGetPackageString (
+                            &gEfiCallerIdGuid,
+                            StrToken->TokenArray[Index],
+                            NULL
+                            );
+    SmbiosAdditionalStrLen = StrLen (SmbiosAdditionalStr) + 1;
+    UnicodeStrToAsciiStrS (
+      SmbiosAdditionalStr,
+      StrStart,
+      SmbiosAdditionalStrLen
+    );
+    FreePool (SmbiosAdditionalStr);
+    StrStart += SmbiosAdditionalStrLen;
+  }
+}
+
+/**
+  Save default strings of HII Database in case multiple tables with the same type using
+  these data for setting additional strings. After using, default strings will be set
+  back again in HII Database by using SmbiosPlatformDxeRestoreHiiDefaultString function
+  for other tables with the same type to use. Before saving HII Database default strings,
+  buffer for saving need to be available. Otherwise, that means a certain SMBIOS Table used
+  this function but forget using SmbiosPlatformDxeRestoreHiiDefaultString function to free
+  buffer for other Tables to use so this check is for that purpose.
+
+  @param[in]  StrToken     Pointer to Token of additional strings in HII Database.
+
+  @retval     EFI_SUCCESS  Saved default strings of HII Database successfully.
+              Other        Failed to save default strings of HII Database.
+**/
+EFI_STATUS
+SmbiosPlatformDxeSaveHiiDefaultString (
+  IN STR_TOKEN_INFO *StrToken
+  )
+{
+  UINT8      Index;
+  UINT8      HiiDatabaseStrLen;
+  EFI_STRING HiiDatabaseStr;
+
+  if (StrToken == NULL) {
+    DEBUG ((
+      DEBUG_ERROR,
+      "[%a]:[%dL] Invalid String Tokens\n",
+      __func__,
+      __LINE__
+      ));
+    return EFI_INVALID_PARAMETER;
+  }
+
+  //
+  // Start saving HII Default Strings
+  //
+  for (Index = 0; Index < StrToken->TokenLen; Index++) {
+    ASSERT (IsZeroBuffer ((VOID *)&mDefaultHiiDatabaseStr[Index * SMBIOS_STRING_MAX_LENGTH], SMBIOS_UNICODE_STRING_MAX_LENGTH - 1));
+    HiiDatabaseStr = HiiGetPackageString (
+                       &gEfiCallerIdGuid,
+                       StrToken->TokenArray[Index],
+                       NULL
+                       );
+    HiiDatabaseStrLen = (StrLen (HiiDatabaseStr) + 1) * sizeof (CHAR16);
+    ASSERT (HiiDatabaseStrLen <= SMBIOS_UNICODE_STRING_MAX_LENGTH);
+    UnicodeSPrint (
+      (CHAR16 *)&mDefaultHiiDatabaseStr[Index * SMBIOS_STRING_MAX_LENGTH],
+      HiiDatabaseStrLen,
+      HiiDatabaseStr
+      );
+    FreePool (HiiDatabaseStr);
+  }
+
+  return EFI_SUCCESS;
+}
+
+/**
+  Restore default strings of HII Database after using for setting additional strings.
+
+  @param[in]  StrToken     Pointer to Token of additional strings in HII Database.
+
+  @retval     EFI_SUCCESS  Restore default strings off HII Database successfully.
+              Other        Failed to restore default strings of HII Database.
+**/
+EFI_STATUS
+SmbiosPlatformDxeRestoreHiiDefaultString (
+  IN STR_TOKEN_INFO *StrToken
+  )
+{
+  UINT8      Index;
+  EFI_STATUS Status;
+
+  if (StrToken == NULL) {
+    DEBUG ((
+      DEBUG_ERROR,
+      "[%a]:[%dL] Invalid String Tokens\n",
+      __func__,
+      __LINE__
+      ));
+    return EFI_INVALID_PARAMETER;
+  }
+
+  for (Index = 0; Index < StrToken->TokenLen; Index++) {
+    if (IsZeroBuffer ((VOID *)&mDefaultHiiDatabaseStr[Index * SMBIOS_STRING_MAX_LENGTH], SMBIOS_UNICODE_STRING_MAX_LENGTH - 1)) {
+      DEBUG ((
+        DEBUG_ERROR,
+        "[%a]:[%dL] Default strings were not saved previously so failed to restore default strings.\n",
+        __func__,
+        __LINE__
+        ));
+      return EFI_INVALID_PARAMETER;
+    }
+
+    Status = HiiSetString (
+               mSmbiosPlatformDxeHiiHandle,
+               StrToken->TokenArray[Index],
+               (EFI_STRING)&mDefaultHiiDatabaseStr[Index * SMBIOS_STRING_MAX_LENGTH],
+               NULL
+               );
+    if (EFI_ERROR (Status)) {
+      DEBUG ((
+        DEBUG_ERROR,
+        "[%a]:[%dL] Failed to restore default strings\n",
+        __func__,
+        __LINE__
+        ));
+      return Status;
+    }
+    ZeroMem ((VOID *)&mDefaultHiiDatabaseStr[Index * SMBIOS_STRING_MAX_LENGTH], SMBIOS_UNICODE_STRING_MAX_LENGTH - 1);
+  }
 
   return Status;
 }
diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxeDataTable.c b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxeDataTable.c
new file mode 100644
index 000000000000..84a4962d33fc
--- /dev/null
+++ b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxeDataTable.c
@@ -0,0 +1,72 @@
+/** @file
+  This file provides SMBIOS Type.
+
+  Based on files under Nt32Pkg/MiscSubClassPlatformDxe/
+
+  Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
+  Copyright (c) 2021, NUVIA Inc. All rights reserved.<BR>
+  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2015, Hisilicon Limited. All rights reserved.<BR>
+  Copyright (c) 2015, Linaro Limited. All rights reserved.<BR>
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include "SmbiosPlatformDxe.h"
+
+SMBIOS_PLATFORM_DXE_TABLE_EXTERNS (
+  SMBIOS_TABLE_TYPE8,
+  PlatformPortConnector
+  )
+SMBIOS_PLATFORM_DXE_TABLE_EXTERNS (
+  SMBIOS_TABLE_TYPE9,
+  PlatformSystemSlot
+  )
+SMBIOS_PLATFORM_DXE_TABLE_EXTERNS (
+  SMBIOS_TABLE_TYPE9,
+  PlatformOemString
+  )
+SMBIOS_PLATFORM_DXE_TABLE_EXTERNS (
+  SMBIOS_TABLE_TYPE24,
+  PlatformHardwareSecurity
+  )
+SMBIOS_PLATFORM_DXE_TABLE_EXTERNS (
+  SMBIOS_TABLE_TYPE38,
+  PlatformIpmiDevice
+  )
+SMBIOS_PLATFORM_DXE_TABLE_EXTERNS (
+  SMBIOS_TABLE_TYPE41,
+  PlatformOnboardDevicesExtended
+  )
+
+SMBIOS_PLATFORM_DXE_DATA_TABLE mSmbiosPlatformDxeDataTable[] = {
+  // Type8
+  SMBIOS_PLATFORM_DXE_TABLE_ENTRY_DATA_AND_FUNCTION (
+    PlatformPortConnector
+  ),
+  // Type9
+  SMBIOS_PLATFORM_DXE_TABLE_ENTRY_DATA_AND_FUNCTION (
+    PlatformSystemSlot
+  ),
+  // Type11
+  SMBIOS_PLATFORM_DXE_TABLE_ENTRY_DATA_AND_FUNCTION (
+    PlatformOemString
+  ),
+  // Type24
+  SMBIOS_PLATFORM_DXE_TABLE_ENTRY_DATA_AND_FUNCTION (
+    PlatformHardwareSecurity
+  ),
+  // Type38
+  SMBIOS_PLATFORM_DXE_TABLE_ENTRY_DATA_AND_FUNCTION (
+    PlatformIpmiDevice
+  ),
+  // Type41
+  SMBIOS_PLATFORM_DXE_TABLE_ENTRY_DATA_AND_FUNCTION (
+    PlatformOnboardDevicesExtended
+  )
+};
+
+//
+// Number of Data Table entries.
+//
+UINTN mSmbiosPlatformDxeDataTableEntries = ARRAY_SIZE (mSmbiosPlatformDxeDataTable);
diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type08/PlatformPortConnectorData.c b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type08/PlatformPortConnectorData.c
new file mode 100644
index 000000000000..d2db29159a09
--- /dev/null
+++ b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type08/PlatformPortConnectorData.c
@@ -0,0 +1,142 @@
+/** @file
+
+  Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include "SmbiosPlatformDxe.h"
+
+//
+// Define data for SMBIOS Type 8 Table.
+//
+SMBIOS_PLATFORM_DXE_TABLE_DATA (SMBIOS_TABLE_TYPE8, PlatformPortConnector) = {
+  {                                               // Table 1
+    {                                             // Header
+      EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION, // Type
+      sizeof (SMBIOS_TABLE_TYPE8),                // Length
+      SMBIOS_HANDLE_PI_RESERVED                   // Handle
+    },
+    ADDITIONAL_STR_INDEX_1,                       // Internal Reference Designator
+    PortConnectorTypeDB15Female,                  // Internal Connector Type
+    ADDITIONAL_STR_INDEX_2,                       // External Reference Designator
+    PortTypeOther,                                // External Connector Type
+    PortTypeVideoPort                             // Port Type
+  },
+  {                                               // Table 2
+    {                                             // Header
+      EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION, // Type
+      sizeof (SMBIOS_TABLE_TYPE8),                // Length
+      SMBIOS_HANDLE_PI_RESERVED                   // Handle
+    },
+    ADDITIONAL_STR_INDEX_1,                       // Internal Reference Designator
+    PortConnectorTypeUsb,                         // Internal Connector Type
+    ADDITIONAL_STR_INDEX_2,                       // External Reference Designator
+    PortTypeOther,                                // External Connector Type
+    PortTypeUsb                                   // Port Type
+  },
+  {                                               // Table 3
+    {                                             // Header
+      EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION, // Type
+      sizeof (SMBIOS_TABLE_TYPE8),                // Length
+      SMBIOS_HANDLE_PI_RESERVED                   // Handle
+    },
+    ADDITIONAL_STR_INDEX_1,                       // Internal Reference Designator
+    PortConnectorTypeUsb,                         // Internal Connector Type
+    ADDITIONAL_STR_INDEX_2,                       // External Reference Designator
+    PortTypeOther,                                // External Connector Type
+    PortTypeUsb                                   // Port Type
+  },
+  {                                               // Table 4
+    {                                             // Header
+      EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION, // Type
+      sizeof (SMBIOS_TABLE_TYPE8),                // Length
+      SMBIOS_HANDLE_PI_RESERVED                   // Handle
+    },
+    ADDITIONAL_STR_INDEX_1,                       // Internal Reference Designator
+    PortConnectorTypeRJ45,                        // Internal Connector Type
+    ADDITIONAL_STR_INDEX_2,                       // External Reference Designator
+    PortConnectorTypeRJ45,                        // External Connector Type
+    PortTypeNetworkPort                           // Port Type
+  },
+  {                                               // Table 5
+    {                                             // Header
+      EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION, // Type
+      sizeof (SMBIOS_TABLE_TYPE8),                // Length
+      SMBIOS_HANDLE_PI_RESERVED                   // Handle
+    },
+    ADDITIONAL_STR_INDEX_1,                       // Internal Reference Designator
+    PortTypeOther,                                // Internal Connector Type
+    ADDITIONAL_STR_INDEX_2,                       // External Reference Designator
+    PortTypeOther,                                // External Connector Type
+    PortTypeNetworkPort                           // Port Type
+  },
+  {                                               // Table 6
+    {                                             // Header
+      EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION, // Type
+      sizeof (SMBIOS_TABLE_TYPE8),                // Length
+      SMBIOS_HANDLE_PI_RESERVED                   // Handle
+    },
+    ADDITIONAL_STR_INDEX_1,                       // Internal Reference Designator
+    PortTypeOther,                                // Internal Connector Type
+    ADDITIONAL_STR_INDEX_2,                       // External Reference Designator
+    PortConnectorTypeDB9Female,                   // External Connector Type
+    PortTypeSerial16550Compatible                 // Port Type
+  },
+  {                                               // Null-terminated table
+    {
+      NULL_TERMINATED_TYPE,
+      0,
+      0
+    },
+  }
+};
+
+//
+// Define string Tokens for additional strings.
+//
+SMBIOS_PLATFORM_DXE_STRING_TOKEN_DATA (PlatformPortConnector) = {
+  {                                                                                  // Table 1
+    {                                                                                // Tokens array
+      STRING_TOKEN (STR_PLATFORM_DXE_PORT_CONNECTOR_INTERNAL_REFERENCE_DESIGNATOR_1),
+      STRING_TOKEN (STR_PLATFORM_DXE_PORT_CONNECTOR_EXTERNAL_REFERENCE_DESIGNATOR_1)
+    },
+    ADDITIONAL_STR_INDEX_2                                                           // Size of Tokens array
+  },
+  {                                                                                  // Table 2
+    {                                                                                // Tokens array
+      STRING_TOKEN (STR_PLATFORM_DXE_PORT_CONNECTOR_INTERNAL_REFERENCE_DESIGNATOR_2),
+      STRING_TOKEN (STR_PLATFORM_DXE_PORT_CONNECTOR_EXTERNAL_REFERENCE_DESIGNATOR_2)
+    },
+    ADDITIONAL_STR_INDEX_2                                                           // Size of Tokens array
+  },
+  {                                                                                  // Table 3
+    {                                                                                // Tokens array
+      STRING_TOKEN (STR_PLATFORM_DXE_PORT_CONNECTOR_INTERNAL_REFERENCE_DESIGNATOR_3),
+      STRING_TOKEN (STR_PLATFORM_DXE_PORT_CONNECTOR_EXTERNAL_REFERENCE_DESIGNATOR_3)
+    },
+    ADDITIONAL_STR_INDEX_2                                                           // Size of Tokens array
+  },
+  {                                                                                  // Table 4
+    {                                                                                // Tokens array
+      STRING_TOKEN (STR_PLATFORM_DXE_PORT_CONNECTOR_INTERNAL_REFERENCE_DESIGNATOR_4),
+      STRING_TOKEN (STR_PLATFORM_DXE_PORT_CONNECTOR_EXTERNAL_REFERENCE_DESIGNATOR_4)
+    },
+    ADDITIONAL_STR_INDEX_2                                                           // Size of Tokens array
+  },
+  {                                                                                  // Table 5
+    {                                                                                // Tokens array
+      STRING_TOKEN (STR_PLATFORM_DXE_PORT_CONNECTOR_INTERNAL_REFERENCE_DESIGNATOR_5),
+      STRING_TOKEN (STR_PLATFORM_DXE_PORT_CONNECTOR_EXTERNAL_REFERENCE_DESIGNATOR_5)
+    },
+    ADDITIONAL_STR_INDEX_2                                                           // Size of Tokens array
+  },
+  {                                                                                  // Table 6
+    {                                                                                // Tokens array
+      STRING_TOKEN (STR_PLATFORM_DXE_PORT_CONNECTOR_INTERNAL_REFERENCE_DESIGNATOR_6),
+      STRING_TOKEN (STR_PLATFORM_DXE_PORT_CONNECTOR_EXTERNAL_REFERENCE_DESIGNATOR_6)
+    },
+    ADDITIONAL_STR_INDEX_2                                                           // Size of Tokens array
+  }
+};
diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type08/PlatformPortConnectorFunction.c b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type08/PlatformPortConnectorFunction.c
new file mode 100644
index 000000000000..dbf272ce4d34
--- /dev/null
+++ b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type08/PlatformPortConnectorFunction.c
@@ -0,0 +1,57 @@
+/** @file
+
+  Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include <Library/BaseLib.h>
+#include <Library/DebugLib.h>
+#include <Library/MemoryAllocationLib.h>
+
+#include "SmbiosPlatformDxe.h"
+
+/**
+  This function adds SMBIOS Table (Type 8) records.
+
+  @param  RecordData                 Pointer to SMBIOS Table with default values.
+  @param  Smbios                     SMBIOS protocol.
+
+  @retval EFI_SUCCESS                The SMBIOS Table was successfully added.
+  @retval Other                      Failed to update the SMBIOS Table.
+
+**/
+SMBIOS_PLATFORM_DXE_TABLE_FUNCTION (PlatformPortConnector) {
+  EFI_STATUS         Status;
+  STR_TOKEN_INFO     *InputStrToken;
+  SMBIOS_TABLE_TYPE8 *InputData;
+  SMBIOS_TABLE_TYPE8 *Type8Record;
+
+  InputData = (SMBIOS_TABLE_TYPE8 *)RecordData;
+  InputStrToken = (STR_TOKEN_INFO *)StrToken;
+
+  while (InputData->Hdr.Type != NULL_TERMINATED_TYPE) {
+    SmbiosPlatformDxeCreateTable (
+      (VOID *)&Type8Record,
+      (VOID *)&InputData,
+      sizeof (SMBIOS_TABLE_TYPE8),
+      InputStrToken
+      );
+    if (Type8Record == NULL) {
+      return EFI_OUT_OF_RESOURCES;
+    }
+
+    Status = SmbiosPlatformDxeAddRecord ((UINT8 *)Type8Record, NULL);
+    if (EFI_ERROR (Status)) {
+      FreePool (Type8Record);
+      return Status;
+    }
+
+    FreePool (Type8Record);
+    InputData++;
+    InputStrToken++;
+  }
+
+  return Status;
+}
diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type09/PlatformSystemSlotData.c b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type09/PlatformSystemSlotData.c
new file mode 100644
index 000000000000..5e9bbc1b00a6
--- /dev/null
+++ b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type09/PlatformSystemSlotData.c
@@ -0,0 +1,268 @@
+/** @file
+
+  Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include "SmbiosPlatformDxe.h"
+
+//
+// Define data for SMBIOS Type 9 Table.
+//
+SMBIOS_PLATFORM_DXE_TABLE_DATA (SMBIOS_TABLE_TYPE9, PlatformSystemSlot) = {
+  {                                 // Table 1
+    {                               // Header
+      EFI_SMBIOS_TYPE_SYSTEM_SLOTS, // Type
+      sizeof (SMBIOS_TABLE_TYPE9),  // Length
+      SMBIOS_HANDLE_PI_RESERVED     // Handle
+    },
+    ADDITIONAL_STR_INDEX_1,         // Slot Designation
+    SlotTypePciExpressGen4,         // Slot Type
+    SlotDataBusWidth8X,             // Slot Data Bus Width
+    SlotUsageAvailable,             // Current Usage
+    SlotLengthLong,                 // Slot Length
+    1,                              // Slot ID
+    {0, 0, 1},                      // Slot Characteristics 1
+    {1},                            // Slot Characteristics 2
+    5,                              // Segment Group Number
+    0,                              // Bus Number
+    0,                              // Device Function Number
+  },
+  {                                 // Table 2
+    {                               // Header
+      EFI_SMBIOS_TYPE_SYSTEM_SLOTS, // Type
+      sizeof (SMBIOS_TABLE_TYPE9),  // Length
+      SMBIOS_HANDLE_PI_RESERVED     // Handle
+    },
+    ADDITIONAL_STR_INDEX_1,         // Slot Designation
+    SlotTypePciExpressGen4,         // Slot Type
+    SlotDataBusWidth16X,            // Slot Data Bus Width
+    SlotUsageAvailable,             // Current Usage
+    SlotLengthLong,                 // Slot Length
+    2,                              // Slot ID
+    {0, 0, 1},                      // Slot Characteristics 1
+    {1},                            // Slot Characteristics 2
+    0,                              // Segment Group Number
+    0,                              // Bus Number
+    0,                              // Device Function Number
+  },
+  {                                 // Table 3
+    {                               // Header
+      EFI_SMBIOS_TYPE_SYSTEM_SLOTS, // Type
+      sizeof (SMBIOS_TABLE_TYPE9),  // Length
+      SMBIOS_HANDLE_PI_RESERVED     // Handle
+    },
+    ADDITIONAL_STR_INDEX_1,         // Slot Designation
+    SlotTypePciExpressGen4,         // Slot Type
+    SlotDataBusWidth8X,             // Slot Data Bus Width
+    SlotUsageUnavailable,           // Current Usage
+    SlotLengthLong,                 // Slot Length
+    3,                              // Slot ID
+    {0, 0, 1},                      // Slot Characteristics 1
+    {1},                            // Slot Characteristics 2
+    4,                              // Segment Group Number
+    0,                              // Bus Number
+    0,                              // Device Function Number
+  },
+  {                                 // Table 4
+    {                               // Header
+      EFI_SMBIOS_TYPE_SYSTEM_SLOTS, // Type
+      sizeof (SMBIOS_TABLE_TYPE9),  // Length
+      SMBIOS_HANDLE_PI_RESERVED     // Handle
+    },
+    ADDITIONAL_STR_INDEX_1,         // Slot Designation
+    SlotTypePciExpressGen4,         // Slot Type
+    SlotDataBusWidth8X,             // Slot Data Bus Width
+    SlotUsageAvailable,             // Current Usage
+    SlotLengthLong,                 // Slot Length
+    4,                              // Slot ID
+    {0, 0, 1},                      // Slot Characteristics 1
+    {1},                            // Slot Characteristics 2
+    9,                              // Segment Group Number
+    0,                              // Bus Number
+    0,                              // Device Function Number
+  },
+  {                                 // Table 5
+    {                               // Header
+      EFI_SMBIOS_TYPE_SYSTEM_SLOTS, // Type
+      sizeof (SMBIOS_TABLE_TYPE9),  // Length
+      SMBIOS_HANDLE_PI_RESERVED     // Handle
+    },
+    ADDITIONAL_STR_INDEX_1,         // Slot Designation
+    SlotTypePciExpressGen4,         // Slot Type
+    SlotDataBusWidth8X,             // Slot Data Bus Width
+    SlotUsageAvailable,             // Current Usage
+    SlotLengthLong,                 // Slot Length
+    5,                              // Slot ID
+    {0, 0, 1},                      // Slot Characteristics 1
+    {1},                            // Slot Characteristics 2
+    7,                              // Segment Group Number
+    0,                              // Bus Number
+    0,                              // Device Function Number
+  },
+  {                                 // Table 6
+    {                               // Header
+      EFI_SMBIOS_TYPE_SYSTEM_SLOTS, // Type
+      sizeof (SMBIOS_TABLE_TYPE9),  // Length
+      SMBIOS_HANDLE_PI_RESERVED     // Handle
+    },
+    ADDITIONAL_STR_INDEX_1,         // Slot Designation
+    SlotTypePciExpressGen4,         // Slot Type
+    SlotDataBusWidth8X,             // Slot Data Bus Width
+    SlotUsageAvailable,             // Current Usage
+    SlotLengthLong,                 // Slot Length
+    6,                              // Slot ID
+    {0, 0, 1},                      // Slot Characteristics 1
+    {1},                            // Slot Characteristics 2
+    7,                              // Segment Group Number
+    0,                              // Bus Number
+    0,                              // Device Function Number
+  },
+  {                                 // Table 7
+    {                               // Header
+      EFI_SMBIOS_TYPE_SYSTEM_SLOTS, // Type
+      sizeof (SMBIOS_TABLE_TYPE9),  // Length
+      SMBIOS_HANDLE_PI_RESERVED     // Handle
+    },
+    ADDITIONAL_STR_INDEX_1,         // Slot Designation
+    SlotTypePciExpressGen4,         // Slot Type
+    SlotDataBusWidth8X,             // Slot Data Bus Width
+    SlotUsageAvailable,             // Current Usage
+    SlotLengthLong,                 // Slot Length
+    7,                              // Slot ID
+    {0, 0, 1},                      // Slot Characteristics 1
+    {1},                            // Slot Characteristics 2
+    8,                              // Segment Group Number
+    0,                              // Bus Number
+    0,                              // Device Function Number
+  },
+  {                                 // Table 8
+    {                               // Header
+      EFI_SMBIOS_TYPE_SYSTEM_SLOTS, // Type
+      sizeof (SMBIOS_TABLE_TYPE9),  // Length
+      SMBIOS_HANDLE_PI_RESERVED     // Handle
+    },
+    ADDITIONAL_STR_INDEX_1,         // Slot Designation
+    SlotTypePciExpressGen4,         // Slot Type
+    SlotDataBusWidth16X,            // Slot Data Bus Width
+    SlotUsageAvailable,             // Current Usage
+    SlotLengthLong,                 // Slot Length
+    8,                              // Slot ID
+    {0, 0, 1},                      // Slot Characteristics 1
+    {1},                            // Slot Characteristics 2
+    1,                              // Segment Group Number
+    0,                              // Bus Number
+    0,                              // Device Function Number
+  },
+  {                                 // Table 9
+    {                               // Header
+      EFI_SMBIOS_TYPE_SYSTEM_SLOTS, // Type
+      sizeof (SMBIOS_TABLE_TYPE9),  // Length
+      SMBIOS_HANDLE_PI_RESERVED     // Handle
+    },
+    ADDITIONAL_STR_INDEX_1,         // Slot Designation
+    SlotTypePciExpressGen4,         // Slot Type
+    SlotDataBusWidth4X,             // Slot Data Bus Width
+    SlotUsageAvailable,             // Current Usage
+    SlotLengthShort,                // Slot Length
+    9,                              // Slot ID
+    {0, 0, 1},                      // Slot Characteristics 1
+    {1},                            // Slot Characteristics 2
+    5,                              // Segment Group Number
+    0,                              // Bus Number
+    0,                              // Device Function Number
+  },
+  {                                 // Table 10
+    {                               // Header
+      EFI_SMBIOS_TYPE_SYSTEM_SLOTS, // Type
+      sizeof (SMBIOS_TABLE_TYPE9),  // Length
+      SMBIOS_HANDLE_PI_RESERVED     // Handle
+    },
+    ADDITIONAL_STR_INDEX_1,         // Slot Designation
+    SlotTypePciExpressGen4,         // Slot Type
+    SlotDataBusWidth4X,             // Slot Data Bus Width
+    SlotUsageAvailable,             // Current Usage
+    SlotLengthShort,                // Slot Length
+    10,                             // Slot ID
+    {0, 0, 1},                      // Slot Characteristics 1
+    {1},                            // Slot Characteristics 2
+    5,                              // Segment Group Number
+    0,                              // Bus Number
+    0,                              // Device Function Number
+  },
+  {                                 // Null-terminated table
+    {
+      NULL_TERMINATED_TYPE,
+      0,
+      0
+    },
+  }
+};
+
+//
+// Define string Tokens for additional strings.
+//
+SMBIOS_PLATFORM_DXE_STRING_TOKEN_DATA (PlatformSystemSlot) = {
+  {                                                              // Table 1
+    {                                                            // Tokens array
+      STRING_TOKEN (STR_PLATFORM_DXE_SYSTEM_SLOT_DESIGNATION_1)
+    },
+    ADDITIONAL_STR_INDEX_1                                       // Size of Tokens array
+  },
+  {                                                              // Table 2
+    {                                                            // Tokens array
+      STRING_TOKEN (STR_PLATFORM_DXE_SYSTEM_SLOT_DESIGNATION_2)
+    },
+    ADDITIONAL_STR_INDEX_1                                       // Size of Tokens array
+  },
+  {                                                              // Table 3
+    {                                                            // Tokens array
+      STRING_TOKEN (STR_PLATFORM_DXE_SYSTEM_SLOT_DESIGNATION_3)
+    },
+    ADDITIONAL_STR_INDEX_1                                       // Size of Tokens array
+  },
+  {                                                              // Table 4
+    {                                                            // Tokens array
+      STRING_TOKEN (STR_PLATFORM_DXE_SYSTEM_SLOT_DESIGNATION_4)
+    },
+    ADDITIONAL_STR_INDEX_1                                       // Size of Tokens array
+  },
+  {                                                              // Table 5
+    {                                                            // Tokens array
+      STRING_TOKEN (STR_PLATFORM_DXE_SYSTEM_SLOT_DESIGNATION_5)
+    },
+    ADDITIONAL_STR_INDEX_1                                       // Size of Tokens array
+  },
+  {                                                              // Table 6
+    {                                                            // Tokens array
+      STRING_TOKEN (STR_PLATFORM_DXE_SYSTEM_SLOT_DESIGNATION_6)
+    },
+    ADDITIONAL_STR_INDEX_1                                       // Size of Tokens array
+  },
+  {                                                              // Table 7
+    {                                                            // Tokens array
+      STRING_TOKEN (STR_PLATFORM_DXE_SYSTEM_SLOT_DESIGNATION_7)
+    },
+    ADDITIONAL_STR_INDEX_1                                       // Size of Tokens array
+  },
+  {                                                              // Table 8
+    {                                                            // Tokens array
+      STRING_TOKEN (STR_PLATFORM_DXE_SYSTEM_SLOT_DESIGNATION_8)
+    },
+    ADDITIONAL_STR_INDEX_1                                       // Size of Tokens array
+  },
+  {                                                              // Table 9
+    {                                                            // Tokens array
+      STRING_TOKEN (STR_PLATFORM_DXE_SYSTEM_SLOT_DESIGNATION_9)
+    },
+    ADDITIONAL_STR_INDEX_1                                       // Size of Tokens array
+  },
+  {                                                              // Table 10
+    {                                                            // Tokens array
+      STRING_TOKEN (STR_PLATFORM_DXE_SYSTEM_SLOT_DESIGNATION_10)
+    },
+    ADDITIONAL_STR_INDEX_1                                       // Size of Tokens array
+  },
+};
diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type09/PlatformSystemSlotFunction.c b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type09/PlatformSystemSlotFunction.c
new file mode 100644
index 000000000000..e91b0eb1cc71
--- /dev/null
+++ b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type09/PlatformSystemSlotFunction.c
@@ -0,0 +1,58 @@
+/** @file
+
+  Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include <Library/AmpereCpuLib.h>
+#include <Library/BaseLib.h>
+#include <Library/DebugLib.h>
+#include <Library/MemoryAllocationLib.h>
+
+#include "SmbiosPlatformDxe.h"
+
+/**
+  This function adds SMBIOS Table (Type 9) records.
+
+  @param  RecordData                 Pointer to SMBIOS Table with default values.
+  @param  Smbios                     SMBIOS protocol.
+
+  @retval EFI_SUCCESS                The SMBIOS Table was successfully added.
+  @retval Other                      Failed to update the SMBIOS Table.
+
+**/
+SMBIOS_PLATFORM_DXE_TABLE_FUNCTION (PlatformSystemSlot) {
+  EFI_STATUS         Status;
+  STR_TOKEN_INFO     *InputStrToken;
+  SMBIOS_TABLE_TYPE9 *InputData;
+  SMBIOS_TABLE_TYPE9 *Type9Record;
+
+  InputData = (SMBIOS_TABLE_TYPE9 *)RecordData;
+  InputStrToken = (STR_TOKEN_INFO *)StrToken;
+
+  while (InputData->Hdr.Type != NULL_TERMINATED_TYPE) {
+    SmbiosPlatformDxeCreateTable (
+      (VOID *)&Type9Record,
+      (VOID *)&InputData,
+      sizeof (SMBIOS_TABLE_TYPE9),
+      InputStrToken
+      );
+    if (Type9Record == NULL) {
+      return EFI_OUT_OF_RESOURCES;
+    }
+
+    Status = SmbiosPlatformDxeAddRecord ((UINT8 *)Type9Record, NULL);
+    if (EFI_ERROR (Status)) {
+      FreePool (Type9Record);
+      return Status;
+    }
+
+    FreePool (Type9Record);
+    InputData++;
+    InputStrToken++;
+  }
+
+  return Status;
+}
diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type11/PlatformOemStringData.c b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type11/PlatformOemStringData.c
new file mode 100644
index 000000000000..183432440e13
--- /dev/null
+++ b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type11/PlatformOemStringData.c
@@ -0,0 +1,42 @@
+/** @file
+
+  Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include "SmbiosPlatformDxe.h"
+
+//
+// Define data for SMBIOS Type 11 Table.
+//
+SMBIOS_PLATFORM_DXE_TABLE_DATA (SMBIOS_TABLE_TYPE11, PlatformOemString) = {
+  {                                 // Table 1
+    {                               // Header
+      EFI_SMBIOS_TYPE_OEM_STRINGS,  // Type
+      sizeof (SMBIOS_TABLE_TYPE11), // Length
+      SMBIOS_HANDLE_PI_RESERVED     // Handle
+    },
+    ADDITIONAL_STR_INDEX_1          // String Count
+  },
+  {                                 // Null-terminated table
+    {
+      NULL_TERMINATED_TYPE,
+      0,
+      0
+    },
+  }
+};
+
+//
+// Define string Tokens for additional strings.
+//
+SMBIOS_PLATFORM_DXE_STRING_TOKEN_DATA (PlatformOemString) = {
+  {                                               // Table 1
+    {                                             // Tokens array
+      STRING_TOKEN (STR_PLATFORM_DXE_STRING_1)
+    },
+    ADDITIONAL_STR_INDEX_1                        // Size of Tokens array
+  }
+};
diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type11/PlatformOemStringFunction.c b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type11/PlatformOemStringFunction.c
new file mode 100644
index 000000000000..a1611a7d5b04
--- /dev/null
+++ b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type11/PlatformOemStringFunction.c
@@ -0,0 +1,57 @@
+/** @file
+
+  Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include <Library/BaseLib.h>
+#include <Library/DebugLib.h>
+#include <Library/MemoryAllocationLib.h>
+
+#include "SmbiosPlatformDxe.h"
+
+/**
+  This function adds SMBIOS Table (Type 11) records.
+
+  @param  RecordData                 Pointer to SMBIOS Table with default values.
+  @param  Smbios                     SMBIOS protocol.
+
+  @retval EFI_SUCCESS                The SMBIOS Table was successfully added.
+  @retval Other                      Failed to update the SMBIOS Table.
+
+**/
+SMBIOS_PLATFORM_DXE_TABLE_FUNCTION (PlatformOemString) {
+  EFI_STATUS          Status;
+  STR_TOKEN_INFO      *InputStrToken;
+  SMBIOS_TABLE_TYPE11 *InputData;
+  SMBIOS_TABLE_TYPE11 *Type11Record;
+
+  InputData = (SMBIOS_TABLE_TYPE11 *)RecordData;
+  InputStrToken = (STR_TOKEN_INFO *)StrToken;
+
+  while (InputData->Hdr.Type != NULL_TERMINATED_TYPE) {
+    SmbiosPlatformDxeCreateTable (
+      (VOID *)&Type11Record,
+      (VOID *)&InputData,
+      sizeof (SMBIOS_TABLE_TYPE11),
+      InputStrToken
+      );
+    if (Type11Record == NULL) {
+      return EFI_OUT_OF_RESOURCES;
+    }
+
+    Status = SmbiosPlatformDxeAddRecord ((UINT8 *)Type11Record, NULL);
+    if (EFI_ERROR (Status)) {
+      FreePool (Type11Record);
+      return Status;
+    }
+
+    FreePool (Type11Record);
+    InputData++;
+    InputStrToken++;
+  }
+
+  return Status;
+}
diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type24/PlatformHardwareSecurityData.c b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type24/PlatformHardwareSecurityData.c
new file mode 100644
index 000000000000..a6c7b3686e2e
--- /dev/null
+++ b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type24/PlatformHardwareSecurityData.c
@@ -0,0 +1,42 @@
+/** @file
+
+  Copyright (c) 2022, Ampere Computing LLC. All rights reserved.<BR>
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include "SmbiosPlatformDxe.h"
+
+//
+// Define data for SMBIOS Type 19 Table.
+//
+SMBIOS_PLATFORM_DXE_TABLE_DATA (SMBIOS_TABLE_TYPE24, PlatformHardwareSecurity) = {
+  {                                        // Table 1
+    {                                      // SMBIOS_STRUCTURE Hdr
+        EFI_SMBIOS_TYPE_HARDWARE_SECURITY, // UINT8 Type
+        sizeof (SMBIOS_TABLE_TYPE24),      // UINT8 Length
+        SMBIOS_HANDLE_PI_RESERVED,
+    },
+    0
+  },
+  {                                        // Null-terminated table
+    {
+      NULL_TERMINATED_TYPE,
+      0,
+      0
+    },
+  }
+};
+
+//
+// Define string Tokens for additional strings.
+//
+SMBIOS_PLATFORM_DXE_STRING_TOKEN_DATA (PlatformHardwareSecurity) = {
+  {                          // Table 1
+    {                        // Tokens array
+      NULL_TERMINATED_TOKEN
+    },
+    0                        // Size of Tokens array
+  }
+};
diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type24/PlatformHardwareSecurityFunction.c b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type24/PlatformHardwareSecurityFunction.c
new file mode 100644
index 000000000000..0b6593da1488
--- /dev/null
+++ b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type24/PlatformHardwareSecurityFunction.c
@@ -0,0 +1,57 @@
+/** @file
+
+  Copyright (c) 2022, Ampere Computing LLC. All rights reserved.<BR>
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include <Library/BaseLib.h>
+#include <Library/DebugLib.h>
+#include <Library/MemoryAllocationLib.h>
+
+#include "SmbiosPlatformDxe.h"
+
+/**
+  This function adds SMBIOS Table (Type 24) records.
+
+  @param  RecordData                 Pointer to SMBIOS Table with default values.
+  @param  Smbios                     SMBIOS protocol.
+
+  @retval EFI_SUCCESS                The SMBIOS Table was successfully added.
+  @retval Other                      Failed to update the SMBIOS Table.
+
+**/
+SMBIOS_PLATFORM_DXE_TABLE_FUNCTION (PlatformHardwareSecurity) {
+  EFI_STATUS          Status;
+  STR_TOKEN_INFO      *InputStrToken;
+  SMBIOS_TABLE_TYPE24 *InputData;
+  SMBIOS_TABLE_TYPE24 *Type24Record;
+
+  InputData = (SMBIOS_TABLE_TYPE24 *)RecordData;
+  InputStrToken = (STR_TOKEN_INFO *)StrToken;
+
+  while (InputData->Hdr.Type != NULL_TERMINATED_TYPE) {
+    SmbiosPlatformDxeCreateTable (
+      (VOID *)&Type24Record,
+      (VOID *)&InputData,
+      sizeof (SMBIOS_TABLE_TYPE24),
+      InputStrToken
+      );
+    if (Type24Record == NULL) {
+      return EFI_OUT_OF_RESOURCES;
+    }
+
+    Status = SmbiosPlatformDxeAddRecord ((UINT8 *)Type24Record, NULL);
+    if (EFI_ERROR (Status)) {
+      FreePool (Type24Record);
+      return Status;
+    }
+
+    FreePool (Type24Record);
+    InputData++;
+    InputStrToken++;
+  }
+
+  return Status;
+}
diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type38/PlatformIpmiDeviceData.c b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type38/PlatformIpmiDeviceData.c
new file mode 100644
index 000000000000..d4b4212e5cd3
--- /dev/null
+++ b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type38/PlatformIpmiDeviceData.c
@@ -0,0 +1,46 @@
+/** @file
+
+  Copyright (c) 2022, Ampere Computing LLC. All rights reserved.<BR>
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include "SmbiosPlatformDxe.h"
+
+//
+// Define data for SMBIOS Type 38 Table.
+//
+SMBIOS_PLATFORM_DXE_TABLE_DATA (SMBIOS_TABLE_TYPE38, PlatformIpmiDevice) = {
+  {                                            // Table 1
+    {                                          // Header
+      EFI_SMBIOS_TYPE_IPMI_DEVICE_INFORMATION, // Type
+      sizeof (SMBIOS_TABLE_TYPE38),            // Length
+      SMBIOS_HANDLE_PI_RESERVED                // Handle
+    },
+    IPMIDeviceInfoInterfaceTypeSSIF,           // Interface Type
+    0x20,                                      // IPMI Specification Revision
+    0x20,                                      // I2C Slave Address
+    0xFF,                                      // NV Storage Device Address
+    0x20,                                      // Base Address
+  },
+  {                                            // Null-terminated table
+    {
+      NULL_TERMINATED_TYPE,
+      0,
+      0
+    },
+  }
+};
+
+//
+// Define string Tokens for additional strings.
+//
+SMBIOS_PLATFORM_DXE_STRING_TOKEN_DATA (PlatformIpmiDevice) = {
+  {                          // Table 1
+    {                        // Tokens array
+      NULL_TERMINATED_TOKEN
+    },
+    0                        // Size of Tokens array
+  }
+};
diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type38/PlatformIpmiDeviceFunction.c b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type38/PlatformIpmiDeviceFunction.c
new file mode 100644
index 000000000000..cda255a034ad
--- /dev/null
+++ b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type38/PlatformIpmiDeviceFunction.c
@@ -0,0 +1,39 @@
+/** @file
+
+  Copyright (c) 2022, Ampere Computing LLC. All rights reserved.<BR>
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include <Library/BaseLib.h>
+#include <Library/DebugLib.h>
+
+#include "SmbiosPlatformDxe.h"
+
+/**
+  This function adds SMBIOS Table (Type 38) records.
+
+  @param  RecordData                 Pointer to SMBIOS Table with default values.
+  @param  Smbios                     SMBIOS protocol.
+
+  @retval EFI_SUCCESS                The SMBIOS Table was successfully added.
+  @retval Other                      Failed to update the SMBIOS Table.
+
+**/
+SMBIOS_PLATFORM_DXE_TABLE_FUNCTION (PlatformIpmiDevice) {
+  EFI_STATUS          Status;
+  SMBIOS_TABLE_TYPE38 *InputData;
+
+  InputData = (SMBIOS_TABLE_TYPE38 *)RecordData;
+  while (InputData->Hdr.Type != NULL_TERMINATED_TYPE) {
+    Status = SmbiosPlatformDxeAddRecord ((UINT8 *)InputData, NULL);
+    if (EFI_ERROR (Status)) {
+      return Status;
+    }
+
+    InputData++;
+  }
+
+  return Status;
+}
diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type41/PlatformOnboardDevicesExtendedData.c b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type41/PlatformOnboardDevicesExtendedData.c
new file mode 100644
index 000000000000..3855cfc4dc57
--- /dev/null
+++ b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type41/PlatformOnboardDevicesExtendedData.c
@@ -0,0 +1,47 @@
+/** @file
+
+  Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include "SmbiosPlatformDxe.h"
+
+//
+// Define data for SMBIOS Type 41 Table.
+//
+SMBIOS_PLATFORM_DXE_TABLE_DATA (SMBIOS_TABLE_TYPE41, PlatformOnboardDevicesExtended) = {
+  {                                                         // Table 1
+    {                                                       // Header
+      EFI_SMBIOS_TYPE_ONBOARD_DEVICES_EXTENDED_INFORMATION, // Type
+      sizeof (SMBIOS_TABLE_TYPE41),                         // Length
+      SMBIOS_HANDLE_PI_RESERVED                             // Handle
+    },
+    ADDITIONAL_STR_INDEX_1,                                 // Reference Designation
+    0x83,                                                   // Device Type
+    1,                                                      // Device Type Instance
+    4,                                                      // Segment Group Number
+    2,                                                      // Bus Number
+    0                                                       // Device Function Number
+  },
+  {                                                         // Null-terminated table
+    {
+      NULL_TERMINATED_TYPE,
+      0,
+      0
+    },
+  }
+};
+
+//
+// Define string Tokens for additional strings.
+//
+SMBIOS_PLATFORM_DXE_STRING_TOKEN_DATA (PlatformOnboardDevicesExtended) = {
+  {                                                                                 // Table 1
+    {                                                                               // Tokens array
+      STRING_TOKEN (STR_PLATFORM_DXE_ONBOARD_DEVICES_EXTENDED_DEVICE_TYPE_INSTANCE)
+    },
+    ADDITIONAL_STR_INDEX_1                                                          // Size of Tokens array
+  }
+};
diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type41/PlatformOnboardDevicesExtendedFunction.c b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type41/PlatformOnboardDevicesExtendedFunction.c
new file mode 100644
index 000000000000..4bc7e4547785
--- /dev/null
+++ b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type41/PlatformOnboardDevicesExtendedFunction.c
@@ -0,0 +1,57 @@
+/** @file
+
+  Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include <Library/BaseLib.h>
+#include <Library/DebugLib.h>
+#include <Library/MemoryAllocationLib.h>
+
+#include "SmbiosPlatformDxe.h"
+
+/**
+  This function adds SMBIOS Table (Type 41) records.
+
+  @param  RecordData                 Pointer to SMBIOS Table with default values.
+  @param  Smbios                     SMBIOS protocol.
+
+  @retval EFI_SUCCESS                The SMBIOS Table was successfully added.
+  @retval Other                      Failed to update the SMBIOS Table.
+
+**/
+SMBIOS_PLATFORM_DXE_TABLE_FUNCTION (PlatformOnboardDevicesExtended) {
+  EFI_STATUS          Status;
+  STR_TOKEN_INFO      *InputStrToken;
+  SMBIOS_TABLE_TYPE41 *InputData;
+  SMBIOS_TABLE_TYPE41 *Type41Record;
+
+  InputData = (SMBIOS_TABLE_TYPE41 *)RecordData;
+  InputStrToken = (STR_TOKEN_INFO *)StrToken;
+
+  while (InputData->Hdr.Type != NULL_TERMINATED_TYPE) {
+    SmbiosPlatformDxeCreateTable (
+      (VOID *)&Type41Record,
+      (VOID *)&InputData,
+      sizeof (SMBIOS_TABLE_TYPE41),
+      InputStrToken
+      );
+    if (Type41Record == NULL) {
+      return EFI_OUT_OF_RESOURCES;
+    }
+
+    Status = SmbiosPlatformDxeAddRecord ((UINT8 *)Type41Record, NULL);
+    if (EFI_ERROR (Status)) {
+      FreePool (Type41Record);
+      return Status;
+    }
+
+    FreePool (Type41Record);
+    InputData++;
+    InputStrToken++;
+  }
+
+  return Status;
+}
diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxeStrings.uni b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxeStrings.uni
new file mode 100644
index 000000000000..c8176e31ab45
--- /dev/null
+++ b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxeStrings.uni
@@ -0,0 +1,21 @@
+/** @file
+ *  Based on files under Nt32Pkg/MiscSubClassPlatformDxe/
+ *
+ *  Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
+ *  Copyright (c) 2021, NUVIA Inc. All rights reserved.<BR>
+ *  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+ *  Copyright (c) 2015, Hisilicon Limited. All rights reserved.<BR>
+ *  Copyright (c) 2015, Linaro Limited. All rights reserved.<BR>
+ *  SPDX-License-Identifier: BSD-2-Clause-Patent
+ *
+**/
+
+
+/=#
+
+#langdef en-US "English"
+
+#include "Type08/PlatformPortConnector.uni"
+#include "Type09/PlatformSystemSlot.uni"
+#include "Type11/PlatformOemString.uni"
+#include "Type41/PlatformOnboardDevicesExtended.uni"
diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type08/PlatformPortConnector.uni b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type08/PlatformPortConnector.uni
new file mode 100644
index 000000000000..7a373f048594
--- /dev/null
+++ b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type08/PlatformPortConnector.uni
@@ -0,0 +1,22 @@
+/** @file
+
+  Copyright (c) 2022, Ampere Computing LLC. All rights reserved.<BR>
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+/=#
+
+#string STR_PLATFORM_DXE_PORT_CONNECTOR_INTERNAL_REFERENCE_DESIGNATOR_1  #language en-US  "VGA1 - Rear VGA Connector"
+#string STR_PLATFORM_DXE_PORT_CONNECTOR_EXTERNAL_REFERENCE_DESIGNATOR_1  #language en-US  "DB-15 Male (VGA)"
+#string STR_PLATFORM_DXE_PORT_CONNECTOR_INTERNAL_REFERENCE_DESIGNATOR_2  #language en-US  "Front Panel USB 3.0"
+#string STR_PLATFORM_DXE_PORT_CONNECTOR_EXTERNAL_REFERENCE_DESIGNATOR_2  #language en-US  "USB"
+#string STR_PLATFORM_DXE_PORT_CONNECTOR_INTERNAL_REFERENCE_DESIGNATOR_3  #language en-US  "Rear Panel USB 3.0"
+#string STR_PLATFORM_DXE_PORT_CONNECTOR_EXTERNAL_REFERENCE_DESIGNATOR_3  #language en-US  "USB"
+#string STR_PLATFORM_DXE_PORT_CONNECTOR_INTERNAL_REFERENCE_DESIGNATOR_4  #language en-US  "RJ1 - BMC RJ45 Port"
+#string STR_PLATFORM_DXE_PORT_CONNECTOR_EXTERNAL_REFERENCE_DESIGNATOR_4  #language en-US  "RJ45 Connector"
+#string STR_PLATFORM_DXE_PORT_CONNECTOR_INTERNAL_REFERENCE_DESIGNATOR_5  #language en-US  "OCP1 - OCP NIC 3.0 Connector"
+#string STR_PLATFORM_DXE_PORT_CONNECTOR_EXTERNAL_REFERENCE_DESIGNATOR_5  #language en-US  "OCP NIC 3.0"
+#string STR_PLATFORM_DXE_PORT_CONNECTOR_INTERNAL_REFERENCE_DESIGNATOR_6  #language en-US  "UART1 - BMC UART5 Connector"
+#string STR_PLATFORM_DXE_PORT_CONNECTOR_EXTERNAL_REFERENCE_DESIGNATOR_6  #language en-US  "DB-9 female"
diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type09/PlatformSystemSlot.uni b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type09/PlatformSystemSlot.uni
new file mode 100644
index 000000000000..b1722e14e511
--- /dev/null
+++ b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type09/PlatformSystemSlot.uni
@@ -0,0 +1,20 @@
+/** @file
+
+  Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+/=#
+
+#string STR_PLATFORM_DXE_SYSTEM_SLOT_DESIGNATION_1   #language en-US  "S0 Riser x32 - Slot 1"
+#string STR_PLATFORM_DXE_SYSTEM_SLOT_DESIGNATION_2   #language en-US  "S0 Riser x32 - Slot 2"
+#string STR_PLATFORM_DXE_SYSTEM_SLOT_DESIGNATION_3   #language en-US  "S0 Riser x32 - Slot 3"
+#string STR_PLATFORM_DXE_SYSTEM_SLOT_DESIGNATION_4   #language en-US  "S1 Riser x24 - Slot 1"
+#string STR_PLATFORM_DXE_SYSTEM_SLOT_DESIGNATION_5   #language en-US  "S1 Riser x24 - Slot 2"
+#string STR_PLATFORM_DXE_SYSTEM_SLOT_DESIGNATION_6   #language en-US  "S1 Riser x24 - Slot 3"
+#string STR_PLATFORM_DXE_SYSTEM_SLOT_DESIGNATION_7   #language en-US  "S1 Riser x8 - Slot 1"
+#string STR_PLATFORM_DXE_SYSTEM_SLOT_DESIGNATION_8   #language en-US  "S0 OCP NIC 3.0"
+#string STR_PLATFORM_DXE_SYSTEM_SLOT_DESIGNATION_9   #language en-US  "S0 NVMe M.2 - Slot 1"
+#string STR_PLATFORM_DXE_SYSTEM_SLOT_DESIGNATION_10  #language en-US  "S0 NVMe M.2 - Slot 2"
diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type11/PlatformOemString.uni b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type11/PlatformOemString.uni
new file mode 100644
index 000000000000..ede9f24aabe7
--- /dev/null
+++ b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type11/PlatformOemString.uni
@@ -0,0 +1,11 @@
+/** @file
+
+  Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+/=#
+
+#string STR_PLATFORM_DXE_STRING_1  #language en-US  "www.amperecomputing.com"
diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type41/PlatformOnboardDevicesExtended.uni b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type41/PlatformOnboardDevicesExtended.uni
new file mode 100644
index 000000000000..868e06236636
--- /dev/null
+++ b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type41/PlatformOnboardDevicesExtended.uni
@@ -0,0 +1,10 @@
+/** @file
+
+  Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+/=#
+
+#string STR_PLATFORM_DXE_ONBOARD_DEVICES_EXTENDED_DEVICE_TYPE_INSTANCE  #language en-US  "Onboard VGA"
-- 
2.39.0



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105268): https://edk2.groups.io/g/devel/message/105268
Mute This Topic: https://groups.io/mt/99111899/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list