From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 1CA9EAC0022 for ; Thu, 25 Apr 2024 00:21:20 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=mXYO6wEsTr78VdyiJubXNawCjQP5Mz7EFrsJ7+jyI0o=; c=relaxed/simple; d=groups.io; h=From:MIME-version:Subject:Date:References:To:In-reply-to:Message-id:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-type; s=20240206; t=1714004479; v=1; b=CzjGWRqfXKhJmRXyOt8gUV4cadlqkAJXKXqclrQfP94wtUCe/LV8yWzNVwb8G9sfxKKyt6rK YO4cqr1oHJzSv/dRqDlhv/lBH785a+wJ5YMB5xqdJV2tJwm8cczqgd5f00NzxJL7LFiRTRVSjWX TjmP7c3tm6+Ybysp7tLFMO2M8axfX1vI17NqYAGIZMsrLnySnkw7ABTDh4ItBxkeYi0DhPKNUZM 4l0n/EZTBu5ZGPI2ORMJLzH26va13XIlHKKEXltYI30SkCSHc7Ry41V0HRMJwO8lu/sDBJ5Jqd3 qnpY0myIVaSm1NqkpcPIr/bUSlJx1E7KSAcHXCVW73FGw== X-Received: by 127.0.0.2 with SMTP id yEfPYY7687511xbZi2SNptCg; Wed, 24 Apr 2024 17:21:19 -0700 X-Received: from rn-mailsvcp-mx-lapp02.apple.com (rn-mailsvcp-mx-lapp02.apple.com [17.179.253.23]) by mx.groups.io with SMTP id smtpd.web10.5093.1714004474199766342 for ; Wed, 24 Apr 2024 17:21:14 -0700 X-Received: from rn-mailsvcp-mta-lapp03.rno.apple.com (rn-mailsvcp-mta-lapp03.rno.apple.com [10.225.203.151]) by rn-mailsvcp-mx-lapp02.rno.apple.com (Oracle Communications Messaging Server 8.1.0.23.20230328 64bit (built Mar 28 2023)) with ESMTPS id <0SCH011YF2BDPF10@rn-mailsvcp-mx-lapp02.rno.apple.com> for devel@edk2.groups.io; Wed, 24 Apr 2024 17:21:13 -0700 (PDT) X-Received: from rn-mailsvcp-mmp-lapp02.rno.apple.com (rn-mailsvcp-mmp-lapp02.rno.apple.com [17.179.253.15]) by rn-mailsvcp-mta-lapp03.rno.apple.com (Oracle Communications Messaging Server 8.1.0.23.20230328 64bit (built Mar 28 2023)) with ESMTPS id <0SCH00NL42BDFGD0@rn-mailsvcp-mta-lapp03.rno.apple.com>; Wed, 24 Apr 2024 17:21:13 -0700 (PDT) X-Received: from process_milters-daemon.rn-mailsvcp-mmp-lapp02.rno.apple.com by rn-mailsvcp-mmp-lapp02.rno.apple.com (Oracle Communications Messaging Server 8.1.0.23.20230328 64bit (built Mar 28 2023)) id <0SCH00F001X1HY00@rn-mailsvcp-mmp-lapp02.rno.apple.com>; Wed, 24 Apr 2024 17:21:13 -0700 (PDT) X-Va-A: X-Va-T-CD: c30a88881ba6ef5a8a39b94b2c22c6e6 X-Va-E-CD: 6d624685f3c4465b8d032cb79f453ffa X-Va-R-CD: 5ca9ac472de9926c2f0b69818c78761d X-Va-ID: 7defca52-605b-426d-a497-fe820f982c91 X-Va-CD: 0 X-V-A: X-V-T-CD: c30a88881ba6ef5a8a39b94b2c22c6e6 X-V-E-CD: 6d624685f3c4465b8d032cb79f453ffa X-V-R-CD: 5ca9ac472de9926c2f0b69818c78761d X-V-ID: 509a0265-a4c7-4acd-99f9-d1b73642a6a6 X-V-CD: 0 X-Received: from smtpclient.apple (unknown [17.11.176.149]) by rn-mailsvcp-mmp-lapp02.rno.apple.com (Oracle Communications Messaging Server 8.1.0.23.20230328 64bit (built Mar 28 2023)) with ESMTPSA id <0SCH001K02BCXQ00@rn-mailsvcp-mmp-lapp02.rno.apple.com>; Wed, 24 Apr 2024 17:21:13 -0700 (PDT) From: "Andrew Fish via groups.io" MIME-version: 1.0 (Mac OS X Mail 16.0 \(3774.300.61.1.2\)) Subject: Re: [edk2-devel] Synchronous Exception at ArmGicDxe Date: Wed, 24 Apr 2024 14:21:02 -1000 References: To: edk2-devel-groups-io , phanbagiabao2001@gmail.com In-reply-to: Message-id: <157C60A3-DE16-457C-9651-7987CCD07B93@apple.com> Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Wed, 24 Apr 2024 17:21:14 -0700 Resent-From: afish@apple.com Reply-To: devel@edk2.groups.io,afish@apple.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: PHWIz0aVvRJ6Hp4t0SUQGE7Jx7686176AA= Content-type: multipart/alternative; boundary="Apple-Mail=_7D991AE0-286F-4C0E-AAAA-13E81A78FED3" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=CzjGWRqf; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io --Apple-Mail=_7D991AE0-286F-4C0E-AAAA-13E81A78FED3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 The fault address is 0x00000004AC100004. Is that in the address range of th= e 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=E2=80=AFPM, Ba Gia Bao Phan wrote: >=20 > Hi Everyone, >=20 > I'm working on a project with edk2, and these guys are trying to port edk= 2 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.=20 >=20 > 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 >=20 > [ 0] /local/home/phanbagi/Documents/RPi3/Build/STM32MP25/DEBUG_GCC5/AARCH= 64/ArmPkg/Drivers/ArmGic/ArmGicDxe/DEBUG/ArmGicDxe.dll > [ 1] /local/home/phanbagi/Documents/RPi3/Build/STM32MP25/DEBUG_GCC5/AARCH= 64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll >=20 > 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 = =20 >=20 > V0 0xAFAFAFAFAFAFAFAF AFAFAFAFAFAFAFAF V1 0xFFFFFF80FFFFFFD0 00000001= 0AFFFA30 > V2 0x00000007AAAA0000 000000000E001858 V3 0x0000100000000000 00000000= 00000100 > V4 0x0000000000000000 0000000000000000 V5 0x0000000000000000 00000000= 00000000 > V6 0x0000000000000000 0000000000000000 V7 0x0000000000000000 00000000= 00000000 > V8 0x0000000000000000 0000000000000000 V9 0x0000000000000000 00000000= 00000000 > V10 0x0000000000000000 0000000000000000 V11 0x0000000000000000 00000000= 00000000 > V12 0x0000000000000000 0000000000000000 V13 0x0000000000000000 00000000= 00000000 > V14 0x0000000000000000 0000000000000000 V15 0x0000000000000000 00000000= 00000000 > V16 0x6145998C70863CB0 9004002B4AC68640 V17 0x646586E820A5D596 AA30249E= C11F1469 > V18 0x5756252D20E5B421 336EEAEC2122B3AB V19 0x6285C083AAECD063 020A72C3= 7700322A > V20 0x40846C68BA2085FB 20966526601C44BB V21 0x818208204CD0A89D 6D84E948= 13E14B24 > V22 0x2362CBA9962AF073 E83ED49CD4A13F98 V23 0x0C1123CD73F5C5B0 C3E92228= 91467015 > V24 0x02B1194895858177 1B028BE1A860D73B V25 0x542AB00936183D90 752F1D1C= CC4D2345 > V26 0x03D02013962356F3 0CCA6F83842045EA V27 0x9DF9D2A28D44915E 2892460B= 223FD84C > V28 0x61A2CC120A809CD8 AC33034803D74C10 V29 0x7A1089709810B030 88B3298E= EB68B450 > V30 0xD20F81310E0896C0 20E2BA370E2AC6F9 V31 0x6C3BBEA030B2BB50 2C2A91AA= F201EF50 >=20 > SP 0x000000010AFFFA50 ELR 0x000000010A63501C SPSR 0x400003C5 FPSR 0x= 00000000 > ESR 0x96000005 FAR 0x00000004AC100004 >=20 > ESR : EC 0x25 IL 0x1 ISS 0x00000005 >=20 > Data abort: Translation fault, first level >=20 >=20 > By using objdump to determine where the wrong source code is, I found out= that the program stopped around the code below. >=20 > UINT32 > EFIAPI > MmioRead32 ( > IN UINTN Address > ) > { > UINT32 Value; > BOOLEAN Flag; >=20 > ASSERT ((Address & 3) =3D=3D 0); >=20 > Flag =3D FilterBeforeMmIoRead (FilterWidth32, Address, &Value); > if (Flag) { > MemoryFence (); >=20 > if (IsTdxGuest ()) { > Value =3D TdMmioRead32 (Address); > } else { > Value =3D *(volatile UINT32 *)Address; > } >=20 > MemoryFence (); > } >=20 > FilterAfterMmIoRead (FilterWidth32, Address, &Value); >=20 > return Value; > } >=20 > 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; >=20 > ASSERT ((Address & 3) =3D=3D 0); > 1ffc: f240041f tst x0, #0x3 > 2000: 540000e0 b.eq 201c // b.none > 2004: b0000002 adrp x2, 3000 > 2008: b0000000 adrp x0, 3000 > 200c: 913ac442 add x2, x2, #0xeb1 > 2010: 913b1000 add x0, x0, #0xec4 > 2014: d2804461 mov x1, #0x223 // #547 > 2018: 97ffff7a bl 1e00 >=20 > Flag =3D FilterBeforeMmIoRead (FilterWidth32, Address, &Value); > if (Flag) { > Value =3D *(volatile UINT32 *)Address; > 201c: b9400260 ldr w0, [x19] > } >=20 > FilterAfterMmIoRead (FilterWidth32, Address, &Value); >=20 > return Value; > } >=20 > Thanks > --=20 > PHAN Ba Gia Bao > Etudiant en 5A STI - INSA Centre Val de Loire >=20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#118248): https://edk2.groups.io/g/devel/message/118248 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] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --Apple-Mail=_7D991AE0-286F-4C0E-AAAA-13E81A78FED3 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 The fault address is 0x00000004AC= 100004. Is that in the address range of the GIC for this platform? What doe= s that Physical address map to you on the STM32MP25?

