Commit graph

183 commits

Author SHA1 Message Date
bunnie
8ec08c9c76 fix rust v1.75.0 warnings that are probably benign
a lot of re-import warnings have cropped up. While I appreciate
their studiousness on this, the problem is that removing some
of these exports in the API crate could mean that future users
who want access to some API features that aren't used in this
configuration are now unaccessible.

I think it's not a huge problem at the moment, just spam-cleaning
the warnings because there are too many to deal with carefully
at the moment.
2024-01-04 19:15:28 +08:00
Sean Cross
88020c99e0 loader: add pid to map_page() call
Add the pid as the page owner to `map_page()` calls. This ensures pages
are owned by their respective processes, and removes a lot of
`change_owner()` calls that immediately follow page mapping.

It also allows for superpages to be owned by their respective processes.

Signed-off-by: Sean Cross <sean@xobs.io>
2023-12-29 18:42:16 +08:00
Sean Cross
e0c62e5480 loader: don't reserve the "susres" page
The "susres" page should be owned by the "susres" server and not the
kernel. Avoid mapping this page to the kernel to prevent it from getting
double-mapped.

Signed-off-by: Sean Cross <sean@xobs.io>
2023-12-29 18:42:16 +08:00
Sean Cross
aee07683b7 loader: run cargo fmt
There are no changes to this project.

Signed-off-by: Sean Cross <sean@xobs.io>
2023-12-27 14:12:26 +08:00
bunnie
e2ba706f4b modify loader to setup the console UART
this avoids a bunch of nasty pinmux stuff that would have to
go into the console logger at early boot
2023-09-15 16:25:44 +08:00
bunnie
07303dccc2 add FPGA target to loader clock settings
this might want to get a more graceful feature option wrapped
around it but i'm hoping the unpleasantness of developing on
the FPGA board is...temporary??
2023-09-15 11:25:35 +08:00
bunnie
53469a68d0 publish package updates, sync to release tag 2023-08-08 14:35:49 +08:00
bunnie
b127cd093f bump version pins for change to xous-rs 2023-08-03 13:29:39 +08:00
bunnie
51278451a0 update version pins to pull in cramium target 2023-07-19 21:07:56 +08:00
bunnie
ca14ed78d2 fix renode build 2023-07-18 13:58:14 +08:00
bunnie
8155c0cc8b loader fixes for cramium target 2023-07-18 03:56:09 +08:00
bunnie
a118cdaa6d fix link file integration 2023-07-17 18:52:28 +08:00
bunnie
3a32e3e7a0 fix visibility of cramium module 2023-07-17 18:49:54 +08:00
bunnie
e0c8cc1da4 add cramium to loader target 2023-07-17 18:23:17 +08:00
Sean Cross
b23f6717ef loader: remove unneeded muts
Rust 1.71.0 reports more cases of unneeded mutability. Remove these from
the loader.

Signed-off-by: Sean Cross <sean@xobs.io>
2023-07-16 15:30:23 +08:00
bunnie
4454dffe4e generate loader files for the new font
also sort the font files in alphabetical order now,
instead of relying on arbitrary ordering of os.listdir() :P
2023-07-05 14:44:30 +08:00
bunnie
30c752db75 bump the loader's font tables 2023-07-05 13:38:28 +08:00
bunnie
952ba18fba commit vesrion pin bumps 2023-06-16 01:30:18 +08:00
bunnie
5a2df4432c technical debt: cleanup UTRA package
- make the "base" field no longer public. It is accessible, but only
through an `unsafe` method, because, it is unsafe.
- add accessors to offest/mask fields. Because, it's not at all
unsafe to access these, and it can be useful for bit-ops that are
not part of the generic set of UTRA.
- add Arc to AtomicCSR, and require `std` for AtomicCSR types.
This should not break anything, I checked inside @foundation-devices
keyOS and they don't seem to be using AtomicCSR anywhere.

The Arc makes it a bit safer to clone the AtomicCSR base pointer
and share it between threads, but it will have an impact on performance.
The USB stack (which requires AtomicCSR) was regression testing and the
impact seems minimal.

Recall that the main purpose of AtomicCSR is to provide a CSR accessor
that does not require a mutable reference to the base object. This
can make certain Rust idioms a bit cleaner. We wrap the base accessor
in Arc+Atomic to try and improve the safety of throwing the borrow
checker under the bus, but it's still not perfect because hardware
mutable state can have side-effects within hardware itself that cannot
be modeled or checked by Rust's borrow checker.
2023-05-23 18:11:24 +08:00
bunnie
697d44de3d bump version pins to absorb changes to svd2utra etc. 2023-05-03 23:11:12 +08:00
bunnie
8357ab31a5 bump all pins because utralib got updated 2023-04-09 00:48:35 +08:00
eupn
387c12d1ee
loader: fix precursor build 2023-04-05 16:42:58 +04:00
eupn
6ac2713f0a
loader/arm: allocate separate IRQ stack 2023-04-05 16:36:13 +04:00
bunnie
e469eba167 bump version for utralib patch 2023-04-04 02:13:02 +08:00
bunnie
57cea9b3ca cleanup a warning when debug is not turned on 2023-03-22 02:47:41 +08:00
bunnie
773bbc695a
Merge pull request #330 from Foundation-Devices/loader-arm
loader: add ARMv7-A support via sama5d27 chip
2023-03-22 00:34:00 +08:00
eupn
1f2b45e60f
loader: replace ssh git dependency with https 2023-03-20 23:54:56 +04:00
bunnie
d413100102 handle edge case of a "perfect fit" loader section
When a block of data perfectly fits we fail to allocate the
next page, violating the loop invariant that there's data available
to write.

However, we can't always allocate a new page when we run out
because if we're at the end of the process we shouldn't allocate
a new page (I think). Thus we track if the last section was
a perfect fit, and if it was, we force a new page allocation
before copying more data.

This is an edit in phase 1 of the loader.
2023-03-16 01:05:07 +08:00
bunnie
137f23039b fix formatting on check print 2023-03-16 01:04:45 +08:00
eupn
e7eb9ece2b
loader: remove unused imports 2023-03-14 17:15:17 +04:00
eupn
d4a85c7efa
loader: add FD to authors list 2023-03-14 17:15:17 +04:00
eupn
899351214b
loader: split hw specific details with feature gates in common modules 2023-03-14 17:15:17 +04:00
eupn
a0b9868068
loader: split panic handlers 2023-03-14 17:15:17 +04:00
eupn
3caf8dedd0
loader: split debug and asm modules between arm and riscv 2023-03-14 17:15:17 +04:00
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