Skip to content

Commit

Permalink
chore(core): increase size of assets area for U5G models
Browse files Browse the repository at this point in the history
[no changelog]
  • Loading branch information
TychoVrahe committed Dec 22, 2024
1 parent f10dc86 commit 4f33534
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 46 deletions.
22 changes: 11 additions & 11 deletions core/embed/models/D002/memory.ld
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ BOOTLOADER_MAXSIZE = 0x30000;
BOOTLOADER_SECTOR_START = 0xa;
BOOTLOADER_SECTOR_END = 0x21;
FIRMWARE_START = 0xc044000;
FIRMWARE_MAXSIZE = 0x36c000;
FIRMWARE_MAXSIZE = 0x35c000;
FIRMWARE_SECTOR_START = 0x22;
FIRMWARE_SECTOR_END = 0x1d7;
FIRMWARE_SECTOR_END = 0x1cf;
KERNEL_START = 0xc044000;
KERNEL_MAXSIZE = 0x80000;
KERNEL_U_FLASH_SIZE = 0x200;
STORAGE_1_START = 0xc3b0000;
STORAGE_1_START = 0xc3a0000;
STORAGE_1_MAXSIZE = 0x20000;
STORAGE_1_SECTOR_START = 0x1d8;
STORAGE_1_SECTOR_END = 0x1e7;
STORAGE_2_START = 0xc3d0000;
STORAGE_1_SECTOR_START = 0x1d0;
STORAGE_1_SECTOR_END = 0x1df;
STORAGE_2_START = 0xc3c0000;
STORAGE_2_MAXSIZE = 0x20000;
STORAGE_2_SECTOR_START = 0x1e8;
STORAGE_2_SECTOR_END = 0x1f7;
ASSETS_START = 0xc3f0000;
ASSETS_MAXSIZE = 0x10000;
ASSETS_SECTOR_START = 0x1f8;
STORAGE_2_SECTOR_START = 0x1e0;
STORAGE_2_SECTOR_END = 0x1ef;
ASSETS_START = 0xc3e0000;
ASSETS_MAXSIZE = 0x20000;
ASSETS_SECTOR_START = 0x1f0;
ASSETS_SECTOR_END = 0x1ff;
FB1_RAM_START = 0x30000000;
FB1_RAM_SIZE = 0xbfe00;
Expand Down
22 changes: 11 additions & 11 deletions core/embed/models/D002/model_D002.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,26 +62,26 @@
#define BOOTLOADER_SECTOR_END 0x21

#define FIRMWARE_START 0x0C044000
#define FIRMWARE_MAXSIZE (438 * 8 * 1024) // 3504 kB
#define FIRMWARE_MAXSIZE (430 * 8 * 1024) // 3440 kB
#define FIRMWARE_SECTOR_START 0x22
#define FIRMWARE_SECTOR_END 0x1D7
#define FIRMWARE_SECTOR_END 0x1CF
#define KERNEL_START 0x0C044000
#define KERNEL_MAXSIZE (512 * 1024) // 512 kB
#define KERNEL_U_FLASH_SIZE 512

#define STORAGE_1_START 0x0C3B0000
#define STORAGE_1_START 0x0C3A0000
#define STORAGE_1_MAXSIZE (16 * 8 * 1024) // 128 kB
#define STORAGE_1_SECTOR_START 0x1D8
#define STORAGE_1_SECTOR_END 0x1E7
#define STORAGE_1_SECTOR_START 0x1D0
#define STORAGE_1_SECTOR_END 0x1DF

#define STORAGE_2_START 0x0C3D0000
#define STORAGE_2_START 0x0C3C0000
#define STORAGE_2_MAXSIZE (16 * 8 * 1024) // 128 kB
#define STORAGE_2_SECTOR_START 0x1E8
#define STORAGE_2_SECTOR_END 0x1F7
#define STORAGE_2_SECTOR_START 0x1E0
#define STORAGE_2_SECTOR_END 0x1EF

#define ASSETS_START 0x0C3F0000
#define ASSETS_MAXSIZE (8 * 8 * 1024) // 64 kB
#define ASSETS_SECTOR_START 0x1F8
#define ASSETS_START 0x0C3E0000
#define ASSETS_MAXSIZE (16 * 8 * 1024) // 128 kB
#define ASSETS_SECTOR_START 0x1F0
#define ASSETS_SECTOR_END 0x1FF

