Commit graph

1738 commits

Author SHA1 Message Date
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
bc6ec8caf4 initial key provisioning demo working 2021-08-07 22:21:49 +08:00
bunnie
86845dd093 fix permissions 2021-08-06 02:34:35 +08:00
bunnie
82aaeb072f gateware HMAC verification now working! 2021-08-06 02:33:52 +08:00
bunnie
40b671ffac refactor for sha256 software emulation native in the engine512 crate 2021-08-05 22:07:21 +08:00
bunnie
d68b6639cf remove now-unused stub 2021-08-04 23:29:00 +08:00
bunnie
7921b0216f try to improve system stability in debug modes 2021-08-04 22:40:53 +08:00
bunnie
d42658a65d fix kernel debug input
for whatever reason, by default, uarts in litex are configured
not to drain a fifo when you read them -- they only drain
after you write EV_PENDING.
2021-08-04 22:40:12 +08:00
bunnie
b6039361cf jtag script for burning the key 2021-08-04 13:57:09 +08:00
bunnie
ac190e2d97 add the test key for self-provisioning testing 2021-08-04 13:54:11 +08:00
Sean Cross
f7f7ac2ee0 loader: add small comment
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-04 12:50:20 +08:00
Sean Cross
c5445da5d2 loader: only pre-allocate the first stack page
For each program, only allocate the first stack page. This will ensure
we don't use too much stack.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-04 12:48:14 +08:00
Sean Cross
acf9e2924d cargo: check in lockfile with locales changes
Locales now has build dependencies.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-04 12:47:47 +08:00
Sean Cross
e93929e04b loader: use vendered version of utralib
By vendoring this package, we can avoid causing a rebuild unnecessarily.

This will be removed when Rust 1.55 is released and we can bring the
`loader` package back into the main workspace.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-04 12:20:05 +08:00
Sean Cross
afcef0d05b kernel: use vendered version of utralib
By vendoring this package, we can avoid causing a rebuild unnecessarily.

This will be removed when Rust 1.55 is released and we can bring the
`kernel` package back into the main workspace.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-04 12:19:16 +08:00
Sean Cross
207662414e locales: generate locales as part of normal build
This makes `locales` its own package. As a result, the system will not
rebuild the locales unless necessary.

Additionally, the `generate-locales` command has been updated to simply
force a rebuild of this file in order to keep the previous behavior.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-04 12:19:06 +08:00
Sean Cross
5ec4da0f8f emulation: use riscv32imac-unknown-xous-elf
The path to the generated file has changed. Update it.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-04 10:14:56 +08:00
Sean Cross
6ca985efa5 Merge branch 'main' of github.com:betrusted-io/xous-core 2021-08-04 10:14:30 +08:00
bunnie
c81a9a7644 whups a buffer wasn't saved during the refactor 2021-08-04 02:05:26 +08:00
bunnie
ef671dd6a3 fix up xous-names and resolve issue #26 thanks to stdlib
also frees up about 24k of unused RAM, i'll take it!
2021-08-04 01:59:17 +08:00
bunnie
8b83fb7c65 remove heapless, go to libstd for all collections!!!!
*fistpump*
2021-08-04 01:25:32 +08:00
bunnie
34d44ee9e7 start to remove heapless and commit to libstd flow 2021-08-04 00:07:47 +08:00
bunnie
cabcce9ab2 fix minor issues for std integration 2021-08-03 18:23:04 +08:00
Sean Cross
183caae75d Merge branch 'main' of github.com:betrusted-io/xous-core 2021-08-03 17:59:36 +08:00
Sean Cross
3645bea9c9 xtask: fix cargo libstd-test
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-03 17:45:40 +08:00
bunnie
68ea69c2ed Merge branch 'bunnie-dev' into main 2021-08-03 17:22:10 +08:00
bunnie
f638d01289 fix a minor issue in hosted mode 2021-08-03 16:57:54 +08:00
bunnie
01d6c61bb6 commit before merging main stuff
want to capture in the libstd improvements before we get too much
version drift
2021-08-03 16:54:42 +08:00
bunnie
07bf3478fa add the KEYROM patching database for rewriting bitstreams with new keys
This code was originally in https://github.com/betrusted-io/rom-locate.
However, the majority of that crate is concerned with creating the database
files necessary for the patching, and it pulls in a lot of dependencies.

