diff --git a/core/embed/models/D002/memory.ld b/core/embed/models/D002/memory.ld index 0d2eb0221b..392840905d 100644 --- a/core/embed/models/D002/memory.ld +++ b/core/embed/models/D002/memory.ld @@ -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; diff --git a/core/embed/models/D002/model_D002.h b/core/embed/models/D002/model_D002.h index 64447c3fcd..6488416876 100644 --- a/core/embed/models/D002/model_D002.h +++ b/core/embed/models/D002/model_D002.h @@ -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 diff --git a/core/embed/models/T3W1/memory.ld b/core/embed/models/T3W1/memory.ld index 0d2eb0221b..392840905d 100644 --- a/core/embed/models/T3W1/memory.ld +++ b/core/embed/models/T3W1/memory.ld @@ -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; diff --git a/core/embed/models/T3W1/model_T3W1.h b/core/embed/models/T3W1/model_T3W1.h index 37384749e6..7a2f7f93d8 100644 --- a/core/embed/models/T3W1/model_T3W1.h +++ b/core/embed/models/T3W1/model_T3W1.h @@ -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 diff --git a/core/tests/test_trezor.utils.py b/core/tests/test_trezor.utils.py index af39f4f683..ce3ff1c307 100644 --- a/core/tests/test_trezor.utils.py +++ b/core/tests/test_trezor.utils.py @@ -60,11 +60,11 @@ class TestUtils(unittest.TestCase): ): 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(