Commit graph

17 commits

Author SHA1 Message Date
bunnie
c1897a3738 format services/spinor 2024-01-14 22:43:05 +08:00
bunnie
67fc21fbdd harmonize hosted mode selection, but retain an explicit hosted flag
In general, hosted mode is assumed "by default" if the target
is not Xous. This allows packages to be built cleanly on command
lines that don't know to pass a --feature flag to specify a target.

However, an explicit "hosted" flag is still retained so that we
can confirm the build system intent. This saves us from the failure
mode that we thought we were building for target A, but accidentally
ommitted the flag, and instead we've been silently building for
"hosted" mode without any warning. The main consumer of the "hosted"
flag is now just the build.rs script inside of the utralib.
2022-10-25 17:21:02 +08:00
bunnie
4e40ae6c5d move from target selectors to feature selectors for back-ends
This will allow for e.g. xous on riscv32-imac but not a precursor
target, for example: by using feature selectors we get to have
a bigger range of targets that we support, such as for implementations
that haven't been upstreamed or have official target-triples.

The downsides are:

- patch override libraries don't absorb feature flags. so, for
example, the AES crate that is used to patch other crates won't
be aware of the target features without modifying the referencing
crates.

- features are normally meant to be additive, but target features
are mutually exclusive. The mutex is enforced by a check in
utralib that throws a panic on build if two targets are accidentally
selected at the same time.
2022-10-02 02:56:44 +08:00
Sean Cross
0dd382b66a Merge branch 'libstd-fs'
Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-27 15:28:27 +08:00
Sean Cross
4410c2a1b3 spinor: add discriminants to api calls
Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-27 15:27:15 +08:00
bunnie
8a63e57862 improve ECC failure reporting on SPINOR
finally saw a failure in the wild, so we have something
to test against.
2022-06-27 14:58:36 +08:00
bunnie
3a0dfe5c3b add bulk erase command to accelerate PDDB init 2022-01-04 21:57:47 +08:00
bunnie
a19fc87687 clean up warnings, and fix some hosted mode issues 2021-08-15 00:46:16 +08:00
bunnie
cf3ed935e7 add staging location lockout and xous-names completion checking 2021-08-10 04:30:45 +08:00
Sean Cross
b86e0a65cd services: recognize xous as a hardware OS
Support `xous` as a valid OS. This allows us to build the entire kernel
under this target.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-02 18:11:48 +08:00
bunnie
e362e2579f un-break hosted mode 2021-07-18 18:29:24 +08:00
bunnie
91fe69ca27 add some real-hardware tests for spinor writes
definitely still bugs.

need to sleep on it.
2021-07-18 02:36:31 +08:00
bunnie
cc0f37a80e rewrite the spinor services
- you can only "patch" regions of memory. caller provides a slice
to the region of data they are patching, so that patches can be
computed by the lib-side code of the server.

- erasing is done with a "patch" with all 0xff's as the write data.
a sequence of pure 0xff for a page does not actually cause a write,
the condition is detected and the write is skipped after an erase.

- patches attempt to be somewhat intelligent and not re-write unchnaged
data, or erase blocks that don't need udpating. However, if a user
submits a "sparse patch" with just a couple bytes modified in a
megabyte region they can expect bad performance. Ideally, in that
scenario, each of the smaller modifications are submitted as
individual calls to the patch function, instead of regurgitating
all the data and hoping that hthe patch function does some intelligent
diffing to be as light-fingered as possible about updating the flash.

In other words, the onus is on the calling server to format
patches intelligently. The patch server does only the simplest,
safest optimizations. You don't want to be shuttling megabytes of
redundant data anyways between servers for many other reasons....!
2021-07-17 02:04:22 +08:00
bunnie
7e7ae82156 pivot spinor implementation
realizing some core assumptions were wrong, so, scrapping and
restarting
2021-07-15 23:00:50 +08:00
bunnie
98c0054d7e some progress on spinor drivers 2021-07-14 00:01:09 +08:00
bunnie
ef93196cfc stash commit to fix a bootloader issue 2021-07-13 22:28:46 +08:00
bunnie
1b5d4bd79b push of spinor changes to validate l2cache 2021-07-05 00:08:58 +08:00