Commit graph

39 commits

Author SHA1 Message Date
bunnie
c08bb6a3f9 add notes about the second ECC error reported 2022-07-13 04:43:20 +08:00
bunnie
02c886bf84 attempt to fix-up ECC error by clearing both ECC registers
this doesn't seem to fix it tho, when we hit the error
the chip just returns 0xFF's eternally.
2022-07-13 04:38:06 +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
03d13cc758 add the archive log and link for future reference 2022-06-27 15:00:24 +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
c46579117b add the "trusted init" check to hosted mode
need to debug a problem with the IMEF connecting/disconnecting
causing trusted init to fail when there is more than one
plugin in the system.
2022-06-18 01:30:49 +08:00
Sean Cross
3ae9d8abf0 apps/services: remove xous::xous_main macro usage
This macro will be removed, since it is no longer necessary. Remove this
macro across the project and replace it with a standard `main()`
function.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-31 13:33:30 +08:00
bunnie
c503316c3d refactor suspend/resume ordering
Add a "Later" stage, and have exactly one "Last" stage.

"Last" to suspend is the ticktimer -- this is crucial for
basically everything else to work. The other really
low level stuff that needs to work to the last minute is
now in the "Later" bin.
2022-03-30 02:30:39 +08:00
Sean Cross
5402582f97 spinor: fix incorrect ecc write into softirq block
The init code tried to set up the ECC block to report errors by writing
into the softirq block. Correct the block so that it goes into the
spinor block instead.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-02-14 17:32:20 +08:00
bunnie
30910dbd4f add keyboard layout setting and retention
Keyboard setting is "the one and only" exception to user settings
that are saved without encryption. This is because you need your
keyboard layout to be set in order for you to type your password.
Thus, this needed a bit of a special-case to handle its storage record.

We decided to lop off 1 page from the loader and have it store
the keyboard layout code.

Let's hope we can have the discipline to really just store that
one word of information and not later be like "gee wally, you have
a whoooole 4092 unused bytes of space we can cram unencrypted
user settings in, sure would be a waste to not put those use those".
2022-02-03 02:46:37 +08:00
bunnie
827888ccbb fix up the REFCOUNT on connections
Was doing disjoint loads and stores on an Atomic, really, should
be using the fetch_add, fetch_sub variants to be proper.

Didn't seem to impact anything but maybe there's a future version
of me that high fives me for doing this.
2022-01-31 23:13:10 +08:00
bunnie
994e3d7cfb refactor llio crate (phase 1): organize files into sub-systems 2022-01-11 12:02:27 +08:00
bunnie
c5fe1bc99b add sequencing to suspend/resume order of operations
this is necessary because we want to make sure that the SPINOR
service does not shut down before the PDDB service finishes syncing
its disks.
2022-01-10 13:45:56 +08:00
bunnie
489a26dd11 fix an issue where we don't decrement the connection counter on drop 2022-01-05 20:01:54 +08:00
bunnie
3a0dfe5c3b add bulk erase command to accelerate PDDB init 2022-01-04 21:57:47 +08:00
bunnie
dd14dfc4c6 retrofit the seed into an atomicu64 so we can set it elsewhere 2021-12-27 02:49:08 +08:00
bunnie
0bd110c163 determinism achieved for testing. now to squash some bugs. 2021-12-26 01:50:30 +08:00
bunnie
66606ed3e0 initial attempt to make hosted mode more deterministic
replace all threadRng with a seeded Rng
2021-12-25 15:58:27 +08:00
bunnie
56e82f37d3 more thoughts on the pddb.
this is definitely a rough-draft implementation and is going to
need a v2 or v3 to plug all the serious holes.
2021-11-05 03:58:58 +08:00
bunnie
353311b987 fix USB update flow 2021-08-15 16:03:18 +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
bunnie
bc6ec8caf4 initial key provisioning demo working 2021-08-07 22:21:49 +08:00
bunnie
82aaeb072f gateware HMAC verification now working! 2021-08-06 02:33:52 +08:00
bunnie
68ea69c2ed Merge branch 'bunnie-dev' into main 2021-08-03 17:22:10 +08:00
bunnie
01d6c61bb6 commit before merging main stuff
want to capture in the libstd improvements before we get too much
version drift
2021-08-03 16:54:42 +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
d98f296499 fixed ordering bug in spinor driver
works now!
2021-07-18 18:02:46 +08:00
bunnie
7257dbcaef add cache flush after array write 2021-07-18 16:04:44 +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
904f6f6f38 add more tests 2021-07-17 23:33:57 +08:00
bunnie
168d0fc2cb start of some basic tests 2021-07-17 17:12:23 +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