Commit graph

418 commits

Author SHA1 Message Date
bunnie
dde034c101 document the safety issue vs USB static mut in the loader
I think we're OK to get away with this, but, it's a pretty big
set of assumptions we're making so let's write it up in a location
that we're likely to look at if/when things break.
2025-02-28 16:31:17 +08:00
bunnie
420800f329 fix text location with fb rotations 2025-02-27 21:37:08 +08:00
bunnie
836ccacf64 change polarity of dark color in fill 2025-02-27 21:36:43 +08:00
bunnie
729a0ca6b9 remove buffer swap calls
we now go between a ram-based compositing buffer and the hw
buffer which effectively gives us our double buffer
2025-02-27 03:14:45 +08:00
bunnie
216ff46e29 fix font rendering due to fb orientation adjustments 2025-02-27 03:14:21 +08:00
bunnie
89b39303f1 add a routine for characterizing bit order in frame buffer 2025-02-27 03:13:33 +08:00
bunnie
c2714dca12 note fontmap hard-coded location inside link file 2025-02-24 02:29:41 +08:00
bunnie
96811143fd use the blit routine in the library for the loader logo 2025-02-24 00:58:09 +08:00
bunnie
20f96f189a fix typo 2025-02-23 16:52:59 +08:00
bunnie
c3051c0332 fix dangling reference to dependency 2025-02-23 12:14:46 +08:00
bunnie
1429944ff3 remove interim boot logo 2025-02-23 12:02:11 +08:00
bunnie
28122b764e point bootloader at the new logo 2025-02-23 12:01:22 +08:00
bunnie
e27f468acd adjust native pixel api change in loader 2025-02-21 17:45:47 +08:00
bunnie
130571b0f4 bring loader up to latest API spec 2025-02-20 15:05:23 +08:00
bunnie
5fd75ec373 update maintenance notes 2025-02-17 18:27:17 +08:00
bunnie
e4f1f8e15d update generated artifacts in the loader 2025-02-17 18:26:55 +08:00
bunnie
25dfc4723d refactor loader to use ux-api 2025-02-02 07:02:35 +08:00
bunnie
0d1a137597 restore the missing font section
this goes missing every now and then because i comment it out for
faster load times during dev
2025-01-20 15:37:00 +08:00
bunnie
cb60120bb2 add some prelim coreuser test routines
these currently only make sense in a simulation environment,
but they allow us to work the significant configuration test
cases for practical execution to make sure we haven't missed
something in the coreuser spec.
2025-01-12 00:55:43 +08:00
bunnie
71ac106ee7 add the CGU perclk divider for the NTO target 2025-01-03 04:06:11 +08:00
bunnie
201decd4ca more feature flag bitrot in loader 2025-01-01 22:47:59 +08:00
bunnie
f3517603e9 cleanup some feature flag bitrot 2025-01-01 22:47:19 +08:00
bunnie
8c0cfd9eab clean up unused args in API 2024-12-23 01:15:49 +08:00
bunnie
44f50a992a add irq disabling routine 2024-12-22 00:31:54 +08:00
bunnie
c66a7c47fb another spot where the irq enable has to be moved 2024-12-22 00:31:32 +08:00
bunnie
e07ab36984 fixup IRQ handling
- disable IRQs on departure
- put EV enable outside of the HAL function
this is necessary because we need all HAL calls to be finished
before an interrupt happens to avoid locking problems
2024-12-22 00:30:27 +08:00
bunnie
b66b60497b make the app uart configurable
so processes other than swap can use it
2024-12-22 00:29:50 +08:00
bunnie
c8e4392a95 pass a handle to udma_global to i2c init 2024-12-06 03:33:39 +08:00
bunnie
189611f3c4 add updates, verilator-only, and simulation-only feature gates
- updates enables or disables updates in the loader
- verilator-only will turn off routines that access hardware not
present in verilator (e.g. leads to a bus lockup)
- simulation-only turns of features that take a long amount of time
and aren't necessary in simulation, such as bulk clearing of
all RAM - in simulation, we can configure the simulator to do this
for us prior to boot; but in HW, of course, RAM is just random,
or worse, has the previous session's secrets in it.
2024-11-30 02:27:35 +08:00
bunnie
1710fb7ee2 cleanup the cramium hw implementation feature flags
this re-oragnizes the feature matrix of the loader to
reflect the chip/board division of feature flags better.
2024-11-30 02:26:56 +08:00
bunnie
43988bde05 cleanup warning on a debug routine
this is not used under certain combinations of e.g. printing
and swap
2024-11-30 02:25:58 +08:00
bunnie
b85b9d2dc2 improve assert message 2024-11-30 02:25:40 +08:00
bunnie
a527b3a300 gate RAM clearing behind not(simulation-only) feature flag
RAM clearing takes a lot of time in simulation and is not necessary,
hence the feature gate option.
2024-11-30 02:22:47 +08:00
bunnie
861b7ae3ff compromise on oscillator setting
I felt uncomfortable leaving the oscillator setting entirely
outside the PLL routine, so as a compromise I defer the oscillator
switch-over until after the initial PLL settings are loaded.

This makes both the simulation model and the actual hardware
happy. I think probably what the simulation model *should* have
done is consider the "powerdown" pin when checking the validity
of the signals going into the PLL model - but this is impossible
to modify/check because the PLL is provided as an encrypted blob :(
2024-11-28 15:32:19 +08:00
bunnie
6e8bff749c eliminate invalid PLL transition
this transition was in the reference C code, but in verilog simulation
it turns out it activates the PLL in an invalid mode which can lead
to glitching. Removing this makes both the simulation happy and
presumably the PLL happier as well.
2024-11-28 15:07:43 +08:00
bunnie
ec3d8b5042 handle swap image burning 2024-11-22 00:55:29 +08:00
bunnie
a7619e55a8 add progress bar to burn 2024-11-21 22:03:06 +08:00
bunnie
b944c51474 a simple update with verified image now working 2024-11-21 18:23:55 +08:00
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
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
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
6d3a58ccea cleanup warnings 2024-11-20 20:41:10 +08:00