public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Liming Gao" <liming.gao@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"lersek@redhat.com" <lersek@redhat.com>,
	"Dong, Eric" <eric.dong@intel.com>,
	"Wu, Hao A" <hao.a.wu@intel.com>,
	"Wang, Jian J" <jian.j.wang@intel.com>,
	"Ni, Ray" <ray.ni@intel.com>
Cc: "Ard Biesheuvel" <ard.biesheuvel@linaro.org>,
	"Igor Mammedov" <imammedo@redhat.com>,
	"Yao, Jiewen" <jiewen.yao@intel.com>,
	"Justen, Jordan L" <jordan.l.justen@intel.com>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [edk2-devel] [PATCH v2 01/16] MdeModulePkg/PiSmmCore: log SMM image start failure
Date: Mon, 2 Mar 2020 12:55:34 +0000	[thread overview]
Message-ID: <a31765ccb4fb45d09f3dac6ff452a0e3@intel.com> (raw)
In-Reply-To: <7b5978a1-7127-f000-c655-31cf9097a80a@redhat.com>

Laszlo:
  The change refers to the same logic in DxeMain logic. So, it makes sense. Reviewed-by: Liming Gao <liming.gao@intel.com>

Thanks
Liming
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Laszlo Ersek
> Sent: Monday, March 2, 2020 8:47 PM
> To: Dong, Eric <eric.dong@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Ni, Ray
> <ray.ni@intel.com>
> Cc: edk2-devel-groups-io <devel@edk2.groups.io>; Ard Biesheuvel <ard.biesheuvel@linaro.org>; Igor Mammedov
> <imammedo@redhat.com>; Yao, Jiewen <jiewen.yao@intel.com>; Justen, Jordan L <jordan.l.justen@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>; Philippe Mathieu-Daudé <philmd@redhat.com>
> Subject: Re: [edk2-devel] [PATCH v2 01/16] MdeModulePkg/PiSmmCore: log SMM image start failure
> 
> Jian, Hao, Eric, Ray,
> 
> this patch is trivial; can one of you please ACK it?
> 
> Thanks
> Laszlo
> 
> On 02/26/20 23:11, Laszlo Ersek wrote:
> > In the CoreStartImage() function [MdeModulePkg/Core/Dxe/Image/Image.c], if
> > the image entry point returns a failure code, then the DXE Core logs a
> > helpful DEBUG_ERROR message, with the following format string:
> >
> >   "Error: Image at %11p start failed: %r\n"
> >
> > Do similarly in the SMM Core (update the message slightly).
> >
> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > Cc: Eric Dong <eric.dong@intel.com>
> > Cc: Hao A Wu <hao.a.wu@intel.com>
> > Cc: Igor Mammedov <imammedo@redhat.com>
> > Cc: Jian J Wang <jian.j.wang@intel.com>
> > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > Cc: Jordan Justen <jordan.l.justen@intel.com>
> > Cc: Michael Kinney <michael.d.kinney@intel.com>
> > Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
> > Cc: Ray Ni <ray.ni@intel.com>
> > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1512
> > Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> > Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > ---
> >
> > Notes:
> >     v2:
> >
> >     - Pick up Ard's Acked-by, which is conditional on approval from Intel
> >       reviewers on Cc. (I'd like to save Ard the churn of re-acking
> >       unmodified patches.)
> >
> >  MdeModulePkg/Core/PiSmmCore/Dispatcher.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/MdeModulePkg/Core/PiSmmCore/Dispatcher.c b/MdeModulePkg/Core/PiSmmCore/Dispatcher.c
> > index 9bec731e5312..76ee9e0b89cc 100644
> > --- a/MdeModulePkg/Core/PiSmmCore/Dispatcher.c
> > +++ b/MdeModulePkg/Core/PiSmmCore/Dispatcher.c
> > @@ -883,44 +883,50 @@ SmmDispatcher (
> >        RemoveEntryList (&DriverEntry->ScheduledLink);
> >
> >        REPORT_STATUS_CODE_WITH_EXTENDED_DATA (
> >          EFI_PROGRESS_CODE,
> >          EFI_SOFTWARE_SMM_DRIVER | EFI_SW_PC_INIT_BEGIN,
> >          &DriverEntry->ImageHandle,
> >          sizeof (DriverEntry->ImageHandle)
> >          );
> >
> >        //
> >        // Cache state of SmmEntryPointRegistered before calling entry point
> >        //
> >        PreviousSmmEntryPointRegistered = gSmmCorePrivate->SmmEntryPointRegistered;
> >
> >        //
> >        // For each SMM driver, pass NULL as ImageHandle
> >        //
> >        RegisterSmramProfileImage (DriverEntry, TRUE);
> >        PERF_START_IMAGE_BEGIN (DriverEntry->ImageHandle);
> >        Status = ((EFI_IMAGE_ENTRY_POINT)(UINTN)DriverEntry->ImageEntryPoint)(DriverEntry->ImageHandle, gST);
> >        PERF_START_IMAGE_END (DriverEntry->ImageHandle);
> >        if (EFI_ERROR(Status)){
> > +        DEBUG ((
> > +          DEBUG_ERROR,
> > +          "Error: SMM image at %11p start failed: %r\n",
> > +          DriverEntry->SmmLoadedImage.ImageBase,
> > +          Status
> > +          ));
> >          UnregisterSmramProfileImage (DriverEntry, TRUE);
> >          SmmFreePages(DriverEntry->ImageBuffer, DriverEntry->NumberOfPage);
> >          //
> >          // Uninstall LoadedImage
> >          //
> >          Status = gBS->UninstallProtocolInterface (
> >                          DriverEntry->ImageHandle,
> >                          &gEfiLoadedImageProtocolGuid,
> >                          DriverEntry->LoadedImage
> >                          );
> >          if (!EFI_ERROR (Status)) {
> >            if (DriverEntry->LoadedImage->FilePath != NULL) {
> >              gBS->FreePool (DriverEntry->LoadedImage->FilePath);
> >            }
> >            gBS->FreePool (DriverEntry->LoadedImage);
> >          }
> >          Status = SmmUninstallProtocolInterface (
> >                     DriverEntry->SmmImageHandle,
> >                     &gEfiLoadedImageProtocolGuid,
> >                     &DriverEntry->SmmLoadedImage
> >                     );
> >          if (!EFI_ERROR(Status)) {
> >
> 
> 
> 


  reply	other threads:[~2020-03-02 12:55 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26 22:11 [PATCH v2 00/16] OvmfPkg: support VCPU hotplug with -D SMM_REQUIRE Laszlo Ersek
2020-02-26 22:11 ` [PATCH v2 01/16] MdeModulePkg/PiSmmCore: log SMM image start failure Laszlo Ersek
2020-03-02 12:47   ` [edk2-devel] " Laszlo Ersek
2020-03-02 12:55     ` Liming Gao [this message]
2020-03-02 13:46   ` Philippe Mathieu-Daudé
2020-03-03  0:46   ` Dong, Eric
2020-02-26 22:11 ` [PATCH v2 02/16] UefiCpuPkg/PiSmmCpuDxeSmm: fix S3 Resume for CPU hotplug Laszlo Ersek
2020-02-28  3:05   ` [edk2-devel] " Dong, Eric
2020-02-28 10:50     ` Laszlo Ersek
2020-03-04 12:23     ` Laszlo Ersek
2020-03-04 14:36       ` Dong, Eric
2020-02-26 22:11 ` [PATCH v2 03/16] OvmfPkg: clone SmmCpuPlatformHookLib from UefiCpuPkg Laszlo Ersek
2020-03-02 13:27   ` Ard Biesheuvel
2020-03-02 13:49   ` Philippe Mathieu-Daudé
2020-02-26 22:11 ` [PATCH v2 04/16] OvmfPkg: enable SMM Monarch Election in PiSmmCpuDxeSmm Laszlo Ersek
2020-03-02 13:32   ` Ard Biesheuvel
2020-02-26 22:11 ` [PATCH v2 05/16] OvmfPkg: enable CPU hotplug support " Laszlo Ersek
2020-03-02 13:33   ` Ard Biesheuvel
2020-02-26 22:11 ` [PATCH v2 06/16] OvmfPkg/CpuHotplugSmm: introduce skeleton for CPU Hotplug SMM driver Laszlo Ersek
2020-03-02 13:44   ` Ard Biesheuvel
2020-02-26 22:11 ` [PATCH v2 07/16] OvmfPkg/CpuHotplugSmm: add hotplug register block helper functions Laszlo Ersek
2020-03-02 13:24   ` Philippe Mathieu-Daudé
2020-03-02 13:45   ` [edk2-devel] " Ard Biesheuvel
2020-02-26 22:11 ` [PATCH v2 08/16] OvmfPkg/CpuHotplugSmm: define the QEMU_CPUHP_CMD_GET_ARCH_ID macro Laszlo Ersek
2020-03-02 13:22   ` Philippe Mathieu-Daudé
2020-03-02 13:45   ` Ard Biesheuvel
2020-02-26 22:11 ` [PATCH v2 09/16] OvmfPkg/CpuHotplugSmm: add function for collecting CPUs with events Laszlo Ersek
2020-03-02 13:49   ` Ard Biesheuvel
2020-03-02 20:34   ` Philippe Mathieu-Daudé
2020-03-03 10:31     ` Laszlo Ersek
2020-02-26 22:11 ` [PATCH v2 10/16] OvmfPkg/CpuHotplugSmm: collect " Laszlo Ersek
2020-03-02 13:58   ` Ard Biesheuvel
2020-02-26 22:11 ` [PATCH v2 11/16] OvmfPkg/CpuHotplugSmm: introduce Post-SMM Pen for hot-added CPUs Laszlo Ersek
2020-03-02 14:02   ` [edk2-devel] " Ard Biesheuvel
2020-02-26 22:11 ` [PATCH v2 12/16] OvmfPkg/CpuHotplugSmm: introduce First SMI Handler " Laszlo Ersek
2020-03-02 14:03   ` Ard Biesheuvel
2020-02-26 22:11 ` [PATCH v2 13/16] OvmfPkg/CpuHotplugSmm: complete root MMI handler for CPU hotplug Laszlo Ersek
2020-03-02 14:05   ` Ard Biesheuvel
2020-02-26 22:11 ` [PATCH v2 14/16] OvmfPkg: clone CpuS3DataDxe from UefiCpuPkg Laszlo Ersek
2020-03-02 13:44   ` Philippe Mathieu-Daudé
2020-03-02 14:06   ` Ard Biesheuvel
2020-02-26 22:11 ` [PATCH v2 15/16] OvmfPkg/CpuS3DataDxe: superficial cleanups Laszlo Ersek
2020-03-02 13:25   ` Philippe Mathieu-Daudé
2020-03-02 14:06   ` Ard Biesheuvel
2020-02-26 22:11 ` [PATCH v2 16/16] OvmfPkg/CpuS3DataDxe: enable S3 resume after CPU hotplug Laszlo Ersek
2020-03-02 14:16   ` Ard Biesheuvel
2020-03-02 15:46 ` [edk2-devel] [PATCH v2 00/16] OvmfPkg: support VCPU hotplug with -D SMM_REQUIRE Boris Ostrovsky
2020-03-02 19:22   ` Laszlo Ersek
2020-03-02 19:59 ` Laszlo Ersek
2020-03-04 13:29   ` Philippe Mathieu-Daudé
2020-03-04 18:09     ` Laszlo Ersek
2020-03-04 12:29 ` Laszlo Ersek
2020-03-05  8:32   ` Laszlo Ersek

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=a31765ccb4fb45d09f3dac6ff452a0e3@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