Commit graph

7559 commits

Author SHA1 Message Date
Sean Cross
c8d70aae6a flatipc: run cargo +nightly fmt -p flatipc
Signed-off-by: Sean Cross <sean@xobs.io>
2024-09-22 18:49:56 +08:00
Sean Cross
a77fdac6f0 libs: add flatipc implementation
flatipc is a new method for doing IPC. This is a zero-copy approach
where structs are given `repr(C)` implementations that are well-defined
and work across process boundaries.

If the same struct or enum is used in two processes that has the same
layout, then data can be freely passed between the two processes without
incurring a serialization or deserialization penalty, provided the
following hold:

1. The buffer must be page-aligned and be a multiple of the page size
2. The item must be `#[repr(C)]`
3. There must be no pointers or references of any kind

If these three things hold, then the object is safe to sling across the
process boundary.

This crate adds the ability to annotate structs with
`#[derive(flatipc::Ipc)]` to provide them with this functionality. When
doing so, objects gain the `.into_ipc()` call that turns them into
something that can be sent across process boundaries.

The resulting object has `.lend()`, `.lend_mut()`, `.try_lend()`, and
`.try_lend_mut()` as functions.

Signed-off-by: Sean Cross <sean@xobs.io>
2024-09-22 18:32:58 +08:00
bunnie
fd0eaaade6
Merge pull request #573 from betrusted-io/rkyv-0.8
Rkyv 0.8 - planning
2024-09-18 01:00:55 +08:00
bunnie
3120b5d13c clean up API even further 2024-09-18 00:50:21 +08:00
bunnie
c259d5566d cleanup API
make Identity the serializer, so we don't have to pass it around
everywhere.
2024-09-18 00:47:32 +08:00
bunnie
4236ba4511 add more detailed test cases to flesh out the API 2024-09-18 00:01:28 +08:00
bunnie
abb245543c create a planning directory, and add the rkyv test
The purpose of the planning directory is a place where we can stash
code for reference in various github issues and project plans without
having to integrate it into the code base. This is for large changes
to the code base that require extensive planning and discussion prior
to integration.
2024-09-17 18:29:24 +08:00
bunnie
19de3e0402
Merge pull request #572 from betrusted-io/fix-renode-aes
renode: vexriscv: fix CPU on newer Renode versions
2024-08-20 10:00:31 +08:00
bunnie
c49acbc0f6
Update RELEASE-v0.9.md
also note the breaking change here so when we tag a release we'll remember to note it.
2024-08-20 09:59:05 +08:00
bunnie
b1776ded9c
Note minimum Renode version requirement
#520 introduces a breaking change to track the latest renode
2024-08-20 09:53:33 +08:00
Sean Cross
17790e0751 renode: vexriscv: fix CPU on newer Renode versions
Newer versions of Renode rename PrivilegeArchitecture to
PrivilegedArchitecture. They appear to have tried to work around this by
annotating it with `[NameAlias("privilegeArchitecture")]`, however that
doesn't change the fact that the actual type itself changed as well.

This incompatible change will cause breakage on older versions of
Renode.

Signed-off-by: Sean Cross <sean@xobs.io>
2024-08-20 09:05:10 +08:00
bunnie
720213cc67
Merge pull request #571 from gsora/gsora/fix-build-rust-1.80
xtask: fix build on Rust v1.80
2024-08-20 00:38:29 +08:00
Gianguido Sorà
92d31b8366
xtask: fix build on Rust v1.80
Zip depends on time, which had some issues compiling on Rust v1.80: https://github.com/time-rs/time/issues/681

Update it to 2.1.6 in order to fix the issue.

