Commit graph

10340 commits

Author SHA1 Message Date
bunnie
fdbdea5ab0 add swap tag to image creation 2024-03-23 11:59:31 +08:00
bunnie
38f0002294 partial progress on create-image
create-image can now genereate inis sections

still needs to kick out a `swap` argument for the bootloader
so it knows where swap should go.
2024-03-23 11:59:31 +08:00
bunnie
66779dd479 add swap specifiers to xtask 2024-03-23 11:59:31 +08:00
bunnie
ff241b117b fix ordering of processes so that the swapper is PID 2 2024-03-23 11:59:31 +08:00
bunnie
71b3244198 add "swap" to the arguments for syntax checking
doesn't hurt, makes it easier to debug things
2024-03-23 11:59:31 +08:00
bunnie
9ddf537115 setup argument unpacking in the swapper 2024-03-23 11:59:31 +08:00
bunnie
803ce1a847 move allocadvice to new home 2024-03-23 11:59:31 +08:00
bunnie
b62a639031 move AllocAdvice record to externally visible xous-rs definitions
this structure moves between swapper and userland.
2024-03-23 11:59:31 +08:00
bunnie
a2e6a75b2d add test code to lock and top level workspace 2024-03-23 11:59:31 +08:00
bunnie
858e2c8eb3 add swapper test code to the swapper test image 2024-03-23 11:59:31 +08:00
bunnie
21338321cd add a skeleton for swapper test code 2024-03-23 11:59:31 +08:00
bunnie
c2084af2ad make sure the swapper feature is turned on 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
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