}\r
\r
/**\r
-\r
- This routine is a notification function for legayc boot or exit boot\r
- service event. It will adjust the memory information for different\r
- memory type and save them into the variables for next boot.\r
-\r
-\r
- @param Event The event that triggered this notification function.\r
- @param Context Pointer to the notification functions context.\r
-\r
+ This routine adjust the memory information for different memory type and \r
+ save them into the variables for next boot.\r
**/\r
VOID\r
-EFIAPI\r
BdsSetMemoryTypeInformationVariable (\r
- EFI_EVENT Event,\r
- VOID *Context\r
+ VOID\r
)\r
{\r
EFI_STATUS Status;\r
// so the new Memory Type Information setting will be used to guarantee that an S4\r
// entry/resume cycle will not fail.\r
//\r
- if (MemoryTypeInformationModified) {\r
- DEBUG ((EFI_D_ERROR, "Memory Type Information settings change. Warm Reset!!!\n"));\r
+ if (MemoryTypeInformationModified && PcdGetBool (PcdResetOnMemoryTypeInformationChange)) {\r
+ DEBUG ((EFI_D_INFO, "Memory Type Information settings change. Warm Reset!!!\n"));\r
gRT->ResetSystem (EfiResetWarm, EFI_SUCCESS, 0, NULL);\r
}\r
}\r
}\r
\r
/**\r
- This routine register a function to adjust the different type memory page number\r
- just before booting and save the updated info into the variable for next boot to use.\r
-\r
+ This routine is kept for backward compatibility.\r
**/\r
VOID\r
EFIAPI\r
VOID\r
)\r
{\r
- EFI_STATUS Status;\r
- EFI_EVENT ReadyToBootEvent;\r
-\r
- Status = EfiCreateEventReadyToBootEx (\r
- TPL_CALLBACK,\r
- BdsSetMemoryTypeInformationVariable,\r
- NULL,\r
- &ReadyToBootEvent\r
- );\r
- if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR,"Bds Set Memory Type Informationa Variable Fails\n"));\r
- }\r
}\r
\r
\r