From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (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 7F0FE22361E45 for ; Thu, 8 Feb 2018 02:26:07 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 15B87C058ED4; Thu, 8 Feb 2018 10:31:52 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-94.phx2.redhat.com [10.3.116.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3EF0860BE0; Thu, 8 Feb 2018 10:31:51 +0000 (UTC) To: "Gao, Liming" , "edk2-devel@lists.01.org" Cc: "Zeng, Star" References: <1518077919-10176-1-git-send-email-liming.gao@intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E1C9D79@SHSMSX104.ccr.corp.intel.com> From: Laszlo Ersek Message-ID: Date: Thu, 8 Feb 2018 11:31:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E1C9D79@SHSMSX104.ccr.corp.intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 08 Feb 2018 10:31:52 +0000 (UTC) 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:26:08 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 02/08/18 11:24, Gao, Liming wrote: > Laszlo: > 11p address is big to cover most real address. It can align and save the message length. Good point, it can go up to 2^44 - 1, covering 16 TB of RAM. Thanks Laszlo > Thanks > Liming >> -----Original Message----- >> From: Laszlo Ersek [mailto:lersek@redhat.com] >> Sent: Thursday, February 08, 2018 5:31 PM >> To: Gao, Liming ; edk2-devel@lists.01.org >> Cc: Zeng, Star >> Subject: Re: [edk2] [Patch] MdeModulePkg PeiCore: Add error message to >> describe PEIM load failure >> >> On 02/08/18 09:18, Liming Gao wrote: >>> If PEIM image address doesn't meet with its section alignment, it will >>> load 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 = PeCoffLoaderLoadImage (&ImageContext); >>> if (EFI_ERROR (Status)) { >>> + if (ImageContext.ImageError == >> 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)); >>> + } >> >> Just curious, is there any particular reason for the 11 chars field >> width? Personally I would print ImageContext.ImageAddress (which has >> type PHYSICAL_ADDRESS, i.e. UINT64), without any type conversion, and >> with the following format string: >> >> 0x%Lx >> >> or maybe >> >> 0x%16Lx >> >> ... There's no need to resubmit the patch because of my question; I'm >> just curious if I'm missing something. >> >> Thanks! >> Laszlo >> >> >>> return Status; >>> } >>> // >>> @@ -612,6 +615,8 @@ PeiLoadImageLoadImage ( >>> } >>> } >>> >>> + DEBUG ((DEBUG_INFO, "Loading PEIM %g\n", FileHandle)); >>> + >>> // >>> // If memory is installed, perform the shadow operations >>> // >>> >> >> I'