Commit graph

7490 commits

Author SHA1 Message Date
Jeanie
5ae52fc490 add get_radiobutton docs 2024-06-22 14:21:21 +09:00
Jeanie
74c8bff8b3 Merge remote-tracking branch 'upstream/main' 2024-06-22 14:18:20 +09:00
bunnie
10a90be082
Merge pull request #559 from betrusted-io/release-notes
update release notes
2024-06-20 02:05:20 +08:00
bunnie
0d79e525bd update release notes 2024-06-20 02:03:40 +08:00
bunnie
3027b895dc
Merge pull request #558 from betrusted-io/build-fixup
Build fixup
2024-06-20 01:59:01 +08:00
bunnie
19dd39c7c8 quiet warnings in hosted mode 2024-06-20 01:57:11 +08:00
bunnie
49da62a0ae mute warnings on mbox
we're not going to implement the remaining features, but leaving
them there as idea placeholders
2024-06-20 01:56:44 +08:00
bunnie
3e8cfab6b0 fix hosted mode 2024-06-20 01:56:36 +08:00
bunnie
1903deaf77
Merge pull request #557 from betrusted-io/mbox-testing
Mbox tests & contiguous RAM allocations
2024-06-20 00:48:06 +08:00
bunnie
32893b9b4c fix build option 2024-06-19 22:04:42 +08:00
bunnie
a081d6cd5d note benchmark results 2024-06-19 22:04:30 +08:00
bunnie
84bb801432 add clifford benchmark to shellchat 2024-06-19 22:04:18 +08:00
bunnie
420d75f49b reflect new dependencies 2024-06-19 21:41:29 +08:00
bunnie
857203731b adjust flags and features 2024-06-19 21:41:12 +08:00
bunnie
474343c24e deprecate SID assignment
We no longer send messages to the swapper via the server interface.

All calls go through the blocking handler; in general, there are
no scenarios where it makes sense to have a swapper operation
pre-emptable. We always want our swapper ops to complete quickly,
deterministically, and atomically.
2024-06-19 21:39:54 +08:00
bunnie
96630a11ee handle the case of a failed PTE allocation gracefully
instead of hard crashing, we return an appropriate error.

Also add some debug instrumentation.
2024-06-19 21:39:17 +08:00
bunnie
c5aee47861 update comment to reflect current policy on OOM
I think it's more Xous-y to punt to userland in the case that
no consecutive memory is found, rather than trying to implement
an evictor in the kernel itself.

For now, the blunt hammer we use is to simply request some
blocks be freed and we retry; this works well enough to find
blocks of a few pages in sequence. If we needed larger blocks,
we may want to consider modifying the swapper userland algorithm
to have some API for finding consecutive runs of non-wired
memory to swap out.
2024-06-19 21:37:00 +08:00
bunnie
6ba57774cf add "device RAM" allocation mode to kernel
"Device RAM" is a block of RAM whose physical address is not
important, but the block must be consecutively allocated in
physical address space.

This is used to allocate blocks of memory that are intended
for hardware DMA targets and other peripheral shared-memory
applications.

