Commit graph

510 commits

Author SHA1 Message Date
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
adad07262e fix warning about missing feature in compilation 2025-02-17 18:26:30 +08:00
bunnie
6e18096247 ux-api needs to have the board specified when cramium features are selected 2025-02-11 16:25:22 +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
6dcb23a53b add flags for configuring uart 2024-12-22 00:32:14 +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
76ffbf6e27 loader feature for mpw 2024-12-06 03:33:10 +08:00
bunnie
c9865e11c2 remove pio dep from loader 2024-12-02 01:01:22 +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
d3eda68b42 move features from cramium-soc into specific boards
cramium-soc is moving closer to the platonic SoC specifier,
and the board-* features are for the specific boards that use
cramium-soc

This division of feature flags feels a lot nicer and cleaner -
if it holds up to further development, I think this style might
become the new standard for Xous (as opposed to a single level
of feature flag where both SoC and board target are conflated in
terms of meaning - which kind of made sense when the CPU was
an FPGA and could actually have different features for different
boards, but for ASICs this wouldn't happen).
2024-11-30 02:23:35 +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
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
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
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