-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support the platform specific event hooks which can be customized. #469
Changes from 3 commits
eb5f430
9583959
9616cd8
6b44a25
ddab201
2cf4944
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
This file include the platform specific event hooks which can be customized by IBV/OEM. | ||
|
||
Copyright (C) Microsoft Corporation. All rights reserved. | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
|
||
**/ | ||
|
||
#ifndef _BDS_PLATFORM_EVENT_LIB_H_ | ||
#define _BDS_PLATFORM_EVENT_LIB_H_ | ||
|
||
/** | ||
The Hook Before End Of Dxe Event. it used for customized porting. | ||
**/ | ||
VOID | ||
BeforeEndOfDxeEventHook ( | ||
VOID | ||
); | ||
|
||
/** | ||
The Hook After End Of Dxe Event. it used for customized porting. | ||
**/ | ||
VOID | ||
AfterEndOfDxeEventHook ( | ||
VOID | ||
); | ||
|
||
/** | ||
The Hook Dispatch the deferred 3rd party images Event. it used for customized porting. | ||
**/ | ||
VOID | ||
AfterDispatchDeferredImagesHook ( | ||
VOID | ||
); | ||
|
||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** @file | ||
This file include the platform specific event hooks which can be customized by IBV/OEM. | ||
|
||
Copyright (C) Microsoft Corporation. All rights reserved. | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
|
||
**/ | ||
|
||
#include <Uefi.h> | ||
|
||
/** | ||
The Hook Before End Of Dxe Event. it used for customized porting. | ||
**/ | ||
VOID | ||
BeforeEndOfDxeEventHook ( | ||
VOID | ||
) | ||
{ | ||
return; | ||
} | ||
|
||
/** | ||
The Hook After End Of Dxe Event. it used for customized porting. | ||
**/ | ||
VOID | ||
AfterEndOfDxeEventHook ( | ||
VOID | ||
) | ||
{ | ||
return; | ||
} | ||
|
||
/** | ||
The Hook Dispatch the deferred 3rd party images Event. it used for customized porting. | ||
**/ | ||
VOID | ||
AfterDispatchDeferredImagesHook ( | ||
VOID | ||
) | ||
{ | ||
return; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** @file | ||
*This file include the platform specific event hooks which can be customized by IBV/OEM. | ||
|
||
Copyright (C) Microsoft Corporation. All rights reserved. | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
|
||
**/ | ||
|
||
|
||
[Defines] | ||
INF_VERSION = 0x00010018 | ||
BASE_NAME = BdsPlatformEventLibNull | ||
FILE_GUID = 55000994-06FB-43AB-A648-CD9CB2A7B273 | ||
VERSION_STRING = 1.0 | ||
MODULE_TYPE = DXE_DRIVER | ||
UEFI_SPECIFICATION_VERSION = 2.7 | ||
LIBRARY_CLASS = BdsPlatformEventLib|DXE_DRIVER | ||
|
||
# | ||
# The following information is for reference only and not required by the build tools. | ||
# | ||
# VALID_ARCHITECTURES = IA32 X64 EBC | ||
# | ||
|
||
[Sources] | ||
BdsPlatformEventLibNull.c | ||
|
||
[Packages] | ||
MdePkg/MdePkg.dec | ||
MdeModulePkg/MdeModulePkg.dec | ||
MsCorePkg/MsCorePkg.dec | ||
|
||
[LibraryClasses] | ||
BaseLib |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,11 +41,15 @@ ExitPmAuth ( | |
|
||
DEBUG ((DEBUG_INFO, "ExitPmAuth ()- Start\n")); | ||
|
||
BeforeEndOfDxeEventHook (); // MS_CHANGE | ||
|
||
// | ||
// Since PI1.2.1, we need signal EndOfDxe as ExitPmAuth | ||
// | ||
EfiEventGroupSignal (&gEfiEndOfDxeEventGroupGuid); | ||
|
||
AfterEndOfDxeEventHook (); // MS_CHANGE | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In practical cases, we would use these hooks to send platform-specific events to enable the functionality to be activated properly. Why I choose to use a library instead of send |
||
|
||
DEBUG ((DEBUG_INFO, "All EndOfDxe callbacks have returned successfully\n")); | ||
|
||
// | ||
|
@@ -267,6 +271,8 @@ PlatformBootManagerBeforeConsole ( | |
// Dispatch the deferred 3rd party images. | ||
// | ||
EfiBootManagerDispatchDeferredImages (); | ||
|
||
AfterDispatchDeferredImagesHook (); // MS_CHANGE | ||
} | ||
|
||
VOID | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is in MU_PLUS, we should not need to use
MS_CHANGE
tags in this PR.