public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ba Gia Bao Phan <phanbagiabao2001@gmail.com>
To: "Andrew (EFI) Fish" <afish@apple.com>, devel@edk2.groups.io
Subject: Re: [edk2-devel] Synchronous Exception at ArmGicDxe
Date: Thu, 25 Apr 2024 10:11:55 +0200	[thread overview]
Message-ID: <CAK9R8u_Yk=jQoVXX-sWfBmAkmgX4njo0R7qQHqGijefwPa2ANA@mail.gmail.com> (raw)
In-Reply-To: <157C60A3-DE16-457C-9651-7987CCD07B93@apple.com>

[-- Attachment #1: Type: text/plain, Size: 6164 bytes --]

It is near to the GicDistributorBase (0x4ac10000) of STM32MP25

Le jeu. 25 avr. 2024 à 02:21, Andrew (EFI) Fish <afish@apple.com> a écrit :

> The fault address is 0x00000004AC100004. Is that in the address range of
> the GIC for this platform? What does that Physical address map to you on
> the STM32MP25?
>
> Thanks,
>
> Andrew Fish
>
> On Apr 21, 2024, at 10:07 PM, Ba Gia Bao Phan <phanbagiabao2001@gmail.com>
> wrote:
>
> Hi Everyone,
>
> I'm working on a project with edk2, and these guys are trying to port edk2
> to STM32MP25 platforms. I had no issue compiling and booting the image on
> my device. Then I've come across an issue at very early stages of booting.
> I was given a Synchronous Exception listed briefly below.
>
> Synchronous Exception at *0x000000010A63501C*
> PC 0x00010A63501C (0x00010A633000+0x0000201C) [ 0] ArmGicDxe.dll
> PC 0x00010A6350CC (0x00010A633000+0x000020CC) [ 0] ArmGicDxe.dll
> PC 0x00010A63657C (0x00010A633000+0x0000357C) [ 0] ArmGicDxe.dll
> PC 0x00010A85853C (0x00010A851000+0x0000753C) [ 1] DxeCore.dll
> PC 0x00010A8666DC (0x00010A851000+0x000156DC) [ 1] DxeCore.dll
> PC 0x00010A85BF14 (0x00010A851000+0x0000AF14) [ 1] DxeCore.dll
> PC 0x000084006EBC
> PC 0x00008400700C
>
> [ 0]
> /local/home/phanbagi/Documents/RPi3/Build/STM32MP25/DEBUG_GCC5/AARCH64/ArmPkg/Drivers/ArmGic/ArmGicDxe/DEBUG/ArmGicDxe.dll
> [ 1]
> /local/home/phanbagi/Documents/RPi3/Build/STM32MP25/DEBUG_GCC5/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll
>
>   X0 0x00000004AC100004   X1 0x0000000000000000   X2 0x0000000000000000
> X3 0x4F46A76E3FDDA605
>   X4 0x083D1B53F41229AD   X5 0x00000000003CF238   X6 0x0000000000000080
> X7 0x0000000000000000
>   X8 0x000000010A850688   X9 0x0000000400000000  X10 0x0000000109E9F000
>  X11 0x000000010A297FFF
>  X12 0x0000000000000000  X13 0x000000000000000E  X14 0x00000000000000FF
>  X15 0x0000000000000002
>  X16 0x000000010AFFFAD0  X17 0x0000000000395790  X18 0x0000000000000000
>  X19 0x00000004AC100004
>  X20 0x000000010A638000  X21 0x000000010A638000  X22 0x000000010A638000
>  X23 0x000000010A6380A8
>  X24 0x000000010A876448  X25 0x000000010A873026  X26 0x000000010A877000
>  X27 0x800000000000000E
>  X28 0x0000000000000001   FP 0x000000010AFFFA50   LR 0x000000010A6350CC
>
>   V0 0xAFAFAFAFAFAFAFAF AFAFAFAFAFAFAFAF   V1 0xFFFFFF80FFFFFFD0
> 000000010AFFFA30
>   V2 0x00000007AAAA0000 000000000E001858   V3 0x0000100000000000
> 0000000000000100
>   V4 0x0000000000000000 0000000000000000   V5 0x0000000000000000
> 0000000000000000
>   V6 0x0000000000000000 0000000000000000   V7 0x0000000000000000
> 0000000000000000
>   V8 0x0000000000000000 0000000000000000   V9 0x0000000000000000
> 0000000000000000
>  V10 0x0000000000000000 0000000000000000  V11 0x0000000000000000
> 0000000000000000
>  V12 0x0000000000000000 0000000000000000  V13 0x0000000000000000
> 0000000000000000
>  V14 0x0000000000000000 0000000000000000  V15 0x0000000000000000
> 0000000000000000
>  V16 0x6145998C70863CB0 9004002B4AC68640  V17 0x646586E820A5D596
> AA30249EC11F1469
>  V18 0x5756252D20E5B421 336EEAEC2122B3AB  V19 0x6285C083AAECD063
> 020A72C37700322A
>  V20 0x40846C68BA2085FB 20966526601C44BB  V21 0x818208204CD0A89D
> 6D84E94813E14B24
>  V22 0x2362CBA9962AF073 E83ED49CD4A13F98  V23 0x0C1123CD73F5C5B0
> C3E9222891467015
>  V24 0x02B1194895858177 1B028BE1A860D73B  V25 0x542AB00936183D90
> 752F1D1CCC4D2345
>  V26 0x03D02013962356F3 0CCA6F83842045EA  V27 0x9DF9D2A28D44915E
> 2892460B223FD84C
>  V28 0x61A2CC120A809CD8 AC33034803D74C10  V29 0x7A1089709810B030
> 88B3298EEB68B450
>  V30 0xD20F81310E0896C0 20E2BA370E2AC6F9  V31 0x6C3BBEA030B2BB50
> 2C2A91AAF201EF50
>
>   SP 0x000000010AFFFA50  ELR 0x000000010A63501C  SPSR 0x400003C5  FPSR
> 0x00000000
>  ESR 0x96000005          FAR 0x00000004AC100004
>
>  ESR : EC 0x25  IL 0x1  ISS 0x00000005
>
> Data abort: Translation fault, first level
>
>
> By using objdump to determine where the wrong source code is, I found out
> that the program stopped around the code below.
>
> UINT32
> EFIAPI
> MmioRead32 (
>   IN      UINTN  Address
>   )
> {
>   UINT32   Value;
>   BOOLEAN  Flag;
>
>   ASSERT ((Address & 3) == 0);
>
>   Flag = FilterBeforeMmIoRead (FilterWidth32, Address, &Value);
>   if (Flag) {
>     MemoryFence ();
>
>     if (IsTdxGuest ()) {
>       Value = TdMmioRead32 (Address);
>     } else {
>       Value = *(volatile UINT32 *)Address;
>     }
>
>     MemoryFence ();
>   }
>
>   FilterAfterMmIoRead (FilterWidth32, Address, &Value);
>
>   return Value;
> }
>
> Output of objdump:
> UINT32
> EFIAPI
> MmioRead32 (
>   IN      UINTN  Address
>   )
> {
>     1fec: a9be7bfd stp x29, x30, [sp, #-32]!
>     1ff0: 910003fd mov x29, sp
>     1ff4: f9000bf3 str x19, [sp, #16]
>     1ff8: aa0003f3 mov x19, x0
>   UINT32   Value;
>   BOOLEAN  Flag;
>
>   ASSERT ((Address & 3) == 0);
>     1ffc: f240041f tst x0, #0x3
>     2000: 540000e0 b.eq 201c <MmioRead32+0x30>  // b.none
>     2004: b0000002 adrp x2, 3000 <MmioAndThenOr32.isra.0>
>     2008: b0000000 adrp x0, 3000 <MmioAndThenOr32.isra.0>
>     200c: 913ac442 add x2, x2, #0xeb1
>     2010: 913b1000 add x0, x0, #0xec4
>     2014: d2804461 mov x1, #0x223                 // #547
>     2018: 97ffff7a bl 1e00 <DebugAssert>
>
>   Flag = FilterBeforeMmIoRead (FilterWidth32, Address, &Value);
>   if (Flag) {
>
> *    Value = *(volatile UINT32 *)Address;    201c: b9400260 ldr w0, [x19]*
>   }
>
>   FilterAfterMmIoRead (FilterWidth32, Address, &Value);
>
>   return Value;
> }
>
> Thanks
> --
> PHAN Ba Gia Bao
> Etudiant en 5A STI - INSA Centre Val de Loire
> 
>
>
>

-- 
PHAN Ba Gia Bao
Etudiant en 5A STI - INSA Centre Val de Loire


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118303): https://edk2.groups.io/g/devel/message/118303
Mute This Topic: https://groups.io/mt/105721886/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



[-- Attachment #2: Type: text/html, Size: 7769 bytes --]

      reply	other threads:[~2024-04-25 22:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22  8:07 [edk2-devel] Synchronous Exception at ArmGicDxe Ba Gia Bao Phan
2024-04-25  0:21 ` Andrew Fish via groups.io
2024-04-25  8:11   ` Ba Gia Bao Phan [this message]

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='CAK9R8u_Yk=jQoVXX-sWfBmAkmgX4njo0R7qQHqGijefwPa2ANA@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