Changing hardware targets is considered to be a "huge" change for this
project, so we're pushing the code generator directly into xous-core,
and commiting the generated code directly. The theory is that we would
probably never have to modify this code, since it's so intimately linked
to the hardware; it's a bit like committing an include file with
register offsets for a particular peripheral.
2021-08-03 16:28:17 +08:00
Sean Cross
987434433e xtask: support building under riscv32imac-unknown-xous-elf
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-03 11:26:15 +08:00
bunnie
d86c78eea8 partial progress on self-signing 2021-08-03 04:58:34 +08:00
Sean Cross
ff23ba7eb0 cargo.lock: use new blitstr hash
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-02 18:16:41 +08:00
Sean Cross
9e1fec4d78 emulation: update offset of xous.img
This image file should get loaded onto SPI flash rather than into RAM,
since RAM gets cleared by the bootloader now.

Place it at a location that matches real hardware.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-02 18:16:01 +08:00
Sean Cross
b86e0a65cd services: recognize xous as a hardware OS
Support `xous` as a valid OS. This allows us to build the entire kernel
under this target.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-02 18:11:48 +08:00
Sean Cross
aff690142a imports: blitstr: support xous target triple
This bumps the version number for blitstr so that it now recognizes
`xous` as a valid bare-metal target.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-02 18:11:09 +08:00
Sean Cross
95a70ba25f xous-rs: support riscv32imac-unknown-xous-elf
This target triple adds Xous as a recognized OS.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-02 18:10:31 +08:00
Sean Cross
bb9472816f emulation: add spinor_soft_int and wfi
These two peripherals are required to run the current build.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-02 17:10:10 +08:00
Sean Cross
45008ebe36 xtask: simplify key file path extraction
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-02 11:08:52 +08:00
bunnie
d112d49524 clean up UX work before switching back into crypto work 2021-08-01 17:52:15 +08:00
bunnie
2714c9eb13 link in some READMEs so that rustdoc pulls them in
also add some bread crumbs on the more user-facing APIs to
help beginners out. Need to do a good spring cleaning of the
rustdoc tree, though. looks pretty terrible as it is.
2021-08-01 16:08:27 +08:00
bunnie
e968798fff fix defacement ordering 2021-08-01 15:06:28 +08:00
bunnie
63cf2d3292 fix right shift overflow in main macro 2021-08-01 15:06:09 +08:00
bunnie
cfd5e18549 add a progress bar/slider element. getting there. 2021-08-01 04:02:15 +08:00
bunnie
1d3eaa4f9a fix a stale dialog box message 2021-07-31 04:02:18 +08:00
bunnie
d56e58cb06 ux now to the point of gathering all the required passwords. 2021-07-31 03:54:10 +08:00
bunnie
d7d052b6ff refactor ux flow, now on a good footing 2021-07-31 03:27:16 +08:00
bunnie
41843db988 intermediate progress on the main UX flow again
does not build clean because still deciding on how to handle
UX feedback.
2021-07-30 19:04:02 +08:00
bunnie
151d1ee229 add tests to bcrypt and fix some corner cases 2021-07-30 15:28:47 +08:00
bunnie
919e9e87ff add bcrypt for password hashing, take care of life cycle of plaintext 2021-07-30 04:07:10 +08:00
bunnie
17be958d87 convert defacement to an XOR
this ensures that "all back" dialog boxes that are fake
are also defaced (as opposed to just drawing black, which
would not deface a "fake" dialog box).
2021-07-29 22:13:44 +08:00