From e4c83a4f9cad7f2c362727cdeb3f5daf297ec270 Mon Sep 17 00:00:00 2001 From: "Gao, Liming" Date: Thu, 13 Feb 2014 03:37:07 +0000 Subject: [PATCH] Fixed the issue in ExitBootServices() implementation to avoid the potential boot service usage after () after gCpu->DisableInterrupt (). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gao, Liming Reviewed-By: Olivier Martin Reviewed-by: Michael Kinney Reviewed-by: Zeng, Star git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15243 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c index 6d2ff82023..d8c7cd0249 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c +++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c @@ -1,7 +1,7 @@ /** @file DXE Core Main Entry Point -Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -741,6 +741,14 @@ CoreExitBootServices ( // CoreNotifySignalList (&gEfiEventExitBootServicesGuid); + // + // Report that ExitBootServices() has been called + // + REPORT_STATUS_CODE ( + EFI_PROGRESS_CODE, + (EFI_SOFTWARE_EFI_BOOT_SERVICE | EFI_SW_BS_PC_EXIT_BOOT_SERVICES) + ); + // // Disable interrupt of Debug timer. // @@ -751,14 +759,6 @@ CoreExitBootServices ( // gCpu->DisableInterrupt (gCpu); - // - // Report that ExitBootServices() has been called - // - REPORT_STATUS_CODE ( - EFI_PROGRESS_CODE, - (EFI_SOFTWARE_EFI_BOOT_SERVICE | EFI_SW_BS_PC_EXIT_BOOT_SERVICES) - ); - // // Clear the non-runtime values of the EFI System Table // -- 2.39.2