Tha= nks,

Andrew Fish

On Apr 21, 2024, at 10:07=E2=80=AFPM, Ba Gia Bao Phan <phanbag= iabao2001@gmail.com> wrote:

Hi Ever= yone,

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 t= he 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.<= span class=3D"Apple-converted-space"> 

Synchronous Excep= tion at 0x000000010A63= 501C
PC 0x00010A63501C (0x00010A633000+0x0000201C) [ 0] ArmGicDxe.dl= l
PC 0x00010A6350CC (0x00010A633000+0x000020CC) [ 0] ArmGicDxe.dll
PC= 0x00010A63657C (0x00010A633000+0x0000357C) [ 0] ArmGicDxe.dll
PC 0x0001= 0A85853C (0x00010A851000+0x0000753C) [ 1] DxeCore.dll
PC 0x00010A8666DC = (0x00010A851000+0x000156DC) [ 1] DxeCore.dll
PC 0x00010A85BF14 (0x00010A= 851000+0x0000AF14) [ 1] DxeCore.dll
PC 0x000084006EBC
PC 0x0000840070= 0C

[ 0] /local/home/phanbagi/Documents/RPi3/Build/STM32MP25/DEBUG_GC= C5/AARCH64/ArmPkg/Drivers/ArmGic/ArmGicDxe/DEBUG/ArmGicDxe.dll
[ 1] /loc= al/home/phanbagi/Documents/RPi3/Build/STM32MP25/DEBUG_GCC5/AARCH64/MdeModul= ePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll

  X0 0x00000004AC100004=   X1 0x0000000000000000   X2 0x0000000000000000   X3 0x4F46= A76E3FDDA605
  X4 0x083D1B53F41229AD   X5 0x00000000003CF238 &= nbsp; X6 0x0000000000000080   X7 0x0000000000000000
  X8 0x000= 000010A850688   X9 0x0000000400000000  X10 0x0000000109E9F000 &nb= sp;X11 0x000000010A297FFF
 X12 0x0000000000000000  X13 0x00000= 0000000000E  X14 0x00000000000000FF  X15 0x0000000000000002
