From nobody Fri May 3 08:19:19 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1506403289893655.3645756590354; Mon, 25 Sep 2017 22:21:29 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 662192095E53C; Mon, 25 Sep 2017 22:18:16 -0700 (PDT) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CE1B82095E529 for ; Mon, 25 Sep 2017 22:18:14 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2017 22:21:26 -0700 Received: from shwdeopenpsi011.ccr.corp.intel.com (HELO SHWDEOPENPSI011.local) ([10.239.9.21]) by orsmga005.jf.intel.com with SMTP; 25 Sep 2017 22:21:24 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=shifeix.a.lu@intel.com; receiver=edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,439,1500966000"; d="scan'208";a="153336613" Date: Tue, 26 Sep 2017 13:21:24 +0800 From: lushifex To: edk2-devel@lists.01.org Message-ID: <4eb7be9b-479b-4ea7-85cc-85a00c9eb3b4@SHWDEOPENPSI011.local> X-Mailer: TortoiseGit MIME-Version: 1.0 Subject: [edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Board Name. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: , david.wei@intel.com Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Correct board names according to different boards. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lushifex --- .../BensonGlacier/BoardInitDxe/BoardInitDxe.c | 2 +- .../Board/LeafHill/BoardInitDxe/BoardInitDxe.c | 2 +- .../Board/MinnowBoard3/BoardInitDxe/BoardInitDxe.c | 4 ++-- .../SmBiosMiscDxe/MiscSystemManufacturerFunction.c | 27 ++++++++++++++++++= +--- .../Smbios/SmBiosMiscDxe/SmBiosMiscDxe.inf | 3 ++- 5 files changed, 30 insertions(+), 8 deletions(-) diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitDxe/B= oardInitDxe.c b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitDx= e/BoardInitDxe.c index c5a001e..d49d259 100644 --- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitDxe/BoardIni= tDxe.c +++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitDxe/BoardIni= tDxe.c @@ -28,7 +28,7 @@ BgGetBoardName ( =20 DEBUG ((EFI_D_INFO, "BoardInitDxe: GetBoardName - Benson Glacier\n")); =20 - UnicodeSPrint (BoardName, sizeof (BoardName), L"Benson Glacier (%02x)", = BoardId); + UnicodeSPrint (BoardName, sizeof (BoardName), L"Benson Glacier "); =20 if (BoardId !=3D (UINT8) BOARD_ID_BENSON) { return NULL; diff --git a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitDxe/BoardI= nitDxe.c b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitDxe/BoardIni= tDxe.c index 5ce6349..dd70065 100644 --- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitDxe/BoardInitDxe.c +++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitDxe/BoardInitDxe.c @@ -27,7 +27,7 @@ LhGetBoardName ( STATIC CHAR16 BoardName[40]; =20 DEBUG ((EFI_D_INFO, "BoardInitDxe: GetBoardName - Leaf Hill\n")); - UnicodeSPrint (BoardName, sizeof (BoardName), L"Leaf Hill CRB (%02x)", B= oardId); + UnicodeSPrint (BoardName, sizeof (BoardName), L"Leaf Hill CRB "); =20 if (BoardId !=3D (UINT8) BOARD_ID_LFH_CRB) { return NULL; diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitDxe/Bo= ardInitDxe.c b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitDxe/= BoardInitDxe.c index 2248f10..94c94a6 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitDxe/BoardInit= Dxe.c +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitDxe/BoardInit= Dxe.c @@ -26,9 +26,9 @@ Mb3GetBoardName ( { STATIC CHAR16 BoardName[40]; =20 - DEBUG ((EFI_D_INFO, "BoardInitDxe: GetBoardName - Minnow Board v3\n")); + DEBUG ((EFI_D_INFO, "BoardInitDxe: GetBoardName - MinnowBoard V3\n")); =20 - UnicodeSPrint (BoardName, sizeof (BoardName), L"Minnow Board v3 (%02x)",= BoardId); + UnicodeSPrint (BoardName, sizeof (BoardName), L"MinnowBoard V3 "); =20 if (BoardId !=3D (UINT8) BOARD_ID_MINNOW) { return NULL; diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscD= xe/MiscSystemManufacturerFunction.c b/Platform/BroxtonPlatformPkg/Common/Fe= atures/Smbios/SmBiosMiscDxe/MiscSystemManufacturerFunction.c index 225f424..bcb0c51 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe/Misc= SystemManufacturerFunction.c +++ b/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe/Misc= SystemManufacturerFunction.c @@ -2,7 +2,7 @@ This driver parses the mMiscSubclassDataTable structure and reports any generated data. =20 - Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
=20 This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -19,7 +19,9 @@ #include "MiscSubclassDriver.h" #include #include - +#include +#include +#include =20 =20 /** @@ -59,6 +61,17 @@ AddSmbiosManuCallback ( EFI_SMBIOS_PROTOCOL *Smbios; CHAR16 Buffer[40]; CHAR16 PlatformNameBuffer[40]; + EFI_PEI_HOB_POINTERS GuidHob; + GET_BOARD_NAME GetBoardNameFunc; + EFI_PLATFORM_INFO_HOB *PlatformInfo =3D NULL; + + + GuidHob.Raw =3D GetHobList (); + if (GuidHob.Raw !=3D NULL) { + if ((GuidHob.Raw =3D GetNextGuidHob (&gEfiPlatformInfoGuid, GuidHob.Ra= w)) !=3D NULL) { + PlatformInfo =3D GET_GUID_HOB_DATA (GuidHob.Guid); + } + } =20 ForType1InputData =3D (EFI_MISC_SYSTEM_MANUFACTURER *) Context; =20 @@ -72,7 +85,15 @@ AddSmbiosManuCallback ( Status =3D gBS->LocateProtocol (&gEfiSmbiosProtocolGuid, NULL, (VOID **)= &Smbios); ASSERT_EFI_ERROR (Status); =20 - UnicodeSPrint (PlatformNameBuffer, sizeof (PlatformNameBuffer), L"%s", L= "MinnowBoard V3 "); + UnicodeSPrint (PlatformNameBuffer, sizeof (PlatformNameBuffer), L"%s", L= "Broxton "); + + // + // Update Board Name from PCD + // + if (PlatformInfo !=3D NULL) { + GetBoardNameFunc =3D (GET_BOARD_NAME) (UINTN) PcdGet64 (PcdGetBoardNam= eFunc); + UnicodeSPrint (PlatformNameBuffer, sizeof (PlatformNameBuffer), L"%s",= GetBoardNameFunc(PlatformInfo->BoardId)); + } =20 // // Silicon Steppings diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscD= xe/SmBiosMiscDxe.inf b/Platform/BroxtonPlatformPkg/Common/Features/Smbios/S= mBiosMiscDxe/SmBiosMiscDxe.inf index db40a0b..12ffea3 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe/SmBi= osMiscDxe.inf +++ b/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe/SmBi= osMiscDxe.inf @@ -1,7 +1,7 @@ ## @file # Component name for module MiscSubclass. # -# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the B= SD License @@ -136,6 +136,7 @@ gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang gEfiBxtTokenSpaceGuid.PcdEmmcManufacturerId gEfiBxtTokenSpaceGuid.PcdProductSerialNumber + gPlatformModuleTokenSpaceGuid.PcdGetBoardNameFunc =20 [Depex] gEfiSmbiosProtocolGuid AND --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel