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 E90727803D0 for ; Fri, 19 Jan 2024 14:57:58 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=fSYtxizcTglhRkexYwtthhzJDA2+XVP3UcQPEcRzfE4=; 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=1705676277; v=1; b=csXtZLKr0M7W7050giu6pQvO1N0RPZLkLFkwtxMDhodMFk869n1PxP38mSKv5+cvmu2MxfbF 4uDnXqHpabflYl10fW2mOEQBcsgIxaAVivXAZnS/+PcJKndHhsGQLBbakIx7dD5M5gAEwqjoN8p 85RBCbpGivpftbidTr8ALoQQ= X-Received: by 127.0.0.2 with SMTP id O5ujYY7687511xijNd3pbTjV; Fri, 19 Jan 2024 06:57:57 -0800 X-Received: from NAM11-DM6-obe.outbound.protection.outlook.com (NAM11-DM6-obe.outbound.protection.outlook.com [40.107.223.82]) by mx.groups.io with SMTP id smtpd.web11.5913.1705560771119195258 for ; Wed, 17 Jan 2024 22:52:51 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y0KEtPo5wigzcgyTKWkyAHKAJft6o7dd4+H3gkoHH77HWnEct3DmCAPIsnoxOUURI9QIjfcqO23fqe0wkvEmjI0YyRROOoImV19PWtzRHp7vxpw5DbZVv75dYEju4V/289uP980IzEF+YqY/J9bHm7aKoXGJEbt6NbniFDmbDDjpW+TIjyMcRHwEFJoaaDKeoQJjvrzcnfSHB1tVn2xuSY7fQzIr5JCogE23GgDSpUOkRKlvE7ptmnZx2xeilc+Aem9y0uLMqhFEmTSLBa9U8xjppQZ03yyszmSbNUjI9HS5bBaUcRX9NMcPzK9lbuZ5lZ2KTD0a8aDnqJJRB9SEYw== 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=xIEXON/x+X2AGhz2qtQw/CsNJAjpEGhbtDzeBGV1vIA=; b=f+ZeWCeQkxf+1sBrAFliwQdcu1Htr1QgZHz5vf2+YzBW+hhP7cTVsMlrwy5ojGoD7JMdTXIyGMc5NVijaHrZt/4ggEH/MiADv1Y09hIQRu1FYYr5MApse5XE21LQRNLLTZ3mcSXwimS1XfCiccD0njIzxADvsMKXxwiRGKeHQDnGuqgJ4IfUy/CqJakDr8LXvvMrWm5BLIaQH8QVhvEXh6daKHepWzqQhe0rQ8va4WAW7cTeCVDUMW5aV5CjAEmoddDiRlvkKAU5h7mmjz/iUV899An4mT0syS5Vc10UUjyQuoWokFsBkXx6HgyY0wM8HgMFk+EVIaqMFdYatgPatQ== 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 BYAPR08CA0001.namprd08.prod.outlook.com (2603:10b6:a03:100::14) by MW5PR12MB5598.namprd12.prod.outlook.com (2603:10b6:303:193::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.24; Thu, 18 Jan 2024 06:52:46 +0000 X-Received: from CO1PEPF000044F5.namprd05.prod.outlook.com (2603:10b6:a03:100:cafe::be) by BYAPR08CA0001.outlook.office365.com (2603:10b6:a03:100::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.24 via Frontend Transport; Thu, 18 Jan 2024 06:52: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=SATLEXMB03.amd.com; pr=C X-Received: from SATLEXMB03.amd.com (165.204.84.17) by CO1PEPF000044F5.mail.protection.outlook.com (10.167.241.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7202.16 via Frontend Transport; Thu, 18 Jan 2024 06:52:46 +0000 X-Received: from SATLEXMB06.amd.com (10.181.40.147) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Thu, 18 Jan 2024 00:52:41 -0600 X-Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB06.amd.com (10.181.40.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Thu, 18 Jan 2024 00:52:39 -0600 X-Received: from SHA-LX-MINGXZHA.amd.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.34 via Frontend Transport; Thu, 18 Jan 2024 00:52:38 -0600 From: "duke.zhai via groups.io" To: CC: Ken Yao , Duke Zhai , Igniculus Fu , Abner Chang Subject: [edk2-devel] [PATCH 26/33] AMD/VanGoghBoard: Check in Smbios platform dxe drivers. Date: Thu, 18 Jan 2024 14:50:39 +0800 Message-ID: <20240118065046.961-27-duke.zhai@amd.com> In-Reply-To: <20240118065046.961-1-duke.zhai@amd.com> References: <20240118065046.961-1-duke.zhai@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044F5:EE_|MW5PR12MB5598:EE_ X-MS-Office365-Filtering-Correlation-Id: 57c15caf-eb55-48fd-5145-08dc17f213e6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: yE5RVXc+NKfh628vriBs97ZHoa/E5QLJTHFUOpjxCrIkvAP0BZpzbHipqNWCeqUKl9uu9Cnaw+6V62jtsLDTEq/XAsVa7MQDWjTQues11p4pkcbdKTEGGPYcWl444b0rwyCrTkiIwMY6dbecEtqSR7q3vtnFodyc/vHSa+lmE9dnfg+U7CL5TBSr86NApwRAoCbp/H2M8oH/2bfRJRrNe6SGPBoadAmD+9B+9ZM/MGM2CeM0AIrUExBht1tx9bZpR6rYbDqUW37Q7CPL2VP37Qu4bxu2JRdw8JsiruSfD6NIAd748gmATOQ8POdxU95oXx4yGto3REM4IARV39f+Y7FvG18KPWGmUBJicE7+ImOxlpj/ovvXHtfI5rbvDUjf6OaY8ujP4d8Mv3tX1wUvhRwAE0b8W3eBC6ua+FXVBpODxPU8nLz8g+Yykq8fUzRPcWYrRyLp726vETTDKUY1cKPOQj0LIQw7R8A2B5Z7LIW8Oz8sUlFF4eP6WhtBky3SOdddRHAH3kH6b9ies5ODsT5Fos7AB81HbqmuRmUnBBcJBDi10kqJRXJELpFIppGUTtfIGKcZz+WrHN+AG8mr9aBVfqodWNY+NBjKVwk5IedaIYiud+SpByxatBUXnXrVbVr4rCmgCndp+di2YfwFwj9rO/7KzuT+LxV4ysgQDHe4R8oEe0gczghz3/txeAJ14NCqzsVpnMuR2eNZVtDNvqmVUWsdbQ2EvUxpbp3pYNdjwcuvt2sbtaz+AH/QB2oBhrH0bKGZDPu+YKFb41Fh36hwPZ3ANG04tQjRwdEKrcuec/qGdkAY+tUo92FVVMCC X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2024 06:52:46.1122 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 57c15caf-eb55-48fd-5145-08dc17f213e6 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=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000044F5.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR12MB5598 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: 1OefNuDK2RfszWtyHKwxJ3TOx7686176AA= 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=csXtZLKr; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); 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 Initial Smbios platform DXE drivers. Static SMBIOS Table for Chachani platf= orm. 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 | 83 ++++ .../PlatformSmbiosDxe/PlatformSmbiosDxe.inf | 60 +++ .../Universal/PlatformSmbiosDxe/SmbiosTable.c | 389 ++++++++++++++++++ 3 files changed, 532 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..141325c346 --- /dev/null +++ b/Platform/AMD/VanGoghBoard/Universal/PlatformSmbiosDxe/PlatformSmbiosD= xe.c @@ -0,0 +1,83 @@ +/** @file + Implements VanGogh board Smbios information + + Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent +**/ +/* This file includes code originally published under the following licens= e. */ + +/** @file + Static SMBIOS Table for platform + + + 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..058813496d --- /dev/null +++ b/Platform/AMD/VanGoghBoard/Universal/PlatformSmbiosDxe/PlatformSmbiosD= xe.inf @@ -0,0 +1,60 @@ +## @file +# Platform Smbios Dxe driver +# +# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent +## +# This file includes code originally published under the following license= . + +## @file +# Platform SMBIOS driver that fills in SMBIOS table entries. +# +# 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..29b16380a1 --- /dev/null +++ b/Platform/AMD/VanGoghBoard/Universal/PlatformSmbiosDxe/SmbiosTable.c @@ -0,0 +1,389 @@ +/** @file + Implements VanGogh board Smbios tables + + Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent +**/ +/* This file includes code originally published under the following licens= e. */ + +/** @file + 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) 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 (#114076): https://edk2.groups.io/g/devel/message/114076 Mute This Topic: https://groups.io/mt/103831199/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-