// RAM layout
Expand Down
22 changes: 11 additions & 11 deletions core/embed/models/T3W1/memory.ld
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ BOOTLOADER_MAXSIZE = 0x30000;
BOOTLOADER_SECTOR_START = 0xa;
BOOTLOADER_SECTOR_END = 0x21;
FIRMWARE_START = 0xc044000;
FIRMWARE_MAXSIZE = 0x36c000;
FIRMWARE_MAXSIZE = 0x35c000;
FIRMWARE_SECTOR_START = 0x22;
FIRMWARE_SECTOR_END = 0x1d7;
FIRMWARE_SECTOR_END = 0x1cf;
KERNEL_START = 0xc044000;
KERNEL_MAXSIZE = 0x80000;
KERNEL_U_FLASH_SIZE = 0x200;
STORAGE_1_START = 0xc3b0000;
STORAGE_1_START = 0xc3a0000;
STORAGE_1_MAXSIZE = 0x20000;
STORAGE_1_SECTOR_START = 0x1d8;
STORAGE_1_SECTOR_END = 0x1e7;
STORAGE_2_START = 0xc3d0000;
STORAGE_1_SECTOR_START = 0x1d0;
STORAGE_1_SECTOR_END = 0x1df;
STORAGE_2_START = 0xc3c0000;
STORAGE_2_MAXSIZE = 0x20000;
STORAGE_2_SECTOR_START = 0x1e8;
STORAGE_2_SECTOR_END = 0x1f7;
ASSETS_START = 0xc3f0000;
ASSETS_MAXSIZE = 0x10000;
ASSETS_SECTOR_START = 0x1f8;
STORAGE_2_SECTOR_START = 0x1e0;
STORAGE_2_SECTOR_END = 0x1ef;
ASSETS_START = 0xc3e0000;
ASSETS_MAXSIZE = 0x20000;
ASSETS_SECTOR_START = 0x1f0;
ASSETS_SECTOR_END = 0x1ff;
FB1_RAM_START = 0x30000000;
FB1_RAM_SIZE = 0xbfe00;
Expand Down
22 changes: 11 additions & 11 deletions core/embed/models/T3W1/model_T3W1.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,26 +68,26 @@
#define BOOTLOADER_SECTOR_END 0x21

#define FIRMWARE_START 0x0C044000
#define FIRMWARE_MAXSIZE (438 * 8 * 1024) // 3504 kB
#define FIRMWARE_MAXSIZE (430 * 8 * 1024) // 3440 kB
#define FIRMWARE_SECTOR_START 0x22
#define FIRMWARE_SECTOR_END 0x1D7
#define FIRMWARE_SECTOR_END 0x1CF
#define KERNEL_START 0x0C044000
#define KERNEL_MAXSIZE (512 * 1024) // 512 kB
#define KERNEL_U_FLASH_SIZE 512

#define STORAGE_1_START 0x0C3B0000
#define STORAGE_1_START 0x0C3A0000
#define STORAGE_1_MAXSIZE (16 * 8 * 1024) // 128 kB
#define STORAGE_1_SECTOR_START 0x1D8
#define STORAGE_1_SECTOR_END 0x1E7
#define STORAGE_1_SECTOR_START 0x1D0
#define STORAGE_1_SECTOR_END 0x1DF

#define STORAGE_2_START 0x0C3D0000
#define STORAGE_2_START 0x0C3C0000
#define STORAGE_2_MAXSIZE (16 * 8 * 1024) // 128 kB
#define STORAGE_2_SECTOR_START 0x1E8
#define STORAGE_2_SECTOR_END 0x1F7
#define STORAGE_2_SECTOR_START 0x1E0
#define STORAGE_2_SECTOR_END 0x1EF

#define ASSETS_START 0x0C3F0000
#define ASSETS_MAXSIZE (8 * 8 * 1024) // 64 kB
#define ASSETS_SECTOR_START 0x1F8
#define ASSETS_START 0x0C3E0000
#define ASSETS_MAXSIZE (16 * 8 * 1024) // 128 kB
#define ASSETS_SECTOR_START 0x1F0
#define ASSETS_SECTOR_END 0x1FF

// RAM layout
Expand Down
4 changes: 2 additions & 2 deletions core/tests/test_trezor.utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ def test_firmware_hash(self):
):
self.assertEqual(
utils.firmware_hash(),
b"\xde\xce\xc5\xf6\xa4vgl5\x13l2\xa5\xf8F\xd8\xba\n$\x0b!x\x1fVM\x1e\xf3}@\xd9\xa8\xe9",
b"R\x17\x04\xaaC\x12\x8e\xbb\xa3RP\x83'J\x899'\xc2[\xa8\xac\x8a\x100&\x06\xba\xa2'C\xdb\x19",
)
self.assertEqual(
utils.firmware_hash(b"0123456789abcdef"),
b"\xb9w\xa0\x02\xbb\xa5\xa3\x90%.\x13\x97\xf8\xf0\xa9\n\xd1\xe8\xdc\xc5\x120\x81\xd0\x13\x13P\x1d\x11\xf70Y",
b"\xc3?\x7f\x0c0\xf1\xb8\xe5]0\xb7\xfd\x05!\xde\xab\xb6^\xd2R\xba\x18nw\x0c\x99\xc9\x1a(\x8b\xb1\xeb",
)
else:
self.assertEqual(
Expand Down

0 comments on commit 4f33534

Please sign in to comment.