mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-12-15 16:49:15 -05:00
fpga/fw: Resize ROM and FW_RAM, add RESETINFO partition
In order to be able to leave data for firmware signalling the intention with a reset or to leave data for the next app in a chain of apps, we introduce a part of FW_RAM that can be used to store this data. In order to do this, we: - Change size of ROM from 6 KB to 8 KB. - Change size of FW_RAM, from 2 KB to 4 KB. - Add RESETINFO memory partition inside FW_RAM. - Add generation of map file. - Change CFLAGS from using -O2 to using -Os. - Update address ranges for valid access to ROM and FW_RAM. - Move stack to be located before data+bss and the RESETINFO data above them. This also means we introduce hardware stack overflow protection through the Security Monitor. - Revise firmware README to the new use of FW_RAM.
This commit is contained in:
parent
3126a9c51e
commit
8f2f312531
13 changed files with 310 additions and 77 deletions
|
|
@ -334,8 +334,8 @@ static void run(const struct context *ctx)
|
|||
// clang-format off
|
||||
#ifndef S_SPLINT_S
|
||||
asm volatile(
|
||||
"li a0, 0xd0000000;" // FW_RAM
|
||||
"li a1, 0xd0000800;" // End of 2 KB FW_RAM (just past the end)
|
||||
"la a0, _sstack;"
|
||||
"la a1, _estack;"
|
||||
"loop:;"
|
||||
"sw zero, 0(a0);"
|
||||
"addi a0, a0, 4;"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue