Commit graph

29 commits

Author SHA1 Message Date
bunnie
43988bde05 cleanup warning on a debug routine
this is not used under certain combinations of e.g. printing
and swap
2024-11-30 02:25:58 +08:00
bunnie
043dfd84ae update formatting to latest nightly rules 2024-09-24 01:49:45 +08:00
bunnie
9f43e1df0a fix edgecase in nocopy section
do not try to decrypt data for sections that are nocopy,
this can lead to spurious decryption errors
2024-06-06 22:19:42 +08:00
bunnie
b7becf27e7 quiet down warnings when debug-print is off
because the print! macro becomes a dummy when debug printing is
off, we get a bunch of warnings about unused variables because
the print! arguments aren't used. Add _ before variable names
to quiet these warnings.
2024-05-21 01:52:30 +08:00
bunnie
03515934df clarify function of the thread context area 2024-05-16 03:51:38 +08:00
bunnie
ef5388a30e ensure that process descriptors aren't swapped out 2024-05-15 02:38:24 +08:00
bunnie
6080bc45d8 attempt to re-type the runtime page tracker to something we can use for swap
This is too expensive to use generically - we're going to have
to split the RPT, but checking in this change as a checkpoint
2024-05-12 16:27:30 +08:00
bunnie
8ceaa1afe4 fix page tracking bug on physical swap addresses 2024-05-05 21:51:17 +08:00
bunnie
721129781a cleanup some warnings 2024-05-04 01:45:36 +08:00
bunnie
c8d4123ed7 fix the debug printout to walk the virtual addresses in swap PT
The check of mapping sanity happens after the VA mapping, so this
undoes that. I think this is a good idea, because we're also
checking the PA->VA mapping of the PTEs as well now.
2024-05-03 16:03:14 +08:00
bunnie
336e47eabe remove comment 2024-04-09 15:46:48 +08:00
bunnie
8abb126577 break out swap_root & improve debug 2024-04-09 15:25:37 +08:00
bunnie
d318134bdc fix default flags for swap; add load checking for swap
load checking is aware of all three types of sections, and
can natively call the encrypt/decrypt ops to ensure that
the encrypted swap is set up correctly.
2024-04-09 00:04:47 +08:00
bunnie
6ce157b20d add swap handling to minielf 2024-04-08 12:38:42 +08:00
bunnie
4bb7c87646 gate loader todo behind feature flag 2024-04-06 23:01:33 +08:00
bunnie
cb7cbd9357 put todo! placeholders for minielf handling of inis 2024-04-01 15:28:53 +08:00
bunnie
a6a28b9d9e format loader 2024-01-14 22:02:55 +08:00
Sean Cross
d8c6881554 loader: pass environment to processes via stack
Load environment variables to processes by placing the value onto the
stack. This will support additional data in the future such as command
line arguments.

Note this is a breaking change and requires a kernel modification.

Signed-off-by: Sean Cross <sean@xobs.io>
2024-01-07 22:36:34 +08:00
Sean Cross
5260ef9f5a 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:35:27 +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
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
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
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
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
899351214b
loader: split hw specific details with feature gates in common modules 2023-03-14 17:15:17 +04: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
039de0bfe9 split loader into modules 2023-02-22 00:36:16 +08:00