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=star.zeng@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 A934322361E61 for ; Thu, 8 Feb 2018 17:57:55 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Feb 2018 18:03:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,481,1511856000"; d="scan'208";a="172915682" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga004.jf.intel.com with ESMTP; 08 Feb 2018 18:03:40 -0800 Received: from fmsmsx121.amr.corp.intel.com (10.18.125.36) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 8 Feb 2018 18:03:40 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx121.amr.corp.intel.com (10.18.125.36) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 8 Feb 2018 18:03:40 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.124]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.116]) with mapi id 14.03.0319.002; Fri, 9 Feb 2018 10:03:38 +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+koCAAIcuAP//fP0AgAGICAA= Date: Fri, 9 Feb 2018 02:03:37 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103BA3DDD6@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> <0C09AFA07DD0434D9E2A0C6AEB0483103BA3DB9F@shsmsx102.ccr.corp.intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E1C9DCB@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E1C9DCB@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: Fri, 09 Feb 2018 01:57:56 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Ok, got it. Reviewed-by: Star Zeng Thanks, Star -----Original Message----- From: Gao, Liming=20 Sent: Thursday, February 8, 2018 6:40 PM To: Zeng, Star ; edk2-devel@lists.01.org Subject: RE: [Patch] MdeModulePkg PeiCore: Add error message to describe PE= IM load failure 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=20 >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=20 >describe PEIM load failure > >Star: > This change is to align Loading Driver in DXE phase. You can find=20 >below message in DXE boot. > >Loading driver 80CF7257-87AB-47F9-A3FE-D50B76D89541 >InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 88014240=20 >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=20 >>describe PEIM load failure >> >>Hi Liming, >> >>Because of new added "+ DEBUG ((DEBUG_INFO, "Loading PEIM %g\n",=20 >>FileHandle));", the debug message will have two "Loading PEIM XXX" for=20 >>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=20 >>reserved.
>>+Copyright (c) 2006 - 2018, Intel Corporation. All rights=20 >>+reserved.
>> This program and the accompanying materials are licensed and made=20 >>available under the terms and conditions of the BSD License which=20 >>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,=20 >>(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=20 >>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=20 >>reserved.
>>+Copyright (c) 2006 - 2018, Intel Corporation. All rights=20 >>+reserved.
>> This program and the accompanying materials are licensed and made=20 >>available under the terms and conditions of the BSD License which=20 >>accompanies this distribution. The full text of the license may be=20 >>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