Commit graph

6718 commits

Author SHA1 Message Date
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
b2cd829adb upgrade api to use the new irq enum discipline
I think this commit message got swapped with the previous one,
the hazards of autocomplete.
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
65599a46d5 add state and handler to the setup
shared state is going to be much more complicated, for now,
just a placeholder
2024-03-23 11:59:31 +08:00
bunnie
fac6a43b19 add arguments for handler and state to registration 2024-03-23 11:59:31 +08:00
bunnie
505dce8343 define the swapper PID 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
fdb1cacf42 fix compile errors 2024-03-23 11:59:31 +08:00
bunnie
47e1ae2141 add EvictPage implementation 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
bunnie
5c3edef519 define initial data structures & registration
note that the SMT is a trait that has an implementation
dependent structure, because we can't always assume
that swap is memory-mapped.
2024-03-23 11:59:31 +08:00
bunnie
496d13b157 create swapper syscall entries; implement RegisterSwapper 2024-03-23 11:59:31 +08:00
bunnie
ab9fe13ac8 make sure swapper is PID 2 by making it the first service added 2024-03-23 11:59:31 +08:00
bunnie
e4c7a86aa1 add ourselves to the workspace Cargo files 2024-03-23 11:59:31 +08:00
bunnie
04ef7ff275 create the swapper crate 2024-03-23 11:59:31 +08:00
bunnie
c8c67a01a3 add a renode-swap target for debugging the swapper 2024-03-23 11:59:31 +08:00
bunnie
c1af9f32da set up for swap mods 2024-03-23 11:59:31 +08:00
bunnie
72fda565cd
Merge pull request #515 from betrusted-io/1.77.0-xous-warning-fixes
kernel: use addr_of!() and addr_of_mut!()
2024-03-23 11:52:49 +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
5911808611
Merge pull request #509 from betrusted-io/bio
WIP: BIO driver
2024-03-12 18:24:38 +08:00
bunnie
133bb2b74f fix a few minor details missing in the tests
also update docs and completion tracker
2024-03-12 13:54:07 +08:00
bunnie
4fa3dd3b59 add spi unit test 2024-03-12 04:53:37 +08:00
bunnie
cc02f3ab4f
Merge pull request #513 from betrusted-io/renode-gdbserver-3456
emulation: expose gdb serial to port 3456
2024-03-11 14:10:41 +08:00
Sean Cross
24fc352517 emulation: expose gdb serial to port 3456
Signed-off-by: Sean Cross <sean@xobs.io>
2024-03-11 14:01:37 +08:00
bunnie
f389b41ccf
Merge pull request #511 from betrusted-io/cramium
add quantum timer feature to cramium target
2024-03-07 01:35:44 +08:00
bunnie
c3e0bee9dc use PIO as the system timer
other timers might work, but this is the one we can simulate
and pre-flight and know it will work.
2024-03-07 01:32:26 +08:00
bunnie
a96abc669f add interrupt clear call 2024-03-07 01:32:15 +08:00
bunnie
5a1f5e0bd9 update derived artifacts to reflect register fixes 2024-03-04 04:09:11 +08:00
bunnie
2f5a717e65 add unit test for inter-core events and fifo events
synthetic test that exercises multiple cores triggering each
other, waiting on each other to complete tasks, and waiting on
the host to meet conditions such as fifo fullness levels before
running.

this proves out the basic concept of inter-core eventing.
2024-03-04 04:08:01 +08:00
bunnie
0844cfbc52 more unit tests
fifo input/output from host with back-pressure works
gpio loopback input testing works

framework for automated assertion testing is in place;
all tests from this point forward will endeavor to include
some asserts that will cause the test to fail, so we don't require
manual inspection to check test results.
2024-03-03 18:33:30 +08:00
bunnie
ca3a3bba19 absorb extra fields for controlling quantum snapping of gpios 2024-03-03 18:33:12 +08:00
bunnie
8a7b5e5627 add the FIFO basic unit test + todo list of tests 2024-03-03 02:39:12 +08:00