mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-09-22 13:54:52 -04: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
|
@ -54,6 +54,8 @@
|
|||
*/
|
||||
|
||||
#define TK1_ROM_BASE 0x00000000
|
||||
#define TK1_ROM_SIZE 0x2000
|
||||
|
||||
#define TK1_RAM_BASE 0x40000000
|
||||
#define TK1_RAM_SIZE 0x20000
|
||||
|
||||
|
@ -63,8 +65,8 @@
|
|||
#define TK1_APP_MAX_SIZE 0x20000
|
||||
|
||||
#define TK1_MMIO_FW_RAM_BASE 0xd0000000
|
||||
// FW_RAM is 2048 bytes
|
||||
#define TK1_MMIO_FW_RAM_SIZE 0x800
|
||||
// FW_RAM is 4096 bytes
|
||||
#define TK1_MMIO_FW_RAM_SIZE 0x1000
|
||||
|
||||
#define TK1_MMIO_TRNG_BASE 0xc0000000
|
||||
#define TK1_MMIO_TRNG_STATUS 0xc0000024
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue