From: lushifex <shifeix.a.lu@intel.com>
To: edk2-devel@lists.01.org
Cc: david.wei@intel.com;
Subject: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Board Name.
Date: Tue, 26 Sep 2017 13:21:24 +0800 [thread overview]
Message-ID: <4eb7be9b-479b-4ea7-85cc-85a00c9eb3b4@SHWDEOPENPSI011.local> (raw)
Correct board names according to different boards.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: lushifex <shifeix.a.lu@intel.com>
---
.../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/BoardInitDxe.c b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitDxe/BoardInitDxe.c
index c5a001e..d49d259 100644
--- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitDxe/BoardInitDxe.c
+++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitDxe/BoardInitDxe.c
@@ -28,7 +28,7 @@ BgGetBoardName (
DEBUG ((EFI_D_INFO, "BoardInitDxe: GetBoardName - Benson Glacier\n"));
- UnicodeSPrint (BoardName, sizeof (BoardName), L"Benson Glacier (%02x)", BoardId);
+ UnicodeSPrint (BoardName, sizeof (BoardName), L"Benson Glacier ");
if (BoardId != (UINT8) BOARD_ID_BENSON) {
return NULL;
diff --git a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitDxe/BoardInitDxe.c b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitDxe/BoardInitDxe.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];
DEBUG ((EFI_D_INFO, "BoardInitDxe: GetBoardName - Leaf Hill\n"));
- UnicodeSPrint (BoardName, sizeof (BoardName), L"Leaf Hill CRB (%02x)", BoardId);
+ UnicodeSPrint (BoardName, sizeof (BoardName), L"Leaf Hill CRB ");
if (BoardId != (UINT8) BOARD_ID_LFH_CRB) {
return NULL;
diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitDxe/BoardInitDxe.c b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitDxe/BoardInitDxe.c
index 2248f10..94c94a6 100644
--- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitDxe/BoardInitDxe.c
+++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitDxe/BoardInitDxe.c
@@ -26,9 +26,9 @@ Mb3GetBoardName (
{
STATIC CHAR16 BoardName[40];
- DEBUG ((EFI_D_INFO, "BoardInitDxe: GetBoardName - Minnow Board v3\n"));
+ DEBUG ((EFI_D_INFO, "BoardInitDxe: GetBoardName - MinnowBoard V3\n"));
- UnicodeSPrint (BoardName, sizeof (BoardName), L"Minnow Board v3 (%02x)", BoardId);
+ UnicodeSPrint (BoardName, sizeof (BoardName), L"MinnowBoard V3 ");
if (BoardId != (UINT8) BOARD_ID_MINNOW) {
return NULL;
diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe/MiscSystemManufacturerFunction.c b/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe/MiscSystemManufacturerFunction.c
index 225f424..bcb0c51 100644
--- a/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe/MiscSystemManufacturerFunction.c
+++ b/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe/MiscSystemManufacturerFunction.c
@@ -2,7 +2,7 @@
This driver parses the mMiscSubclassDataTable structure and reports
any generated data.
- Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -19,7 +19,9 @@
#include "MiscSubclassDriver.h"
#include <Protocol/DxeSmmReadyToLock.h>
#include <Library/PrintLib.h>
-
+#include <BoardFunctionsDxe.h>
+#include <Library/HobLib.h>
+#include <Guid/PlatformInfo.h>
/**
@@ -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 = NULL;
+
+
+ GuidHob.Raw = GetHobList ();
+ if (GuidHob.Raw != NULL) {
+ if ((GuidHob.Raw = GetNextGuidHob (&gEfiPlatformInfoGuid, GuidHob.Raw)) != NULL) {
+ PlatformInfo = GET_GUID_HOB_DATA (GuidHob.Guid);
+ }
+ }
ForType1InputData = (EFI_MISC_SYSTEM_MANUFACTURER *) Context;
@@ -72,7 +85,15 @@ AddSmbiosManuCallback (
Status = gBS->LocateProtocol (&gEfiSmbiosProtocolGuid, NULL, (VOID **) &Smbios);
ASSERT_EFI_ERROR (Status);
- UnicodeSPrint (PlatformNameBuffer, sizeof (PlatformNameBuffer), L"%s", L"MinnowBoard V3 ");
+ UnicodeSPrint (PlatformNameBuffer, sizeof (PlatformNameBuffer), L"%s", L"Broxton ");
+
+ //
+ // Update Board Name from PCD
+ //
+ if (PlatformInfo != NULL) {
+ GetBoardNameFunc = (GET_BOARD_NAME) (UINTN) PcdGet64 (PcdGetBoardNameFunc);
+ UnicodeSPrint (PlatformNameBuffer, sizeof (PlatformNameBuffer), L"%s", GetBoardNameFunc(PlatformInfo->BoardId));
+ }
//
// Silicon Steppings
diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe/SmBiosMiscDxe.inf b/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe/SmBiosMiscDxe.inf
index db40a0b..12ffea3 100644
--- a/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe/SmBiosMiscDxe.inf
+++ b/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe/SmBiosMiscDxe.inf
@@ -1,7 +1,7 @@
## @file
# Component name for module MiscSubclass.
#
-# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -136,6 +136,7 @@
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang
gEfiBxtTokenSpaceGuid.PcdEmmcManufacturerId
gEfiBxtTokenSpaceGuid.PcdProductSerialNumber
+ gPlatformModuleTokenSpaceGuid.PcdGetBoardNameFunc
[Depex]
gEfiSmbiosProtocolGuid AND
--
2.7.0.windows.1
next reply other threads:[~2017-09-26 5:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-26 5:21 lushifex [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-12-11 8:27 [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Board Name lushifex
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4eb7be9b-479b-4ea7-85cc-85a00c9eb3b4@SHWDEOPENPSI011.local \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox