From dc281a86bc1ca8800331be0a82b02d2c96ef5a54 Mon Sep 17 00:00:00 2001 From: Guo Mang Date: Wed, 3 Aug 2016 09:51:01 +0800 Subject: BraswellPlatformPkg: Restructure code in Common/Feature directory Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Mang Reviewed-by: David Wei --- .../Feature/SmBiosMiscDxe/SmBiosCpu/SmBiosCpu.c | 30 ++++++++-------------- 1 file changed, 11 insertions(+), 19 deletions(-) (limited to 'BraswellPlatformPkg/Common/Feature/SmBiosMiscDxe/SmBiosCpu/SmBiosCpu.c') diff --git a/BraswellPlatformPkg/Common/Feature/SmBiosMiscDxe/SmBiosCpu/SmBiosCpu.c b/BraswellPlatformPkg/Common/Feature/SmBiosMiscDxe/SmBiosCpu/SmBiosCpu.c index c67bcf9785..52ee6ae950 100644 --- a/BraswellPlatformPkg/Common/Feature/SmBiosMiscDxe/SmBiosCpu/SmBiosCpu.c +++ b/BraswellPlatformPkg/Common/Feature/SmBiosMiscDxe/SmBiosCpu/SmBiosCpu.c @@ -40,7 +40,6 @@ #include "SocketLga1156Lib.h" #include #include -#include "MiscSubclassDriver.h" #define PLATFORM_DESKTOP 0 #define PLATFORM_MOBILE 1 @@ -999,10 +998,10 @@ AddSmbiosCacheTypeTable ( // SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED; Status = Smbios->Add ( Smbios, - NULL, - &SmbiosHandle, - (EFI_SMBIOS_TABLE_HEADER*) SmbiosRecord - ); + NULL, + &SmbiosHandle, + (EFI_SMBIOS_TABLE_HEADER*) SmbiosRecord + ); // // Record L1/L2/L3 Cache Smbios Handle, Type 4 SMBIOS Record needs it. @@ -1220,15 +1219,7 @@ AddSmbiosProcessorTypeTable ( // Get CPU Version string. // GetProcessorVersion (ProcessorNumber, &Version); - if (Version.StringValid) { - Token = HiiSetString (mHiiHandle, 0, Version.BrandString, NULL); - if (Token == 0) { - Token = Version.StringRef; - } - } else { - Token = Version.StringRef; - } - CpuVerStr = HiiGetPackageString (&gEfiCallerIdGuid, Token, NULL); + CpuVerStr = Version.BrandString; ASSERT (CpuVerStr != NULL); CpuVerStrLen = StrLen (CpuVerStr); ASSERT (CpuVerStrLen <= SMBIOS_STRING_MAX_LENGTH); @@ -1359,10 +1350,10 @@ AddSmbiosProcessorTypeTable ( // SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED; Status = Smbios->Add ( Smbios, - NULL, - &SmbiosHandle, - (EFI_SMBIOS_TABLE_HEADER*) SmbiosRecord - ); + NULL, + &SmbiosHandle, + (EFI_SMBIOS_TABLE_HEADER*) SmbiosRecord + ); FreePool (SmbiosRecord); FreePool (CpuSocketStr); FreePool (CpuManuStr); @@ -1392,7 +1383,7 @@ GetSmbiosCpuInformation ( EFI_SMBIOS_PROTOCOL *Smbios --*/ { - EFI_STATUS Status = EFI_SUCCESS; + EFI_STATUS Status = EFI_SUCCESS; EFI_MP_SERVICES_PROTOCOL *MpService; UINTN MaximumNumberOfCPUs; UINTN NumberOfEnabledCPUs; @@ -1489,3 +1480,4 @@ GetSmbiosCpuInformation ( EFI_SMBIOS_PROTOCOL *Smbios return Status; } + -- cgit v1.2.3