Skip to content

Commit

Permalink
Fixes for DTS.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarske committed Sep 18, 2023
1 parent 7f01d6b commit ae8d35f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
8 changes: 6 additions & 2 deletions config/examples/nxp-t2080.config
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ BOOTLOADER_PARTITION_SIZE=0x10000

WOLFBOOT_PARTITION_BOOT_ADDRESS?=0xEFFD0000
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0xEFFB0000

# Location of temporary sector used during updates
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0xEFFA0000
WOLFBOOT_LOAD_ADDRESS?=0x200000
WOLFBOOT_LOAD_DTS_ADDRESS?=0x40000

# DTS (Device Tree)
WOLFBOOT_DTS_BOOT_ADDRESS?=0xE8040000
WOLFBOOT_LOAD_DTS_ADDRESS?=0x200000
2 changes: 1 addition & 1 deletion hal/nxp_t1024.c
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@ void hal_prepare_boot(void)
#ifdef MMU
void* hal_get_dts_address(void)
{
return (void*)WOLFBOOT_LOAD_DTS_ADDRESS;
return (void*)WOLFBOOT_DTS_BOOT_ADDRESS;
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion hal/nxp_t2080.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,6 @@ void hal_prepare_boot(void)
#ifdef MMU
void* hal_get_dts_address(void)
{
return (void*)WOLFBOOT_LOAD_DTS_ADDRESS;
return (void*)WOLFBOOT_DTS_BOOT_ADDRESS;
}
#endif
2 changes: 1 addition & 1 deletion hal/zynq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,7 @@ void RAMFUNCTION ext_flash_unlock(void)
#ifdef MMU
void* hal_get_dts_address(void)
{
return (void*)WOLFBOOT_LOAD_DTS_ADDRESS;
return (void*)WOLFBOOT_DTS_BOOT_ADDRESS;
}
#endif

Expand Down
3 changes: 2 additions & 1 deletion src/update_ram.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ void RAMFUNCTION wolfBoot_start(void)
dts_size = (uint32_t)ret;
wolfBoot_printf("Loading DTB (size %d) to RAM at %08lx\n",
dts_size, dts_addr);
memcpy(dts_addr, (void*)WOLFBOOT_DTS_BOOT_ADDRESS, dts_size);
memcpy((void*)WOLFBOOT_LOAD_DTS_ADDRESS, dts_addr, dts_size);
dts_addr = (uint8_t*)WOLFBOOT_LOAD_DTS_ADDRESS;
}
}
}
Expand Down

0 comments on commit ae8d35f

Please sign in to comment.