Note that this also marks the allocated block as "wired", so
it can't be swapped out.
2024-06-19 21:34:42 +08:00
bunnie
ec4752d228 add mbox module; add swapper dependency
swapper dependency is needed because we need to allocate
some device RAM
2024-06-19 21:34:03 +08:00
bunnie
d75624cfe4 reduce fclk on target, reoragnize feature flags into groups
Not all chips can hit rated speed, so for bringup we're defaulting
to the slower setting.
2024-06-19 21:33:14 +08:00
bunnie
b9cdf166ca add carriage returns to the local echo 2024-06-19 21:29:48 +08:00
bunnie
3b6629e58f add userland call for requesting free memory
also refactor the startup API to no longer create and store
deprecated elements
2024-06-19 21:28:58 +08:00
bunnie
0f72117929 add mbox command for testing the mailbox 2024-06-19 21:28:25 +08:00
Jeanie
ec084ff1d4 Merge remote-tracking branch 'upstream/main' 2024-06-18 13:01:13 +09:00
bunnie
fa9637664b
Merge pull request #556 from betrusted-io/trng-test
Trng test
2024-06-18 00:57:05 +08:00
bunnie
f93c97096b turnoff default features for usb-device-xous in cram modes 2024-06-18 00:54:39 +08:00
bunnie
79b4a781f7 actually fix dependency issue for cargo doc 2024-06-18 00:54:27 +08:00
bunnie
8bfdc1296a cleanup dependency leakage across targets 2024-06-18 00:50:02 +08:00
Jeanie
c090f64e75 small updates based on feedback 2024-06-18 01:37:51 +09:00
bunnie
d3c205e3d4 add feature flag option for dumping trng 2024-06-18 00:09:21 +08:00
bunnie
8838fa6162 add loader test mode for entropy output 2024-06-18 00:08:57 +08:00
bunnie
75cc40d866 Update TRNG settings
new settings are much *much* better; no more need for entropy
compression.
2024-06-18 00:08:03 +08:00
bunnie
7a821a836f cleanup comments 2024-06-18 00:07:43 +08:00
Jeanie
b4f86b3de1 Merge remote-tracking branch 'upstream/main' 2024-06-17 23:53:50 +09:00
bunnie
c6a0f7f629 apply more autoformat. Why did that not trigger on save? 2024-06-16 02:34:46 +08:00
bunnie
8414f08aae autoformat the logo file 2024-06-16 02:10:27 +08:00
bunnie
d40e92b52d add code to dump the TRNG output via the DUART
gotta move on to other things, can't fully debug the USB
serial thing now. :-/
2024-06-16 02:07:33 +08:00
bunnie
28ab6ae311 add a quick-on boot logo in the loader
the swap load can take a little while, so a graphic at power-on
makes the UI feel more smooth
2024-06-16 01:53:45 +08:00
bunnie
975b44f894 improve visibility of setup_port so it can be re-used 2024-06-16 01:53:00 +08:00
bunnie
fe6fad2847 change the boot logo in the graphics server 2024-06-16 01:52:28 +08:00
bunnie
57342ebc4a commit some one-off hacks while trying to explore reliability of serial USB 2024-06-16 01:51:57 +08:00
bunnie
8b967d82bb don't go into debug mode on call 2024-06-15 17:55:02 +08:00
bunnie
9bcb65449e fix missing dir api 2024-06-15 17:54:49 +08:00
bunnie
7943e08c44 we were oom'ing on swap, so move some more things into rram 2024-06-15 17:37:22 +08:00
bunnie
831cad011e add flow control and and enq/deq management on app buffers
currently uses just a "dumb" 0-to-max scheme and then block until
drain. A more efficient implementation might implement a circular
buffer but it's more tricky to code -- just want to get something
working for now.
2024-06-15 17:36:12 +08:00
bunnie
295e3b0fd7 fix reseeding
Using the full seed of ChaCha means that the seed doesn't change
as we run the cipher (there's just a count of how many blocks
you've evolved since the initial state).

This works with that by modifying the seed directly with XORs
against the TRNG output.

The security margin on the reseed interval is loosened up
because we've increased the security margin (and the cost) of
reseeding from the conditioned kernel TRNG-seeded CSPRNG output.
2024-06-15 00:41:44 +08:00
bunnie
a1c3e8e598 fix warning from latest rust 2024-06-15 00:41:35 +08:00
bunnie
89dbf88e51 suppress warning from latest rust 2024-06-15 00:41:05 +08:00
bunnie
ec41c73aa9 harden kernel TRNG
apply the same techniques in the loader key generator to
the kernel TRNG. Every pull of data from the kernel reseeds
the TRNG state as well. This makes server ID creation somewhat
more expensive, but should greatly improve the security of
the system in the case of a TRNG with occassional drop-outs.
2024-06-15 00:40:04 +08:00
bunnie
84fe4c96ff fix seeding algorithm
- use proper seeding of entire state
- chacha8 does not evolve internal state when extracting the seed,
so we have to run the cipher some to force mixing of the seed
state.
2024-06-15 00:37:38 +08:00