Commit graph

475 commits

Author SHA1 Message Date
bunnie
802decb55a initial drafts at the backup and restore helper scripts
very, very rough but i was able to run through an entire
cycle exactly once successfully.

much more testing needed.
2022-07-17 03:13:42 +08:00
bunnie
9c7b1e3228 update update script verbiage to reflect the latest flow 2022-07-17 03:13:13 +08:00
bunnie
7248f47ca8 fix self-signing to reflect extra data for semvers
the loader is a little funky, and requires some maintainer hand-holding
due to the split of the page ownership between the root-keys
crate and the graphics-server crate.

Improved docs so I don't forget this detail in the future.
2022-07-11 16:11:32 +08:00
bunnie
2ad7ed10d6 bump semver version 2022-07-11 04:13:19 +08:00
bunnie
1256fcb411 add min version requirement and current version to kernel and loader 2022-07-08 18:56:05 +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
ae8fe799bc add a fuzzer for basis lock/unlocking
this commits a script that will repeatedly rerun the `btest`
which creates several Bases, fills them with pseudorandom datat,
and goes through a lock/unlock cycle.

should be run with the disk size set to 4MiB for maximum stress
testing (the larger disk won't trigger an FSCB refill because its
hard to run out free space on the larger disk size)
2022-07-04 17:53:29 +08:00
bunnie
97ae56915e fix edge case in --dump mode for pddbdb.py
shouldn't crash when not in CI analysis mode
2022-07-04 17:52:59 +08:00
bunnie
f14cce55ff update the updater readme
The FPGA gateware region is blocked from trivial readout via USB:
this makes it a tiny bit harder to obtain the gateware image, which
contains the secret keys. This slightly aids users who haven't
burned any efuse keys and are using the default "null" key from
a trivial readout attack, and it also hampers a WBSTAR exploit.

This makes the most convenient path of attack to be loading
a custom xous.img (or otherwise exploiting the kernel) with
a gadget that is capable of reading the gateware region
through priveleged code, and then relaying it over USB through
some run-around of the firewall. This primitive isn't impossible
to create but it doesn't exist and has no use in a normal
operational flow, so, it's going to at least force an attacker
to write some code, as opposed to using off the shelf utilities
we provide.
2022-06-29 13:20:52 +08:00
bunnie
e32ea4d3f5 fix #174 2022-06-10 21:36:53 +08:00
Sean Cross
aa436cbcc7 tools: elf: don't get raw_data for no_copy sections
The `xmas-elf` crate doesn't deal with `raw_data()` of sections that are
`NO_COPY`. These sections may point to data that is outside of the file.

In order to avoid hitting this assert, don't call `raw_data()` on
sections that are marked `NO_COPY`.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-10 16:52:57 +08:00
bunnie
7112b6a15f add a script to help extract keyboard mappings for unknown keyboards
use `usb kbdtest` to output a mapping assuming US-101 maps
it will then derive an appropriate keymap based on that mapping

doesn't support non-ascii characters (yet)
2022-05-17 16:39:48 +08:00
bunnie
02daea2f0e add a note for STAGING area as well 2022-04-22 02:48:52 +08:00
bunnie
5bdd3a9f51 modifications to prepare for enhanced USB security
The next release will feature an access control on USB so that
root keys and the encrypted gateware cannot be read back and
transitively the writes would be guttered (but this is not a problem
because the write target address is not set by the memory location
of the write, it's actually set by the location specified in
the program command to the FLASH).