&n= bsp;X16 0x000000010AFFFAD0  X17 0x0000000000395790  X18 0x0000000= 000000000  X19 0x00000004AC100004
 X20 0x000000010A638000 &nbs= p;X21 0x000000010A638000  X22 0x000000010A638000  X23 0x000000010= A6380A8
 X24 0x000000010A876448  X25 0x000000010A873026  = X26 0x000000010A877000  X27 0x800000000000000E
 X28 0x00000000= 00000001   FP 0x000000010AFFFA50   LR 0x000000010A6350CC  
  V0 0xAFAFAFAFAFAFAFAF AFAFAFAFAFAFAFAF   V1 0xFFFFFF80FFF= FFFD0 000000010AFFFA30
  V2 0x00000007AAAA0000 000000000E001858 &nb= sp; V3 0x0000100000000000 0000000000000100
  V4 0x0000000000000000 = 0000000000000000   V5 0x0000000000000000 0000000000000000
  V6= 0x0000000000000000 0000000000000000   V7 0x0000000000000000 000000000= 0000000
  V8 0x0000000000000000 0000000000000000   V9 0x000000= 0000000000 0000000000000000
 V10 0x0000000000000000 000000000000000= 0  V11 0x0000000000000000 0000000000000000
 V12 0x000000000000= 0000 0000000000000000  V13 0x0000000000000000 0000000000000000
