From 9338e230178599491a2de28ecaea8c6383eceeaf Mon Sep 17 00:00:00 2001 From: Bret Barkelew Date: Fri, 22 Mar 2019 11:07:18 +0800 Subject: [PATCH] MdeModulePkg/ResetSystemRuntimeDxe: Remove DoS3 in warm reset BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1462 Original logic is that checking the CapsuleUpdate variable and do the EnterS3WithImmediateWake if the system require a capsule update. The EnterS3WithImmediateWake is usually implemented in Platform ResetSystemLib instance and it may do some operation for capsule update. For now, thess preparations of capsule are platform reset notify functions' duty. Most platforms need flush cache to memory before warm reset during capsule update and this operation is added to capsule flow. So it is safe to remove it and do not affect the capsule update function. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhichao Gao Cc: Jian J Wang Cc: Hao Wu Cc: Ray Ni Cc: Star Zeng Cc: Liming Gao Reviewed-by: Liming Gao --- .../ResetSystemRuntimeDxe/ResetSystem.c | 38 ------------------- 1 file changed, 38 deletions(-) diff --git a/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.c b/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.c index 4c7107faea..36234f4d5b 100644 --- a/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.c +++ b/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.c @@ -206,22 +206,6 @@ InitializeResetSystem ( return Status; } -/** - Put the system into S3 power state. -**/ -VOID -DoS3 ( - VOID - ) -{ - EnterS3WithImmediateWake (); - - // - // Should not return - // - CpuDeadLoop (); -} - /** Resets the entire platform. @@ -249,9 +233,6 @@ RuntimeServiceResetSystem ( IN VOID *ResetData OPTIONAL ) { - EFI_STATUS Status; - UINTN Size; - UINTN CapsuleDataPtr; LIST_ENTRY *Link; RESET_NOTIFY_ENTRY *Entry; @@ -315,25 +296,6 @@ RuntimeServiceResetSystem ( switch (ResetType) { case EfiResetWarm: - // - //Check if there are pending capsules to process - // - Size = sizeof (CapsuleDataPtr); - Status = EfiGetVariable ( - EFI_CAPSULE_VARIABLE_NAME, - &gEfiCapsuleVendorGuid, - NULL, - &Size, - (VOID *) &CapsuleDataPtr - ); - - if (Status == EFI_SUCCESS) { - // - //Process capsules across a system reset. - // - DoS3(); - } - ResetWarm (); break; -- 2.39.2