Laszlo:
  11p address is big to cover most real address. It can align and save the 
message length. 

Thanks
Liming
>-----Original Message-----
>From: Laszlo Ersek [mailto:ler...@redhat.com]
>Sent: Thursday, February 08, 2018 5:31 PM
>To: Gao, Liming <liming....@intel.com>; edk2-devel@lists.01.org
>Cc: Zeng, Star <star.z...@intel.com>
>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 <liming....@intel.com>
>> Cc: Star Zeng <star.z...@intel.com>
>> ---
>>  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.<BR>
>> +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
>>  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'
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to