-
Notifications
You must be signed in to change notification settings - Fork 461
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MinPlatformPkg/Acpi/AcpiSmm: Add Standalone MM support
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3248 Adds a new module called AcpiStandaloneMm that serves the same role as AcpiSmm but in a Standalone MM environment. This change follows a similar pattern to other changes that have added Standalone MM support to a SMM module. The SMM INF name and file path remain unaltered to allow backward compatibility and much of the code is shared between the driver instances with unique entry points for each respective module type. Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Eric Dong <eric.dong@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
- Loading branch information
1 parent
e84d6a8
commit 3250973
Showing
8 changed files
with
164 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** @file | ||
Internal header file for the ACPI MM driver. | ||
Copyright (c) 2017, Intel Corporation. All rights reserved.<BR> | ||
Copyright (c) Microsoft Corporation.<BR> | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
**/ | ||
|
||
#ifndef _ACPI_MM_H_ | ||
#define _ACPI_MM_H_ | ||
|
||
/** | ||
ACPI initialization logic shared between the Traditional MM and | ||
Standalone MM driver instances. | ||
**/ | ||
VOID | ||
InitializeAcpiMm ( | ||
VOID | ||
); | ||
|
||
#endif |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
Platform/Intel/MinPlatformPkg/Acpi/AcpiSmm/AcpiStandaloneMm.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** @file | ||
Standalone MM driver for ACPI initialization. | ||
Copyright (c) 2017, Intel Corporation. All rights reserved.<BR> | ||
Copyright (c) Microsoft Corporation.<BR> | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
**/ | ||
|
||
#include <PiMm.h> | ||
|
||
#include "AcpiMm.h" | ||
|
||
/** | ||
The Standalone MM driver entry point. | ||
@param[in] ImageHandle - Pointer to the loaded image protocol for this driver | ||
@param[in] SystemTable - Pointer to the EFI MM System Table | ||
@retval Status - EFI_SUCCESS | ||
@retval Assert, otherwise. | ||
**/ | ||
EFI_STATUS | ||
EFIAPI | ||
AcpiStandaloneMmEntryPoint ( | ||
IN EFI_HANDLE ImageHandle, | ||
IN EFI_MM_SYSTEM_TABLE *MmSystemTable | ||
) | ||
{ | ||
InitializeAcpiMm (); | ||
|
||
return EFI_SUCCESS; | ||
} |
46 changes: 46 additions & 0 deletions
46
Platform/Intel/MinPlatformPkg/Acpi/AcpiSmm/AcpiStandaloneMm.inf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
### @file | ||
# Component information file for ACPI Standalone MM module. | ||
# | ||
# Copyright (c) 2017, Intel Corporation. All rights reserved.<BR> | ||
# Copyright (c) Microsoft Corporation.<BR> | ||
# | ||
# SPDX-License-Identifier: BSD-2-Clause-Patent | ||
# | ||
### | ||
|
||
[Defines] | ||
INF_VERSION = 0x00010017 | ||
BASE_NAME = AcpiStandaloneMm | ||
FILE_GUID = F113611F-DEE7-4137-8623-0168675E9F6D | ||
VERSION_STRING = 1.0 | ||
MODULE_TYPE = MM_STANDALONE | ||
PI_SPECIFICATION_VERSION = 0x00010032 | ||
ENTRY_POINT = AcpiStandaloneMmEntryPoint | ||
|
||
[LibraryClasses] | ||
BoardAcpiEnableLib | ||
DebugLib | ||
MmServicesTableLib | ||
PcdLib | ||
StandaloneMmDriverEntryPoint | ||
|
||
[Packages] | ||
MdePkg/MdePkg.dec | ||
MinPlatformPkg/MinPlatformPkg.dec | ||
|
||
# Note: All PCDs consumed in the Standalone MM instance must be either FixedAtBuild | ||
# or PatchableInModule | ||
[Pcd] | ||
gMinPlatformPkgTokenSpaceGuid.PcdAcpiEnableSwSmi ## CONSUMES | ||
gMinPlatformPkgTokenSpaceGuid.PcdAcpiDisableSwSmi ## CONSUMES | ||
|
||
[Sources] | ||
AcpiMm.h | ||
AcpiMm.c | ||
AcpiStandaloneMm.c | ||
|
||
[Protocols] | ||
gEfiSmmSwDispatch2ProtocolGuid ## CONSUMES | ||
|
||
[Depex] | ||
gEfiSmmSwDispatch2ProtocolGuid |
34 changes: 34 additions & 0 deletions
34
Platform/Intel/MinPlatformPkg/Acpi/AcpiSmm/AcpiTraditionalMm.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** @file | ||
Traditional MM driver for ACPI initialization. | ||
Copyright (c) 2017, Intel Corporation. All rights reserved.<BR> | ||
Copyright (c) Microsoft Corporation.<BR> | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
**/ | ||
|
||
#include <PiMm.h> | ||
|
||
#include "AcpiMm.h" | ||
|
||
/** | ||
The Traditional MM driver entry point. | ||
@param[in] ImageHandle - Pointer to the loaded image protocol for this driver | ||
@param[in] SystemTable - Pointer to the EFI System Table | ||
@retval Status - EFI_SUCCESS | ||
@retval Assert, otherwise. | ||
**/ | ||
EFI_STATUS | ||
EFIAPI | ||
AcpiTraditionalMmEntryPoint ( | ||
IN EFI_HANDLE ImageHandle, | ||
IN EFI_SYSTEM_TABLE *SystemTable | ||
) | ||
{ | ||
InitializeAcpiMm (); | ||
|
||
return EFI_SUCCESS; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters