Commit graph

3726 commits

Author SHA1 Message Date
bunnie
3ee086b257 fix interrupts (broke them trying to do some exceptional error handling) 2022-07-11 04:39:10 +08:00
bunnie
2ad7ed10d6 bump semver version 2022-07-11 04:13:19 +08:00
bunnie
d639b3db55 fix debug output 2022-07-11 04:13:04 +08:00
bunnie
a89ae13463 move pddb mounter to status thread 2022-07-11 04:12:44 +08:00
bunnie
25e8da849e rework semver returns and fix flash verify bugs in COM 2022-07-11 04:07:00 +08:00
bunnie
6e7798ff6c remove ECUP from shellchat 2022-07-11 04:06:26 +08:00
bunnie
70003b641f migrate ecup to the status thread
also rework the boot flow to have auto-update detect for EC updates
2022-07-11 04:05:53 +08:00
bunnie
734a382ae9 add FLASH_VERIFY to COM command set. Add apilevel to com_rs.
This adds the FLASH_VERIFY command, which is going to be used
to help automate some update logic.

The notion of an apilevel has also been added to every com_rs
command; this can be used by the COM to figure out what commands
are valid for talking to the current reported EC version.

The version parsing of the string passed back from the EC has
been replaced with the code in the xous-semver crate.
2022-07-10 01:04:34 +08:00
bunnie
1256fcb411 add min version requirement and current version to kernel and loader 2022-07-08 18:56:05 +08:00
bunnie
1da8578459 remove v1 PDDB migration in prep for min version setting 2022-07-08 18:07:10 +08:00
bunnie
40b16b3cdb inject current semver info into signature appendix on loader and kernel
this allows for a quick readout of the version of each of these
artifacts, inside a signed region, by just inspecting the last
few words of the binary object.
2022-07-08 04:08:37 +08:00
bunnie
efc680ed36 Merge branch 'main' of github.com:betrusted-io/xous-core into main 2022-07-07 00:47:27 +08:00
bunnie
6fc83d363b resolve issue #202 add a bail option to the BIP39 dialog 2022-07-07 00:46:58 +08:00
Sean Cross
095e8b594f Merge branch 'main' of github.com:betrusted-io/xous-core 2022-07-06 14:00:23 +08:00
Sean Cross
d6ac900748 pddb: backend: use Instant for access time
Instead of using the ticktimer server directly, use
`std::time::Instant::now()`. This enables tests to be run in hosted
mode.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-07-06 13:59:35 +08:00
bunnie
d1c3ebce97 fix TTS in CI build 2022-07-06 05:08:22 +08:00
bunnie
7dfafe84e8 update release notes 2022-07-06 05:07:29 +08:00
bunnie
77a92e310f shift around position of test in modals test and add a dedicated shellchat test 2022-07-06 05:04:26 +08:00
bunnie
620b9c2e56 Merge branch 'main' of github.com:betrusted-io/xous-core into main 2022-07-06 04:55:38 +08:00
bunnie
1e1314cee3 bump lockfile 2022-07-06 04:53:11 +08:00
bunnie
11287938ab add bip39 facilities to the modals server 2022-07-06 04:52:52 +08:00
bunnie
4087312a2c add bip39 primitives to the GAM, including an interactive entry dialog 2022-07-06 04:52:14 +08:00
Sean Cross
fe4211bb15 RELEASE-v0.9: add pddb libstd notes
Signed-off-by: Sean Cross <sean@xobs.io>
2022-07-05 23:57:01 +08:00
Sean Cross
086c014de2 pddb: close all related filehandles when a file is deleted
Signed-off-by: Sean Cross <sean@xobs.io>
2022-07-05 23:56:31 +08:00
Sean Cross
5cc51ebdaf
Merge pull request #200 from betrusted-io/libstd-fs
pddb: Add libstd support
2022-07-05 23:22:12 +08:00
Sean Cross
728add6c81 Merge branch 'libstd-fs' of github.com:betrusted-io/xous-core into libstd-fs 2022-07-05 23:13:34 +08:00
bunnie
bba4c38f6b
Update main.rs 2022-07-05 23:13:07 +08:00
Sean Cross
20389e0941 xous: definitions: correct offsets for Result::from_usize()
The offsets were corrected with `to_usize()`, but hadn't been updated
for the other direction.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-07-05 23:12:22 +08:00
Sean Cross
506990c7be Merge remote-tracking branch 'origin/main' into libstd-fs 2022-07-05 22:52:39 +08:00
Sean Cross
ee18fe889c pddb: initial libstd support
Add support for libstd calls to pddb.

The pddb uses `:` as the path separator, and grafts the concept of paths
onto dicts.

Currently implemented features:

    * mkdir
    * rmdir
    * create file
    * open file
    * read file
    * write file
    * unlink file
    * seek file