Did not notice any apparent regression due to this update as of now.
2024-08-19 18:12:37 +02:00
bunnie
5b0e7fa922
Merge pull request #569 from betrusted-io/more-warnings
fix a doc warning that slipped through the cracks
2024-08-19 03:11:52 +08:00
bunnie
61e77ac6e4 fix a doc warning that slipped through the cracks 2024-08-19 03:07:09 +08:00
bunnie
8eb479facb
Merge pull request #568 from betrusted-io/cramsoc-warnings
fix rust-1.80 warnings for cram-soc config
2024-08-19 02:58:59 +08:00
bunnie
3cdf01d5e9 fix rust-1.80 warnings for cram-soc config 2024-08-19 02:57:12 +08:00
bunnie
1ae0ef4861
Merge pull request #567 from betrusted-io/vault-fixes
rust 1.80 fixes for vault
2024-08-19 02:41:11 +08:00
bunnie
c8d45479eb rust 1.80 fixes for vault 2024-08-19 02:39:21 +08:00
bunnie
cea0f7a4d7
Merge pull request #563 from betrusted-io/nto-work
Work on NTO items
2024-08-19 02:32:00 +08:00
bunnie
89f92c28a2
Merge branch 'main' into nto-work 2024-08-19 02:30:35 +08:00
bunnie
276c6cf6d5
Merge pull request #566 from betrusted-io/rust-1.80-warns
patches to clean up warnings in rust-1.80
2024-08-19 02:30:21 +08:00
bunnie
5ca815ad89
Merge branch 'main' into rust-1.80-warns 2024-08-19 02:26:29 +08:00
bunnie
6eab1c48bb patches to clean up warnings in rust-1.80 2024-08-19 02:24:24 +08:00
bunnie
2a533d2e1c bump utralib to include filter registers 2024-08-02 17:27:10 +08:00
bunnie
4884ee51d9 reserve the top-most word of RAM as a "gutter" for filtered DMA
it's much easier to gutter a blocked AXI transaction, than to
squash it. So we reserve a region of memory as a gutter for blocked
transactions.
2024-08-02 17:26:24 +08:00
bunnie
00da783c4d add filter tests to dma suite
the filter is on by default (which blocks all DMA access with
the null settings) and can be configured to restrict access to
regions of memory that contain secret materials.
2024-08-02 17:25:38 +08:00
bunnie
8015b16cb8 clock tests 2024-07-19 17:16:02 +08:00
bunnie
4cfcc7ebd3
Merge pull request #565 from betrusted-io/nettype
Nettype - facility to "type" data retrieved from a URL
2024-07-14 01:49:22 +08:00
bunnie
7a31d54723 attempt to resolve rustfmt/whitespace issue 2024-07-14 01:46:46 +08:00
bunnie
4089bb4f21
Merge branch 'main' into nettype 2024-07-14 01:36:18 +08:00
bunnie
f8a0921f5b fix rustfmt issues... 2024-07-14 01:35:02 +08:00
bunnie
bdfeb9917a undo handlers for an aborted experiment 2024-07-14 00:55:59 +08:00
bunnie
12f6192dae add nettype command 2024-07-14 00:01:22 +08:00
bunnie
9c227d2a93 beginning of clock tests 2024-07-13 22:45:58 +08:00
bunnie
53af83cdd8 sync lockfile 2024-07-13 22:35:32 +08:00
bunnie
83f5205a2d update artifacts with latest generated output 2024-07-13 22:35:14 +08:00
bunnie
28142e2b24 cleanup bios tests 2024-07-13 22:34:59 +08:00
bunnie
c3bbbbd672 fix bug in i2c library where i/o was not set low
you have to write *0* to the clear register to set the port low.
always the weird gotcha on that one...
2024-07-05 01:59:14 +08:00
bunnie
2ebe7f3c64 fix port ordering for NTO
don't think we'll be doing much with the MPW + PIO banks anyway anymore...
2024-07-05 01:58:42 +08:00
bunnie
63983ab9e0
Merge pull request #564 from cpick/no-backend-available
Improve USB no backend available message
2024-07-04 18:41:14 +08:00
bunnie
059855201b add a simple dmareq handler test 2024-07-04 05:26:22 +08:00
bunnie
7f35fa8e72 add unit tests for aliased fifo pages 2024-07-04 03:58:33 +08:00
bunnie
7b2109b1cc improve bio tests
- don't dead reckon tests: read feedabck from the hw to know
when they are done
- fix doc bugs
- add more test feedback on long-running tests
2024-07-03 01:23:48 +08:00
Chris Pick
b8feb4ec40 Improve USB no backend available message
Provide a more descriptive error message when pyusb can't find a backend
USB library.
2024-07-01 21:32:58 -04:00
bunnie
e0d09f1d3b more DMA corner cases
bytes, half-words, words, multi-core contention, oh my!
2024-07-01 16:45:02 +08:00
bunnie
64c281bfe0 add DMA tests to bio library 2024-06-30 03:28:22 +08:00
bunnie
6ddc8bc79a
Merge branch 'main' into nto-work 2024-06-27 00:41:07 +08:00
bunnie
9215276b60
Merge pull request #562 from betrusted-io/formatting-stupidity
Formatting stupidity
2024-06-27 00:40:48 +08:00
bunnie
823c8af562 ok, that's gold-level stupidity
rust format inserts a trailing space in some autoformatted
doc code.

we have a rule that doesn't allow trailing spaces

we also have a rule that requires rustfmt to run clean

unresolvable paradox.

Solution: just make the docs worse. I don't have time for this, really.
2024-06-27 00:37:10 +08:00