bunnie
30bdecc2a0
fix return type of register swap syscall
2024-03-31 17:48:32 +08:00
bunnie
0e756003a1
debugging around the swapper protected context calls
2024-03-31 17:25:47 +08:00
bunnie
504253a033
more tid recording
2024-03-31 17:25:05 +08:00
bunnie
03388b1413
add tid reporting
2024-03-31 17:23:54 +08:00
bunnie
ecbce84385
add some debug & add state visibility
...
@xobs made the `state` element of a process publicly read-only visible
through a function call. I don't think this is a security issue but
please lmk if that's a problem.
2024-03-31 17:21:54 +08:00
bunnie
1af43fba7b
track current tid in swap manager
2024-03-31 17:20:50 +08:00
bunnie
cc49867403
fix warnings from rust 1.77.0 upgrade
2024-03-29 09:45:49 +08:00
bunnie
8b7912fb34
add some targeted debug; handle advisories before swapper registered
...
for now, we just count how mayn pages we missed an advisory on,
those all effectively are "wired". If we're fast enough on registering,
it turns out we actually miss nothing.
2024-03-23 11:59:31 +08:00
bunnie
233bb63878
add debug-swap targeted debug config
2024-03-23 11:59:31 +08:00
bunnie
803ce1a847
move allocadvice to new home
2024-03-23 11:59:31 +08:00
bunnie
af856124a0
pass kernel dependency to xous-rs
2024-03-23 11:59:31 +08:00
bunnie
025e39913b
implement retrieval from swap and allocation advisories
2024-03-23 11:59:31 +08:00
bunnie
4eefbd88bc
cleanup warning that crept into the code
2024-03-23 11:59:31 +08:00
bunnie
168e3454f6
handle free advisories
2024-03-23 11:59:31 +08:00
bunnie
28b415cb27
handle swapped pages and allocation advisories
2024-03-23 11:59:31 +08:00
bunnie
14364e09c6
ensure compliance with unsafe conditions on exit_blocking_call()
2024-03-23 11:59:31 +08:00
bunnie
167cd04f06
remove arg page list, replace with set of 8 usize
...
this makes calls more efficient and avoids the double-shared page
2024-03-23 11:59:31 +08:00
bunnie
d6cfb13e4f
upgrade irq path to handle the new API
2024-03-23 11:59:31 +08:00
bunnie
5234127b7b
support multiple irq-like contexts with an enum
2024-03-23 11:59:31 +08:00
bunnie
70639214e1
specify the swap return address for swaps
2024-03-23 11:59:31 +08:00
bunnie
500a641848
specify the irq return address for irqs
2024-03-23 11:59:31 +08:00
bunnie
474e8f0822
make return address of callback configurable
2024-03-23 11:59:31 +08:00
bunnie
f2e44d364a
implement blocking callback
...
a roughed-out nonblocking callback version also staged
2024-03-23 11:59:31 +08:00
bunnie
9008452a36
add arguments to register syscall for handler and state
2024-03-23 11:59:31 +08:00
bunnie
6806403da8
make the release page mechanism visible externally for swap config
2024-03-23 11:59:31 +08:00
bunnie
47a16b6ce4
add RETURN_FROM_ISR magic address
...
this is picked to not conflict with other addresses used by
the ARM implementation. I think it should be OK?
2024-03-23 11:59:31 +08:00
bunnie
26047bf956
add the routine to evict a page
2024-03-23 11:59:31 +08:00
bunnie
6f18a0ed21
add trampoline to return from swapper
2024-03-23 11:59:31 +08:00
bunnie
daf4d9a93e
make valid bit mapping symbolic instead of hard coded constant
2024-03-23 11:59:31 +08:00
bunnie
bc91055307
add template for EvictPage
...
actual function is still a todo
2024-03-23 11:59:31 +08:00
bunnie
b0665c3412
implement RegisterSwapper syscall
2024-03-23 11:59:31 +08:00
bunnie
9fb1acb705
swap module, with some initial functionality for registration
2024-03-23 11:59:31 +08:00
bunnie
4f15af3fee
add swap module to the kernel, and initialize it from args
2024-03-23 11:59:31 +08:00
bunnie
a1cffed9cd
un-use the P bit in the page table
...
prep for re-allocating it to swap
2024-03-23 11:59:31 +08:00
Sean Cross
b4d6884cc4
kernel: use addr_of!() and addr_of_mut!()
...
DUe to https://github.com/rust-lang/rust/issues/114447 direct access to
static mut variables causes a warning which will be turned into an
error in the 2024 edition.
The workaround is to use `addr_of!()` and `addr_of_mut!()` macros and
then dereference that.
Signed-off-by: Sean Cross <sean@xobs.io>
2024-03-22 15:53:11 +08:00
bunnie
717abf4af8
work around dependency conflict on atsma5d27
...
the dependency is pinned to an old version of utralib that
causes a build conflict...
2024-02-08 00:33:14 +08:00
bunnie
699004e7b0
bump xous pins
2024-02-06 14:49:10 +08:00
Sean Cross
bf61ce5071
kernel: remove dead code
...
This code is commented-out and dead. It gets adjusted with `cargo fmt`,
so just remove it.
Signed-off-by: Sean Cross <sean@xobs.io>
2024-02-06 10:33:33 +08:00
Sean Cross
ed4ec01017
kernel: support riscv32imac-unknown-none-elf
...
With Rust 1.76.0, we no longer support building with `#![no_std]` or
`panic = "abort"`, both of which are required within the kernel. As a
workaround, go back to building the kernel under
`riscv32imac-unknown-none-elf`.
Signed-off-by: Sean Cross <sean@xobs.io>
2024-02-06 10:28:33 +08:00
bunnie
64f8285239
cleanup warning
2024-01-29 03:49:33 +08:00
bunnie
1e93171575
turn of rkyv derives in kernel and loader, as these are no-std
2024-01-23 03:59:49 +08:00
bunnie
5df2e27447
add production TRNG to cramium target for kernel
2024-01-20 16:16:07 +08:00
bunnie
a79b134d14
add placeholder for v2p/PID mapping
...
We need the V2P feature, but don't need the ability to swap
PID spaces yet. Leave the alternate API as a todo!() item
in the kernel for riscv targets.
2024-01-19 23:23:28 +08:00
bunnie
0267a56989
format Cargo.tomls
...
because apparently cargo fmt doesn't format Cargo.toml files???
2024-01-15 00:14:39 +08:00
bunnie
607db9c573
remove trailing space in kernel
2024-01-14 23:40:30 +08:00
bunnie
f9fc3d0d4b
ok, format the kernel now that all in-line assembly has been checked
2024-01-14 19:27:14 +08:00
bunnie
710c45969f
Revert "format the kernel"
...
This reverts commit 1f69e6aa39 .
this has in-line assembly, let's fix that before we format
2024-01-14 19:24:33 +08:00
bunnie
1f69e6aa39
format the kernel
2024-01-14 19:11:19 +08:00
bunnie
0750644e45
Merge pull request #479 from betrusted-io/process-arguments
...
Support process arguments
2024-01-07 23:39:45 +08:00
Sean Cross
60f2a17649
kernel: support receiving process arguments
...
Support passing process arguments in register 2 as part of arguments to
a process.
This requires updating the `InitialProcess` struct that is received from
the loader, and so requires modeifications to be made in tandem.
Signed-off-by: Sean Cross <sean@xobs.io>
2024-01-07 23:02:58 +08:00