Other calls may be added as needed.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-07-05 22:50:58 +08:00
Sean Cross
6ae91d8e46 pddb: make select_basis and latest_basis non-mut
These do not need to clone data and do not need to be mut. This improves
access time considerably.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-07-05 17:23:40 +08:00
bunnie
77886fae4a adjust dead-weight size of qrtext down wards
the sizing was such that two pages of data had to be prepared
for even very short messages. This change fits the message back
into one page of data once again.
2022-07-05 13:07:04 +08:00
bunnie
7ef4e4dc41 Merge branch 'pddb' into main 2022-07-05 03:25:02 +08:00
bunnie
148bf71a94 modify the fb pop routine so it doesn't overwrite the status bar
this eliminates a small glitch in the time display/security infos
whenever transitioning between foreground/background contexts
2022-07-05 03:24:15 +08:00
bunnie
db569dd6e0 update release notes 2022-07-05 03:04:04 +08:00
bunnie
761cffc35e strip some debug spew 2022-07-05 03:00:31 +08:00
bunnie
147ec8594c add stash/pop of FB; fix suspend/resume buffering
The `ManagedMem` thing for the suspend/resume crate is simply
a disaster. It tries to be fancy and Rusty and really it just fails
in non-obvious ways. This is one of the places where it simply
does not pay to make things seem so simple.

Why? because in reality, memory is complicated. It comes in pages.
There's initialization. There's caching. There's volatility.
I haven't encountered a single situation where the assumptions
of page-alignment and memory layout have really lined up well enough
for this primitive to make sense. The "idea" was hey, since
you allocate a peripheral MemoryRegion, why not just use its attributes
as a marker to a suspend/resume thing that automatically handled
stashing that MemoryRegion to a backing store inside RAM? Seems
simple right? wrong. Every time I've tried to use it, it's failed
in non-obvious ways.

In this most recent incarnation, it turns out that for whatever
reason, it seems to be just stashing about the first 4-8k of the
framebuffer to the SR backup region, and then somehow grabbing
a future(?) copy of the memory? or maybe just a wrong copy? I don't
know. The code seems simple enough but it goes through some
traits and some type transformations and then there's some unsafe
code to make it volatile and it doesn't work.

Instead, we just use a damn [u32; FB_SIZE] slice to store the
frame buffer. This is so obvious and easy. The only price is
you have an "ugly" `fb[..FB_SIZE].copy_from_slice(&self.srfb)`
line instead of an "elegant" `srfb.suspend()` invocation.
Stashing into it is a bit uglier, because we have to cast the
slice to an unsafe pointer in order to access the `write_volatile()`
method. But, it works! It. Just. Works. And you can see what's going
on. Really, I should stop trying to be fancy and just be readable.

OK anyways, that was that rant. This commit also adds some
calls that allow us to re-use the suspend/resume frame buffer during
"normal" times as a stash/pop for the application image. This is
nice because the memory is normally idle/overhead when not
in suspend, so now we're repurposing some already-allocated memory
to accelerate some drawing operations, and it also makes, crucially,
a multi-step blocking modal dialog interaction less cosmetically
jarring, because the application thread can be fully blocked and
not responding to redraw commands but the stash/pop mechanism
creates the illusion of "everything is moving along".
2022-07-05 02:44:13 +08:00
bunnie
3ad1ae7325 fix typo 2022-07-05 02:43:47 +08:00
bunnie
32a3bb5fa4 change foreground/background behavior
1. add foreground/background tracking, such that if we return
to a context instead of redrawing it, we stash the framebuffer and
restore it.

2. make foreground/background context swap messages mandatory

previously, we were "light fingered" about sending the message --
we'd only send them to apps. the app was not considered to be
"backgrounded" if a menu came up in front of it.

This turns out to be a mistake. Now, we background apps when
a menu or dialog comes in front of it, and then foreground it when
the app goes away.
2022-07-05 02:43:40 +08:00
bunnie
ae717f78af add code to make the ball app full-screen redraw affirmative on context switch
otherwise, you'll get some stale artifacts because the ball app
relies on the prior state of the screen for clean rendering
2022-07-05 02:35:38 +08:00
Sean Cross
c1e585c37c xtask: ensure loader is build with lto,codegenunits=1
If the loader is not build with these two parameters, then Weird Things
happen with the font table.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-07-04 22:33:38 +08:00
Sean Cross
4d416ce4c6 Merge remote-tracking branch 'origin/main' into libstd-fs 2022-07-04 22:29:26 +08:00
bunnie
900e3e6ae2 fix limit on manual FSCB test so we're triggering basis gen once
it's pretty tedious to do repeated basis regens manually.
2022-07-04 18:35:18 +08:00
bunnie
10521bd9a7 bump release notes to include FSCB updates 2022-07-04 18:22:34 +08:00
bunnie
00a40ef29d Merge branch 'pddb' into main 2022-07-04 18:14:40 +08:00
bunnie
e26106e334 fix warnings and clean up configs
tighten up the scope of some features to reduce warning messages
2022-07-04 18:13:11 +08:00
bunnie
c46b5179ff commit various project configs 2022-07-04 17:58:52 +08:00
bunnie
8565c7efe1 fix FSCB generation issues
- fix problem where we were generating a size based off of total disk
size, instead of fraction of available space

- enumerate FSCB entries into the page table scan. This is because
the page table cache could hold used entries that aren't reflected
in the low-level disk scan, and there is no way to trigger a
flush at the point of re-allocation.
2022-07-04 17:56:54 +08:00
bunnie
608817f343 finalize/improve basis stress testing
- add an autotrigger feature for the basis stress test so it can
  be run in a fuzzer loop
- various fixes and improvements to the implementation to help
  integrate with CI
2022-07-04 17:55:52 +08:00
bunnie
5d23ad9db6 add the pddb-btest target, for secret basis stress testing 2022-07-04 17:55:23 +08:00