From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (NAM10-BN7-obe.outbound.protection.outlook.com [40.92.40.91]) by mx.groups.io with SMTP id smtpd.web12.18040.1611690450806605124 for ; Tue, 26 Jan 2021 11:47:31 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@outlook.com header.s=selector1 header.b=Pzb18hYH; spf=pass (domain: outlook.com, ip: 40.92.40.91, mailfrom: kun.q@outlook.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D2vSP2dKHAqdyzIePBh43qimmrjHyMDQgEhRKg/A9fW1lnsuBGOslE4clmtAknXM0EBw2AFO0tK8kdflPFQCUnKx3zXbAS4+zey7Y7MdyUkfJeD9w//Vq2DXYdXlV+Jtc2MbDGRwR9MCQ9mdjC2a/yHqMAgZoRoZWAK1iLprfJ/3AefieakGNUmAFHJrucEdo1humHelBxmTOay/t5XKalikGVMdhMrvVD4uBWbSHQWWVCQTxnX5wi9G6zHQvYoS4BYqClUJmjDho3ZER0MXr7FivPd9/ugQ6zPOjmoCJcgxY6t0K1M7nJNLWIqlSB0KehMCpul+9CU560DAUadagw== 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-SenderADCheck; bh=z/tLhANx0Le3w/UT2e6B/uS5sGk8WBSZuJxPGCZw5JE=; b=VPZzUgVwZOXjycAHwjCStE0v5soMxvn2CoS7et2javvgG738o00DsOXivxNQdAFVcQoqmMof+BVOiL1OIysBFtvgcWvfcLGeYT/Yy5V2o8AB1N2CTYkXuwdvyvfx8HVskzdHQCfmwVocoM0BBQv95mVd9yqrkfeHdPH4rmWYfsLvHUbczRPYTlt6/yF/VtWVQyZgGpEm43N+8rfBXUQ3WSZ8e4dVfcKxnWsWOiKPqwwmohfhmcFrSu1VQhGMd7Vm7KlLSwwaVeHM6c/WWdhiUcqZb5UQcc5iK5VcmrjA7bDjFeO5nbpAynxFAE2u2DFxhArT14Js7uH/X4LK+xEf3A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z/tLhANx0Le3w/UT2e6B/uS5sGk8WBSZuJxPGCZw5JE=; b=Pzb18hYHB2D3DEd8pMnreirOykGzzpRLMzXpeA/AcbM/Ma0ADp38kK2dKT48LU/DMlqHsSGdlFfxaRatAmNfBYGp+F8nlWSVVtBmwJXojXSZfbWLAlqs/EuU9uFAz0c3CnIXWcppV92FRSUrVGSKLjpfTiAmwZc9BD+Wr8OwBK+inGSAWxh9n6hewlrLj5mB5Xfb8jt/bHsLg2naHPTyEoCc2GcanfjKBNWQlBr19NfhOl3loyuXgamJ4K3oZo8BxVhjIEV2xV1uy+JbeSBTrQD9AgOfkfHzhetgPRohBKm3cIQNCNrQHBFiDgyOFYD+iQm7Uf/xCj64+Te5Cbwotg== Received: from BN7NAM10FT059.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e8f::53) by BN7NAM10HT136.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e8f::423) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11; Tue, 26 Jan 2021 19:47:29 +0000 Received: from MWHPR06MB3102.namprd06.prod.outlook.com (2a01:111:e400:7e8f::4c) by BN7NAM10FT059.mail.protection.outlook.com (2a01:111:e400:7e8f::447) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11 via Frontend Transport; Tue, 26 Jan 2021 19:47:29 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:3C8542E41C1F40E901748DC906FC00AAF8926D0F5CEB1EC626A2CB5499ABDEBA;UpperCasedChecksum:AED9072CE5D7DC33F48D05F3EE49F711BAD8F64B219D409E400F1328E3D4FCA0;SizeAsReceived:7535;Count:47 Received: from MWHPR06MB3102.namprd06.prod.outlook.com ([fe80::d4ee:1260:6f53:3f7b]) by MWHPR06MB3102.namprd06.prod.outlook.com ([fe80::d4ee:1260:6f53:3f7b%6]) with mapi id 15.20.3784.017; Tue, 26 Jan 2021 19:47:29 +0000 From: "Kun Qin" To: devel@edk2.groups.io CC: Jian J Wang , Hao A Wu , Dandan Bi , Liming Gao , Jiewen Yao Subject: [PATCH v4 08/20] MdeModulePkg: StatusCodeHandler: StatusCodeHandler driver in StandaloneMm Date: Tue, 26 Jan 2021 11:46:58 -0800 Message-ID: X-Mailer: git-send-email 2.30.0.windows.1 In-Reply-To: <20210126194710.2248-1-kun.q@outlook.com> References: <20210126194710.2248-1-kun.q@outlook.com> X-TMN: [j/YIe+JuWjHoO83qrwBmYCAvA3Ib/vzD] X-ClientProxiedBy: MWHPR11CA0001.namprd11.prod.outlook.com (2603:10b6:301:1::11) To MWHPR06MB3102.namprd06.prod.outlook.com (2603:10b6:301:3e::35) Return-Path: kun.q@outlook.com X-Microsoft-Original-Message-ID: <20210126194710.2248-6-kun.q@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (50.35.88.161) by MWHPR11CA0001.namprd11.prod.outlook.com (2603:10b6:301:1::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.14 via Frontend Transport; Tue, 26 Jan 2021 19:47:27 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 47 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: d39f54c1-fb77-4521-27e6-08d8c233361b X-MS-TrafficTypeDiagnostic: BN7NAM10HT136: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gI7bykKFoUGMW26AF9w5ztgmVZDtyr2hNdYJBOrDYNfLThvup7bJeaQEDn/OLUNP/j2pEubuk02BbiZLa6cqlbIgnw5dQLdbrVoYc/aL5z9dPhyhUu8PEXdffh3eiU/2czmVGN9eUtwD/j3+3Ozi3Ol/u5OW82KpuLWTBota96mdWAHv1DduiProaTb36nryA6xtcauIGnafbTlThxDAqbYoLpbautJDuuYakzaMGjNhJutmy6SMuFXPNWf/WhSF X-MS-Exchange-AntiSpam-MessageData: WTNjs0HMsKC3Ssp+sfWRYeXlpSpFQQp3HG8QmlzqcQeaVhvWsP/kTQxYXMhUgoYfIUR7UMC1x/waun3sGCdf655CITQAihNLLdAgbKXfkuLdLblHGKkzsJ5Q2QuNUFbxbbt0ITXVn9r9XmPP83/KrA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d39f54c1-fb77-4521-27e6-08d8c233361b X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2021 19:47:28.2143 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: BN7NAM10FT059.eop-nam10.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7NAM10HT136 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain This change added support of StandaloneMm for StatusCodeHandler. It adds a new instance of StatusCodeHandler of MM_STANDALONE type, and abstracts the driver entrypoint into separate files, replaced gSmst with gMmst, and switched to MM version of RscHandlerProtocol. Cc: Jian J Wang Cc: Hao A Wu Cc: Dandan Bi Cc: Liming Gao Cc: Jiewen Yao Signed-off-by: Kun Qin Reviewed-by: Hao A Wu --- Notes: v4: - Previously reviewed. No change. =20 v3: - Added reviewed-by tag [Hao] =20 v2: - New patch to support StatusCodeHandler in standalone mm [Liming] MdeModulePkg/Universal/StatusCodeHandler/Smm/MemoryStatusCodeWorker.c = | 36 ++++++++++---------- MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c = | 2 +- MdeModulePkg/Universal/StatusCodeHandler/Smm/{StatusCodeHandlerSmm.c =3D> = StatusCodeHandlerMm.c} | 23 +++++-------- MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerStandalone.c= | 31 +++++++++++++++++ MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerTraditional.= c | 31 +++++++++++++++++ MdeModulePkg/MdeModulePkg.dsc = | 1 + MdeModulePkg/Universal/StatusCodeHandler/Smm/{StatusCodeHandlerSmm.h =3D> = StatusCodeHandlerMm.h} | 23 ++++++++++--- MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf = | 15 ++++---- MdeModulePkg/Universal/StatusCodeHandler/Smm/{StatusCodeHandlerSmm.inf =3D= > StatusCodeHandlerStandaloneMm.inf} | 32 ++++++++--------- 9 files changed, 132 insertions(+), 62 deletions(-) diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Smm/MemoryStatusCodeW= orker.c b/MdeModulePkg/Universal/StatusCodeHandler/Smm/MemoryStatusCodeWork= er.c index c9b43fd2468f..14bac8ec3c18 100644 --- a/MdeModulePkg/Universal/StatusCodeHandler/Smm/MemoryStatusCodeWorker.c +++ b/MdeModulePkg/Universal/StatusCodeHandler/Smm/MemoryStatusCodeWorker.c @@ -7,15 +7,15 @@ =20 **/ =20 -#include "StatusCodeHandlerSmm.h" +#include "StatusCodeHandlerMm.h" =20 -RUNTIME_MEMORY_STATUSCODE_HEADER *mSmmMemoryStatusCodeTable; +RUNTIME_MEMORY_STATUSCODE_HEADER *mMmMemoryStatusCodeTable; =20 /** - Initialize SMM memory status code table as initialization for memory sta= tus code worker + Initialize MM memory status code table as initialization for memory stat= us code worker =20 - @retval EFI_SUCCESS SMM memory status code table successfully initializ= ed. - @retval others Errors from gSmst->SmmInstallConfigurationTable(). + @retval EFI_SUCCESS MM memory status code table successfully initialize= d. + @retval others Errors from gMmst->MmInstallConfigurationTable(). **/ EFI_STATUS MemoryStatusCodeInitializeWorker ( @@ -25,17 +25,17 @@ MemoryStatusCodeInitializeWorker ( EFI_STATUS Status; =20 // - // Allocate SMM memory status code pool. + // Allocate MM memory status code pool. // - mSmmMemoryStatusCodeTable =3D (RUNTIME_MEMORY_STATUSCODE_HEADER *)Alloca= teZeroPool (sizeof (RUNTIME_MEMORY_STATUSCODE_HEADER) + PcdGet16 (PcdStatus= CodeMemorySize) * 1024); - ASSERT (mSmmMemoryStatusCodeTable !=3D NULL); + mMmMemoryStatusCodeTable =3D (RUNTIME_MEMORY_STATUSCODE_HEADER *)Allocat= eZeroPool (sizeof (RUNTIME_MEMORY_STATUSCODE_HEADER) + PcdGet16 (PcdStatusC= odeMemorySize) * 1024); + ASSERT (mMmMemoryStatusCodeTable !=3D NULL); =20 - mSmmMemoryStatusCodeTable->MaxRecordsNumber =3D (PcdGet16 (PcdStatusCode= MemorySize) * 1024) / sizeof (MEMORY_STATUSCODE_RECORD); - Status =3D gSmst->SmmInstallConfigurationTable ( - gSmst, + mMmMemoryStatusCodeTable->MaxRecordsNumber =3D (PcdGet16 (PcdStatusCodeM= emorySize) * 1024) / sizeof (MEMORY_STATUSCODE_RECORD); + Status =3D gMmst->MmInstallConfigurationTable ( + gMmst, &gMemoryStatusCodeRecordGuid, - &mSmmMemoryStatusCodeTable, - sizeof (mSmmMemoryStatusCodeTable) + &mMmMemoryStatusCodeTable, + sizeof (mMmMemoryStatusCodeTable) ); return Status; } @@ -74,8 +74,8 @@ MemoryStatusCodeReportWorker ( // // Locate current record buffer. // - Record =3D (MEMORY_STATUSCODE_RECORD *) (mSmmMemoryStatusCodeTable + 1); - Record =3D &Record[mSmmMemoryStatusCodeTable->RecordIndex++]; + Record =3D (MEMORY_STATUSCODE_RECORD *) (mMmMemoryStatusCodeTable + 1); + Record =3D &Record[mMmMemoryStatusCodeTable->RecordIndex++]; =20 // // Save status code. @@ -92,12 +92,12 @@ MemoryStatusCodeReportWorker ( // so the first record is pointed by record index. // If it is less then max number, index of the first record is zero. // - mSmmMemoryStatusCodeTable->NumberOfRecords++; - if (mSmmMemoryStatusCodeTable->RecordIndex =3D=3D mSmmMemoryStatusCodeTa= ble->MaxRecordsNumber) { + mMmMemoryStatusCodeTable->NumberOfRecords++; + if (mMmMemoryStatusCodeTable->RecordIndex =3D=3D mMmMemoryStatusCodeTabl= e->MaxRecordsNumber) { // // Wrap around record index. // - mSmmMemoryStatusCodeTable->RecordIndex =3D 0; + mMmMemoryStatusCodeTable->RecordIndex =3D 0; } =20 return EFI_SUCCESS; diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeW= orker.c b/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWork= er.c index 3df0a6712611..bcb75bc7b170 100644 --- a/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c +++ b/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c @@ -6,7 +6,7 @@ =20 **/ =20 -#include "StatusCodeHandlerSmm.h" +#include "StatusCodeHandlerMm.h" =20 /** Convert status code value and extended data to readable ASCII string, se= nd string to serial I/O device. diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandler= Smm.c b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerMm.c similarity index 69% rename from MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerS= mm.c rename to MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerMm.= c index 20271571ded4..4948d3d99ad6 100644 --- a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.c +++ b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerMm.c @@ -1,15 +1,15 @@ /** @file Status Code Handler Driver which produces general handlers and hook them - onto the SMM status code router. + onto the MM status code router. =20 Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ =20 -#include "StatusCodeHandlerSmm.h" +#include "StatusCodeHandlerMm.h" =20 -EFI_SMM_RSC_HANDLER_PROTOCOL *mRscHandlerProtocol =3D NULL; +EFI_MM_RSC_HANDLER_PROTOCOL *mRscHandlerProtocol =3D NULL; =20 =20 /** @@ -42,27 +42,22 @@ InitializationDispatcherWorker ( } =20 /** - Entry point of SMM Status Code Driver. + Entry point of Common MM Status Code Driver. =20 - This function is the entry point of SMM Status Code Driver. - - @param ImageHandle The firmware allocated handle for the EFI imag= e. - @param SystemTable A pointer to the EFI System Table. + This function is the entry point of MM Status Code Driver. =20 @retval EFI_SUCCESS The entry point is executed successfully. =20 **/ EFI_STATUS -EFIAPI -StatusCodeHandlerSmmEntry ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable +StatusCodeHandlerCommonEntry ( + VOID ) { EFI_STATUS Status; =20 - Status =3D gSmst->SmmLocateProtocol ( - &gEfiSmmRscHandlerProtocolGuid, + Status =3D gMmst->MmLocateProtocol ( + &gEfiMmRscHandlerProtocolGuid, NULL, (VOID **) &mRscHandlerProtocol ); diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandler= Standalone.c b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandl= erStandalone.c new file mode 100644 index 000000000000..11a61705d612 --- /dev/null +++ b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerStandal= one.c @@ -0,0 +1,31 @@ +/** @file + Abstraction layer that contains Standalone MM specific implementation fo= r + Status Code Handler Driver. + + Copyright (c) Microsoft Corporation. + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include "StatusCodeHandlerMm.h" + +/** + Entry point of Standalone MM Status Code Driver. + + This function is the entry point of Standalone MM Status Code Driver. + + @param ImageHandle The firmware allocated handle for the EFI imag= e. + @param SystemTable A pointer to the EFI MM System Table. + + @retval EFI_SUCCESS The entry point is executed successfully. + +**/ +EFI_STATUS +EFIAPI +StatusCodeHandlerStandaloneMmEntry ( + IN EFI_HANDLE ImageHandle, + IN EFI_MM_SYSTEM_TABLE *SystemTable + ) +{ + return StatusCodeHandlerCommonEntry (); +} diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandler= Traditional.c b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHand= lerTraditional.c new file mode 100644 index 000000000000..1105f184b08e --- /dev/null +++ b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerTraditi= onal.c @@ -0,0 +1,31 @@ +/** @file + Abstraction layer that contains Standalone MM specific implementation fo= r + Status Code Handler Driver. + + Copyright (c) Microsoft Corporation. + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include "StatusCodeHandlerMm.h" + +/** + Entry point of Traditional MM Status Code Driver. + + This function is the entry point of Traditional MM Status Code Driver. + + @param ImageHandle The firmware allocated handle for the EFI imag= e. + @param SystemTable A pointer to the EFI System Table. + + @retval EFI_SUCCESS The entry point is executed successfully. + +**/ +EFI_STATUS +EFIAPI +StatusCodeHandlerTraditionalMmEntry ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + return StatusCodeHandlerCommonEntry (); +} diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc index 200fbcc18a18..098909490095 100644 --- a/MdeModulePkg/MdeModulePkg.dsc +++ b/MdeModulePkg/MdeModulePkg.dsc @@ -476,6 +476,7 @@ [Components.IA32, Components.X64] MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCodeLib.inf MdeModulePkg/Library/SmmReportStatusCodeLib/StandaloneMmReportStatusCode= Lib.inf MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf + MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerStandalone= Mm.inf MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouter= Smm.inf MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf MdeModulePkg/Library/SmmMemoryAllocationProfileLib/SmmMemoryAllocationPr= ofileLib.inf diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandler= Smm.h b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerMm.h similarity index 87% rename from MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerS= mm.h rename to MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerMm.= h index 6b5d53a4fee3..7871ee404046 100644 --- a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.h +++ b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerMm.h @@ -7,10 +7,10 @@ =20 **/ =20 -#ifndef __STATUS_CODE_HANDLER_SMM_H__ -#define __STATUS_CODE_HANDLER_SMM_H__ +#ifndef __STATUS_CODE_HANDLER_MM_H__ +#define __STATUS_CODE_HANDLER_MM_H__ =20 -#include +#include =20 #include #include @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -32,7 +32,7 @@ // #define MAX_DEBUG_MESSAGE_LENGTH 0x100 =20 -extern RUNTIME_MEMORY_STATUSCODE_HEADER *mSmmMemoryStatusCodeTable; +extern RUNTIME_MEMORY_STATUSCODE_HEADER *mMmMemoryStatusCodeTable; =20 /** Locates Serial I/O Protocol as initialization for serial status code wor= ker. @@ -114,4 +114,17 @@ MemoryStatusCodeReportWorker ( IN EFI_STATUS_CODE_DATA *Data OPTIONAL ); =20 +/** + Entry point of Common MM Status Code Driver. + + This function is the entry point of MM Status Code Driver. + + @retval EFI_SUCCESS The entry point is executed successfully. + +**/ +EFI_STATUS +StatusCodeHandlerCommonEntry ( + VOID + ); + #endif diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandler= Smm.inf b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm= .inf index 4e24d87e55d1..90abe662d291 100644 --- a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf +++ b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf @@ -1,5 +1,5 @@ ## @file -# Status Code Handler Driver which produces general handlers and hook the= m onto the SMM status code router. +# Status Code Handler Driver which produces general handlers and hook the= m onto the MM status code router. # # Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP
@@ -17,7 +17,7 @@ [Defines] MODULE_TYPE =3D DXE_SMM_DRIVER PI_SPECIFICATION_VERSION =3D 0x0001000A VERSION_STRING =3D 1.0 - ENTRY_POINT =3D StatusCodeHandlerSmmEntry + ENTRY_POINT =3D StatusCodeHandlerTraditionalMmEntry =20 # # The following information is for reference only and not required by the = build tools. @@ -26,8 +26,9 @@ [Defines] # =20 [Sources] - StatusCodeHandlerSmm.c - StatusCodeHandlerSmm.h + StatusCodeHandlerMm.c + StatusCodeHandlerMm.h + StatusCodeHandlerTraditional.c SerialStatusCodeWorker.c MemoryStatusCodeWorker.c =20 @@ -37,7 +38,7 @@ [Packages] =20 [LibraryClasses] SerialPortLib - SmmServicesTableLib + MmServicesTableLib UefiDriverEntryPoint PcdLib PrintLib @@ -51,7 +52,7 @@ [Guids] gMemoryStatusCodeRecordGuid ## SOMETIMES_PRODUCES ##= UNDEFINED # SmmSystemTable =20 [Protocols] - gEfiSmmRscHandlerProtocolGuid ## CONSUMES + gEfiMmRscHandlerProtocolGuid ## CONSUMES =20 [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial ## CONSUMES @@ -59,7 +60,7 @@ [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize |128| gEfiMdeModu= lePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## SOMETIMES_CONSUMES =20 [Depex] - gEfiSmmRscHandlerProtocolGuid + gEfiMmRscHandlerProtocolGuid =20 [UserExtensions.TianoCore."ExtraFiles"] StatusCodeHandlerSmmExtra.uni diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandler= Smm.inf b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSta= ndaloneMm.inf similarity index 62% copy from MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm= .inf copy to MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerStand= aloneMm.inf index 4e24d87e55d1..d7c863bf064c 100644 --- a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf +++ b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerStandal= oneMm.inf @@ -1,8 +1,9 @@ ## @file -# Status Code Handler Driver which produces general handlers and hook the= m onto the SMM status code router. +# Status Code Handler Driver which produces general handlers and hook the= m onto the MM status code router. # # Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP
+# Copyright (c) Microsoft Corporation. # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -11,13 +12,12 @@ =20 [Defines] INF_VERSION =3D 0x00010005 - BASE_NAME =3D StatusCodeHandlerSmm - MODULE_UNI_FILE =3D StatusCodeHandlerSmm.uni - FILE_GUID =3D 79CD78D8-6EDC-4978-BD02-3299C387AB17 - MODULE_TYPE =3D DXE_SMM_DRIVER - PI_SPECIFICATION_VERSION =3D 0x0001000A + BASE_NAME =3D StatusCodeHandlerStandaloneMm + FILE_GUID =3D EBE7802F-5E11-4D4E-B463-22D2425D156B + MODULE_TYPE =3D MM_STANDALONE + PI_SPECIFICATION_VERSION =3D 0x00010032 VERSION_STRING =3D 1.0 - ENTRY_POINT =3D StatusCodeHandlerSmmEntry + ENTRY_POINT =3D StatusCodeHandlerStandaloneMmEntry =20 # # The following information is for reference only and not required by the = build tools. @@ -26,8 +26,9 @@ [Defines] # =20 [Sources] - StatusCodeHandlerSmm.c - StatusCodeHandlerSmm.h + StatusCodeHandlerMm.c + StatusCodeHandlerMm.h + StatusCodeHandlerStandalone.c SerialStatusCodeWorker.c MemoryStatusCodeWorker.c =20 @@ -37,8 +38,8 @@ [Packages] =20 [LibraryClasses] SerialPortLib - SmmServicesTableLib - UefiDriverEntryPoint + MmServicesTableLib + StandaloneMmDriverEntryPoint PcdLib PrintLib ReportStatusCodeLib @@ -48,10 +49,10 @@ [LibraryClasses] =20 [Guids] gEfiStatusCodeDataTypeStringGuid ## SOMETIMES_CONSUMES ##= UNDEFINED - gMemoryStatusCodeRecordGuid ## SOMETIMES_PRODUCES ##= UNDEFINED # SmmSystemTable + gMemoryStatusCodeRecordGuid ## SOMETIMES_PRODUCES ##= UNDEFINED # MmSystemTable =20 [Protocols] - gEfiSmmRscHandlerProtocolGuid ## CONSUMES + gEfiMmRscHandlerProtocolGuid ## CONSUMES =20 [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial ## CONSUMES @@ -59,7 +60,4 @@ [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize |128| gEfiMdeModu= lePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## SOMETIMES_CONSUMES =20 [Depex] - gEfiSmmRscHandlerProtocolGuid - -[UserExtensions.TianoCore."ExtraFiles"] - StatusCodeHandlerSmmExtra.uni + gEfiMmRscHandlerProtocolGuid --=20 2.30.0.windows.1