diff --git a/hw/application_fpga/fw/tk1/main.c b/hw/application_fpga/fw/tk1/main.c index 60c1e71..cce3ca9 100644 --- a/hw/application_fpga/fw/tk1/main.c +++ b/hw/application_fpga/fw/tk1/main.c @@ -29,7 +29,7 @@ static volatile uint32_t *timer = (volatile uint32_t *)TK1_MMIO_TIMER_ static volatile uint32_t *timer_prescaler = (volatile uint32_t *)TK1_MMIO_TIMER_PRESCALER; static volatile uint32_t *timer_status = (volatile uint32_t *)TK1_MMIO_TIMER_STATUS; static volatile uint32_t *timer_ctrl = (volatile uint32_t *)TK1_MMIO_TIMER_CTRL; -static volatile uint32_t *ram_aslr = (volatile uint32_t *)TK1_MMIO_TK1_RAM_ASLR; +static volatile uint32_t *ram_rand = (volatile uint32_t *)TK1_MMIO_TK1_RAM_ADDR_RAND; static volatile uint32_t *ram_scramble = (volatile uint32_t *)TK1_MMIO_TK1_RAM_SCRAMBLE; // clang-format on @@ -369,7 +369,7 @@ static void scramble_ram(void) uint32_t rnd_incr = rnd_word(); // Set RAM address and data scrambling values - *ram_aslr = rnd_word(); + *ram_rand = rnd_word(); *ram_scramble = rnd_word(); // Fill RAM with random data (FW does not use RAM, has its stack in @@ -380,7 +380,7 @@ static void scramble_ram(void) } // Set new scrambling values, for all use of RAM by app - *ram_aslr = rnd_word(); + *ram_rand = rnd_word(); *ram_scramble = rnd_word(); } diff --git a/hw/application_fpga/fw/tk1_mem.h b/hw/application_fpga/fw/tk1_mem.h index 83a56be..1dec9f2 100644 --- a/hw/application_fpga/fw/tk1_mem.h +++ b/hw/application_fpga/fw/tk1_mem.h @@ -133,7 +133,9 @@ #define TK1_MMIO_TK1_UDI_FIRST 0xff0000c0 #define TK1_MMIO_TK1_UDI_LAST 0xff0000c4 +// Deprecated - use _ADDR_RAND instead #define TK1_MMIO_TK1_RAM_ASLR 0xff000100 +#define TK1_MMIO_TK1_RAM_ADDR_RAND 0xff000100 #define TK1_MMIO_TK1_RAM_SCRAMBLE 0xff000104 #define TK1_MMIO_TK1_CPU_MON_CTRL 0xff000180