Commit graph

4311 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
006a7cc8a6 make busybox linux image ro so it doesn't modify the JFFS2 image in renode 2022-10-12 01:27:54 +08:00
bunnie
709ff8f9f2 cleanup lockfile 2022-10-10 03:31:55 +08: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
94aa4b62b1 forgot to bump kernel version 2022-10-10 03:09:27 +08:00
bunnie
02b80425f5 bump xous-rs to absorb change in language specification 2022-10-10 03:07:44 +08:00
bunnie
c52c02013e add command line feature flags back to xtask; detect & track language changes 2022-10-10 02:53:15 +08:00
bunnie
b1eecb4cca update analysis script to match new package names 2022-10-10 00:32:01 +08:00
bunnie
2173f73aa8 add an ignore 2022-10-09 23:38:23 +08:00
bunnie
9732ecdc18 add v0.9.10 to restore URL list 2022-10-09 23:37:48 +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
6f255d1e44 note backups in release notes 2022-10-09 18:52:00 +08:00
bunnie
13217fa402 fix hosted mode warning 2022-10-09 18:08:00 +08:00
bunnie
96e64b6388 always emit long format tags 2022-10-09 17:57:01 +08:00
bunnie
d048372d46 absorb v0.9.10 soc artifacts 2022-10-09 17:53:12 +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
b2048d0066 note the previous commit for future reference in a place where i can hopefully find it :-l 2022-10-09 17:26:41 +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
4aad245b31 add notes about how to maintain the XOUS_MIN_VER field 2022-10-09 14:22:02 +08:00
bunnie
01b68cbdc9 fix development roll-out process for picking a restore kernel 2022-10-09 14:18:57 +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
6230c922ac fix backup/restore scripts 2022-10-09 02:36:48 +08:00
bunnie
a1a6ae6d6a add a note about how minver is currently broken 2022-10-09 02:36:27 +08:00
bunnie
8ac80f8c42 update tools to work with checksums (partial update) 2022-10-09 01:12:03 +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
c33dee152d fix backup opcode setting 2022-10-08 22:20:50 +08:00
bunnie
11673da5f6 bump min xous version, as we need the version mask fix to read newer backups
even though the format is compatible, the version check isn't :(
2022-10-08 15:30:24 +08:00
bunnie
c471ca0fbb fix overly restrictive version match on backup version 2022-10-08 15:29:37 +08:00
bunnie
a0791ff092 back out patch of the opcode change -- the backup script did that in error 2022-10-08 02:40:55 +08:00
bunnie
89d050891b fix incorrect opcode setting on backup 2022-10-08 02:40:07 +08:00
bunnie
44d3c19733 fix hash check computation and op offset 2022-10-08 02:26:00 +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
42052fdcc5 fix padding on hash check in backup tools 2022-10-08 01:53:28 +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
c1eed3e7ad bump readme to note coherence issue fixed 2022-10-07 18:55:47 +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
d7333a51fd bump xous-susres version check 2022-10-07 18:50:35 +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
ce02d9ff50 bump release notes 2022-10-06 01:01:56 +08:00
bunnie
0f9195f305 add some sanity checks on the backup header
this tries to catch the cases that:
  - user tried to run the backup without first running "prepare backup..."
  - the USB connection is a little flakey and returning bum data

We can only inspect the plaintext portions of the header, which contains
things like protocol version numbers, time stamps, and language codes.

We use the timestamp validation heavily because it's the only field that
isn't almost always going to be a 0 or 1 when correct, which are highly
likely to be reported anyways if there's a problem with the USB link.

This does assume the user sets the time correctly on the device
doing the backup, and on the Precursor itself.
2022-10-06 00:53:52 +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
8f71164278 crates.io source files differ in length from repo source files
because crlf->lf conversions
2022-10-05 21:25:54 +08:00