RPi 4B MMU seems to be enabled but throwing aarch64-default-exception error

Noor Aman nooraman5718 at gmail.com
Sun Sep 4 10:12:29 UTC 2022


Hey,
Some doubts here:
1) On inspecting the raspberry pi 3 config table, I only seem to have 2
entries, one is for peripheral base, the other one for core local
peripherals. I have updated the MMU with peripheral base, ARM local
registers, and ARMC register. If I'm correct then, the Videocore should
handle every address of uarts, spi and others, right? or am I missing
something?

2) Raspberry pi 3 kernel starts from 0x200000 and the MMU is mapped
starting from 0x100000. My question is if the aarch64 kernel starts from
0x80000, then where should the MMU start from? I'm assuming it does not
start from 0x0 because my current code's MMU starts from that and it's very
likely that this is causing problems.

3) Any more suggestions? Glad to receive them.

Thanks,
Noor

On Sat, 3 Sept 2022 at 22:05, Alan Cudmore <alan.cudmore at gmail.com> wrote:

> Hi Noor,
>
> Nice blog entry on the JTAG setup. I ordered the FT232H board like yours
> to see if I can get the same setup working. I have my Pi 4 running the bare
> metal OS examples, and I have built your branch, so I hope to start looking
> at the code.
>
> What needs to be in the MMU table? I see different entries in the Aarch64
> BSPs. For example the Xilinx-versal BSP has entries for the GIC,
> peripherals, and memory. Can you cover RAM and I/O space on the Pi 4 with
> just one entry?
>
> Looking at the RT-Thread OS, they have the following Pi4/Aarch64 MMU table:
>
>
> https://github.com/RT-Thread/rt-thread/blob/master/bsp/raspberry-pi/raspi4-64/driver/board.c#L25
>
>
>
> Alan
>
> *From: *Noor Aman <nooraman5718 at gmail.com>
> *Sent: *Friday, September 2, 2022 2:18 PM
> *To: *Alan Cudmore <alan.cudmore at gmail.com>
> *Cc: *Hesham Moustafa <heshamelmatary at gmail.com>; William Moore
> <WKMoore at gmail.com>; rtems-devel at rtems.org <devel at rtems.org>
> *Subject: *Re: RPi 4B MMU seems to be enabled but throwing
> aarch64-default-exception error
>
>
>
> Openocd connection is on my website. Here's the link to that.
> https://0xnoor.hashnode.dev/setup-openocd-with-jtag-uart-on-raspberry-pi-4-using-ft232h
>
>
>
> I pushed the code to my github repo. Be sure to checkout noor-dev branch.
> Here's the link for that. https://github.com/0xnoor/rtems
>
>
>
> And yes the code looks bad as of now, I'll do optimization and everything
> soon.
>
>
>
> Thanks
>
>
>
> On Fri, 2 Sept 2022 at 23:31, Alan Cudmore <alan.cudmore at gmail.com> wrote:
>
> Hi Noor,
>
> Can you describe the setup you use for testing the BSP?
>
> I can set up my Pi 4 to try running your code as you update it. How do you
> setup the OCD connection?
>
>
>
> Thanks,
>
> Alan
>
>
>
> On Fri, Sep 2, 2022 at 11:48 AM Noor Aman <nooraman5718 at gmail.com> wrote:
>
> Hey all,
>
> Raspberry Pi 4B MMU seems to be enabled, as reported by openocd but gdb is
> showing to run in a loop from aarch64-defaulit-exception.S file starting
> from code line number 143 to 220.
>
>
>
> From what I can gather, it is being caused by the wrong MMU address.
>
>  Here's a RAM and MMU allocation sizes and base
>
>
>
>   MEMORY {
>   RAM_MMU  : ORIGIN = 0x0, LENGTH = (0x1000 *
> ${AARCH64_MMU_TRANSLATION_TABLE_PAGES})
>   RAM      : ORIGIN = 0x80000, LENGTH = 1024M
>   }
>
>
>
> Relevant Openocd info
>
>
>
> bcm2711.cpu0 halted in AArch64 state due to debug-request, current mode:
> EL1T
> cpsr: 0x200003c4 pc: 0x8e208
> MMU: enabled, D-Cache: enabled, I-Cache: enabled
> Info : New GDB Connection: 1, Target bcm2711.cpu0, state: halted
>
>
>
> Any ideas?
>
>
>
> Thanks,
>
> Noor
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20220904/17ba1773/attachment.htm>


More information about the devel mailing list