&nbs= p;V14 0x0000000000000000 0000000000000000  V15 0x0000000000000000 0000= 000000000000
 V16 0x6145998C70863CB0 9004002B4AC68640  V17 0x6= 46586E820A5D596 AA30249EC11F1469
 V18 0x5756252D20E5B421 336EEAEC21= 22B3AB  V19 0x6285C083AAECD063 020A72C37700322A
 V20 0x40846C6= 8BA2085FB 20966526601C44BB  V21 0x818208204CD0A89D 6D84E94813E14B24 V22 0x2362CBA9962AF073 E83ED49CD4A13F98  V23 0x0C1123CD73F5C5B0= C3E9222891467015
 V24 0x02B1194895858177 1B028BE1A860D73B  V2= 5 0x542AB00936183D90 752F1D1CCC4D2345
 V26 0x03D02013962356F3 0CCA6= F83842045EA  V27 0x9DF9D2A28D44915E 2892460B223FD84C
 V28 0x61= A2CC120A809CD8 AC33034803D74C10  V29 0x7A1089709810B030 88B3298EEB68B4= 50
 V30 0xD20F81310E0896C0 20E2BA370E2AC6F9  V31 0x6C3BBEA030B= 2BB50 2C2A91AAF201EF50

  SP 0x000000010AFFFA50  ELR 0x0000= 00010A63501C  SPSR 0x400003C5  FPSR 0x00000000
 ESR 0x960= 00005          FAR 0x00000004AC100004

 = ;ESR : EC 0x25  IL 0x1  ISS 0x00000005

Data abort: Transla= tion 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     &= nbsp;UINTN  Address
  )
{
  UINT32   Value;  BOOLEAN  Flag;

  ASSERT ((Address & 3) =3D=3D = 0);

  Flag =3D FilterBeforeMmIoRead (FilterWidth32, Address, &a= mp;Value);
  if (Flag) {
    MemoryFence ();

&n= bsp;   if (IsTdxGuest ()) {
      Value =3D TdMmioRe= ad32 (Address);
    } else {
      Value =3D= *(volatile UINT32 *)Address;
    }

    Memor= yFence ();
  }

  FilterAfterMmIoRead (FilterWidth32, Ad= dress, &Value);

  return Value;
}

Output of objdu= mp:
UINT32
EFIAPI
MmioRead32 (
  IN      UI= NTN  Address
  )
{
    1fec: a9be7bfd stp x29,= x30, [sp, #-32]!
    1ff0: 910003fd mov x29, sp
  &nb= sp; 1ff4: f9000bf3 str x19, [sp, #16]
    1ff8: aa0003f3 mov x= 19, x0
  UINT32   Value;
  BOOLEAN  Flag;

=   ASSERT ((Address & 3) =3D=3D 0);
    1ffc: f240041f= tst x0, #0x3
    2000: 540000e0 b.eq 201c <MmioRead32+0x30= >  // b.none
    2004: b0000002 adrp x2, 3000 <Mmio= AndThenOr32.isra.0>
    2008: b0000000 adrp x0, 3000 <Mm= ioAndThenOr32.isra.0>
    200c: 913ac442 add x2, x2, #0xeb1=
    2010: 913b1000 add x0, x0, #0xec4
    2014: = d2804461 mov x1, #0x223               &n= bsp; // #547
    2018: 97ffff7a bl 1e00 <DebugAssert>
  Flag =3D FilterBeforeMmIoRead (FilterWidth32, Address, &Val= ue);
  if (Flag) {
    Value =3D *(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

_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#118248) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--Apple-Mail=_7D991AE0-286F-4C0E-AAAA-13E81A78FED3--