the camirq is a perfectly good source of preemption,
and xous will run other threads when the handler is finished.
having both natural timer preemption and camera preemption running
at the sime time seems unnecessary and hurts performance.
this is done after critical setup is done. it doesn't guarantee
that it has an infinite time slice, but it makes the startup sequence
more deterministic.
the snippet `attack_keystore()` is left in place along with hints
on how to attack the keystore. Nominally, the attack should fail,
but there are some critical pre-assumptions that can be violated.
I am interested in knowing how robust those assumptions are, so,
documentation and sample code is provided to would-be attackers.
Do me a solid and if you do find a vulnerability, open an issue
ASAP and let me know. Full well aware that some vulns may well
be unpatchable; it is what it is. Hardware is hard, but maybe
we can work together to make it better.
the chunks match the size of the application buffer, eliminating
the possibility of an overrun (of the buffer at least)
there is a possibility still i think of overrunning USB itself
but i think the CPU can't produce data fast enough to actually
do that.
on dabao targets the duart is unavailable, so, it's convenient to
have a uart-based debug option in the HAL. this patch creates a
flag that can allow either target.
have to absorb a version change due to xous-semver change
might as well also update the utra/svd generator dependencies
since that's been held off for a long time now.
The code base had evolved through several code names, interim
names, company names and chip names that alternatively did or did
not exist.
Baochip is the definitive name of the company, and the Baochip1x
(full part number BAO1X2S4F-WA) is the definitivey part number of
the SoC. For convenience, the part number is shortened to 'bao1x'
in most feature flags and variable references.
This commit fixes all of the odd names and removes some unmaintained
early targets.
this creates hooks for applications to listen to the serial port,
as well as to send and receive data. some improvements to code
ordering for readability are bundled in this as well.
very lightly tested, most of the code comes from other more tested
code in the Precursor stack.
the TRNG test stuff is not put into this stack because I think
it belongs in the baremetal environment, as it's only ever
run for characterization. We don't need to bog down the production
stack with test code.
some test code to echo characters back, needs to be improved
fix some reset edge cases, needs more work as stack still
does not enumerate on second plugin
handler works in an interrupt context, so it can't allocate
a page to return data. this cleans up that problem, and also
removes some redundant brute-forced checks that were copypasta
from previous merging of several routines.
This relies on a trick I was not aware of previously, which is
that transitive dependencies absorb the additive set of features
enabled within a crate.
see
https://doc.rust-lang.org/cargo/reference/features.html#feature-unification
for the full description. but basically by referring to the feature
required in "aes" despite not being used in the crate but pulled
in by aes-gcm-siv, i can ensure that the transitive dependency
is in fact used.
I think this was always there but previously I just didn't understand
it correctly or didn't use it right when I tried to deploy it, but
this time I think I got it right.