From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id B44339418CF for ; Fri, 26 Jan 2024 13:13:24 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=41mSQ5/8XlAKCvTSr2niF8nI1OBV703kME6Jw3Feiuk=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Received-SPF:From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1706274803; v=1; b=FyijHzpn9vHXzdB93DH/P+miaNJ7GpawGS+UyOIWJzzfstE6umIW3T/F4/6ZVDv8PWR4ZT98 s1F8q2cxZtnKmpvG7pcl/ZAvPQR0sl7lIi6bq6Qhkzpx8pi1aLJSi19nsje/47YXUfcDImAXtN5 6SaLcBZziN6jguDIzOnK1tT4= X-Received: by 127.0.0.2 with SMTP id 6tRQYY7687511xDyVFooLNAh; Fri, 26 Jan 2024 05:13:23 -0800 X-Received: from NAM11-DM6-obe.outbound.protection.outlook.com (NAM11-DM6-obe.outbound.protection.outlook.com [40.107.223.78]) by mx.groups.io with SMTP id smtpd.web11.15480.1706274802753490330 for ; Fri, 26 Jan 2024 05:13:22 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MM9u/b4FOgehKe1o6ecQk0867+IcKBkh4v9WqY0l1nkF7ZJWNSfB6pxkC0YByXwGxG2maVovRhwXTR6KpLqHiMRbIaXhdxw4wO12pQxLh/owvJfX1PyYhmpKeW02kGqXYylcYBLPXcptQVRJoHy74LpctEfPswpBzDMjNELb4PWUpeHk+d7wbSaY/ey2V617qox9Ddvuon2XMHOcRsd7f4YU+3PmFvKc4Ce+MMWBS96foOrTekq54X/GTfb/YUlw9nleztSduPcXbTKPOVMOuQ8amc7grXzEjzV945SylZgdUfcEadXdzJZkE+zdBvU+yf3+d4dm2vKgpa9OXQ3L1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=juQWjyHEL/6h2R5YY3lEaxLDF5oFNx92BJuGH1BhPtE=; b=nGNujejOMQfj7quh8KOEnezM967M/cbjNgq+bVdyIgkWIdR2rCSGqeCkPmUn+TKQd1ZJ11El0oHnEzawmm+7umBPp0ScYRMWSYV1OqsCW6TnXloYKBR9sfTI26Kahy/ureLNWPleaF9LfMkhRtWrrpQww57ng0sNWZ4lFmxti8k+eKAhYSRzCr60LaROVqIS13ayyR+h/AEeUSD6MJVCup0o74aIMFR3McdJdtS5uDH+NHZbsmeW/13XhUWKYtAb2/1k+mHVGp1wt4C5m8hSPj7XZhD1MbAJl7+dDX4BBvwKHNx90M1mW7WlRKU4nyLgSvY71l71vprapPCzOybrGw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) X-Received: from CYXPR02CA0003.namprd02.prod.outlook.com (2603:10b6:930:cf::18) by CY8PR12MB7706.namprd12.prod.outlook.com (2603:10b6:930:85::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.27; Fri, 26 Jan 2024 13:13:19 +0000 X-Received: from CY4PEPF0000E9D0.namprd03.prod.outlook.com (2603:10b6:930:cf:cafe::3e) by CYXPR02CA0003.outlook.office365.com (2603:10b6:930:cf::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.24 via Frontend Transport; Fri, 26 Jan 2024 13:13:19 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C X-Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000E9D0.mail.protection.outlook.com (10.167.241.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7228.16 via Frontend Transport; Fri, 26 Jan 2024 13:13:16 +0000 X-Received: from SHA-LX-MINGXZHA.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 26 Jan 2024 07:13:14 -0600 From: "Zhai, MingXin (Duke) via groups.io" To: CC: Ken Yao , Duke Zhai , Igniculus Fu , Abner Chang Subject: [edk2-devel] [PATCH V3 26/32] AMD/VanGoghBoard: Check in Smbios platform dxe drivers Date: Fri, 26 Jan 2024 21:11:19 +0800 Message-ID: <20240126131125.1881-27-duke.zhai@amd.com> In-Reply-To: <20240126131125.1881-1-duke.zhai@amd.com> References: <20240126131125.1881-1-duke.zhai@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9D0:EE_|CY8PR12MB7706:EE_ X-MS-Office365-Filtering-Correlation-Id: 360cde02-2c6a-4a0d-33f1-08dc1e709114 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: y0FMumxl9KCC3QAjLaRhg3+u5Vz8g6f9POiE4W22G932zsEz4FKLfrIM0vjdNxEoOBjeUufyjRIDHW2gL4FK/OZPZ3BwbTivNtnhXmTitS2Q43eMlHGopBiSnxmk9o9m9/tNUwbaEGS7jLmDJdis9m2a43DEwwKj9vA1jf21iFkKsnir+SHBjLRDpZJ8WZIC/0HX8lbHdGg1zqd/3fkA3VYq1D0I2NpbSRQOltCalUb0tLX+7oIGHxkRvVV3MkizuJXf7h50F3v98m672I27ckgZU7F6JiCFJPrFXWfqljeUOIVLZQgL5Kq/HV4qQHCCfjWPMCbG+qt6EjYSgFFfbduR14Hsl/g71I28k0p4VB05rihnO/PjHtcgNIqg+PYxmGrLOsSLX8dh4ILmiIJYls73mbDnLJ2aFh6DJFtIQ2a/0aUCjA+8GFfMRzfdHvM4ArsFCmuPdgLaBrVkT+Mikkz4E9HnTpl2ebx62fkaScqp8CzRlSJQmFhvWXGTVfZVqwXg5TnRZB+O+TUzle7fGX8e9IjnG6ULVRoIQrqmd774FL5/Ex8SWykqxVQO+N+tEitd4fGE+8rmLmrosVHRlaLk+AeGFiyWlipTcJI4Q9uPhdPCx9zWIz9qHuzsaHc8DYwhs/djGYBMTP6V8tV8MqEDJVS6IZpTX6pOMTnPShp1tIbObDMf9PwGUZ++d3mtiVTkZPKEG6HOVkMGMy5/V5nNJUaVliS95mnNSXRDW8nnlK7HG91MoJekM9I+BaP/OilT/q/OBNdDV52xl7NyCbF4Y1RpFpq1n5y4ws3MrFYCwv11aJTCxqbcfao2OiKT X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2024 13:13:16.5677 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 360cde02-2c6a-4a0d-33f1-08dc1e709114 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9D0.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7706 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,duke.zhai@amd.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: MlXBqSwNw1LxhGzwolAdAlxEx7686176AA= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=FyijHzpn; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io From: Duke Zhai BZ #:4640 In V3: Improve coding style follow edk2 C coding standard. 1.Remove macro definition extra underscores. 2.Putting some AMD copyright in the right place. In V2: Improve coding style. 1.Remove the leading underscore and use double underscore at trailing in = C header files. 2.Remove old tianocore licenses and redundant license description. 3.Improve coding style. For example: remove space between @param. In V1: Initial Smbios platform DXE drivers. Static SMBIOS Table for Chachani pla= tform. SmbiosLib provides detailed information of Chachani platform. Signed-off-by: Eric Xing Cc: Ken Yao Cc: Duke Zhai Cc: Igniculus Fu Cc: Abner Chang --- .../PlatformSmbiosDxe/PlatformSmbiosDxe.c | 75 ++++ .../PlatformSmbiosDxe/PlatformSmbiosDxe.inf | 52 +++ .../Universal/PlatformSmbiosDxe/SmbiosTable.c | 382 ++++++++++++++++++ 3 files changed, 509 insertions(+) create mode 100644 Platform/AMD/VanGoghBoard/Universal/PlatformSmbiosDxe/P= latformSmbiosDxe.c create mode 100644 Platform/AMD/VanGoghBoard/Universal/PlatformSmbiosDxe/P= latformSmbiosDxe.inf create mode 100644 Platform/AMD/VanGoghBoard/Universal/PlatformSmbiosDxe/S= mbiosTable.c diff --git a/Platform/AMD/VanGoghBoard/Universal/PlatformSmbiosDxe/Platform= SmbiosDxe.c b/Platform/AMD/VanGoghBoard/Universal/PlatformSmbiosDxe/Platfor= mSmbiosDxe.c new file mode 100644 index 0000000000..c4de6ca133 --- /dev/null +++ b/Platform/AMD/VanGoghBoard/Universal/PlatformSmbiosDxe/PlatformSmbiosD= xe.c @@ -0,0 +1,75 @@ +/** @file + Static SMBIOS Table for platform + + Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
+ Copyright (c) 2012, Apple Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern SMBIOS_TEMPLATE_ENTRY gSmbiosTemplate[]; + +/** + Main entry for this driver. + + @param ImageHandle Image handle this driver. + @param SystemTable Pointer to SystemTable. + + @retval EFI_SUCESS This function always complete successfully. + +**/ +EFI_STATUS +EFIAPI +PlatformSmbiosDriverEntryPoint ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + EFI_STATUS Status; + EFI_SMBIOS_HANDLE SmbiosHandle; + SMBIOS_STRUCTURE_POINTER Smbios; + + DEBUG ((DEBUG_INFO, " PlatfomrSmbiosDriverEntryPoint \n")); + + // Phase 0 - Patch table to make SMBIOS 2.7 structures smaller to confor= m + // to an early version of the specification. + + // Phase 1 - Initialize SMBIOS tables from template + Status =3D SmbiosLibInitializeFromTemplate (gSmbiosTemplate); + ASSERT_EFI_ERROR (Status); + + // Phase 2 - Patch SMBIOS table entries + Smbios.Hdr =3D SmbiosLibGetRecord (EFI_SMBIOS_TYPE_BIOS_INFORMATION, 0, = &SmbiosHandle); + if (Smbios.Type0 !=3D NULL) { + // 64K * (n+1) bytes + Smbios.Type0->BiosSize =3D (UINT8)DivU64x32 (FixedPcdGet64 (PcdFlashAr= eaSize), 64*1024) - 1; + + SmbiosLibUpdateUnicodeString ( + SmbiosHandle, + Smbios.Type0->BiosVersion, + (CHAR16 *)PcdGetPtr (PcdFirmwareVersionString) + ); + + DEBUG (( + DEBUG_INFO, + " Smbios.Type0->BiosSize: %dMB, Smbios.Type0->BiosVersion: %S, Build= Time: %a,%a\n", + (Smbios.Type0->BiosSize +1) * 64 / 1024, + (CHAR16 *)PcdGetPtr (PcdFirmwareVersionString), + __DATE__, + __TIME__ + )); + } + + return EFI_SUCCESS; +} diff --git a/Platform/AMD/VanGoghBoard/Universal/PlatformSmbiosDxe/Platform= SmbiosDxe.inf b/Platform/AMD/VanGoghBoard/Universal/PlatformSmbiosDxe/Platf= ormSmbiosDxe.inf new file mode 100644 index 0000000000..1f4fefeaa2 --- /dev/null +++ b/Platform/AMD/VanGoghBoard/Universal/PlatformSmbiosDxe/PlatformSmbiosD= xe.inf @@ -0,0 +1,52 @@ +## @file +# Platform SMBIOS driver that fills in SMBIOS table entries. +# +# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
+# Copyright (c) 2012, Apple Inc. All rights reserved. +# Portions copyright (c) 2006 - 2010, Intel Corporation. All rights reserv= ed.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x00010005 + BASE_NAME =3D PlatformSmbiosDxe + FILE_GUID =3D 15EEEB97-709E-91FA-CDA7-44A9C85DDB78 + MODULE_TYPE =3D DXE_DRIVER + VERSION_STRING =3D 1.0 + ENTRY_POINT =3D PlatformSmbiosDriverEntryPoint + + +[Sources] + SmbiosTable.c + PlatformSmbiosDxe.c + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + VanGoghCommonPkg/AmdCommonPkg.dec + ChachaniBoardPkg/Project.dec + +[LibraryClasses] + UefiDriverEntryPoint + BaseLib + BaseMemoryLib + DebugLib + PcdLib + MemoryAllocationLib + UefiBootServicesTableLib + UefiLib + HobLib + SmbiosLib + +[Protocols] + gEfiSmbiosProtocolGuid + +[Pcd] + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareReleaseDateString + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString + gPlatformPkgTokenSpaceGuid.PcdFlashAreaSize + +[Depex] + gEfiSmbiosProtocolGuid diff --git a/Platform/AMD/VanGoghBoard/Universal/PlatformSmbiosDxe/SmbiosTa= ble.c b/Platform/AMD/VanGoghBoard/Universal/PlatformSmbiosDxe/SmbiosTable.c new file mode 100644 index 0000000000..2770cd23f3 --- /dev/null +++ b/Platform/AMD/VanGoghBoard/Universal/PlatformSmbiosDxe/SmbiosTable.c @@ -0,0 +1,382 @@ +/** @file + Implements VanGogh board Smbios tables + Static SMBIOS Table for platform + + Note SMBIOS 2.7.1 Required structures: + BIOS Information (Type 0) + System Information (Type 1) + System Enclosure (Type 3) + Processor Information (Type 4) - CPU Driver + Cache Information (Type 7) - For cache that is external to processor + System Slots (Type 9) - If system has slots + Physical Memory Array (Type 16) + Memory Device (Type 17) - For each socketed system-memory Device + Memory Array Mapped Address (Type 19) - One per contiguous block per P= hysical Memroy Array + System Boot Information (Type 32) + + Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
+ Copyright (c) 2012, Apple Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include +#include +#include +#include + +SMBIOS_TABLE_TYPE0 gSmbiosType0Template =3D { + { EFI_SMBIOS_TYPE_BIOS_INFORMATION, sizeof (SMBIOS_TABLE_TYPE0), 0 }, + 1, // Vendor String + 2, // BiosVersion String + 0xE000, // BiosSegment + 3, // BiosReleaseDate String + 0x7F, // BiosSize + { // BiosCharacteristics + 0, // Reserved :2; ///< Bits 0-1. + 0, // Unknown :1; + 0, // BiosCharacteristicsNotSupported :1; + 0, // IsaIsSupported :1; + 0, // McaIsSupported :1; + 0, // EisaIsSupported :1; + 1, // PciIsSupported :1; + 0, // PcmciaIsSupported :1; + 0, // PlugAndPlayIsSupported :1; + 0, // ApmIsSupported :1; + 1, // BiosIsUpgradable :1; + 1, // BiosShadowingAllowed :1; + 0, // VlVesaIsSupported :1; + 0, // EscdSupportIsAvailable :1; + 0, // BootFromCdIsSupported :1; + 1, // SelectableBootIsSupported :1; + 0, // RomBiosIsSocketed :1; + 0, // BootFromPcmciaIsSupported :1; + 0, // EDDSpecificationIsSupported :1; + 0, // JapaneseNecFloppyIsSupported :1; + 0, // JapaneseToshibaFloppyIsSupported :1; + 0, // Floppy525_360IsSupported :1; + 0, // Floppy525_12IsSupported :1; + 0, // Floppy35_720IsSupported :1; + 0, // Floppy35_288IsSupported :1; + 0, // PrintScreenIsSupported :1; + 0, // Keyboard8042IsSupported :1; + 0, // SerialIsSupported :1; + 0, // PrinterIsSupported :1; + 0, // CgaMonoIsSupported :1; + 0, // NecPc98 :1; + 0 // ReservedForVendor :32; ///< Bits 32-63. Bits= 32-47 reserved for BIOS vendor + ///< and bits 48-63 reserved for System Vendor. + }, + { // BIOSCharacteristicsExtensionBytes[] + 0x81, // AcpiIsSupported :1; + // UsbLegacyIsSupported :1; + // AgpIsSupported :1; + // I2OBootIsSupported :1; + // Ls120BootIsSupported :1; + // AtapiZipDriveBootIsSupported :1; + // Boot1394IsSupported :1; + // SmartBatteryIsSupported :1; + // BIOSCharacteristicsExtensionBytes[1] + 0x0a, // BiosBootSpecIsSupported :1; + // FunctionKeyNetworkBootIsSupported :1; + // TargetContentDistributionEnabled :1; + // UefiSpecificationSupported :1; + // VirtualMachineSupported :1; + // ExtensionByte2Reserved :3; + }, + 0x00, // SystemBiosMajorRelease + 0x01, // SystemBiosMinorRelease + 0xFF, // EmbeddedControllerFirmwareMajorRelease + 0xFF, // EmbeddedControllerFirmwareMinorRelease +}; +CHAR8 *gSmbiosType0Strings[] =3D { + "ADVANCED MICRO DEVICES, INC.", // Vendor String + __TIME__, // BiosVersion String + __DATE__, // BiosReleaseDate String + NULL +}; + +SMBIOS_TABLE_TYPE1 gSmbiosType1Template =3D { + { EFI_SMBIOS_TYPE_SYSTEM_INFORMATION, sizeof (SMBIOS_TABLE_TYPE1), 0 = }, + 1, // Manufacturer String + 2, // ProductName String + 3, // Version String + 4, // SerialNumber String + { 0x25EF0280, 0xEC82, 0x42B= 0, { 0x8F, 0xB6, 0x10, 0xAD, 0xCC, 0xC6, 0x7C, 0x02} + }, + SystemWakeupTypePowerSwitch, + 5, // SKUNumber String + 6, // Family String +}; +CHAR8 *gSmbiosType1Strings[] =3D { + "ADVANCED MICRO DEVICES, INC.", + "Chachani", + "1.0", + "System Serial#", + "System SKU#", + "edk2", + NULL +}; + +SMBIOS_TABLE_TYPE2 gSmbiosType2Template =3D { + { EFI_SMBIOS_TYPE_BASEBOARD_INFORMATION, sizeof (SMBIOS_TABLE_TYPE2), 0 = }, + 1, // Manufacturer String + 2, // ProductName String + 3, // Version String + 4, // SerialNumber String + 5, // AssetTag String + { // FeatureFlag + 1, // Motherboard :1; + 0, // RequiresDaughterCard :1; + 0, // Removable :1; + 0, // Replaceable :1; + 0, // HotSwappable :1; + 0, // Reserved :3; + }, + 6, // LocationInChassis String + 0, // ChassisHandle; + BaseBoardTypeMotherBoard, // BoardType; + 0, // NumberOfContainedObjectHandles; + { 0 } // ContainedObjectHandles[1]; +}; +CHAR8 *gSmbiosType2Strings[] =3D { + "ADVANCED MICRO DEVICES, INC.", + "Chachani", + "1.0", + "Base Board Serial#", + "Base Board Asset Tag#", + "Part Component", + NULL +}; + +SMBIOS_TABLE_TYPE3 gSmbiosType3Template =3D { + { EFI_SMBIOS_TYPE_SYSTEM_ENCLOSURE, sizeof (SMBIOS_TABLE_TYPE3), 0 }, + 1, //= Manufacturer String + MiscChassisTypeLapTop, //= Type; + 2, //= Version String + 3, //= SerialNumber String + 4, //= AssetTag String + ChassisStateSafe, //= BootupState; + ChassisStateSafe, //= PowerSupplyState; + ChassisStateSafe, //= ThermalState; + ChassisSecurityStatusNone, //= SecurityStatus; + { 0, 0, 0, 0}, = // OemDefined[4]; + 0, //= Height; + 0, //= NumberofPowerCords; + 0, //= ContainedElementCount; + 0, //= ContainedElementRecordLength; + { + { 0 } + }, //= ContainedElements[1]; +}; +CHAR8 *gSmbiosType3Strings[] =3D { + "ADVANCED MICRO DEVICES, INC.", + "Chachani", + "Chassis Board Serial#", + "Chassis Board Asset Tag#", + NULL +}; + +SMBIOS_TABLE_TYPE8 gSmbiosType8Template1 =3D { + { EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION, sizeof (SMBIOS_TABLE_TYPE8= ), 0 }, + 0, // InternalReferenceDesignator String + PortConnectorTypeNone, // InternalConnectorType; ///< Th= e enumeration value from MISC_PORT_CONNECTOR_TYPE. + 1, // ExternalReferenceDesignator String + PortConnectorTypeNone, // ExternalConnectorType; ///< Th= e enumeration value from MISC_PORT_CONNECTOR_TYPE. + PortTypeOther, // PortType; ///< Th= e enumeration value from MISC_PORT_TYPE. +}; +CHAR8 *gSmbiosType8Strings1[] =3D { + "Mini DisplayPort", + NULL +}; + +SMBIOS_TABLE_TYPE8 gSmbiosType8Template2 =3D { + { EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION, sizeof (SMBIOS_TABLE_TYPE8= ), 0 }, + 0, // InternalReferenceDesignator String + PortConnectorTypeNone, // InternalConnectorType; ///< Th= e enumeration value from MISC_PORT_CONNECTOR_TYPE. + 1, // ExternalReferenceDesignator String + PortConnectorTypeNone, // ExternalConnectorType; ///< Th= e enumeration value from MISC_PORT_CONNECTOR_TYPE. + PortTypeFireWire, // PortType; ///< Th= e enumeration value from MISC_PORT_TYPE. +}; +CHAR8 *gSmbiosType8Strings2[] =3D { + "FireWire 800", + NULL +}; + +SMBIOS_TABLE_TYPE8 gSmbiosType8Template3 =3D { + { EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION, sizeof (SMBIOS_TABLE_TYPE8= ), 0 }, + 0, // InternalReferenceDesignator String + PortConnectorTypeNone, // InternalConnectorType; ///< Th= e enumeration value from MISC_PORT_CONNECTOR_TYPE. + 1, // ExternalReferenceDesignator String + PortConnectorTypeRJ45, // ExternalConnectorType; ///< Th= e enumeration value from MISC_PORT_CONNECTOR_TYPE. + PortTypeNetworkPort, // PortType; ///< Th= e enumeration value from MISC_PORT_TYPE. +}; +CHAR8 *gSmbiosType8Strings3[] =3D { + "Ethernet", + NULL +}; + +SMBIOS_TABLE_TYPE8 gSmbiosType8Template4 =3D { + { EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION, sizeof (SMBIOS_TABLE_TYPE8= ), 0 }, + 0, // InternalReferenceDesignator String + PortConnectorTypeNone, // InternalConnectorType; ///< Th= e enumeration value from MISC_PORT_CONNECTOR_TYPE. + 1, // ExternalReferenceDesignator String + PortConnectorTypeUsb, // ExternalConnectorType; ///< Th= e enumeration value from MISC_PORT_CONNECTOR_TYPE. + PortTypeUsb, // PortType; ///< Th= e enumeration value from MISC_PORT_TYPE. +}; +CHAR8 *gSmbiosType8Strings4[] =3D { + "USB0", + NULL +}; + +SMBIOS_TABLE_TYPE8 gSmbiosType8Template5 =3D { + { EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION, sizeof (SMBIOS_TABLE_TYPE8= ), 0 }, + 0, // InternalReferenceDesignator String + PortConnectorTypeNone, // InternalConnectorType; ///< Th= e enumeration value from MISC_PORT_CONNECTOR_TYPE. + 1, // ExternalReferenceDesignator String + PortConnectorTypeUsb, // ExternalConnectorType; ///< Th= e enumeration value from MISC_PORT_CONNECTOR_TYPE. + PortTypeUsb, // PortType; ///< Th= e enumeration value from MISC_PORT_TYPE. +}; +CHAR8 *gSmbiosType8Strings5[] =3D { + "USB1", + NULL +}; + +SMBIOS_TABLE_TYPE8 gSmbiosType8Template6 =3D { + { EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION, sizeof (SMBIOS_TABLE_TYPE8= ), 0 }, + 0, // InternalReferenceDesignator String + PortConnectorTypeNone, // InternalConnectorType; ///< Th= e enumeration value from MISC_PORT_CONNECTOR_TYPE. + 1, // ExternalReferenceDesignator String + PortConnectorTypeUsb, // ExternalConnectorType; ///< Th= e enumeration value from MISC_PORT_CONNECTOR_TYPE. + PortTypeUsb, // PortType; ///< Th= e enumeration value from MISC_PORT_TYPE. +}; +CHAR8 *gSmbiosType8Strings6[] =3D { + "USB2", + NULL +}; + +SMBIOS_TABLE_TYPE8 gSmbiosType8Template7 =3D { + { EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION, sizeof (SMBIOS_TABLE_TYPE8= ), 0 }, + 0, // InternalReferenceDesignator String + PortConnectorTypeNone, // InternalConnectorType; ///< Th= e enumeration value from MISC_PORT_CONNECTOR_TYPE. + 1, // ExternalReferenceDesignator String + PortConnectorTypeUsb, // ExternalConnectorType; ///< Th= e enumeration value from MISC_PORT_CONNECTOR_TYPE. + PortTypeUsb, // PortType; ///< Th= e enumeration value from MISC_PORT_TYPE. +}; +CHAR8 *gSmbiosType8Strings7[] =3D { + "USB3", + NULL +}; + +SMBIOS_TABLE_TYPE8 gSmbiosType8Template8 =3D { + { EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION, sizeof (SMBIOS_TABLE_TYPE8= ), 0 }, + 0, // InternalReferenceDesignator Strin= g + PortConnectorTypeNone, // InternalConnectorType; /= //< The enumeration value from MISC_PORT_CONNECTOR_TYPE. + 1, // ExternalReferenceDesignator Strin= g + PortConnectorTypeHeadPhoneMiniJack, // ExternalConnectorType; /= //< The enumeration value from MISC_PORT_CONNECTOR_TYPE. + PortTypeAudioPort, // PortType; /= //< The enumeration value from MISC_PORT_TYPE. +}; +CHAR8 *gSmbiosType8Strings8[] =3D { + "Audio Line In", + NULL +}; + +SMBIOS_TABLE_TYPE8 gSmbiosType8Template9 =3D { + { EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION, sizeof (SMBIOS_TABLE_TYPE8= ), 0 }, + 0, // InternalReferenceDesignator Strin= g + PortConnectorTypeNone, // InternalConnectorType; /= //< The enumeration value from MISC_PORT_CONNECTOR_TYPE. + 1, // ExternalReferenceDesignator Strin= g + PortConnectorTypeHeadPhoneMiniJack, // ExternalConnectorType; /= //< The enumeration value from MISC_PORT_CONNECTOR_TYPE. + PortTypeAudioPort, // PortType; /= //< The enumeration value from MISC_PORT_TYPE. +}; +CHAR8 *gSmbiosType8Strings9[] =3D { + "Audio Line Out", + NULL +}; + +SMBIOS_TABLE_TYPE9 gSmbiosType9Template =3D { + { EFI_SMBIOS_TYPE_SYSTEM_SLOTS, sizeof (SMBIOS_TABLE_TYPE9), 0 }, + 1, // SlotDesignation String + SlotTypeOther, // SlotType; ///< The enumeration= value from MISC_SLOT_TYPE. + SlotDataBusWidthOther, // SlotDataBusWidth; ///< The enumeration= value from MISC_SLOT_DATA_BUS_WIDTH. + SlotUsageAvailable, // CurrentUsage; ///< The enumeration= value from MISC_SLOT_USAGE. + SlotLengthOther, // SlotLength; ///< The enumeration= value from MISC_SLOT_LENGTH. + 0, // SlotID; + { // SlotCharacteristics1; + 1, // CharacteristicsUnknown :1; + 0, // Provides50Volts :1; + 0, // Provides33Volts :1; + 0, // SharedSlot :1; + 0, // PcCard16Supported :1; + 0, // CardBusSupported :1; + 0, // ZoomVideoSupported :1; + 0, // ModemRingResumeSupported:1; + }, + { // SlotCharacteristics2; + 0, // PmeSignalSupported :1; + 0, // HotPlugDevicesSupported :1; + 0, // SmbusSignalSupported :1; + 0, // Reserved :5; ///< Set to 0. + }, + 0, // SegmentGroupNum; + 0, // BusNum; + 0, // DevFuncNum; +}; +CHAR8 *gSmbiosType9Strings[] =3D { + "SD Card", + NULL +}; + +SMBIOS_TABLE_TYPE11 gSmbiosType11Template =3D { + { EFI_SMBIOS_TYPE_OEM_STRINGS, sizeof (SMBIOS_TABLE_TYPE11), 0 }, + 1 // StringCount +}; +CHAR8 *gSmbiosType11Strings[] =3D { + "OEM Strings: ADVANCED MICRO DEVICES, INC.", + NULL +}; + +SMBIOS_TABLE_TYPE12 gSmbiosType12Template =3D { + { EFI_SMBIOS_TYPE_SYSTEM_CONFIGURATION_OPTIONS, sizeof (SMBIOS_TABLE_TYP= E12), 0 }, + 1 // StringCount +}; +CHAR8 *gSmbiosType12Strings[] =3D { + "System Configuration Options: SW1-1: Close to Disable On Board Video", + NULL +}; + +SMBIOS_TABLE_TYPE23 gSmbiosType23Template =3D { + { EFI_SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION, sizeof (SMBIOS_TABLE_TYPE23),= 0 }, + 0, // Capabilities; + 0, // ResetCount; + 0, // ResetLimit; + 0, // TimerInterval; + 0 // Timeout; +}; + +SMBIOS_TABLE_TYPE32 gSmbiosType32Template =3D { + { EFI_SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION, sizeof (SMBIOS_TABLE_TYPE32),= 0 }, + { 0, 0, = 0, 0, 0, 0}, // Reserved[6]; + BootInformationStatusNoError = // BootStatus +}; + +SMBIOS_TEMPLATE_ENTRY gSmbiosTemplate[] =3D { + { (SMBIOS_STRUCTURE *)&gSmbiosType0Template, gSmbiosType0Strings }, + { (SMBIOS_STRUCTURE *)&gSmbiosType1Template, gSmbiosType1Strings }, + { (SMBIOS_STRUCTURE *)&gSmbiosType2Template, gSmbiosType2Strings }, + { (SMBIOS_STRUCTURE *)&gSmbiosType3Template, gSmbiosType3Strings }, + { (SMBIOS_STRUCTURE *)&gSmbiosType8Template1, gSmbiosType8Strings1 }, + { (SMBIOS_STRUCTURE *)&gSmbiosType8Template2, gSmbiosType8Strings2 }, + { (SMBIOS_STRUCTURE *)&gSmbiosType8Template3, gSmbiosType8Strings3 }, + { (SMBIOS_STRUCTURE *)&gSmbiosType8Template4, gSmbiosType8Strings4 }, + { (SMBIOS_STRUCTURE *)&gSmbiosType8Template5, gSmbiosType8Strings5 }, + { (SMBIOS_STRUCTURE *)&gSmbiosType8Template6, gSmbiosType8Strings6 }, + { (SMBIOS_STRUCTURE *)&gSmbiosType8Template7, gSmbiosType8Strings7 }, + { (SMBIOS_STRUCTURE *)&gSmbiosType8Template8, gSmbiosType8Strings8 }, + { (SMBIOS_STRUCTURE *)&gSmbiosType8Template9, gSmbiosType8Strings9 }, + { (SMBIOS_STRUCTURE *)&gSmbiosType9Template, gSmbiosType9Strings }, + { (SMBIOS_STRUCTURE *)&gSmbiosType11Template, gSmbiosType11Strings }, + { (SMBIOS_STRUCTURE *)&gSmbiosType12Template, gSmbiosType12Strings }, + { (SMBIOS_STRUCTURE *)&gSmbiosType23Template, NULL }, + { (SMBIOS_STRUCTURE *)&gSmbiosType32Template, NULL }, + { NULL, NULL } +}; --=20 2.31.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114602): https://edk2.groups.io/g/devel/message/114602 Mute This Topic: https://groups.io/mt/103975483/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-