mount initiator is now back inside of the status thread
(woo, no more app-specific dependency) and there is now a
wait on "attempted to mount" inside the status thread which is
the signal to clear the "waiting on boot" message.
While it's a kind of neat effect to have the "please wait"
message persist right up until the point where the dialog box
pops up, the problem is that the blit of the backplane captures
that, so when the context is reverted that message is still there.
On a very fast mount (empty PDDB under Renode emulation) the
mounting call finishes so quickly that the dialog box that would
normally trigger the redraw to clear this message never renders.
This patch forces the screen to blank before trying to call
PDDB init, ensuring that we don't have that persist after the
mount, even if it is very fast.
The downside is there is a fraction of a second where the please
wait disappears, and the dialog box pops up. That is just the
time it takes for the system to setup for the cryptographic
operations.
There's a race condition between the return of a blocking scalar
and when focus is relinquished.
This causes chained graphics operations to get dropped sometimes.
Move the return result to after the focus switch; this allows us
to elimate some dead waits.
The initial wait message is drawn directly under where
the modals would appear, so the message "goes away"
when modals pop up.
There's still a bit of trickiness around the timing of
some of the calls. Attempting to mount the PDDB too early
before all the contexts have been registered leads to
a lot of needless defacing.
Also, the final redraw needs a short delay to allow
the system to foreground shellchat again after closing
the modals.
The rationale is that xous-rs should have only architecture
specific code, e.g.: riscv, arm, x86, etc. To make other
crates that depend on it not specify the features.
This could be useful when using xous-rs with `libstd`
for example.
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
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.
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).