Commit graph

10340 commits

Author SHA1 Message Date
bunnie
a635df3a90 make placeholder for 0.9.17 2024-05-30 18:38:03 +08:00
bunnie
f4c127684b commit cram-hal-service dependency 2024-05-29 14:06:41 +08:00
bunnie
cfc2a27e13 cleanup cram-console debug 2024-05-29 14:06:21 +08:00
bunnie
94ee63d564 latest cram-soc build config 2024-05-29 14:05:44 +08:00
bunnie
d92a8dd00d tweak backup stack space allocation in kernel now that we've tested on hw 2024-05-29 14:05:16 +08:00
bunnie
14d6e703e9 restore keyboard injector 2024-05-29 14:04:16 +08:00
bunnie
46cdbcf18d ahem...actually harmonize 2024-05-29 13:49:59 +08:00
bunnie
ebd0f69d20 harmonize debug standard 2024-05-29 13:48:47 +08:00
bunnie
b003b4f88f modernize debug output 2024-05-29 13:48:19 +08:00
bunnie
ae4ed7ba3d adjust trng source provider based on hardware target 2024-05-29 13:47:49 +08:00
bunnie
4d28e940d0
Merge pull request #545 from betrusted-io/bump-xous
Bump xous
2024-05-28 23:47:33 +05:30
bunnie
df808b5eaa commit bumped pins 2024-05-29 02:15:55 +08:00
bunnie
97665d8785 bump verifier pins 2024-05-29 02:10:37 +08:00
bunnie
28f42d4c90 bump dependent hashes 2024-05-29 02:09:53 +08:00
bunnie
35e7cf3a5b bump xous dep revs 2024-05-29 02:07:06 +08:00
bunnie
b9856c8f1d fix various typos and annotate Debug derives 2024-05-29 02:05:27 +08:00
bunnie
a0fec13016 make the SwapOp syscall allowable to call in an interrupt context
SwapOp is guaranteed to return eventually, so, it's technically
not blocking; it's merely very slow.

also fix a number of typos
2024-05-29 02:04:44 +08:00
bunnie
de1998a1c0
Merge pull request #544 from betrusted-io/cram-testing
Refimenments and fixes after testing swap
2024-05-28 20:36:08 +05:30
bunnie
c7036c1309 fix cram-soc impl for graphics 2024-05-28 23:04:16 +08:00
bunnie
9a3a525314 cleanup kbd stub 2024-05-28 23:04:01 +08:00
bunnie
8a58db8936 simplify the swap search algorithm
turns out that prioritizing pages beyond LRU does not improve
performance at all -- really hurts performance.

Also making the OOM target a bit smaller so that the system
feels a bit more responsive between OOM events.
2024-05-28 21:25:21 +08:00
bunnie
1f72c8cd38 quiet down poll loop 2024-05-28 20:58:41 +08:00
bunnie
fb804d1ac8 move log files to reports/ 2024-05-28 20:41:51 +08:00
bunnie
5599a3721e add missing dependencies for gam->keyboard->ea->spinor
yeesh....everything connected to everything...
2024-05-28 20:32:20 +08:00
bunnie
6303b9a075 turnoff debug spew on swapper userspace
haha like this is going to be default for any period of time...
2024-05-28 20:31:42 +08:00
bunnie
9167e1daca minor debug tweaks 2024-05-28 20:31:16 +08:00
bunnie
1648567c18 add an extra reserved page for OOM handler
seems an extra page is necessary to handle the edge case of
OOM during lend/move
2024-05-28 20:30:27 +08:00
bunnie
755265d290 quiet down debug on syscalls 2024-05-28 20:28:55 +08:00
bunnie
c569fa528c handle corner case of OOM during move or lend
In this situation, we enter the OOM with the hardware address
space vs the process space inconsistent (the hardware address
space was transitioned in anticipation of mapping a block into it).

