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 787A8740041 for ; Fri, 26 Jan 2024 06:03:51 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Kdr6Ft4ZepKHUPPUpkcK8b71ikXzqbf3aN90K++zwnA=; 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=1706249030; v=1; b=PMPf0or/jN00M5oxEaTyTZkP4u44afhkkmUu/hMuNth1yhUccNy7wdyE6Sfj4eIIE0pvuihP T7Tv4hsCscSZcRe995gsGkIe3qBDJyrDVAC0ypInLOcp58mTs2jaSHfBUNUKQsnjBRIjUcdvIvf YyuD0DT22T9NWjMPgUxIPqGI= X-Received: by 127.0.0.2 with SMTP id LpMnYY7687511xz22GnOJrD3; Thu, 25 Jan 2024 22:03:50 -0800 X-Received: from NAM12-BN8-obe.outbound.protection.outlook.com (NAM12-BN8-obe.outbound.protection.outlook.com [40.107.237.58]) by mx.groups.io with SMTP id smtpd.web11.9726.1706249029495419295 for ; Thu, 25 Jan 2024 22:03:49 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OYcL66Rtr1kUOWlPt9FHAg7n9+BT1CDqh6CkVlClT1LVHchjQuEOiIyqK50EOucZqC9yYT7QwyFteTMNsWHm3+y/m8ajm+oV1dnbwrHGbgAMMg0dRHortaWz3Gpv/E5gc7b7tQJ/BnZjpSjR/ifpor98rmy2c0YHfJMhPCmUmXs8yevCRstWdR/fNZ3xeopM+5/7StnyVxv2vGZ37NjR2TktHBzkEVLVskxjJzlwCegrLLM7g3fswz2o9kx5U0+Vke0NiQ2rrixMzYZQUy8FJ5KODo4x/B/L6fEqwWu8zvdXNzuDz6KnuT6fsXvAl3ZiTCLNxqnJkqtkUsyYSzT+PQ== 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=Kkuclz5ezzBsLk8GuJKw0l6nK784NjnBAEFJsL7aZgo=; b=HYj8wQOBq1mUF5sAwXtPlnkh1YUz4d6+OXiv4hCQMXeAsb8BFufgf36LPGTOcz8baWcdOlTivYEpUS/azgN4SZta4dwsfrW9G0YBhVHcQpXPXHjQuakr3VUPM+DBO+gmiSmMFaPIGIV8qP1BSRswkod2M9KiltniJty4Z41v0D1Rho3/jaNlG+105t36110RteTouuxku4T7im2XOVmwMI8Ifoo/H3t1Xs6GrJ4ihsAy8d4zQ0ZWLlcA+5l7psQqRCy8DmQYpy6PK/Db+AXYPwYU3PfdNfK6xqg7zUeZYbVDQ6/oDmmofRWikY6QaopsqbuzVuSOWaCY8Hl1bvd/5A== 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 SJ0PR05CA0069.namprd05.prod.outlook.com (2603:10b6:a03:332::14) by DM6PR12MB4483.namprd12.prod.outlook.com (2603:10b6:5:2a2::22) 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 06:03:46 +0000 X-Received: from DS2PEPF0000343B.namprd02.prod.outlook.com (2603:10b6:a03:332:cafe::c7) by SJ0PR05CA0069.outlook.office365.com (2603:10b6:a03:332::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.21 via Frontend Transport; Fri, 26 Jan 2024 06:03:46 +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 DS2PEPF0000343B.mail.protection.outlook.com (10.167.18.38) 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 06:03:45 +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 00:03:39 -0600 From: "Zhai, MingXin (Duke) via groups.io" To: CC: Ken Yao , Duke Zhai , Igniculus Fu , Abner Chang Subject: [edk2-devel] [PATCH V2 26/32] AMD/VanGoghBoard: Check in Smbios platform dxe drivers Date: Fri, 26 Jan 2024 14:00:44 +0800 Message-ID: <20240126060050.1725-27-duke.zhai@amd.com> In-Reply-To: <20240126060050.1725-1-duke.zhai@amd.com> References: <20240126060050.1725-1-duke.zhai@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS2PEPF0000343B:EE_|DM6PR12MB4483:EE_ X-MS-Office365-Filtering-Correlation-Id: f5563285-355f-4ae3-1253-08dc1e348ead X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: oQ+sykdEkQ0AxZ8klpUu+Yqq4gp3QRnmr1SoiFMs742TwqxRZxSrVB5A+qdbCiEwNMHBNP4cCpO+TURHMw8w9a8nK6RD4OcrLTInyIvT0SS1DRpkao6N9n4kLyhLaRFpaWB9xQ4F/b5vVX9IwH4Y6y1EDE8XhGRA/JkG2UhDKXQ2sbYxhvKjXIYHMlAK7oFb+yR9L0yD9dA/0TiU3oQ8NMGNGwabOkI22fSOy3egpp0gf0t7O0pJxbD9cQx+86yYkN3dQLo7dV5fgfNaq+eFLG42YdpQ4xs4IFNoALkoLWtBdO9cUrDpGyiT6Q7ORRevsUDgBnFACul/zwELNRe28whFIvfmQrXAgHLkNAxLX/zwTu/DlYCNiqMiX6C0cgl0RbZajyDqvvFdvyC8/v8b6PJFgE767FXK2FlTRaHvXBOCrbM1unUe/0lGsYrprISYC/i8phJUWeFJXCEWGbMi1nLcQw0Q/sph3jIfUeh0hAbwNiyq4GPsYwpeuHdiexQ456E9iCYvWy744VLottsRU+oxLlsycfWw8pkyGGCabpwW7QSN2w5gqLBmh8hJWNp7JX/1N38/Z27pYM1sm74dqlY5qS+iNlffQ6XtcBg8fJE53seV/Z8l02DR7bP2MSaxrUSWYrHmrzPEqLEomWszDEvLY8RAE25Ldja+eGHahucmlEvdiKTvWkmFeF3lbiaLWawjsAHEvgsfTTmQ5yq4OThljBFLySXuxWIEbtAuThQcuvdCcCObAA2uAdPjK+qOs8QXIbjUp1oQTXT1xnFCMHxlgAzHKpJvgjfd6hJvTwF35IDNTmzUlJz4Ij2cbRgS X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2024 06:03:45.9357 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f5563285-355f-4ae3-1253-08dc1e348ead 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: DS2PEPF0000343B.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4483 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: EH6Q54CVQmKiqxruly0sAr8xx7686176AA= 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="PMPf0or/"; 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; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") From: Duke Zhai BZ #:4640 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 | 53 +++ .../Universal/PlatformSmbiosDxe/SmbiosTable.c | 382 ++++++++++++++++++ 3 files changed, 510 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..e16a448d7a --- /dev/null +++ b/Platform/AMD/VanGoghBoard/Universal/PlatformSmbiosDxe/PlatformSmbiosD= xe.inf @@ -0,0 +1,53 @@ +## @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 } +}; -- 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 (#114519): https://edk2.groups.io/g/devel/message/114519 Mute This Topic: https://groups.io/mt/103971419/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-