MdeModulePkg/ResetSystemPei: Add reset notifications in PEI
The Reset Notification protocol is added in UEFI spec to support
reset notification mechanism in the DXE phase.
This patch adds similar EDKII specific Reset Notification PPI to PEI
phase to provide the same support.
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
(cherry picked from commit ce2697abeb
)
This commit is contained in:
@@ -25,6 +25,7 @@ EFI_PEI_RESET2_PPI mPpiReset2 = {
|
||||
|
||||
EFI_GUID *mProcessingOrder[] = {
|
||||
&gEdkiiPlatformSpecificResetFilterPpiGuid,
|
||||
&gEdkiiPlatformSpecificResetNotificationPpiGuid,
|
||||
&gEdkiiPlatformSpecificResetHandlerPpiGuid
|
||||
};
|
||||
|
||||
@@ -36,6 +37,14 @@ RESET_FILTER_INSTANCE mResetFilter = {
|
||||
&gEdkiiPlatformSpecificResetFilterPpiGuid
|
||||
};
|
||||
|
||||
RESET_FILTER_INSTANCE mResetNotification = {
|
||||
{
|
||||
RegisterResetNotify,
|
||||
UnregisterResetNotify
|
||||
},
|
||||
&gEdkiiPlatformSpecificResetNotificationPpiGuid
|
||||
};
|
||||
|
||||
RESET_FILTER_INSTANCE mResetHandler = {
|
||||
{
|
||||
RegisterResetNotify,
|
||||
@@ -55,6 +64,11 @@ EFI_PEI_PPI_DESCRIPTOR mPpiListReset[] = {
|
||||
&gEdkiiPlatformSpecificResetFilterPpiGuid,
|
||||
&mResetFilter.ResetFilter
|
||||
},
|
||||
{
|
||||
EFI_PEI_PPI_DESCRIPTOR_PPI,
|
||||
&gEdkiiPlatformSpecificResetNotificationPpiGuid,
|
||||
&mResetNotification.ResetFilter
|
||||
},
|
||||
{
|
||||
EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
|
||||
&gEdkiiPlatformSpecificResetHandlerPpiGuid,
|
||||
@@ -101,6 +115,7 @@ RegisterResetNotify (
|
||||
|
||||
ResetFilter = (RESET_FILTER_INSTANCE *) This;
|
||||
ASSERT (CompareGuid (ResetFilter->Guid, &gEdkiiPlatformSpecificResetFilterPpiGuid) ||
|
||||
CompareGuid (ResetFilter->Guid, &gEdkiiPlatformSpecificResetNotificationPpiGuid) ||
|
||||
CompareGuid (ResetFilter->Guid, &gEdkiiPlatformSpecificResetHandlerPpiGuid)
|
||||
);
|
||||
|
||||
@@ -187,6 +202,7 @@ UnregisterResetNotify (
|
||||
|
||||
ResetFilter = (RESET_FILTER_INSTANCE *)This;
|
||||
ASSERT (CompareGuid (ResetFilter->Guid, &gEdkiiPlatformSpecificResetFilterPpiGuid) ||
|
||||
CompareGuid (ResetFilter->Guid, &gEdkiiPlatformSpecificResetNotificationPpiGuid) ||
|
||||
CompareGuid (ResetFilter->Guid, &gEdkiiPlatformSpecificResetHandlerPpiGuid)
|
||||
);
|
||||
|
||||
|
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <Ppi/Reset2.h>
|
||||
#include <Ppi/PlatformSpecificResetFilter.h>
|
||||
#include <Ppi/PlatformSpecificResetNotification.h>
|
||||
#include <Ppi/PlatformSpecificResetHandler.h>
|
||||
|
||||
#include <Library/BaseLib.h>
|
||||
|
@@ -48,9 +48,10 @@
|
||||
ReportStatusCodeLib
|
||||
|
||||
[Ppis]
|
||||
gEfiPeiReset2PpiGuid ## PRODUCES
|
||||
gEdkiiPlatformSpecificResetFilterPpiGuid ## PRODUCES
|
||||
gEdkiiPlatformSpecificResetHandlerPpiGuid ## PRODUCES
|
||||
gEfiPeiReset2PpiGuid ## PRODUCES
|
||||
gEdkiiPlatformSpecificResetFilterPpiGuid ## PRODUCES
|
||||
gEdkiiPlatformSpecificResetHandlerPpiGuid ## PRODUCES
|
||||
gEdkiiPlatformSpecificResetNotificationPpiGuid ## PRODUCES
|
||||
|
||||
[Pcd]
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdMaximumPeiResetNotifies
|
||||
|
Reference in New Issue
Block a user