From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 687A622361E76 for ; Thu, 8 Feb 2018 02:24:53 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Feb 2018 02:30:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,478,1511856000"; d="scan'208";a="18244589" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga002.fm.intel.com with ESMTP; 08 Feb 2018 02:30:37 -0800 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 8 Feb 2018 02:30:36 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 8 Feb 2018 02:30:35 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.124]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.116]) with mapi id 14.03.0319.002; Thu, 8 Feb 2018 18:30:34 +0800 From: "Zeng, Star" To: "Gao, Liming" , "edk2-devel@lists.01.org" CC: "Zeng, Star" Thread-Topic: [Patch] MdeModulePkg PeiCore: Add error message to describe PEIM load failure Thread-Index: AQHToLV1Axpak8a4FE2RYVM3jyH8bKOaR//A//9+koCAAIcuAA== Date: Thu, 8 Feb 2018 10:30:33 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103BA3DB9F@shsmsx102.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> In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E1C9D88@SHSMSX104.ccr.corp.intel.com> Accept-Language: zh-CN, 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:24:53 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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=20 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 PE= IM load failure Star: This change is to align Loading Driver in DXE phase. You can find below m= essage in DXE boot.=20 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 one >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 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(%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 loa= d 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