This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Loading elf to versatile-juno A57 bare-metal fail

Hi folks,

An error occurred when I loading program onto the versatile-juno A57 by DS-5. The detail information is as shown as following. Basically, the MMU was turning on and the pages were mapping correctly. (Verified by FastModel)

Then I tried to load different images, but still got the same error message. And load failed at 40K or tenth page. (The page size is 4K.)

Any idea?

thanks,

Dave

DS-5 Command:  loadfile "myimage.elf"

Error message:

---------

ERROR(CMD16-TAD274-NAL18):
! Failed to load "myimage.elf"
! Failed to write 33,284 bytes to address EL3:0x0000000000400B4C while writing block of 4,096 bytes to address EL3:0x0000000000403B4C
! Bus error on memory operation.

---------

Debugger:   ARM DS-5 Ultimate Edition 5.20.2 and Eclipse 4.3.2

ISA:  ARMv8 AArch64

Environment: bare-metal

Semi-hosting: on

MMU: enable

SCTLR_EL3: 0x00C5383D

The header info of myimage.elf

  myimage.elf:     file format elf64-littleaarch64
  myimage.elf
  architecture: aarch64, flags 0x00000012:
  EXEC_P, HAS_SYMS
  start address 0x0000000000001000

  Program Header:
      LOAD off    0x0000000000000190 vaddr 0x0000000000001000 paddr 0x0000000000001000 align 2**3  filesz 0x0000000000004f94 memsz 0x0000000000004f94 flags r-x
      LOAD off    0x0000000000005124 vaddr 0x0000000000400b4c paddr 0x0000000000400b4c align 2**2  filesz 0x0000000000008204 memsz 0x0000000000008204 flags r-x
      LOAD off    0x000000000000d328 vaddr 0x00000000004267e4 paddr 0x00000000004267e4 align 2**2  filesz 0x000000000000677c memsz 0x000000000000677c flags rwx
      LOAD off    0x0000000000013aa4 vaddr 0x0000000000469360 paddr 0x0000000000469360 align 2**0  filesz 0x0000000000000008 memsz 0x0000000000000008 flags rw-
      LOAD off    0x0000000000013aac vaddr 0x000000000049bb70 paddr 0x000000000049bb70 align 2**0  filesz 0x000000000000d770 memsz 0x000000000000d770 flags rw-
      LOAD off    0x000000000002121c vaddr 0x00000040007feda0 paddr 0x00000040007feda0 align 2**0  filesz 0x00000000000002f0 memsz 0x00000000000002f0 flags rw-
  private flags = 0:
  • Hi Dave,

    Please could you pass this on to ARM Technical Support?

    They will be able to work through the problem at your convenience.

    Thanks,

    Joe

  • Hello,

    Basically, the MMU was turning on and the pages were mapping correctly. (Verified by FastModel)

    I assume by this that you are not using the ARM Trusted Firmware, and are also using non-flat-mapped translation tables, seeing as physical address 0x403B4C is marked as reserved on the Juno's memory map?

    Please can you confirm that your translation tables are configured such that virtual address 0x403B4C has a valid mapping to a writeable physical address?

    You can use DS-5's built-in MMU view to do this:

    1. Run your code that sets up the translation tables and enables the MMU
    2. Halt the CPU
    3. Navigate to "Window" > "Show View" > "MMU"
    4. Use the "Translation" tab to check for a valid mapping for virtual address 0x403B4C, and that the resulting physical address is writeable

    You can also use the "Memory Map" tab of the MMU view to see your entire memory map, which can help to quickly identify any problems.

    If, after following the above steps, you cannot spot any issues with your translation tables and are still encountering this issue, then please submit a ticket to ARM Technical Support as recommended by Joe.

    I hope this helps,

    Ash.