1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-17 11:58:13 +00:00
Commit Graph

303 Commits

Author SHA1 Message Date
Jan Pochyla
12708b4987 unix/flash: default FLASH_FILE 2017-11-05 20:46:11 +01:00
Jan Pochyla
c78babdc12 flash: add flash_get_address 2017-11-05 20:46:11 +01:00
Jan Pochyla
f07b4dda0b modtrezorconfig: extract pin & unlocking to storage.c 2017-11-05 20:46:11 +01:00
Jan Pochyla
fdc2f6a39d modtrezorconfig: use new flash API 2017-11-05 20:46:11 +01:00
Jan Pochyla
543e8c5007 flash: add unix/flash.c 2017-11-05 20:46:11 +01:00
Jan Pochyla
4cabe40220 storage: pin checking in c proof of concept
TODO: move out of modtrezorconfig
TODO: flash unix mock
2017-11-05 20:46:11 +01:00
mcudev
2ebd2b1b6b jump_to: clear out before the next stage NMI exception handler can run 2017-11-05 19:37:05 +01:00
mcudev
ffc16a98b5 rng: header cleanup, loop codestyle 2017-11-05 19:37:05 +01:00
mcudev
cc9aa8c197 cleanup: do not use reserved identifiers for header guards 2017-11-05 19:37:05 +01:00
Pavol Rusnak
77cc62644d
firmware: don't return CYCCNT contents as it is always zero anyway (cycle counter is disabled) 2017-11-05 18:02:47 +01:00
Pavol Rusnak
8190e0909e
boardloader: set BOR level to 2 2017-11-05 16:42:20 +01:00
mcudev
1737f17f43
boardloader: flash option bytes, production changes 2017-11-05 16:42:20 +01:00
mcudev
15bdc59b46 touch: reset touch panel 2017-11-05 16:20:37 +01:00
mcudev
d9a64fbb6a touch: app note related updates and exit loop upon detection 2017-11-05 16:20:37 +01:00
mcudev
2ae1c99b06 touch: address simplification 2017-11-05 16:20:37 +01:00
mcudev
6aeccd5ee1 touch: make i2c_handle static and trivial simplification 2017-11-05 16:20:37 +01:00
mcudev
d1ed02fb98 touch: use full 12-bit X and Y values 2017-11-05 16:20:37 +01:00
mcudev
edd95d9b65 secbool: add unsigned literal suffixes 2017-11-03 19:38:18 +01:00
mcudev
7e01a733a3 shutdown: reorder operations 2017-11-03 19:33:15 +01:00
mcudev
5be5e19f99 clear_otg_hs_memory: remove unpredictable write 2017-11-03 19:33:15 +01:00
Jan Pochyla
c632f9450f trezorhal: add spread spectrum clock 2017-10-31 11:49:18 +01:00
Jan Pochyla
6213974b6e prodtest: emulate python impl in OTP READ 2017-10-30 14:08:56 +01:00
Pavol Rusnak
7d0a12c29e
unix: fix build 2017-10-29 23:26:44 +01:00
Pavol Rusnak
311a28242b
boardloader: fix production build, disable reset_flags_init for now 2017-10-29 21:12:40 +01:00
Pavol Rusnak
16f657361c
boardloader: disable BOR protection; fix setting OB flags 2017-10-29 18:07:05 +01:00
Pavol Rusnak
a08f18c2ce
boardloader: use PVD level 4 2017-10-29 17:58:33 +01:00
Pavol Rusnak
30ddb53c11
prodtest: fix calls to sdcard functions 2017-10-29 17:51:16 +01:00
Pavol Rusnak
6738796d8b
trezorhal: call shutdown in default_handler 2017-10-29 17:50:50 +01:00
Pavol Rusnak
69c17dae9b
trezorhal: use uint32_t* for sdcard_{read,write}_blocks 2017-10-29 16:34:09 +01:00
Pavol Rusnak
fa802e9353
boardloader: fix test for existence of bootloader on sd card 2017-10-29 16:23:25 +01:00
Pavol Rusnak
a56da7d7ed
prodtest: fix sdcard test 2017-10-29 15:07:34 +01:00
Pavol Rusnak
5d6d342813
bootloader: erase storage on vendor change 2017-10-27 18:45:33 +02:00
Jan Pochyla
836508657d prodtest: style 2017-10-27 17:26:14 +02:00
Pavol Rusnak
3851404d04
small cosmetic changes to prodtest and others 2017-10-27 06:01:22 +02:00
Pavol Rusnak
d0e81edc8f
bootloader: check chunk hash before flashing 2017-10-27 05:09:35 +02:00
Pavol Rusnak
36143033c4
bootloader: check vendor header / image header before flashing 2017-10-27 04:49:59 +02:00
Pavol Rusnak
9690f1abdf
bootloader: load chunk into memory first, then save it to flash 2017-10-27 04:20:03 +02:00
Pavol Rusnak
4d36d0e1c1
trezorhal: use sectrue where possible 2017-10-27 03:58:00 +02:00
Pavol Rusnak
efa918a2f9
prodtest: code cleanup, fix build 2017-10-27 01:00:39 +02:00
Jan Pochyla
905e0bc82a
prodtest: codestyle, touch, fixes 2017-10-26 23:55:15 +02:00
Jan Pochyla
51d00e1de7
trezorhal/usb: add Inf timeout to blocking fns 2017-10-26 23:55:14 +02:00
Jan Pochyla
9cb342fcb6
prodtest: implement commands 2017-10-26 23:55:14 +02:00
Jan Pochyla
95965c3ff7
prodtest: add new target 2017-10-26 23:55:13 +02:00
Pavol Rusnak
f73eb3effd
trezorhal: introduce secbool/sectrue/secfalse and use it where possible 2017-10-26 23:51:39 +02:00
Pavol Rusnak
7ddfdf69d6
trezorhal: support for non-continous areas in check_image_contents 2017-10-26 19:09:53 +02:00
Pavol Rusnak
89cc35b195
trezorhal: fix hash offset in check_image_contents 2017-10-26 18:53:20 +02:00
Pavol Rusnak
7c891e19e5
boardloader, bootloader: check image contents against hashes in the header 2017-10-26 17:16:59 +02:00
Pavol Rusnak
b4ff9deb6b
bootloader: better wording 2017-10-26 15:56:57 +02:00
Pavol Rusnak
63636be0a3
trezorhal: rework header checking to new format 2017-10-26 15:54:02 +02:00
Pavol Rusnak
9e82a4d348
bootloader, firmware: introduce chunk hashes in the image header 2017-10-26 14:25:10 +02:00
Pavol Rusnak
3c974095aa
trezorhal: increase image header size from 512 to 1024 bytes 2017-10-26 02:11:40 +02:00
Pavol Rusnak
0c6ee14ee1
trezorhal: move image related defines to image.h 2017-10-26 01:17:57 +02:00
Pavol Rusnak
28aca51bc8
firmware: sign just the firmware part, not vendor header 2017-10-26 00:09:21 +02:00
Pavol Rusnak
e4003700cd
bootloader, firmware: update visuals 2017-10-25 15:20:06 +02:00
Pavol Rusnak
8bd258db6f
trezorhal: added calls to USBD_LL_FlushEP in deinit functions 2017-10-24 19:19:57 +02:00
Pavol Rusnak
9e31e0f4d4
bootloader: stop/deinit usb for unplug events as well 2017-10-24 18:48:01 +02:00
mcudev
b922579173 bootloader: cleanup usb on firmware upload success before jumping to firmware (#68) 2017-10-24 18:45:02 +02:00
Pavol Rusnak
d2ecae71d7
trezorhal: return position of last touch event from touch_click 2017-10-24 17:59:25 +02:00
Pavol Rusnak
6e51ee251f
bootloader+firmware: call shutdown instead of inf-loop after main is finished 2017-10-24 17:23:06 +02:00
mcudev
abf7f822b8 boardloader: do not call shutdown directly, return and the startup code handles it 2017-10-24 17:17:20 +02:00
mcudev
041dd951d3 boardloader: do not use ensure before display_init, just return 2017-10-24 17:17:20 +02:00
mcudev
1f6edb448c boardloader: check reset flags for production 2017-10-24 17:17:20 +02:00
mcudev
3f58a771b4 boardloader: stop clearing standby flag 2017-10-24 17:17:20 +02:00
mcudev
b1eea5a434 boardloader: enable PVD programmable voltage detector and interrupt 2017-10-24 17:17:20 +02:00
Jan Pochyla
f93316bebd cleanup .gitignore files 2017-10-24 16:24:59 +02:00
Pavol Rusnak
6b9751d30d
trezorhal: cleanup usb api 2017-10-20 18:51:05 +02:00
Pavol Rusnak
4f041e9f3a
trezorhal: update sdcard api 2017-10-20 18:13:17 +02:00
Pavol Rusnak
3033762618
trezorhal: make touch_init and usb_init return void, use ensure inside 2017-10-20 17:18:55 +02:00
Pavol Rusnak
5f256ce0b0
bootloader: show DOM QR code on welcome screen 2017-10-20 16:07:42 +02:00
Pavol Rusnak
b544fd3f81
bootloader: fix usb_init_all api 2017-10-20 16:03:51 +02:00
Pavol Rusnak
79fe9162b5
trezorhal: simplify api for init functions, use bool and void rather than int 2017-10-20 15:25:24 +02:00
Pavol Rusnak
b51ca0a16e
trezorhal: remove extra comment 2017-10-20 14:56:15 +02:00
Pavol Rusnak
21fac2e2c3
boardloader: don't erase sectors in flash_set_option_bytes for now 2017-10-20 14:42:51 +02:00
mcudev
d6ae912703 boardloader: flash option bytes updates 2017-10-20 14:41:01 +02:00
mcudev
fc7b1cfe81 flash_init: remove empty function from all stages 2017-10-20 14:41:01 +02:00
mcudev
167d476fff image_parse_header: remove undefined behavior and other updates (#61)
boardloader: bootloader: remove undefined behavior in header parsing, code cleanup
2017-10-19 18:45:57 +02:00
mcudev
a0286bcc29 build: further cleanup common symbols (#63) 2017-10-19 15:27:15 +02:00
Pavol Rusnak
749b80ba03
bootloader: fix touch detection at start 2017-10-18 17:18:58 +02:00
mcudev
ee7e6134a2 bootloader, firmware: do not need touch interrupt handlers or to enable touch interrupts (#59) 2017-10-18 16:54:03 +02:00
mcudev
73897c1147 boardloader: remove micropython related code that enables debug features to get clock cycle counts (#58) 2017-10-17 18:29:51 +02:00
Pavol Rusnak
e10d40f846
bootloader: restart into firmware after update, don't shutdown 2017-10-17 18:29:03 +02:00
Pavol Rusnak
c689b1f2cd
bootloader: remove debug code 2017-10-17 17:38:22 +02:00
mcudev
4bda828cbd boardloader: disable flash data cache (#57) 2017-10-17 17:35:10 +02:00
Pavol Rusnak
17c3d2b56f
bootloader: implement UI according to mockup 2017-10-17 17:31:16 +02:00
Pavol Rusnak
fdafae7d8d
trezorhal: remove timer1_get_source_freq function 2017-10-17 15:50:45 +02:00
mcudev
4f16aed757 display: handle TEON and COLMOD the same for both display types (#55) 2017-10-17 14:27:55 +02:00
Pavol Rusnak
4a14fb6c4d
boardloader: move periph_init to lowlevel.c 2017-10-17 11:44:53 +02:00
mcudev
45a4a944d0 boardloader, bootloader, firmware: only call periph_init in boardloader (#54) 2017-10-17 11:42:57 +02:00
mcudev
ac89203e7c SDIO: remove SDIO_IRQHandler and interrupt config (#53) 2017-10-17 00:43:47 +02:00
Pavol Rusnak
6ea9b105e5
boardloader, bootloader: reorder erasing of sectors, check whether sector was really erased 2017-10-16 21:43:07 +02:00
Pavol Rusnak
b1d9a59a79
unix: fix build 2017-10-16 21:02:21 +02:00
Pavol Rusnak
82050912c4
bootloader: implement WipeDevice 2017-10-16 20:56:16 +02:00
mcudev
ca8d93ab5d boardloader, bootloader, firmware: factor out display_pwm_init (#52) 2017-10-16 20:56:05 +02:00
Pavol Rusnak
2010213338
bootloader: first UI steps 2017-10-16 18:04:19 +02:00
mcudev
0e2a1da99b display: remove redundant display commands and increase wait after reset (#51) 2017-10-16 14:46:20 +02:00
Pavol Rusnak
001298a90e
boardloader: erase storage on failed option_bytes 2017-10-16 14:22:10 +02:00
Pavol Rusnak
e8e3ed98f3
boardloader: usability fixes 2017-10-15 22:20:13 +02:00
Pavol Rusnak
b6f9df10bb
display: set minimum possible values for sram controller 2017-10-15 22:07:34 +02:00
Pavol Rusnak
46a0dd8648
display: fix DataSetupTime for ST7789V 2017-10-15 21:39:00 +02:00
mcudev
e2b66436df display: tearing effect cleanup 2017-10-15 21:38:16 +02:00
mcudev
26852e5aee boardloader: display_init stm32f42x updates 2017-10-15 21:38:16 +02:00
mcudev
e4aec8f302 code cleanup 3: add note about timer wrap and use increment operator 2017-10-15 19:34:16 +02:00
mcudev
a1c33e32f0 code cleanup 2: explicit .bss, linker map, and simpler systick 2017-10-15 19:34:16 +02:00
mcudev
5b634098d9 code cleanup 2017-10-15 19:34:16 +02:00
Pavol Rusnak
06fc509cbb
boardloader: reorder calls so one can abort also by ejecting SD card 2017-10-14 13:00:23 +02:00
Pavol Rusnak
8a707ce40d
boardloader: check flash_option_bytes at start 2017-10-14 12:49:00 +02:00
mcudev
70594a9bfe startup: setup the stack protector for the stage before main function (#46) 2017-10-14 12:25:13 +02:00
Pavol Rusnak
4c9e2d45a5
bootloader: use display_fade 2017-10-13 18:21:38 +02:00
Pavol Rusnak
204f0c55e4
bootloader: use ensure 2017-10-13 18:05:47 +02:00
Pavol Rusnak
bdae87ddde
boardloader: small changes to program flow and display output 2017-10-13 17:19:14 +02:00
Pavol Rusnak
4831287357
embed: move call to usb_clear to shutdown function in assembler 2017-10-13 17:18:22 +02:00
Pavol Rusnak
88894e7a8d
embed: disable stack protector for SysTick_Handler 2017-10-13 00:45:26 +02:00
Pavol Rusnak
a7625877ef
embed: call clear_otg_hs_memory from fatal_error 2017-10-13 00:36:12 +02:00
mcudev
73214017fa clear_otg_hs_memory: Delay after an RCC peripheral clock enabling 2017-10-13 00:30:19 +02:00
mcudev
7103404b90 RNG: Delay after an RCC peripheral clock enabling 2017-10-13 00:30:19 +02:00
Pavol Rusnak
c5dfa37f3e
boardloader: don't call copy_sdcard twice 2017-10-13 00:28:06 +02:00
Pavol Rusnak
b60a1ad79f
embed: add shutdown function to fatal_error 2017-10-12 17:34:39 +02:00
Pavol Rusnak
2fc69bed61
embed: rename trassert to ensure 2017-10-12 16:06:53 +02:00
Pavol Rusnak
8cc8272fb3
build: pass gitrev, use it in fatal_error 2017-10-12 16:02:40 +02:00
mcudev
0c1f609675 SystemInit: add more waiting just to be sure (#41) 2017-10-12 14:56:12 +02:00
mcudev
be92d9a7ee vector table updates (#40) 2017-10-12 14:55:59 +02:00
Pavol Rusnak
66b6406b7c
boardloader, bootloader: add write-protection and downgrade-protection respectively 2017-10-12 14:35:01 +02:00
Pavol Rusnak
9a0c8f4687
build: introduce PRODUCTION flag 2017-10-12 12:17:04 +02:00
Pavol Rusnak
380d08f1d0
embed: introduce trassert (trezor assert) 2017-10-12 00:35:14 +02:00
Pavol Rusnak
d003c250d8
boardloader: refactor flash_option_bytes from trezorhal to boardloader/lowlevel 2017-10-11 23:53:29 +02:00
Pavol Rusnak
3982c19378
fix whitespace 2017-10-11 23:37:28 +02:00
mcudev
61e0f6c818 stm32f427 sram bigger (#39) 2017-10-11 23:36:07 +02:00
Pavol Rusnak
98ad17e1ea
firmware: use __FUNCTION__ in consistency with the rest of the code 2017-10-11 23:23:08 +02:00
Pavol Rusnak
7babde646e
embed: more cleanup 2017-10-11 23:11:59 +02:00
Pavol Rusnak
7653eb699d
embed: use 4bpp fonts again 2017-10-11 23:05:08 +02:00
Pavol Rusnak
a43aec0fe3
embed: make F427 the default mcu 2017-10-11 21:36:55 +02:00
Pavol Rusnak
6413c2c23e
embed: rework memory layout, enable stack protector 2017-10-11 21:19:52 +02:00
Pavol Rusnak
7117c59ed9
firmware: drop firmware0 concept 2017-10-11 20:04:17 +02:00
Pavol Rusnak
10ebd43261
firmware: move nlr_jump_fail from common to firmware 2017-10-11 20:01:22 +02:00
Pavol Rusnak
32e48258e4
trezorhal: preparations for F427 support 2017-10-11 19:52:58 +02:00
Pavol Rusnak
eb345046d3
trezorhal: move internal constants to common.c 2017-10-11 19:06:09 +02:00
Pavol Rusnak
69953a91c5
trezorhal: code cleanup, combine stm32_it.c + stm32_system.c into stm32.c 2017-10-11 18:43:39 +02:00
Pavol Rusnak
a6fd1da237
boardloader: wait 5 seconds before copying bootloader 2017-10-11 18:11:38 +02:00
mcudev
ead626404b boardloader: issue 34 (#36) 2017-10-11 12:58:36 +02:00
mcudev
9ea975d37d jump_to: reset registers to zero (#33) 2017-10-10 14:40:57 +02:00
mcudev
8e96978ce2 boardloader, bootloader, firmware stage switching updates (#30) 2017-10-09 19:55:54 +02:00
mcudev
dbfeddce79 firmware: issue #12 (#29) 2017-10-09 17:45:45 +02:00
mcudev
08caf86c5b bootloader: issue #12 (#28) 2017-10-09 17:44:58 +02:00
mcudev
b0c54e2a4b boardloader: simplify linker script (#27) 2017-10-09 17:43:38 +02:00
Pavol Rusnak
7bbfba1ac0
boardloader, bootloader: moving embed/common/* to embed/trezorhal/* 2017-10-08 23:55:05 +02:00
mcudev
8d3540c858 boardloader, bootloader: jump_to memory clearing and simplify code to asm 2017-10-08 23:48:44 +02:00
mcudev
acca6a0945 boardloader: move memset_reg to separate source file 2017-10-08 23:48:44 +02:00
mcudev
bb5b4d2e55 boardloader: simplify vector table config with macro 2017-10-08 23:48:44 +02:00
mcudev
08b231a298 boardloader: factor out vector table 2017-10-08 23:48:44 +02:00
mcudev
4ee5872a55 display: backlight handling (#25) 2017-10-06 11:11:59 +02:00