mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-06-02 04:52:43 -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
|
@ -89,7 +89,7 @@ module application_fpga (
|
|||
wire [31 : 0] cpu_wdata;
|
||||
|
||||
reg rom_cs;
|
||||
reg [11 : 0] rom_address;
|
||||
reg [10 : 0] rom_address;
|
||||
wire [31 : 0] rom_read_data;
|
||||
wire rom_ready;
|
||||
|
||||
|
@ -128,7 +128,7 @@ module application_fpga (
|
|||
|
||||
reg fw_ram_cs;
|
||||
reg [ 3 : 0] fw_ram_we;
|
||||
reg [ 8 : 0] fw_ram_address;
|
||||
reg [ 9 : 0] fw_ram_address;
|
||||
reg [31 : 0] fw_ram_write_data;
|
||||
wire [31 : 0] fw_ram_read_data;
|
||||
wire fw_ram_ready;
|
||||
|
@ -394,7 +394,7 @@ module application_fpga (
|
|||
muxed_rdata_new = 32'h0;
|
||||
|
||||
rom_cs = 1'h0;
|
||||
rom_address = cpu_addr[13 : 2];
|
||||
rom_address = cpu_addr[12 : 2];
|
||||
|
||||
ram_cs = 1'h0;
|
||||
ram_we = 4'h0;
|
||||
|
@ -403,7 +403,7 @@ module application_fpga (
|
|||
|
||||
fw_ram_cs = 1'h0;
|
||||
fw_ram_we = cpu_wstrb;
|
||||
fw_ram_address = cpu_addr[10 : 2];
|
||||
fw_ram_address = cpu_addr[11 : 2];
|
||||
fw_ram_write_data = cpu_wdata;
|
||||
|
||||
trng_cs = 1'h0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue