Generate files in-memory (which is a cheap operation) and only write the
file to disk if it is different from the existing file.
This prevents rebuilds in the following circumstances:
1. When changing utralibs, an extra rebuild is always generated due to
the file being updated mid-build. This will no longer happen.
2. When switching targets, there will no longer be an unconditional
rebuild. This is because the feature flags are mixed in with the
package hash, and different builds use different feature flags.
3. When one svd file is updated, other variants of that feature flag are
no longer rebuilt. For example, when updating the Renode SVD,
Precursor DVT1 will not need to be rebuilt, since that has not
changed.
Changing a given SVD file will cause that target's version of utralib to
be rebuilt, and only that target's version.
Signed-off-by: Sean Cross <sean@xobs.io>
The `args.bin` file served only to be copied to `xous_presign.img`. Skip
this step and directly generate a file called `xous_presign.img`.
Signed-off-by: Sean Cross <sean@xobs.io>
Previously, we would unconditionally zero out the remainder of a page
when finished copying. We wrapped to PAGE_SIZE in order to avoid
corrupting another process' memory.
However, an issue was discovered under the following circumstances:
1. There are fewer than 4096 bytes of `.bss`
2. The `.bss` ends on a page boundary
Under these conditions, the loader would load the section before the
`.bss` into the page, then clear out the `.bss`, and finally clear the
entire page, overwriting the previous section.
Skip the remainder-of-page clearout when the `.bss` ends on a page
boundary, rather than clearing the entire page.
Signed-off-by: Sean Cross <sean@xobs.io>
Print out the current process ID when looping through values. This will
make it easier to identify which process is getting loaded when reading
through the tea leaves.
Signed-off-by: Sean Cross <sean@xobs.io>
* Adds mtxcli commands using the PDDB
/get key -- shows value of key (from the PDDB)
/set key value -- sets value of key (in the PDDB)
/unset key -- removes key (from the PDDB)
/status -- shows status of the connection
Updates .gitignore for PDDB in hosted mode
the Vex has a custom flush instruction, after contacting
charles he recommends maybe adding some nops to make sure it
completes (maybe hardware bug? unclear. we're about to find out.)
suspect maybe the custom vex routine for cache flush has a subtle
issue, so fall back to first-principles read-region flush.
remove excess calls to flushing as well, turns out we effectively
duplicated the call because it was both in the core patch routine
and outside of it too.
When ditherpunk flag is enabled, graphics-server cannot start.
I suspect macOS doesn't tranfer thread-local variables when a new one
is spawned, and this makes xous-names, logs crash.
This commit adds a compile setting that will bypass ditherpunk thread
settings on macOS as well, allowing developers who happen to run this OS
to develop and prototype for betrusted again.
this will increase binary size but may help to trace down some instability issues we have seen crop up. probably root cause is something to do with loader init of bss, but other candidates include regression in rust 1.64 and possibly version/crate mismatch issues between api and service crates that were recently split.
This is how I'd do the app switch. It's a special case going to the shellchat. shellchat is aliased to `INITIAL_APP_FOCUS`, so you can refer to that constant directly in this call, instead of using a more generic app-lookup mechanism.
Also, because the idea is that we can allow *anyone* to call this method, there are no authorization tokens to check, unlike the SwitchToApp call, which can allow arbitrary apps to be foregrounded.
The security assumption is that "no harm" can be done if a malicious process can bring shellchat to the foreground. This might not be a good assumption, but, I can't think of a scenario where this helps someone trying to get control of a device.
NOTE: action on DefaultApp is not yet implemented: this
should allow the GAM to choose which application is safe
as a default (for other applications to "quit" by switching to it).
Proposed default application is "shellchat".
Updates mtxcli commands
- removes audio command
- adds help and quit commands
resurrecting some old hardware as an efuse testing target;
new hardware is too precious at the moment given the ridiculous
shortage of FPGAs on the market.