Commit graph

149 commits

Author SHA1 Message Date
eupn
787312bf82
loader: split consts between riscv and arm 2023-03-14 17:15:17 +04:00
eupn
319071ed73
loader: add sama5d27 feature 2023-03-14 17:15:14 +04:00
eupn
306fdee180
loader: add asm binary and ix build script to pick ARM asm and link.x 2023-03-14 17:13:53 +04:00
eupn
1867f6cf1a
loader: include atsama5d27 arm platform 2023-03-14 17:13:53 +04:00
bunnie
303f595d6f bump versions to cleanup renode.rs sync issue 2023-03-14 16:34:53 +08:00
bunnie
82e3aa322f bump toml files in prep for publish 2023-03-08 03:54:37 +08:00
bunnie
0dd74fe7b3 remove gitrev from precursor soc type
in practice this has not been a useful indicator, and we
have stabilized the SVD format so that changes in the code don't
cause the SVD files to go incompatible anymore.

this should make maintenance a bit easier going forward, hopefully.

also merge in cramium support to harmonize the forks for easier
cross-patches in the future.
2023-03-08 03:46:03 +08:00
bunnie
93bd7468e1 Merge branch 'main' of github.com:betrusted-io/xous-core into main 2023-03-08 03:03:40 +08:00
bunnie
df401d684a remove references to sram_ext so the hardware can be pruned 2023-03-02 17:03:41 +08:00
Sean Cross
ab353c1bee loader: move the kernel stack to kernel region
The kernel stack previously was located at the same relative offset as
all other programs. While this worked, it is poor form.

Move the kernel stack into the kernel memory region (located in the last
4 megabytes of virtual address).

Signed-off-by: Sean Cross <sean@xobs.io>
2023-02-27 20:21:16 +08:00
bunnie
d7c3266ec6 cleanup a warning; fix renode build 2023-02-27 02:19:21 +08:00
bunnie
dfd4c1ab40 fix precursor platform test
the precursor platform test is a RAM stress test. This patch
improves the test slightly by making it more parameterizeable,
and having it run a bit longer.
2023-02-27 01:30:20 +08:00
bunnie
0b25ede0c5 refactor phase 1 of the bootloader
Removes some of the redundant copying, and also simplifies the code
for easier readability and maintainability.
2023-02-22 03:29:14 +08:00
bunnie
b8cc156cfc compact phase 1 loader
merge inie/inif routines more intelligently
2023-02-22 00:58:26 +08:00
bunnie
039de0bfe9 split loader into modules 2023-02-22 00:36:16 +08:00
bunnie
3437b94807 clean up a warning 2023-02-21 23:38:40 +08:00
bunnie
e34d740bc6 some final tweaks for cross-platform integration 2023-02-21 23:19:02 +08:00
bunnie
032bd864db parameterize the loader so it can work with multiple targets 2023-02-21 22:51:53 +08:00
bunnie
bdc0b79906 move assembly header into in-line assembly 2023-02-21 22:17:10 +08:00
bunnie
0c9f8c57c2 remove warning on unused murmur lib when no resume is enabled 2023-02-21 18:24:39 +08:00
bunnie
c4a55a3cb5 fix multiplatform details; bump version number printed 2023-02-21 18:19:12 +08:00
bunnie
0c6ee68a3b make secboot optional 2023-02-21 18:11:32 +08:00
bunnie
f95b05fdb0 fix utralib entry 2023-02-21 17:46:56 +08:00
bunnie
dd105e25f7 update loader Cargo.toml to include platform options 2023-02-21 17:44:12 +08:00
bunnie
3d88a7b3de add platform option files to loader 2023-02-21 17:43:48 +08:00
bunnie
08ae66a264 fix: #320
this commit adds the facilities to extract eh_frame[_header]
sections and pass it to each process.

A bump is required to `std` to extract the passed parameters.
2023-02-15 19:55:08 +08:00
bunnie
ffe697b8c8 CHORE: cleanup some build warnings
put the load checker code behind the debug-print feature gate
2023-02-12 13:15:02 +08:00
bunnie
a6b46c6275 add check function to loader
This is very helpful for debugging loader errors. Basically
it prints out the first and last 20 bytes of each section
based on the source as specified in the MiniElf format, and
then it prints the corresponding data as loaded after walking
the page tables.

Loader errors really stand out with this debugging tool.
2023-02-12 01:12:20 +08:00
bunnie
4a2234f539 XIP works with some processes, but not others
it works with e.g. shellchat, but not vault.

still scratching my head on what's gone wrong -- it's
crashing in the pre-boot, which means something is not
mapped right for some case that wasn't caught in the
earlier testing.
2023-02-11 01:42:04 +08:00
bunnie
11c987c5f6 this loader commit was accidentally pulled into a previous mass-commit 2023-01-31 15:14:47 +08:00
bunnie
e5fdd0fec7 commit new versions to verifiers 2023-01-31 15:12:19 +08:00
bunnie
5370ce396d bump all revs due to SoC artifact update 2022-12-12 16:07:20 +08:00
bunnie
1d1b3a35b7 commit version bump 2022-11-26 10:00:44 +08:00
bunnie
aa9977cc58 bump all the things because we changed utralib again 2022-11-17 22:13:40 +08:00
bunnie
dabbfd6c35 bump all the things to absorb the SoC change 2022-11-17 19:39:18 +08:00
Sean Cross
3a8457852f loader: fix build with gcc-ld
With Rust 1.65.0, we may be forced to use gdb's linker due to bug that
appeared in llvm-15:

https://github.com/rust-lang/rust/issues/103949

Signed-off-by: Sean Cross <sean@xobs.io>
2022-11-04 12:26:05 +08:00
Tom Marble
9689b3bc07
Removes VS Code artifacts
Also updates .gitignore to prevent adding IDE (VS Code, Emacs) artifacts

Signed-off-by: Tom Marble <tmarble@info9.net>
2022-10-28 11:23:56 -05:00
bunnie
ba28dd8795 bump to absorb utralib straggler configs 2022-10-28 15:11:17 +08:00
bunnie
475e464efe bump versions due to svd2utra change 2022-10-27 03:04:22 +08:00
bunnie
d331d405ee bump version numbers for publication 2022-10-25 17:23:40 +08:00
bunnie
805a7d528c flip back to using remote references 2022-10-20 16:30:06 +08:00
Sean Cross
b35d65c3e1 loader: skip zeroing when we hit a page boundary
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>
2022-10-20 11:27:48 +08:00
Sean Cross
af501c4303 loader: print process IDs as debug data
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>
2022-10-20 11:27:48 +08:00
bunnie
8e05925cfa somehow the transition to local paths got missed in the merge 2022-10-18 00:39:01 +08:00
bunnie
0584ad2f2c switch to local paths to see if this helps the build 2022-10-18 00:26:56 +08:00
bunnie
12dc1e6b70 more patches for local build 2022-10-17 23:34:47 +08:00
bunnie
4b368d71db bump versions of crates 2022-10-15 01:31:54 +08:00
bunnie
63a87ca1bc bump all the versions 2022-10-14 16:54:43 +08:00
bunnie
18e1d6e867 switch over to the log uart on boot
this helps minimal configurations to be more useful without pulling
in com/llio crates. The trade-off is that KP's early in boot
(or during resume) are not visible, but, these are (thankfully??)
less rare these days.
2022-10-02 21:45:36 +08:00
bunnie
fb29c9b2c1 refactor utra target line to use explicit feature targets
still need to rework the crate feature selection
2022-10-02 02:20:03 +08:00