mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-04 20:01:18 +00:00
Removed references to pin fail area
This commit is contained in:
parent
497021f2ef
commit
9f2bbb0e1a
@ -7,7 +7,7 @@
|
|||||||
| Sector 0 | 0x08000000 - 0x08003FFF | 16 KiB | boardloader (1st stage) (write-protected)
|
| Sector 0 | 0x08000000 - 0x08003FFF | 16 KiB | boardloader (1st stage) (write-protected)
|
||||||
| Sector 1 | 0x08004000 - 0x08007FFF | 16 KiB | boardloader (1st stage) (write-protected)
|
| Sector 1 | 0x08004000 - 0x08007FFF | 16 KiB | boardloader (1st stage) (write-protected)
|
||||||
| Sector 2 | 0x08008000 - 0x0800BFFF | 16 KiB | boardloader (1st stage) (write-protected)
|
| Sector 2 | 0x08008000 - 0x0800BFFF | 16 KiB | boardloader (1st stage) (write-protected)
|
||||||
| Sector 3 | 0x0800C000 - 0x0800FFFF | 16 KiB | PIN counter area
|
| Sector 3 | 0x0800C000 - 0x0800FFFF | 16 KiB | unused
|
||||||
| Sector 4 | 0x08010000 - 0x0801FFFF | 64 KiB | storage area #1
|
| Sector 4 | 0x08010000 - 0x0801FFFF | 64 KiB | storage area #1
|
||||||
| Sector 5 | 0x08020000 - 0x0803FFFF | 128 KiB | bootloader (2nd stage)
|
| Sector 5 | 0x08020000 - 0x0803FFFF | 128 KiB | bootloader (2nd stage)
|
||||||
| Sector 6 | 0x08040000 - 0x0805FFFF | 128 KiB | firmware
|
| Sector 6 | 0x08040000 - 0x0805FFFF | 128 KiB | firmware
|
||||||
|
@ -86,6 +86,7 @@ static secbool copy_sdcard(void)
|
|||||||
|
|
||||||
// erase all flash (except boardloader)
|
// erase all flash (except boardloader)
|
||||||
const uint8_t sectors[] = {
|
const uint8_t sectors[] = {
|
||||||
|
3,
|
||||||
FLASH_SECTOR_STORAGE_1,
|
FLASH_SECTOR_STORAGE_1,
|
||||||
FLASH_SECTOR_STORAGE_2,
|
FLASH_SECTOR_STORAGE_2,
|
||||||
FLASH_SECTOR_BOOTLOADER,
|
FLASH_SECTOR_BOOTLOADER,
|
||||||
@ -106,7 +107,6 @@ static secbool copy_sdcard(void)
|
|||||||
21,
|
21,
|
||||||
22,
|
22,
|
||||||
FLASH_SECTOR_FIRMWARE_EXTRA_END,
|
FLASH_SECTOR_FIRMWARE_EXTRA_END,
|
||||||
FLASH_SECTOR_PIN_AREA,
|
|
||||||
};
|
};
|
||||||
if (sectrue != flash_erase_sectors(sectors, sizeof(sectors), progress_callback)) {
|
if (sectrue != flash_erase_sectors(sectors, sizeof(sectors), progress_callback)) {
|
||||||
display_printf(" failed\n");
|
display_printf(" failed\n");
|
||||||
|
@ -371,7 +371,6 @@ int process_msg_FirmwareUpload(uint8_t iface_num, uint32_t msg_size, uint8_t *bu
|
|||||||
FLASH_SECTOR_STORAGE_2,
|
FLASH_SECTOR_STORAGE_2,
|
||||||
};
|
};
|
||||||
ensure(flash_erase_sectors(sectors_storage, sizeof(sectors_storage), NULL), NULL);
|
ensure(flash_erase_sectors(sectors_storage, sizeof(sectors_storage), NULL), NULL);
|
||||||
ensure(flash_erase_sector(FLASH_SECTOR_PIN_AREA), NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
firstskip = IMAGE_HEADER_SIZE + vhdr.hdrlen;
|
firstskip = IMAGE_HEADER_SIZE + vhdr.hdrlen;
|
||||||
@ -432,6 +431,7 @@ static void progress_wipe(int pos, int len)
|
|||||||
int process_msg_WipeDevice(uint8_t iface_num, uint32_t msg_size, uint8_t *buf)
|
int process_msg_WipeDevice(uint8_t iface_num, uint32_t msg_size, uint8_t *buf)
|
||||||
{
|
{
|
||||||
const uint8_t sectors[] = {
|
const uint8_t sectors[] = {
|
||||||
|
3,
|
||||||
FLASH_SECTOR_STORAGE_1,
|
FLASH_SECTOR_STORAGE_1,
|
||||||
FLASH_SECTOR_STORAGE_2,
|
FLASH_SECTOR_STORAGE_2,
|
||||||
FLASH_SECTOR_FIRMWARE_START,
|
FLASH_SECTOR_FIRMWARE_START,
|
||||||
@ -451,7 +451,6 @@ int process_msg_WipeDevice(uint8_t iface_num, uint32_t msg_size, uint8_t *buf)
|
|||||||
21,
|
21,
|
||||||
22,
|
22,
|
||||||
FLASH_SECTOR_FIRMWARE_EXTRA_END,
|
FLASH_SECTOR_FIRMWARE_EXTRA_END,
|
||||||
FLASH_SECTOR_PIN_AREA,
|
|
||||||
};
|
};
|
||||||
if (sectrue != flash_erase_sectors(sectors, sizeof(sectors), progress_wipe)) {
|
if (sectrue != flash_erase_sectors(sectors, sizeof(sectors), progress_wipe)) {
|
||||||
MSG_SEND_INIT(Failure);
|
MSG_SEND_INIT(Failure);
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// 1
|
// 1
|
||||||
#define FLASH_SECTOR_BOARDLOADER_END 2
|
#define FLASH_SECTOR_BOARDLOADER_END 2
|
||||||
|
|
||||||
#define FLASH_SECTOR_PIN_AREA 3
|
// 3
|
||||||
|
|
||||||
#define FLASH_SECTOR_STORAGE_1 4
|
#define FLASH_SECTOR_STORAGE_1 4
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user