This patch reverts our address space to the original space then
runs the OOM routine, and then puts us back where we were.
2024-05-28 20:27:38 +08:00
bunnie
ec9a2be9cc reduce warnings when debug is turned off 2024-05-28 20:27:13 +08:00
bunnie
3cf79dbbd4 fix typos, adjust debug 2024-05-28 20:26:57 +08:00
bunnie
e5ac160c7c demote panic to warning on edge case of re-assigned swap page
Found a case where this is actually "legal" - when you have
a piece of memory that is allocated without going to swap,
then lent, then swapped, then released before being read back
into memory. In this case, the release will clear the page without
notifying the swapper of such an event.

This case is mostly harmless -- the biggest problem is that we
leak swap due to pages that are released while swapped. This
tends to happen mostly with memory messages, and there is a high
re-use of addresses in this situation so I think the leakage
is not bad.

However, we continue to print the warning. If it turns out
that the leakage is cumulative, we'll have to come up with a
way to report this situation back to the swapper -- but it's
fairly disruptive, because it also forces us to do a full PT
walk and check on release plus send a message to the swap context
which is another chunk of code and syscall.

My working theory is this will be a "couple of pages" that circulate
around in a messaging pool inside swap memory, which is fine because
it doesn't impact main memory usage and swap memory is fairly
ample.
2024-05-28 16:54:45 +08:00
bunnie
bed9252614 suppress warning when debug is turned off 2024-05-28 16:54:18 +08:00
bunnie
21fab71558 snapshot current testing config in xtask 2024-05-28 02:49:50 +08:00
bunnie
4005b0f1ca update abi mappings and clear out a comment that i think is old 2024-05-28 02:49:23 +08:00
bunnie
ed73dfb401 make retrievepage a re-entrant syscall: syscall abi 2024-05-28 02:49:00 +08:00
bunnie
747e07c90f remove code bits now that all syscalls are re-entrant
previously we could re-enter into a process through a divergent
call into the swapper. Now, we only ever re-enter as a syscall
through the syscall interface.

in order to make this happen we had to store all the thread and
stack state for the handler so we can do a re-entrant syscall, but
I think this is worth it. makes the code so much better.
2024-05-28 02:47:19 +08:00
bunnie
8ce2ac566a make swapper syscall API re-entrant (map/retrieve page)
we no longer diverge at the swapper call, so execution flows
intuitively here. this feels so much nicer.
2024-05-28 02:45:27 +08:00
bunnie
62eb233db1 make swapper api generic for re-entrant kernel calls (alloc element) 2024-05-28 02:44:36 +08:00
bunnie
0e135b0e4c refactor retrieve_page to use re-entrant syscall
- makes retrieve_page in-lineable into existing kernel routines
without a divergence issue on the call return
- reduces code duplication
- fixes a hairy bug on interrupt restore timing. With the previous
method, the interrupts would have to un-gate just before the
syscall executes its return to normalcy; this can cause a race
condition between a hardware interrupt and that return context
switch which can lead to the return context being corrupted.

By making this re-entrant, we can make the IRQ pause/restore
point happen outside of any fancy system context footwork, which
makes the interrupt via hardware source work again.
2024-05-28 02:41:08 +08:00
Jeanie
1977f945da documentation for slider 2024-05-28 01:10:30 +09:00
bunnie
66fe45edf9 make emulation more deterministic; add autologging of UARTs 2024-05-27 23:07:03 +08:00
bunnie
42d30dc799 remove com bus handler in case it is making things not deterministic 2024-05-27 23:06:42 +08:00
bunnie
5813cee4f7 fix debug va 2024-05-26 23:14:41 +08:00
bunnie
c9ac6142b5 make oom doom a feature
even though we can do it, I am not sure we should.
2024-05-26 23:01:21 +08:00
bunnie
fa777b6198 cleanup the original alloc_page now that all are oomable 2024-05-26 23:00:20 +08:00
bunnie
a799e4b09d make all other allocs possibly oomable 2024-05-26 22:57:53 +08:00
bunnie
de7d876820 more missing prereqs for gam op 2024-05-26 12:13:13 +08:00
bunnie
fb502a8073 debug cleanup 2024-05-26 12:12:58 +08:00
bunnie
2a1552b628 bring renode emulator params closer to in line with cram target 2024-05-25 14:35:17 +08:00