Commit graph

2139 commits

Author SHA1 Message Date
Jean-Pierre De Jesus DIAZ
955fbc8788
xous: Use CARGO_CFG_TARGET_OS in build scripts.
This allows for a more reliable detection of target_os configuration
in build scripts. The target is inconsistent between some architectures,
notably armv7a is `armv7a-none-eabi` skipping the `unknown` (the vendor,
I guess) part. This happen with some of the unrelated Cortex-M targets
present, and others may also be.

Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2022-10-12 19:03:46 +02:00
bunnie
acc52f1f8e revert version commit for package push 2022-10-10 03:22:19 +08:00
bunnie
2f97738449 add version for package push 2022-10-10 03:21:19 +08:00
bunnie
f8a2ea51bb remove rkyv warnings from xous-api-names 2022-10-10 03:16:40 +08:00
bunnie
02b80425f5 bump xous-rs to absorb change in language specification 2022-10-10 03:07:44 +08:00
bunnie
78e72e6ef4 re-institute manual cache flushing because we're seeing a CI error triggered by a cache flush failure... 2022-10-09 19:50:19 +08:00
bunnie
13217fa402 fix hosted mode warning 2022-10-09 18:08:00 +08:00
bunnie
2a440f6409 retry bad passwords on backups; add note that backups are not abortable
Because we unmount the PDDB and put the system in a semi-shutdown
state, backups are not abortable if you type in the wrong root password.
This patch retries the root password forever, but also adds a note
at the beginning of the process that the process cannot be stopped
once started.
2022-10-09 17:44:46 +08:00
bunnie
f815ed85b5 fix rust 1.64.0 rkyv warning regressions on unused enum types
rkyv-derived enums throw warnings that they are unused.
Not sure how to get rid of them; I've tried surrounding them in
`#[allow(dead_code)]` directives, and also explicitly creating
each enum variant that I'm aware of through some dummy code and
some log prints of the dummy code calls to ensure the results are
used, and the warnings still persist.

Significantly, the warnings only happen for enums that take
a value. Simple rkyv enums do not throw a warning.

These warnings overwhelm the build logs, so they need to be isolated
in order for us to ensure that the build is clean of other more
important warnings.

The method chosen to isolate them is to take the enums that are
problematic, carve them into their own special file, and add
a file-wide `#![allow(dead_code)]` directive. This only happens
in 7 service crates, and this change commits all of the modifications
in a single big commit that could be undone later if this turns out
to be a compiler regression or something similar.

I also opened an issue with the rkyv maintainer to see what his
opinion is on the situation.

https://github.com/rkyv/rkyv/issues/318
2022-10-09 17:17:20 +08:00
bunnie
453aeb3596 fix boot order issue that prevents restore 2022-10-09 14:16:36 +08:00
bunnie
99c6e005ad fix hosted mode 2022-10-09 02:46:24 +08:00
bunnie
2ff9163789 add checksums to PDDB backup
every 1MiB block is checksummed with a sha512/256 truncated to
128 bits. This is used to confirm the media and transport integrity
only. It is not intended to be a cryptographic check, it just confirms
that the backup data was transferred correctly assuming no intentionally
malicious actors in the middle.
2022-10-09 01:10:42 +08:00
bunnie
c471ca0fbb fix overly restrictive version match on backup version 2022-10-08 15:29:37 +08:00
bunnie
df12dcdd1e fix hash count computation 2022-10-08 02:25:46 +08:00
bunnie
818c172af2 add a note that the PDDB accesses will be disabled on backup 2022-10-08 01:53:42 +08:00
bunnie
a416069002 add hash protection on the metadata header
stage is set for hash protection on the PDDB data itself.
that comes next.
2022-10-08 01:22:14 +08:00
bunnie
62af36560b checks for cache coherence issues
Most of the changes introduced in this commit were rolled back,
but, there is now a test facility that's hanging out for the PDDB
to help with future debug efforts.

The patch was motivated by a problem observed in FSCB consistency
when it's updated. Ultimately the root cause was traced to a
cache coherence problem and it's fixed by a patch in the spinor
crate.

However, this patch still retains a check that the data is coherent,
in case the flushing routine isn't complete or some other factor
was missed. It also includes a large amount of commented-out code
that keeps a bit of history used to debug the problem -- eventually,
we can just cull that but it's kept around in case we got the
root cause wrong (or there were multiple causes and coherence is
just one of them).
2022-10-07 18:52:57 +08:00
bunnie
97895fd9c9 fix cache coherence issue with FLASH
after updating a piece of FLASH memory, there is an inherent
cache coherence issue. This is because the write happens through
a side channel that is outside of the memory model of the system:
writes happen through a CSR that feed data to pages of FLASH.
Reads happen through direct-mapped memory regions that are unaware
of write mutations.

Thus, after writing a page of memory, if you try to access it,
sometimes you'll read the old cached value instead of the new
updated value.

This patch introduces a mandatory dcache flush after every
FLASH write, so that any cached FLASH regions are re-fetched.
2022-10-07 18:50:51 +08:00
bunnie
6418f8b54f add notes about making the cache flush loop more efficient on suspend 2022-10-07 18:46:59 +08:00
bunnie
97ccb67ff2 cleanup push artifacts 2022-10-06 00:03:27 +08:00
bunnie
e5704cef4e add for cargo push 2022-10-06 00:02:55 +08:00
bunnie
7a3a132780 bump other API levels 2022-10-05 23:58:46 +08:00
bunnie
3bca9de2a0 bump version numbers for xous-kernel patch
this fixes tests in CI
2022-10-05 23:51:35 +08:00
bunnie
86cc7de6b1 version.rs should not be cached 2022-10-05 21:20:01 +08:00
bunnie
5c0154f730 cleanup version comparison code
this should be "clean" and working. yowch, this is really strict...
i may need to loosen this checking to make development sustainable.
2022-10-05 18:53:09 +08:00
bunnie
969f93b001 cross-repo update versions from xous-rs bump 2022-10-05 18:32:44 +08:00
bunnie
eaa59348e7 oops meant 0.1.3 2022-10-05 18:03:07 +08:00
bunnie
edadcecebc bump susres to 0.1.2 2022-10-05 18:02:18 +08:00
bunnie
851cd0924c bump xous-names to 0.9.9 2022-10-05 18:01:22 +08:00
bunnie
a10520cdd4 bump log to 0.1.1 2022-10-05 18:00:17 +08:00
bunnie
ef4053586d fix typo 2022-10-05 17:59:17 +08:00
bunnie
161a4dbc5d now republish ticktimer with updated api refs (0.1.3) 2022-10-05 17:58:21 +08:00
bunnie
c31e050926 it helps to save teh file 2022-10-05 17:44:14 +08:00
bunnie
45d606c8f2 bump susres to 0.1.2 (xous-rs dependency) 2022-10-05 17:43:13 +08:00
bunnie
a12973a7ae bump ticktimer to 0.1.2 for new xous-rs dependencies 2022-10-05 17:41:45 +08:00
bunnie
bcee655dcb fix published package to reflect correct susres API 2022-10-05 17:08:03 +08:00
bunnie
4a8c4498ea fix inconsistency in Cargo.toml file 2022-10-05 17:00:18 +08:00
bunnie
9dcc0a3386 absorb ticktimer api bump, propagated from susres bump 2022-10-03 04:40:06 +08:00
bunnie
d2b2383d1a bump susres version 2022-10-03 04:36:32 +08:00
bunnie
e4c306d50a remove version from tracking when not packaging 2022-10-03 03:46:04 +08:00
bunnie
b184bfbe6a move ticktimer to remote api 2022-10-03 03:37:38 +08:00
bunnie
924c0fd802 fix more crates.io issues 2022-10-03 03:27:20 +08:00
bunnie
4fbfd0e686 commit an interim version for crating 2022-10-03 03:21:34 +08:00
bunnie
2b8b74003d set default for crates.io 2022-10-03 03:20:42 +08:00
bunnie
567a408c92 prep ticktimer crate for crates submission 2022-10-03 03:18:38 +08:00
bunnie
89ca75c4bf move over to remote susres api 2022-10-03 02:24:44 +08:00
bunnie
8f6880faf3 fix another default case 2022-10-03 02:20:55 +08:00
bunnie
35aa11bec9 add a default implementation for crates.io 2022-10-03 02:18:28 +08:00
bunnie
34fd38db92 prep susres for crates.io 2022-10-03 02:16:06 +08:00
bunnie
e52db91a73 bump tts to absorb new xous-names api 2022-10-03 02:05:08 +08:00