Commit graph

10340 commits

Author SHA1 Message Date
bunnie
24c10dcfb2 bump the rate of update feedback slightly
slightly more aesthetic experience without too much performance
penalty.
2022-07-11 15:09:47 +08:00
bunnie
a90b5f2554 clean up autoupdate flow & clean up net link reset flow
We are now at a point where the EC update can be applied and the
net stack recovers gracefully, so no reboot is required in the
case of an EC update.
2022-07-11 15:07:53 +08:00
bunnie
8f3aa84e6d refresh the wlan stats cache on resume... 2022-07-11 05:06:01 +08:00
bunnie
ca5455635b add some heuristics to improve the connection manager
the CM can't always detect if the EC changes state; this is
especially true after an update or a forced reset where
the state caches are not reliably updated. If no packets are
seen for a while, poll the actual state and force a sync-up.

Also try to make sure that the interrupts are enabled correctly.
2022-07-11 04:58:48 +08:00
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
b3aed616cd
Update flash.md 2022-07-09 15:37:50 +08:00
bunnie
398e4b1f88
Update flash.md 2022-07-09 15:34:55 +08:00
Gianguido Sorà
23a46268b4 match against percursor usb pid/vid 2022-07-08 18:11:10 +02:00
Gianguido Sorà
e222ae4bf3 disable default features for hidapi, since ctaphid already takes care of that 2022-07-08 17:40:03 +02:00
Gianguido Sorà
c619287824 first raw commit 2022-07-08 15:36:25 +02: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