Skip to content

Commit

Permalink
Aarch64 support for FDT fixups.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarske committed Nov 8, 2024
1 parent 4a3beba commit 454dc1a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
4 changes: 2 additions & 2 deletions IDE/XilinxSDK/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ Successfully ran Hello World application
6. Build “boot.bin” image:
* `bootgen -image boot.bif -arch zynqmp -o i BOOT.BIN -w`

Note: To generate a report of a boot.bin use the `bootgen_utility`:
`bootgen_utility -arch zynqmp -bin boot.bin -out boot.bin.txt`
Note: To generate a report of a boot.bin use the `bootgen_utility` or after 2022.1 use `bootgen -read`:
`bootgen -read -arch zynqmp -bin boot.bin -out boot.bin.txt`

## Post Quantum

Expand Down
7 changes: 7 additions & 0 deletions hal/zynq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1109,6 +1109,13 @@ void* hal_get_dts_address(void)
{
return (void*)WOLFBOOT_DTS_BOOT_ADDRESS;
}

int hal_dts_fixup(void* dts_addr)
{
/* place FDT fixup specific to ZynqMP here */
//fdt_set_boot_cpuid_phys(buf, fdt_boot_cpuid_phys(fdt));
return 0;
}
#endif


Expand Down
14 changes: 14 additions & 0 deletions src/boot_aarch64.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@ void boot_entry_C(void)
main();
}


#ifdef MMU
int __attribute((weak)) hal_dts_fixup(void* dts_addr)
{
(void)dts_addr;
return 0;
}
#endif


/* This is the main loop for the bootloader.
*
* It performs the following actions:
Expand All @@ -80,6 +90,10 @@ void RAMFUNCTION do_boot(const uint32_t *app_offset, const uint32_t* dts_offset)
void RAMFUNCTION do_boot(const uint32_t *app_offset)
#endif
{
#ifdef MMU
hal_dts_fixup((uint32_t*)dts_offset);
#endif

/* Set application address via x4 */
asm volatile("mov x4, %0" : : "r"(app_offset));

Expand Down

0 comments on commit 454dc1a

Please sign in to comment.