This means that the updating program has to be modified accordingly;
now, for writes, a single location is targeted (and as alluded above,
this is funneled to a write FIFO buffer, and then the actual address is
set with the page program command); and for readback, attempts to read
back the SoC area are flagged and noted as impossible due to security
precautions.
2022-04-22 02:48:43 +08:00
bunnie
b39f4c38eb fix update scripts so updates don't wipe root keys :-O 2022-04-20 17:15:46 +08:00
bunnie
9878dfc1a9 add a note about resetting the device properly after an update 2022-04-20 17:03:02 +08:00
bunnie
a31030bf90 remove excess wait state and clarify wait text 2022-04-20 16:59:19 +08:00
bunnie
15105cd0b2 fix update scripts to prevent device from self-resetting during updates 2022-04-20 16:57:10 +08:00
bunnie
4f9f1116fc fix various bugs in pddbg
note that there is still pddbg_v1 for the older version of the pddb
2022-04-20 03:47:17 +08:00
bunnie
758ed1ba31 some more fixes to pddbg to bring it up to v2. now passing CI. 2022-04-19 23:28:47 +08:00
bunnie
2d0af08266 bring pddbdbg up to v2 2022-04-19 15:57:51 +08:00
bunnie
d0f632965e add the old version of pddbg for debugging v1.x databases 2022-04-19 04:49:40 +08:00
bunnie
ba3639b00a prepare for v2 migration. more edits coming 2022-04-19 00:44:30 +08:00
bunnie
52f1afa780 commit some improvements to the CI framework 2022-03-31 00:28:49 +08:00
bunnie
e4eed87a55 Merge remote-tracking branch 'origin/main' into bunnie-dev 2022-03-29 16:45:56 +08:00
Aaron Bieber
6f98940189 Switch to using env to find the path to bash.
Systems like OpenBSD and NixOS have bash in different locations. This
allows the various scripts to be run on those systems.
2022-03-28 16:43:47 -06:00
bunnie
afb9974309 issue a warning if dup journal entries are found (pdddbg) 2022-03-29 04:37:35 +08:00
bunnie
0cf27be3b0 make the partition on dump vs ci analysis cleaner 2022-03-29 01:53:42 +08:00
bunnie
23041ab1f1 add a dump mode to pddbdbg.py so we can just view records
helpful for manual debugging
2022-03-29 01:47:00 +08:00
bunnie
c79afd4220 make sure the directory is not deleted 2022-03-28 04:09:57 +08:00
bunnie
6cbc93f8de make sure the directory is not deleted 2022-03-28 04:09:19 +08:00
bunnie
526a7374b0 re-introduce PDDB structure nuking on SoC reset 2022-03-20 15:25:14 +08:00
bunnie
b52b73ddfa add functionality to override the CSR data in case it is corrupted 2022-03-19 16:56:03 +08:00
bunnie
b06d7c4bb7 add a note about the hard reset 2022-03-19 16:31:37 +08:00
bunnie
1856a83e3e fix ordering of updates to prevent mid-update resets 2022-03-19 16:22:09 +08:00
bunnie
2aa72fae18
Update factory_reset.sh 2022-03-19 09:01:40 +08:00
bunnie
d9f4f6d041
Update factory_reset.ps1
move soc update to top so we don't get resets from latest xous
2022-03-19 09:00:58 +08:00
bunnie
eae61df786
Update factory_reset.sh
move soc update to the top to avoid wdt resets
2022-03-19 08:58:41 +08:00
bunnie
f7d42f6c1b correct usb_update.py force message to the correct version offsets 2022-03-18 17:39:45 +08:00
bunnie
dc2c393c5c update scripts to accept a locale argument 2022-03-10 16:22:48 +08:00
bunnie
dd017fb291 retire file-based versioning to symlink methodology 2022-02-28 16:06:48 +08:00
bunnie
2b3178be82 add a powershell script for bleeding edge CI
Because i don't know how to do variables in powershell :-/
2022-02-28 14:07:42 +08:00
bunnie
65499eb0fc bump version code in the pddbdbg.py script as well 2022-02-28 04:16:06 +08:00
bunnie
0b454cb7a8 evict salamanders from AES-GCM-SIV in the PDDB
So you'd like to think that an authenticating cipher would like,
authenticate stuff on decryption. And AES-GCM-SIV was billed as sort
of AES with the pointy edges taken off.

Well, there's always one more bug, actually this time a salamander:
https://eprint.iacr.org/2020/1456.pdf Apparently one can forge
authentication if the attacker can control keys and ciphertext. In the
case of the PDDB I think the attack is largely theoretical, because
you'd have to forge through both the AES-GCM-SIV and the rather
insufficient nonce/murmur hash check on the PTE that locates the page
to be decrypted.

But it's never good to have cryptographic properties depend upon
something that's known to be insufficient, so let's assume the attacker
can simply forge keys and stick some data on the device.

This wouldn't be a problem for confidentiality but it could lead to
the ability to plant evidence, but more importantly could lead to code
paths that were thought to be protected against fuzzing being fuzzed
as you could conceivably create a Basis root record that "checked out"
and then the larger body of the PDDB code would try to chomp on other
pages that are forged, leading to a bigger attack surface. Plus who
knows what else might exist beyond salamanders...

This patch does a "key commitment" on the Basis root page, so that it
is now cryptographically hard to create a salamander.  Basically
instead of using the system root key directly in AES-GCM-SIV, the key
goes through a KDF that expands it with yet another nonce plus a bit
of header data. The KDF is SHA512/256 and it expands it twice,
changing one bit in the header data (as prescribed by the paper cited
above), to create a version of the key that is written to disk (the
commitment), and a version of the key that is used to
decrypt/authenticate the AES-GCM-SIV data. Only if both the commitment
and the authentication check out, do we accept a Basis root page as
valid.

I had some concerns about the slightly different structure of the
Basis Root page being detectable, but I have been assured that the key
commitment form and the MAC in AES-GCM-SIV satisfy a property known as
IND$-CPA ("indistinguishable from uniform randomness by a
chosen-plaintext attacker") by Rogaway[1], and, more strongly, "Secure
nonce misuse-resistant authenticated encryption (mrAE)" by Gueron and
Lindell (see appendix for def)[2]. Still, just out of total paranoia
and nothing else, I organize the basis root page such that the MAC is
in the identical location as the other non-committed pages...just in
case there is some mathematical property of the MAC that could be
leveraged to leak info about the existence of the basis root record.
The commitment nonce and sha512/256 result I understand better and
feel pretty comfortable that they are going to be strongly random and
indistinguishable from AES ciphertext.

Thanks to Michael Rosenberg for taking the time to explain all this to
me and to guide me through the process of making the fixes. It is a
major PDDB API-breaking change and I'm glad it's able to be rolled out
before most users have received a device.

[1] https://web.cs.ucdavis.edu/~rogaway/papers/ad.pdf
[2] https://eprint.iacr.org/2015/102
2022-02-28 03:13:26 +08:00
taivlam
152abdac6b
Fix minor typos
Fixed minor typos in comments (I guessed "ts" was "its")
2022-02-14 19:45:12 -05:00
bunnie
b6b620b9b0 fix some paths 2022-02-10 00:46:20 +08:00
bunnie
2c3425d3fa add a release updater for windows as well 2022-02-10 00:46:09 +08:00
bunnie
ec64782f32 remove a trailing space 2022-02-10 00:39:50 +08:00
bunnie
d88d552260 add a windows version of the factory-reset command 2022-02-10 00:39:38 +08:00
bunnie
fcb67d5d16 fix argument order 2022-02-04 04:25:58 +08:00
bunnie
ad8ba37cf9 add a script that does a factory reset
for those just getting started and who want a fast-path to update.
2022-02-04 04:18:30 +08:00
bunnie
11c88b170e implement a basis for anti-rollback upgrades
the actual transition to a new version isn't here. But,
at the very least, the root keys are now derived by hashing
them MAX_ROLLBACK_LIMIT times, which allows us to create a
key chain based on a global version number that can be incremented
while allowing derviation of older keys without compromising newer
keys.
2022-02-04 01:33:04 +08:00
bunnie
b3788a54af clarify the dependency policy 2022-01-10 16:50:10 +08:00
bunnie
995915ed4e nail down a couple more dependencies, and add a policy note to Cargo.toml
Each Cargo.toml now includes a comment which remnids maintainers
of the dependency policy for Xous (that is, nail down every dependency
to the minor number).
2022-01-10 15:54:27 +08:00
bunnie
fec180890b nail down dependencies in the related build toolchain flow
these are secondary attack surfaces -- code that isn't directly
in the kernel, but involved in the manipulation, handling, grooming
and preparation of source and binary files
2022-01-10 15:49:30 +08:00
bunnie
dd943c5416 pin down versions and harmonize versions across servers
Versions are pinned down to the minor number. Yes, this means that
we don't automatically pull in features and bug updates from crates.io,
but it also means we don't pull in new attack surfaces and code that
hasn't been tested or reviewed. I'd like this process to be very deliberate
and not automatic for Xous.

The `rand` crate is almost pinned down to a single version, except
for an odd dependency that's pulled in by hosted mode that depends
on rand 0.8.4 via a subordinate dependency via the `tempfile` crate.
Pondering if it's worth it to try and eliminate that, because the
0.8.4 version doesn't get compiled into any version that touches
real hardware. It just makes it harder to analyze the Cargo.lock
file, mostly. I think I'll leave it as-is.
2022-01-10 15:39:55 +08:00
bunnie
9a34de0065 rework flash memory locs; add command for re-creating a factory new device 2022-01-09 22:33:36 +08:00
bunnie
0c71622740 fix alignment bug in analysis code 2022-01-06 23:15:24 +08:00
bunnie
4c927f2c99 fix name records so they encode a length
This is one of the truly redeeming features of Rust is that a
major refactor of a core structure like this doesn't leave me
shaking in my boots -- I feel pretty good that this works
since everything passes the CI tests.

The original FS implementation did the "stupid C thing" which
just creates a fixed lenth field and uses null-terminated C
strings. Which actually restricts PDDB entry names to be ascii
as valid UTF-8 can encode single-byte nulls.

The intention was for names to be fully utf-8 compliant, but in
order to do that we have to burn one byte of potential filename
length and encode an overall length field for the name strings.

This change does that, which both makes the code a bit safer
at the expense of losing a character off of the maximum filename
length.
2022-01-06 18:53:01 +08:00
bunnie
d87920a772 add argument to erase the entire PDDB region. 2022-01-04 11:12:30 +08:00
bunnie
630dd6a784 make the CI options command line driven 2022-01-02 16:41:23 +08:00
bunnie
421a3814d8 clean up some warnings before moving on to further integration 2022-01-02 15:07:48 +08:00
bunnie
33b0593f9a fx fspace cache entry space check issue
was counting total number of pages, not actual free pages.
2022-01-02 01:41:55 +08:00
bunnie
fef355423b fix CI red herrings; add more debug granularty 2022-01-01 15:14:44 +08:00
bunnie
c02a8933ef speed up the analysis tool so it's a bit more practical to use in CI 2022-01-01 14:14:09 +08:00
bunnie
656f17f621 add extensive CI test 2021-12-29 05:49:07 +08:00
bunnie
6990513278 fixed a subtle bug in the pte sync algorithm
was mixing deletions and updates and because they are in arbitrary
order due to the hashset structure, sometimes i'd delete an entry
after it was updated.

this is now found and fixed.
2021-12-28 06:47:33 +08:00
bunnie
713c0d6e73 add a multi-iteration CI loop around the pddb test
this allows us to capture seeds and corners of interest
2021-12-27 16:15:51 +08:00
bunnie
4f7372bbd4 add log levels to the debug tool 2021-12-27 13:07:01 +08:00
bunnie
c15841cfdc test framework in place to look at multiple basis
found one bug already, need to refactor how PT encryptor is
handled
2021-11-28 23:54:58 +08:00
bunnie
af9f4cbde3 back out changes for stress testing the fastspace mechanims 2021-11-27 21:23:42 +08:00
bunnie
185d629b98 stress test fastspace allocation and regeneration
- confirmed that log entries regenerate on trigger
- confirmed that fastspace cache regenerates and contains a
new subset of blank pages.
2021-11-27 21:17:41 +08:00
bunnie
93ee050079 fastspace regen debugging -- passes test, but needs optimization
should be able to get away with "just" regenerating the fast space
log only if that's what we've run out of; however, doing that optimization
we run into out of space errors. maybe we need some tuning of the thresholds
for when to reclaim space
2021-11-27 02:19:57 +08:00
bunnie
e02df18374 fix reporting error in directory listings 2021-11-26 03:36:36 +08:00
bunnie
468e372bfa most tests passing, also, be a little smarter about cache fills. 2021-11-26 03:08:08 +08:00
bunnie
ca485d5541 fix off-by-one in small pool to dictionary storage mappings
consolidate index math into helper functions to reduce errors.
2021-11-25 03:14:29 +08:00
bunnie
8de0d70f43 debugging the patch-extend test.
probably should make a bunch of unit tests for the free dictionary
key tracking logic, it's too tricky to test out.
2021-11-24 03:57:50 +08:00
bunnie
66a5b97705 revise pagetable entry to be 7 bytes wide -- this will allow
us to have a full 64-bit address space upon expansion of the page
number (turns out this is probably important because of the crappy
increment-only allocator used for the large blocks)
2021-11-24 01:49:22 +08:00
bunnie
42e926fcab fixes for patch update test
lots of corner cases found and ifxed
2021-11-23 23:33:06 +08:00
bunnie
d716fea17a now passing dictionary add/remove test 2021-11-23 02:57:13 +08:00
bunnie
77d3f8a646 fix bug in python aes-gcm-siv reference implementation 2021-11-23 02:56:54 +08:00
bunnie
eda60a5d9c base case test done, with CI checking 2021-11-22 18:26:19 +08:00
bunnie
62059a9f93 relocate images to a directory 2021-11-22 14:00:43 +08:00
bunnie
1874c8e72d most of the core routines are now in place
can create/delete dicts, create/delete/update keys.
basis deletion is...just forgetting the password. that's the point,
at least. could maybe extend the basis AAD to include some small
amount of derived data that could be deleted to facilitate basis
deletion...

anyways. next up is...lots and lots of testing.
2021-11-22 04:46:36 +08:00
bunnie
193f563782 very basic small key additions working as expected now 2021-11-21 02:21:25 +08:00
bunnie
c62b2a25fb dictionary adding now seems to work 2021-11-18 02:01:30 +08:00
bunnie
507d99ee41 moving toward refactoring the basis sync function 2021-11-18 00:09:55 +08:00
bunnie
bbbaa6b810 clean up the structural definition of the dictionaries and keys 2021-11-16 18:45:24 +08:00
bunnie
49d00c783e basic mounting of the PDDB & readout of system basis 2021-11-16 02:58:33 +08:00
bunnie
d7cc518552 add mbbb mechanism 2021-11-15 19:05:03 +08:00
bunnie
65bbc82ef5 commit to Repr(C), include doc comment for rationale and tests 2021-11-15 16:38:57 +08:00
bunnie
ce51205155 checkpoint with memory placement and disk storage
this probably isn't new to most other people but this has been
a very visceral exercise of how tricky it is to use Repr(c)
for data layouts in anything but the most trivial data structures.

Unfortunately the Basis root data structure needs to be fairly rich,
so we're playing around with using rkyv to help with the serialization
to disk but I'm also not convinced this is a good idea yet. This
checkpoints commits a "working" rkyv implementation, but I'm not
entirely happy with the notion that rkyv can shuffle around data
bits based on its particular version or decisions in the serializer
crate. I'd like deterministic, repeatable serialization that will
be solid through lots of revs...
2021-11-15 16:00:01 +08:00
bunnie
ba9b136f87 debugging alignment issues on serialization of compound structures 2021-11-15 04:03:55 +08:00
bunnie
94a86c542d add an entrails parser for the PDDB 2021-11-14 19:02:34 +08:00
bunnie
8b59bcdf61 add indices to create_image output
makes it easier to figure out what IniE section corresponds
with which PID.
2021-11-06 21:03:28 +08:00
bunnie
c87acaeddc clarify a bit of rounding code in the create-image routine 2021-11-06 20:30:01 +08:00
bunnie
6360d1c902 tighten up the hard-coded locations for the trng test
these locations look good for a while, now that i see the
structure of data allocation (it's split between top and bottom)
2021-10-31 02:58:43 +08:00
bunnie
5f327126ab Merge branch 'bunnie-dev' of github.com:betrusted-io/xous-core into bunnie-dev 2021-10-30 03:16:13 +08:00
bunnie
72df2ff7e4 commit tester stability tweaks 2021-10-30 03:15:53 +08:00
bunnie
ad66460543 move the trng tester ram locations on the corresponding host-side test script 2021-10-30 03:14:33 +08:00
bunnie
73c131cbcc fix help message 2021-10-07 01:09:53 +08:00
bunnie
42e298d79b add a sleep between update commands 2021-10-05 22:34:53 +08:00
bunnie
792ad953eb add wf200 artifacts to the update script 2021-10-05 22:28:30 +08:00
bunnie
2e40546a88 add a force overwrite option to the updater for the soc mode 2021-10-04 16:30:41 +08:00
bunnie
0f00e36dea loader was never updated. oops. 2021-10-04 16:26:33 +08:00
bunnie
6b0b768081 add a line break on the exit to call out the reminder 2021-10-04 15:48:37 +08:00
bunnie
e3ff753e83 add a line break on the help message 2021-10-04 15:48:23 +08:00
bunnie
9994b38e16 clarify update_ci role with respect to the SOC image 2021-10-04 15:47:02 +08:00
bunnie
7bfdce147c modify the update_ci script to be aware of the release tree 2021-10-04 15:38:04 +08:00
bunnie
966615270f update trng test wdt ping method 2021-09-09 22:38:51 +08:00
bunnie
f3786b01a1 Merge branch 'main' of github.com:betrusted-io/xous-core into main 2021-09-07 19:01:02 +08:00
bunnie
840cccecda make the filename more obvious for the purpose of the legacy update script 2021-09-07 19:00:34 +08:00
bunnie
da9078749f add a script for xous 0.8 devices. because there are still a couple out there 2021-09-07 18:59:47 +08:00
bunnie
e510525a0a move wycheproof-import to tools 2021-09-06 14:42:19 +08:00
bunnie
e57587d9c8 update documentation to reflect bitstream padding added to align AES blocks 2021-09-05 18:31:42 +08:00
bunnie
0ae2d13602 update trng_test.py to xous 0.9 2021-09-05 17:47:52 +08:00
bunnie
d20a06e4eb fix update script to use the correct precursor 2021-08-30 03:30:45 +08:00
bunnie
69d9e38c8b add EC updates to the CI update script 2021-08-24 23:22:41 +08:00
bunnie
33d14b6ee3 add some timeouts after each phase, for the device to reboot 2021-08-24 22:59:10 +08:00
bunnie
1af98f7e43 Merge branch 'main' of github.com:betrusted-io/xous-core into bunnie-dev 2021-08-24 22:39:50 +08:00
bunnie
99ff36f529 add a quick CI update script 2021-08-24 22:37:31 +08:00
bunnie
a2bcf0fc2b match wdt ping to refactor + fix paths for default images to xous 2021-08-23 05:11:14 +08:00
bunnie
ccc577f8d7 clean up the update flow 2021-08-16 02:46:54 +08:00
bunnie
353311b987 fix USB update flow 2021-08-15 16:03:18 +08:00
bunnie
f334199ee6 commit host mode debugging 2021-08-12 23:01:34 +08:00
bunnie
ec6a3fd1a3 self-signing working, but the patch to use the SHA hash engine seems to be disregarded... 2021-08-09 03:27:43 +08:00
bunnie
d86c78eea8 partial progress on self-signing 2021-08-03 04:58:34 +08:00
bunnie
825322c730 add explicit .iter() for arrays so we still work with Rust 1.51 2021-07-18 16:04:22 +08:00
Sean Cross
aaa4407e21 sign-image: enable kernel image signing
Previously we only supported signing the loader. This also adds the
kernel as a thing that can be signed.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-15 16:39:35 +08:00
Sean Cross
f0bd6c6cd3 Merge branch 'sign-image' 2021-07-13 20:11:27 +08:00
bunnie
a4f8346c34 reflect the latest fixes to the secure boot process
also patch up some issues with sha512 reset and loose
ends on docs and updates
2021-07-13 00:46:31 +08:00
bunnie
5d62af49a5 simple signature checks in the bootloader now
checks xous.img as a single blob before accepting it.
2021-07-12 17:16:22 +08:00
bunnie
2b19f31da9 set the stage for simple signature validation on the kernel 2021-07-12 02:26:50 +08:00
bunnie
b31ff527a3 more help for dealing with python shittiness 2021-07-11 17:01:56 +08:00
bunnie
3359267eb0 update with some hints that hopefully make installation easier 2021-07-11 17:00:38 +08:00
Sean Cross
31551a6227 tools: add sign-image
Add a Rust implementation of `sign-image`. This enables us to sign the
binary on any platform that can compile Rust.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-11 16:34:23 +08:00
bunnie
dfb8d89866 add comments about where to get packages from 2021-07-11 14:13:34 +08:00
bunnie
1949c1bbc9 a semblance of sanity, finally 2021-07-09 23:01:50 +08:00
bunnie
057d9895a6 beginnings of image signing 2021-07-06 17:31:09 +08:00
bunnie
a25f244426 Merge branch 'bunnie-dev' of github.com:betrusted-io/xous-core into bunnie-dev 2021-07-04 01:50:55 +08:00
bunnie
f63b29cadd fix bugs in the trng tester helper script 2021-07-04 01:50:31 +08:00
bunnie
22906ce366 make the defaults for usb_update.py map to something immediately usable in-situ 2021-07-02 04:27:26 +08:00
bunnie
25ea2c9cf9 move obsolete script into tools directory and update readme 2021-06-30 00:12:46 +08:00
bunnie
7ff4824eb6 add routines to copy audio test files to the device 2021-06-23 19:07:59 +08:00
bunnie
d5c30fae00 tighten up the CPU halt periods to just around the USB burst reads 2021-06-12 15:13:35 +08:00
bunnie
75f15df723 relax polling of target ready in trng test script 2021-06-12 04:26:30 +08:00
bunnie
c1734334fb add retries around all functions 2021-06-12 03:41:45 +08:00
bunnie
406aa9405d put the trng tester host-side helpe script inside the tools directory 2021-06-12 01:50:17 +08:00
bunnie
758bb64578 Merge branch 'bunnie-dev' of github.com:betrusted-io/xous-core into bunnie-dev 2021-06-02 04:04:21 +08:00
bunnie
1f7add35a1 update docs for usb updater 2021-06-02 04:04:04 +08:00
bunnie
fadc9c29ab Merge remote-tracking branch 'origin/master' into bunnie-dev 2021-06-02 03:59:25 +08:00
bunnie
b9f3182bb9 mods for hosted mode to work again 2021-06-02 03:45:15 +08:00
bunnie
8145473167 remove what i think is no longer a necessary comment 2021-05-25 05:31:21 +08:00
bunnie
8398d22102 fix readme 2021-05-25 03:56:19 +08:00
bunnie
40b4f26dcb fix alignment bug on erase blocks for usb_update.py 2021-05-25 03:54:37 +08:00
bunnie
548126d1b6 add a maintenance note to the docs 2021-05-23 15:11:11 +08:00
bunnie
e1d0dc2178 add USB updater scripts to xous-core 2021-05-23 14:55:43 +08:00
Sean Cross
f7ae13da44 tools: run cargo fmt on pnam
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-19 14:20:22 +08:00
Sean Cross
2e4fb672ab arguments: document and add pnam tag
The `PNam` tag stores information in the kernel about process names.
This can be used at runtime to discover what process maps to what
program name.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 14:37:33 +08:00
Sean Cross
86140dfb35 tools: specify v0.4 for log
Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-06 16:36:34 +08:00
Sean Cross
7b50d00eb8 repo: run cargo fmt
This reformats line endings to be consistent, and reinforces the
contents of `.gitattributes`.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-01-03 18:31:51 +08:00
hasheddan
a4d18d6db2
Update tools README.md links to other docs
Fixes links in tools directory README.md to top-level documentation.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2020-12-06 10:40:45 -06:00
Sean Cross
96df91f53b create-image: support generating an image from an svd
Now that we can parse svd files, support creating an image using an svd
instead of a csv file.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-05 11:37:44 +08:00
Sean
ba320184b0 tools: create-image: print out error when csr.csv can't be opened
Signed-off-by: Sean <xobs@ci.betrusted.io>
2020-10-03 20:32:31 +08:00
Sean Cross
10ecacd136 kernel: native: create process for initial processes
These all need to bootstrap themselves.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-09 23:08:54 +08:00
Sean Cross
09be029ad0 tools: refactor to make clippy happy
This fixes a lot of small clippy warnings.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-29 20:02:58 +08:00
Sean Cross
14bb1ac1e5 kernel: working on getting process termination functioning
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-22 17:42:24 +08:00
Sean Cross
973945fce2 tools: read-tags: fix bad pointer arithmetic
This removes raw pointer usage that could cause unaligned accesses.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-15 12:30:21 +08:00
Sean Cross
7da67f050a tools: fix most clippy warnings
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-15 12:04:23 +08:00
Sean Cross
5aa3358bc0 tools: generate byte addresses for mini elf files
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-12 15:29:26 +08:00
Sean Cross
4645816674 tools: elf: add comment and dead code for alignment fixing
This issue was spotted when the kernel address was wrong.  This fixed
the test, but was indicative of something else being wrong.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 14:43:15 +08:00
Sean Cross
edf723e107 create-image: verify the kernel image address is sane
Rust inconsistently applies linker scripts.  Verify the image being
added has a script that makes sense.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 14:42:01 +08:00
Sean Cross
36dbc97a61 tools: pad inie and xkrn tags to 4-bytes
This fixes an issue where images were not word-aligned.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 13:12:27 +08:00
Sean Cross
6959b4ef77 tools: rename from xous-tools
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 12:46:20 +08:00
Sean Cross
f50ec67553 initial commit
This pulls together many disparate repositories into one xous-core
repository.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 12:13:05 +08:00