From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C1C0B22361E4D for ; Thu, 8 Feb 2018 02:34:02 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Feb 2018 02:39:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,478,1511856000"; d="scan'208";a="33090997" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga002.jf.intel.com with ESMTP; 08 Feb 2018 02:39:47 -0800 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 8 Feb 2018 02:39:46 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 8 Feb 2018 02:39:46 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.125]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.253]) with mapi id 14.03.0319.002; Thu, 8 Feb 2018 18:39:44 +0800 From: "Gao, Liming" To: "Zeng, Star" , "edk2-devel@lists.01.org" Thread-Topic: [Patch] MdeModulePkg PeiCore: Add error message to describe PEIM load failure Thread-Index: AQHToMU2b0vcglT6+0CYS7NC5cc3RKOaSsvQ//99QYCAAIbkwA== Date: Thu, 8 Feb 2018 10:39:44 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E1C9DCB@SHSMSX104.ccr.corp.intel.com> References: <1518077919-10176-1-git-send-email-liming.gao@intel.com> <0C09AFA07DD0434D9E2A0C6AEB0483103BA3DB37@shsmsx102.ccr.corp.intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E1C9D88@SHSMSX104.ccr.corp.intel.com> <0C09AFA07DD0434D9E2A0C6AEB0483103BA3DB9F@shsmsx102.ccr.corp.intel.com> In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103BA3DB9F@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] MdeModulePkg PeiCore: Add error message to describe PEIM load failure X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Feb 2018 10:34:03 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable They are reported in different phase. The first message is print before loa= d image. The second message is print after load image successfully. If load= image failure, only first message is print. So, I don't think we can combi= ne them.=20 >-----Original Message----- >From: Zeng, Star >Sent: Thursday, February 08, 2018 6:31 PM >To: Gao, Liming ; edk2-devel@lists.01.org >Cc: Zeng, Star >Subject: RE: [Patch] MdeModulePkg PeiCore: Add error message to describe >PEIM load failure > >How about combining it to one for DXE? >Either print FFS GUID or file name from PDB path, or both. > >Thanks, >Star >-----Original Message----- >From: Gao, Liming >Sent: Thursday, February 8, 2018 6:25 PM >To: Zeng, Star ; edk2-devel@lists.01.org >Subject: RE: [Patch] MdeModulePkg PeiCore: Add error message to describe >PEIM load failure > >Star: > This change is to align Loading Driver in DXE phase. You can find below >message in DXE boot. > >Loading driver 80CF7257-87AB-47F9-A3FE-D50B76D89541 >InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 88014240 >Loading driver at 0x00087FE6000 EntryPoint=3D0x00087FE70B4 PcdDxe.efi > >Thanks >Liming >>-----Original Message----- >>From: Zeng, Star >>Sent: Thursday, February 08, 2018 6:12 PM >>To: Gao, Liming ; edk2-devel@lists.01.org >>Cc: Zeng, Star >>Subject: RE: [Patch] MdeModulePkg PeiCore: Add error message to describe >>PEIM load failure >> >>Hi Liming, >> >>Because of new added "+ DEBUG ((DEBUG_INFO, "Loading PEIM %g\n", >>FileHandle));", the debug message will have two "Loading PEIM XXX" for on= e >>PEIM, that is very confusing. >>Loading PEIM 9B3ADA4F-AE56-4C24-8DEA-F03B7558AE50 >>Loading PEIM at 0x00002353000 EntryPoint=3D0x000003C10C5 PcdPeim.efi >> >>How about like below change? >>1. Also print FFS GUID when section alignment error. >>2. Print FFS GUID when PDB not found. >> >> >>fb0030045fe4ae561177d9cff01f32088ae9975e >> MdeModulePkg/Core/Pei/Image/Image.c | 10 +++++++++- >> 1 file changed, 9 insertions(+), 1 deletion(-) >> >>diff --git a/MdeModulePkg/Core/Pei/Image/Image.c >>b/MdeModulePkg/Core/Pei/Image/Image.c >>index 198541128512..179c77ef2194 100644 >>--- a/MdeModulePkg/Core/Pei/Image/Image.c >>+++ b/MdeModulePkg/Core/Pei/Image/Image.c >>@@ -1,7 +1,7 @@ >> /** @file >> Pei Core Load Image Support >> >>-Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
>>+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
>> This program and the accompanying materials >> are licensed and made available under the terms and conditions of the BS= D >>License >> which accompanies this distribution. The full text of the license may b= e >found >>at >>@@ -506,6 +506,9 @@ LoadAndRelocatePeCoffImage ( >> // >> Status =3D PeCoffLoaderLoadImage (&ImageContext); >> if (EFI_ERROR (Status)) { >>+ if (ImageContext.ImageError =3D=3D >>IMAGE_ERROR_INVALID_SECTION_ALIGNMENT) { >>+ DEBUG ((DEBUG_ERROR, "PEIM(%g) Image Address 0x%11p doesn't >>meet with section alignment 0x%x.\n", FileHandle, >>(VOID*)(UINTN)ImageContext.ImageAddress, >>ImageContext.SectionAlignment)); >>+ } >> return Status; >> } >> // >>@@ -707,6 +710,11 @@ PeiLoadImageLoadImage ( >> } >> >> DEBUG ((EFI_D_INFO | EFI_D_LOAD, "%a", EfiFileName)); >>+ } else { >>+ // >>+ // Print FFS GUID when PDB not found. >>+ // >>+ DEBUG ((EFI_D_INFO | EFI_D_LOAD, "%g", FileHandle)); >> } >> >> DEBUG_CODE_END (); >> >> >>Thanks, >>Star >>-----Original Message----- >>From: Gao, Liming >>Sent: Thursday, February 8, 2018 4:19 PM >>To: edk2-devel@lists.01.org >>Cc: Zeng, Star >>Subject: [Patch] MdeModulePkg PeiCore: Add error message to describe >>PEIM load failure >> >>If PEIM image address doesn't meet with its section alignment, it will lo= ad fail. >>PeiCore adds more debug message to report it. >> >>Contributed-under: TianoCore Contribution Agreement 1.1 >>Signed-off-by: Liming Gao >>Cc: Star Zeng >>--- >> MdeModulePkg/Core/Pei/Image/Image.c | 7 ++++++- >> 1 file changed, 6 insertions(+), 1 deletion(-) >> >>diff --git a/MdeModulePkg/Core/Pei/Image/Image.c >>b/MdeModulePkg/Core/Pei/Image/Image.c >>index 1985411..f41d3ac 100644 >>--- a/MdeModulePkg/Core/Pei/Image/Image.c >>+++ b/MdeModulePkg/Core/Pei/Image/Image.c >>@@ -1,7 +1,7 @@ >> /** @file >> Pei Core Load Image Support >> >>-Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
>>+Copyright (c) 2006 - 2018, 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 >>@@ -506,6 +506,9 @@ LoadAndRelocatePeCoffImage ( >> // >> Status =3D PeCoffLoaderLoadImage (&ImageContext); >> if (EFI_ERROR (Status)) { >>+ if (ImageContext.ImageError =3D=3D >>IMAGE_ERROR_INVALID_SECTION_ALIGNMENT) { >>+ DEBUG ((DEBUG_ERROR, "PEIM Image Address 0x%11p doesn't meet >>with section alignment 0x%x.\n", >>(VOID*)(UINTN)ImageContext.ImageAddress, >>ImageContext.SectionAlignment)); >>+ } >> return Status; >> } >> // >>@@ -612,6 +615,8 @@ PeiLoadImageLoadImage ( >> } >> } >> >>+ DEBUG ((DEBUG_INFO, "Loading PEIM %g\n", FileHandle)); >>+ >> // >> // If memory is installed, perform the shadow operations >> // >>-- >>2.8.0.windows.1