public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Chandni Cherukuri <chandni.cherukuri@arm.com>
Cc: Thomas Panakamattam Abraham <thomas.abraham@arm.com>,
	 "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	Nariman Poushin <nariman.poushin@linaro.org>
Subject: Re: [PATCH edk2-platforms 0/3] drop GUIDs from NOR flash bank descriptors
Date: Thu, 22 Nov 2018 12:37:46 +0100	[thread overview]
Message-ID: <CAKv+Gu-d60UypTUo1a2oti2b8gOnSbfb6=QuTqmvcc8gb4w6Jw@mail.gmail.com> (raw)
In-Reply-To: <CADXzzgpV37gKzmSYYrEyZgs_1B33AmJAnYJHwdA3Hvuax_djcw@mail.gmail.com>

On Thu, 22 Nov 2018 at 12:19, chandni cherukuri
<chandni.cherukuri@arm.com> wrote:
>
> On Thu, Nov 22, 2018 at 1:20 PM Ard Biesheuvel
> <ard.biesheuvel@linaro.org> wrote:
> >
> > On Thu, 22 Nov 2018 at 05:01, Thomas Abraham <thomas.abraham@arm.com> wrote:
> > >
> > > Hi Ard,
> > >
> > > On Thu, Nov 22, 2018 at 3:46 AM Ard Biesheuvel
> > > <ard.biesheuvel@linaro.org> wrote:
> > > >
> > > > On Wed, 21 Nov 2018 at 14:48, Thomas Abraham <thomas.abraham@arm.com> wrote:
> > > > >
> > > > > Hi Ard,
> > > > >
> > > > > On Wed, Nov 21, 2018 at 5:31 PM Ard Biesheuvel
> > > > > <ard.biesheuvel@linaro.org> wrote:
> > > > > >
> > > > > > Align edk2-platform with upcoming changes to EDK2 to get rid of per-bank
> > > > > > NOR flash GUIDs.
> > > > > >
> > > > > > Ard Biesheuvel (3):
> > > > > >   Platform/ARM: replace hardcoded VenHW() device paths referring to NOR
> > > > > >     flash
> > > > > >   Silicon/SynQuacer: drop per-bank NOR flash GUIDs
> > > > > >   Platform/ARM: drop per-bank NOR flash GUIDs
> > > > > >
> > > > > >  Platform/ARM/JunoPkg/ArmJuno.dec                   |  2 +-
> > > > > >  Platform/ARM/JunoPkg/ArmJuno.dsc                   |  2 +-
> > > > > >  .../JunoPkg/Library/NorFlashJunoLib/NorFlashJuno.c |  2 --
> > > > > >  .../ARM/SgiPkg/Library/NorFlashLib/NorFlashLib.c   |  2 --
> > > > > >  Platform/ARM/SgiPkg/SgiPlatform.dsc                |  2 +-
> > > > > >  Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc  |  2 +-
> > > > > >  Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc       |  2 +-
> > > > > >  .../NorFlashArmVExpressLib/NorFlashArmVExpress.c   |  4 ----
> > > > > >  .../SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c      | 14 +++++++-------
> > > > > >  .../SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.h      |  3 +++
> > > > > >  .../NorFlashSynQuacerLib/NorFlashSynQuacer.c       |  6 ------
> > > > > >  11 files changed, 15 insertions(+), 26 deletions(-)
> > > > >
> > > > > Tested this patch series and "[PATCH v2 0/5] ArmPlatformPkg,
> > > > > ArmVirtPkg: discover NOR flash banks from DTB" patch series on the
> > > > > Juno board. With these patches applied, the boot fails on Juno board
> > > > > with the following messages. I have not yet tried to debug the issue
> > > > > but wanted to let you know this.
> > > > >
> > > > > [...]
> > > > > Loading driver at 0x000F830C000 EntryPoint=0x000F831B2AC IScsiDxe.efi
> > > > > add-symbol-file
> > > > > /home/thopan01/devel/juno/uefi/uefi/edk2/Build/ArmJuno/DEBUG_GCC5/AARCH64/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe/DEBUG/Udp4Dxe.dll
> > > > > 0xF8300000
> > > > > Loading driver at 0x000F82FF000 EntryPoint=0x000F8306DF0 Udp4Dxe.efi
> > > > > add-symbol-file
> > > > > /home/thopan01/devel/juno/uefi/uefi/edk2/Build/ArmJuno/DEBUG_GCC5/AARCH64/Platform/ARM/Drivers/FdtPlatformDxe/FdtPlatformDxe/DEBUG/FdtPlatformDxe.dll
> > > > > 0xF82EE000
> > > > > Loading driver at 0x000F82ED000 EntryPoint=0x000F82F76EC FdtPlatformDxe.efi
> > > > > Found image: fip in block 5.
> > > > > Found image: norkern in block 20.
> > > > > Found image: ramdisk.img in block 116.
> > > > > Found image: hdlcdclk in block 151.
> > > > > Found image: selftest in block 152.
> > > > > Found image: board.dtb in block 156.
> > > > > Found image: scp_bl1 in block 249.
> > > > > Found image: bl1 in block 251.
> > > > > Found image: startup.nsh in block 252.
> > > > > ASSERT [BootMonFs]
> > > > > /home/thopan01/devel/juno/uefi/uefi/edk2/MdePkg/Library/BaseLib/String.c(173):
> > > > > ((UINTN) String & 0x00000001) == 0
> > > > >
> > > >
> > > > Hi Thomas,
> > > >
> > > > Thanks for testing.
> > > >
> > > > Could you please apply this patch and re-test:
> > > >
> > > > --- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> > > > +++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> > > > @@ -299,7 +299,7 @@
> > > >  !if $(TARGET) == RELEASE
> > > >    gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x21
> > > >  !else
> > > > -  gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2f
> > > > +  gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x3f
> > > >  !endif
> > > >
> > > >    #  DEBUG_INIT      0x00000001  // Initialization
> > > >
> > > > This will produce a backtrace when an ASSERT() is triggered, and from
> > > > this we can figure out what the call stack looks like exactly (The
> > > > ASSERT() occurs in StrLen (), which is called with a misaligned
> > > > unicode string, but I cannot figure out where the call is made)
> > > >
> > > > Please share the backtrace and all the .dlls listed in it if you can please.
> > >
> > > The following is the log with the above diff applied on top of your
> > > patch series.
> > >
> >
> > Thanks!
> >
> > Could you please share the output of
> >
> > nm -n /home/thopan01/devel/juno/uefi/uefi/edk2/Build/ArmJuno/DEBUG_GCC5/AARCH64/Platform/ARM/Drivers/BootMonFs/BootMonFs/DEBUG/BootMonFs.dll
> >
> > as well so I can cross reference the addresses with the functions? Thanks.
> >
> >
> Hi Ard,
>
> With the following diff applied on top of your patches we see that the
> ASSERT no longer comes in Juno and it boots till the UEFI Shell.
>
> --- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c
> +++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c
> @@ -129,7 +129,7 @@ NorFlashCreateInstance (
>    Instance->Media.LastBlock = (NorFlashSize / BlockSize)-1;
>
>    CopyGuid (&Instance->DevicePath.Vendor.Guid, &gEfiCallerIdGuid);
> -  Instance->DevicePath.Index = (UINT8)Index;
> +  Instance->DevicePath.Index = (UINT16)Index;^M
>
>    Instance->ShadowBuffer = AllocateRuntimePool (BlockSize);;
>    if (Instance->ShadowBuffer == NULL) {
> diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.h
> b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.h
> index 8886aa4..c40255e 100644
> --- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.h
> +++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.h
> @@ -125,7 +125,7 @@ typedef struct _NOR_FLASH_INSTANCE
> NOR_FLASH_INSTANCE;
>  #pragma pack(1)
>  typedef struct {
>    VENDOR_DEVICE_PATH                  Vendor;
> -  UINT8                               Index;
> +  UINT16                              Index;^M
>    EFI_DEVICE_PATH_PROTOCOL            End;
>  } NOR_FLASH_DEVICE_PATH;
>  #pragma pack()
>


Thank you! That is really helpful. However, it still means there is a
bug in the BootMonFs driver somewhere, so I'd still like a peek at the
symbols.

Could you please share the backtrace and the results of

nm -n Build/ArmJuno/DEBUG_GCC5/AARCH64/Platform/ARM/Drivers/BootMonFs/BootMonFs/DEBUG/BootMonFs.dll

for the failing case?

Thanks.


  reply	other threads:[~2018-11-22 11:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-21 12:01 [PATCH edk2-platforms 0/3] drop GUIDs from NOR flash bank descriptors Ard Biesheuvel
2018-11-21 12:01 ` [PATCH edk2-platforms 1/3] Platform/ARM: replace hardcoded VenHW() device paths referring to NOR flash Ard Biesheuvel
2018-11-21 12:01 ` [PATCH edk2-platforms 2/3] Silicon/SynQuacer: drop per-bank NOR flash GUIDs Ard Biesheuvel
2018-11-21 12:01 ` [PATCH edk2-platforms 3/3] Platform/ARM: " Ard Biesheuvel
2018-11-21 13:48 ` [PATCH edk2-platforms 0/3] drop GUIDs from NOR flash bank descriptors Thomas Abraham
2018-11-21 22:16   ` Ard Biesheuvel
2018-11-22  4:01     ` Thomas Abraham
2018-11-22  7:50       ` Ard Biesheuvel
2018-11-22 11:19         ` chandni cherukuri
2018-11-22 11:37           ` Ard Biesheuvel [this message]
2018-11-22 12:54             ` Thomas Abraham
2018-11-22 13:08             ` Ard Biesheuvel
2018-11-22 13:33               ` Thomas Abraham
2018-11-22 16:30               ` Laszlo Ersek
2018-11-22 16:37                 ` Ard Biesheuvel
2018-11-26 15:15 ` Leif Lindholm
2018-11-26 17:26   ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKv+Gu-d60UypTUo1a2oti2b8gOnSbfb6=QuTqmvcc8gb4w6Jw@mail.gmail.com' \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox