From: "Yao, Jiewen" <jiewen.yao@intel.com>
To: "Wu, Hao A" <hao.a.wu@intel.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
"Ni, Ruiyu" <ruiyu.ni@intel.com>,
"Dong, Eric" <eric.dong@intel.com>,
"Zeng, Star" <star.zeng@intel.com>
Subject: Re: [PATCH] MdeModulePkg/DxeMain: Fix BSP interrupts reenabled in ExitBootServices
Date: Mon, 19 Mar 2018 07:21:17 +0000 [thread overview]
Message-ID: <108573C7-B03F-4874-9314-EB689ED6E6BC@intel.com> (raw)
In-Reply-To: <20180319071509.16380-1-hao.a.wu@intel.com>
reviewed-by: jiewen.yao@intel.com
thank you!
Yao, Jiewen
> 在 2018年3月19日,下午3:15,Hao Wu <hao.a.wu@intel.com> 写道:
>
> Within function CoreExitBootServices(), this commit will move the call
> of:
>
> MemoryProtectionExitBootServicesCallback();
>
> before:
>
> SaveAndSetDebugTimerInterrupt (FALSE);
> and
> gCpu->DisableInterrupt (gCpu);
>
> The reason is that, within MemoryProtectionExitBootServicesCallback(),
> APIs like RaiseTpl and RestoreTpl maybe called. An example will be:
>
> DebugLib (using PeiDxeDebugLibReportStatusCode instance)
> |
> v
> ReportStatusCodeLib (using DxeReportStatusCodeLib instance)
> |
> v
> Raise/RestoreTpl
>
> The call of Raise/RestoreTpl APIs will re-enable BSP interrupts. Hence,
> this commit refine the calling sequence to ensure BSP interrupts before
> leaving CoreExitBootServices().
>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Star Zeng <star.zeng@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Hao Wu <hao.a.wu@intel.com>
> ---
> MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
> index 62a597edaf..07c7403462 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 - 2017, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
> 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
> @@ -805,6 +805,8 @@ CoreExitBootServices (
> (EFI_SOFTWARE_EFI_BOOT_SERVICE | EFI_SW_BS_PC_EXIT_BOOT_SERVICES)
> );
>
> + MemoryProtectionExitBootServicesCallback();
> +
> //
> // Disable interrupt of Debug timer.
> //
> @@ -815,8 +817,6 @@ CoreExitBootServices (
> //
> gCpu->DisableInterrupt (gCpu);
>
> - MemoryProtectionExitBootServicesCallback();
> -
> //
> // Clear the non-runtime values of the EFI System Table
> //
> --
> 2.12.0.windows.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
next prev parent reply other threads:[~2018-03-19 7:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-19 7:15 [PATCH] MdeModulePkg/DxeMain: Fix BSP interrupts reenabled in ExitBootServices Hao Wu
2018-03-19 7:21 ` Yao, Jiewen [this message]
2018-03-19 9:39 ` Ni, Ruiyu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=108573C7-B03F-4874-9314-EB689ED6E6BC@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox