mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-28 16:14:04 +02:00
MdeModulePkg/UefiBootManagerLib: Always create MemoryTypeInfo variable
Align to old BDS behavior (IntelFrameworkModulePkg/BDS) to always create MemoryTypeInfo variable regardless of the PcdResetOnMemoryTypeInformationChange value. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18926 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
63a9e0d6f9
commit
665b26ba33
@ -1765,11 +1765,9 @@ EfiBootManagerBoot (
|
|||||||
// 6. Adjust the different type memory page number just before booting
|
// 6. Adjust the different type memory page number just before booting
|
||||||
// and save the updated info into the variable for next boot to use
|
// and save the updated info into the variable for next boot to use
|
||||||
//
|
//
|
||||||
if ((BootOption->Attributes & LOAD_OPTION_CATEGORY) == LOAD_OPTION_CATEGORY_BOOT) {
|
BmSetMemoryTypeInformationVariable (
|
||||||
if (PcdGetBool (PcdResetOnMemoryTypeInformationChange)) {
|
(BOOLEAN) ((BootOption->Attributes & LOAD_OPTION_CATEGORY) == LOAD_OPTION_CATEGORY_BOOT)
|
||||||
BmSetMemoryTypeInformationVariable ();
|
);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DEBUG_CODE_BEGIN();
|
DEBUG_CODE_BEGIN();
|
||||||
if (BootOption->Description == NULL) {
|
if (BootOption->Description == NULL) {
|
||||||
|
@ -122,11 +122,16 @@ BmMatchDevicePaths (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
This routine adjust the memory information for different memory type and
|
This routine adjust the memory information for different memory type and
|
||||||
save them into the variables for next boot.
|
save them into the variables for next boot. It resets the system when
|
||||||
|
memory information is updated and the current boot option belongs to
|
||||||
|
boot category instead of application category.
|
||||||
|
|
||||||
|
@param Boot TRUE if current boot option belongs to boot category instead of
|
||||||
|
application category.
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
BmSetMemoryTypeInformationVariable (
|
BmSetMemoryTypeInformationVariable (
|
||||||
VOID
|
IN BOOLEAN Boot
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
@ -267,11 +272,11 @@ BmSetMemoryTypeInformationVariable (
|
|||||||
|
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
//
|
//
|
||||||
// If the Memory Type Information settings have been modified, then reset the platform
|
// If the Memory Type Information settings have been modified and the boot option belongs to boot category,
|
||||||
// so the new Memory Type Information setting will be used to guarantee that an S4
|
// then reset the platform so the new Memory Type Information setting will be used to guarantee that an S4
|
||||||
// entry/resume cycle will not fail.
|
// entry/resume cycle will not fail.
|
||||||
//
|
//
|
||||||
if (MemoryTypeInformationModified) {
|
if (MemoryTypeInformationModified && Boot && PcdGetBool (PcdResetOnMemoryTypeInformationChange)) {
|
||||||
DEBUG ((EFI_D_INFO, "Memory Type Information settings change. Warm Reset!!!\n"));
|
DEBUG ((EFI_D_INFO, "Memory Type Information settings change. Warm Reset!!!\n"));
|
||||||
gRT->ResetSystem (EfiResetWarm, EFI_SUCCESS, 0, NULL);
|
gRT->ResetSystem (EfiResetWarm, EFI_SUCCESS, 0, NULL);
|
||||||
}
|
}
|
||||||
|
@ -245,11 +245,16 @@ BmGetImageHeader (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
This routine adjust the memory information for different memory type and
|
This routine adjust the memory information for different memory type and
|
||||||
save them into the variables for next boot.
|
save them into the variables for next boot. It resets the system when
|
||||||
|
memory information is updated and the current boot option belongs to
|
||||||
|
boot category instead of application category.
|
||||||
|
|
||||||
|
@param Boot TRUE if current boot option belongs to boot category instead of
|
||||||
|
application category.
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
BmSetMemoryTypeInformationVariable (
|
BmSetMemoryTypeInformationVariable (
|
||||||
VOID
|
IN BOOLEAN Boot
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user