Commit graph

10340 commits

Author SHA1 Message Date
bunnie
89fb9b4df6 add reference to the presign module 2024-11-21 02:22:39 +08:00
bunnie
30cb5f84f7 make more space in the cramium loader
need code space to handle image verification.

getting kind of heavy, but I think we're almost done.
2024-11-21 02:22:08 +08:00
bunnie
2437712b7b add some basic image integrity checking code
this doesn't protect against malicious tampering (because
the public key is the developer key) but it will at least
catch correctness errors in USB upload and filesystem
behavior.
2024-11-21 02:20:40 +08:00
bunnie
8aa633641f add new dependencies for image checking in loader 2024-11-21 02:20:10 +08:00
bunnie
3bf8598509 make slice cursor peekable 2024-11-21 02:19:45 +08:00
bunnie
fb0efbce3b add helper type for pre-hash digests 2024-11-21 02:19:21 +08:00
bunnie
6c49e2a6dd include patches for shellchat and rootkeys 2024-11-21 02:18:58 +08:00
bunnie
25c30f6cde add bodge to work around HW configuration in patches
right now our patch set assumes a single HW configuration for
cryptography accelerators.

This isn't going to be true going forward. A more scalable approach
to patching accelerators is going to be needed.

For now, we're just falling back to software acceleration for
the cramium target.
2024-11-21 01:39:35 +08:00
bunnie
ec409fedc0 add formatting nit to allow for bodge to work around HW configs
the curve 25519 accelerator hw is different on different targets
so it can't be enabled for all of them all at once.

This is going to be come a bigger problem as time goes on...
2024-11-21 01:37:48 +08:00
bunnie
996b574486 quiet down debug; add a method to expatriate PORTSC 2024-11-20 21:42:02 +08:00
bunnie
ed085f2c83 UX improvements for loader update interface 2024-11-20 21:41:41 +08:00
bunnie
9c1186022f quiet debug 2024-11-20 21:41:23 +08:00
bunnie
8b571561f8 cleanup warning 2024-11-20 21:41:08 +08:00
bunnie
60dcd906ed include slice_cursor in mod list 2024-11-20 21:40:50 +08:00
bunnie
3b567fb3e2 modularize SliceCursor 2024-11-20 21:40:25 +08:00
bunnie
b68abf1d2b change volume label 2024-11-20 20:43:39 +08:00
bunnie
fded456115 commit dependency impact of simple-fatfs 2024-11-20 20:41:26 +08:00
bunnie
6d3a58ccea cleanup warnings 2024-11-20 20:41:10 +08:00
bunnie
9a839e3fe6 add keypress handling and no_std Cursor implementation 2024-11-20 20:40:48 +08:00
bunnie
d9709997fb add template disk image
this is a pre-initialized, FAT12 image that is compatible with
Windows (which is the harder of the OSes to please)
2024-11-20 20:40:05 +08:00
bunnie
e181c0d460 use global allocator for simple-fatfs
also initialize the disk image with some default data
2024-11-20 20:39:27 +08:00
bunnie
8cc80741ac cleanup warning 2024-11-20 20:39:06 +08:00
bunnie
51717fd7d9 move to simple-fatfs 2024-11-20 20:38:31 +08:00
bunnie
2d322d852c cleanup warnin 2024-11-20 20:36:57 +08:00
bunnie
dfe5d50f41 start to lay in the APIs for the USB interface in userspace 2024-11-20 01:46:34 +08:00
bunnie
5d0cc45c43 update lockfile to reflect new dependencies 2024-11-20 01:46:22 +08:00
bunnie
6c79441ee1 add boot option to loader 2024-11-20 01:45:56 +08:00
bunnie
bb594a5c40 try to improve the pmic detection code
we can now recover from an I2C timeout and get the PMIC data
out, but mysteriously, when we leave the routine, the CPU hangs.

I think fundamentally the I2C instability is due to something
very wonky inside the chip itself, so the recovery only papers
over an issue that is only fixed with a reboot...
2024-11-20 01:44:58 +08:00
bunnie
f14cf1948c gfx is now used as part of the update routine 2024-11-20 01:44:28 +08:00
bunnie
d4f209c0b2 add ghostfat to dependencies
in anticipation of starting to emulate the FS
2024-11-20 01:43:46 +08:00
bunnie
391fb84f00 update api to inclued perclk_freq 2024-11-20 01:43:25 +08:00
bunnie
de12d0f73a add usb feature to loader 2024-11-20 01:43:05 +08:00
bunnie
5ec5bc29c9 add keyboard pins to board description 2024-11-20 01:42:47 +08:00
bunnie
6829eae73c add a reset method to the UDMA abstraction 2024-11-20 01:42:27 +08:00
bunnie
72685e2c1c improve i2c error recovery 2024-11-20 01:42:06 +08:00
bunnie
5279e50ace
Merge pull request #594 from betrusted-io/udma-debug
Udma debug
2024-11-19 22:33:08 +08:00
bunnie
e42b7195b0 add notes about performance improvement for the future 2024-11-19 22:21:48 +08:00
bunnie
d78899ca74 implement retry on SPIM failure
somehow, the retry still *fails* - to be looked into in the future
2024-11-19 22:17:19 +08:00
bunnie
265805ac94 cleanup warnings 2024-11-19 22:17:07 +08:00
bunnie
289d6879ca fix typo 2024-11-19 22:15:47 +08:00
bunnie
a40d78f3ea add backpressure setting to SPIM; also re-attempt interface clearing
...now that we have the right bit...
2024-11-19 00:00:50 +08:00
bunnie
e8e28702e2 fix position of clear bit; add backpressure feature for NTO 2024-11-19 00:00:18 +08:00
bunnie
53de9cc273
Merge pull request #593 from betrusted-io/mpw-dev
Mpw dev
2024-11-18 18:41:56 +08:00
bunnie
fe45f40cb7 increase verbosity of pl230 output for co-debugging 2024-11-18 18:38:41 +08:00
bunnie
64520cf5a3 add note about failing option for pl230 2024-11-18 18:38:15 +08:00
bunnie
626d997868 move pl230 test to an easier place for checking 2024-11-18 18:37:33 +08:00
bunnie
d0e638e020 enequeue data before command is issued
it becomes clear on a slower bus configuration that this is
the correct ordering for udma

also add code to debug timeout cases
2024-11-18 18:36:23 +08:00
bunnie
0c5fde7fc2 reformat busy statement for easier debug 2024-11-18 18:35:56 +08:00
bunnie
4a99341269 cleanup warnings 2024-11-14 22:19:40 +08:00
bunnie
fac7adca35 improve UX a little bit 2024-11-14 00:36:24 +08:00