Sean Cross
ff180ca737
rkyv-test-server: add DoubleString api call
...
This demonstrates how we might use strings in syscalls.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-26 12:15:57 +08:00
Sean Cross
461f5c5f8d
rkyv-test-server: buffer: add from_memory_message_mut()
...
This enables passing data back to the caller by modifying the original
message `offset` field.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-26 12:15:13 +08:00
Sean Cross
cf1fc44f7e
xous: return buffer offset as part of MemoryMessages
...
When a MemoryMessage goes out of scope, update the buffer offset and
valid fields. This allows the caller to see what's changed.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-26 12:14:16 +08:00
Sean Cross
fd255d8f53
services: add rkyv-test-client and rkyv-test-server
...
These servers demonstrate how we might use rkyv in the future.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-25 23:39:35 +08:00
Sean Cross
364cd94326
xous: definitions: don't allow mutable refs to lends
...
lends are non-mutable, so don't allow them to be mutably borrowed.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-25 23:38:20 +08:00
Sean Cross
078f6ba625
kernel: services: be more proactive about updating current_thread
...
The `current_thread` variable is used to determine which thread to
switch back to after a context switch occurs. Keep track of the thread
more closely.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-25 16:15:19 +08:00
Sean Cross
6efc6bdfd5
services: kernel-test: add loopback test
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-25 16:01:57 +08:00
Sean Cross
a5993f0445
kernel: fix hosted representation of ReturnMemory
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-25 14:56:40 +08:00
Sean Cross
c7b2b2cab0
xous: add offset and valid to returned memory
...
This will enable us to have more information about the result that is
returned when mutable memory is modified by a server.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-25 13:16:15 +08:00
Sean Cross
52c993556f
services: gam: use create_thread_4
...
This replaces create_thread_simple() which is unsound and has been
deprecated.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-25 13:15:42 +08:00
Sean Cross
006101835e
services: shellchat: use create_thread_0
...
This replaces create_thread_simple() which is deprecated.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-25 13:15:16 +08:00
Sean Cross
d3879d36ac
xous: use try_into when converting messages to syscalls
...
This moves message internals back into the message struct.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-25 11:58:50 +08:00
Sean Cross
6cdd9b4b4c
services: use shorter timeout for thread 4
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-25 11:31:50 +08:00
Sean Cross
5367697b54
services: kernel-test: use create_thread_n
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-25 11:12:44 +08:00
Sean Cross
4cbfe5f90f
services: log-server: use create_thread_1()
...
This moves away from the deprecated `create_thread_simple()` call.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-25 10:54:22 +08:00
Sean Cross
5410d62ef5
xous: fix create_thread_[2..4] arg count
...
These functions assumed there was only one argument, which was
incorrect.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-25 10:53:50 +08:00
Sean Cross
cecd78fd61
xous: hosted: implement create_thread_n()
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-25 10:53:32 +08:00
Sean Cross
2b97ea25ab
xous: add create_thread_n functions
...
These are used to create threads with between 0 and 4 arguments.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-25 10:42:49 +08:00
Sean Cross
568d1263a3
kernel: syscall: remove variables that never change
...
The `can_resume` variable doesn't change, and can be made a constant.
This slightly improves reasoning about what the function is doing.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-25 09:14:43 +08:00
Sean Cross
eb2014bc80
kernel: hosted: fix kernel tests
...
We don't need to re-create the PID1 process, since it is done
immediately now.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-25 09:13:27 +08:00
bunnie
ef3653bf36
add updated SVD files for WDT interrupt rev
2021-03-25 02:40:18 +08:00
bunnie
0940894b27
add a minimal target
2021-03-25 02:40:00 +08:00
bunnie
bb3d96de27
Merge branch 'master' of https://github.com/betrusted-io/xous-core into HEAD
2021-03-25 02:37:58 +08:00
bunnie
8763cf3133
stash before merge
2021-03-24 22:48:23 +08:00
Sean Cross
455bd4ccfb
kernel: services: add more debug print crumbs
...
These could be useful in finding out what's gone wrong.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-24 22:12:29 +08:00
Sean Cross
cc0c395e1e
kernel: server: rework queue with generation counter
...
This reworks the server queue to add a "generation counter". This
counter ensures messages are removed from the queue in the order they
were added, even if they are jumbled up within the queue itself.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-24 22:10:11 +08:00
Sean Cross
f8309dc580
kernel: riscv: add klog messages to mem.rs
...
These are useful in tracking down certain violations.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-24 22:07:06 +08:00
Sean Cross
090354c882
kernel: services: remove syscall_stack
...
This field is unused, so remove it.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-24 20:21:30 +08:00
Sean Cross
b967712e5f
kernel: use correct thread ID when server queue is full
...
Instead of queueing the client thread number inside the server, queue
the server's thread number inside the server.
This prevents many spooky messages that were occurring when server
queues got full.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-24 17:23:39 +08:00
Sean Cross
ca24b74cd2
Merge remote-tracking branch 'origin/master' into fix-create-thread
2021-03-24 12:52:01 +08:00
Sean Cross
2d7dda93a9
kernel-test: add testcase for ticktimer/kernel bustage
...
The ticktimer server breaks spectacularly with this.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-24 12:51:06 +08:00
Sean Cross
0e8c231758
emulation: add description to renode.svd
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-24 08:41:40 +08:00
bunnie
e39c186c4a
Revert "Revert "kernel: services: remember new thread if specified""
...
This reverts commit c72d67203a .
2021-03-23 23:37:54 +08:00
bunnie
c72d67203a
Revert "kernel: services: remember new thread if specified"
...
This reverts commit 00e7f07187 .
2021-03-23 23:35:07 +08:00
bunnie
9541523d76
move GPIO mapping earlier in LLIO so we can capture the boot prompt
2021-03-23 23:10:26 +08:00
Sean Cross
e894dbd7b8
Merge branch 'fix-messages'
2021-03-23 21:58:11 +08:00
Sean Cross
9a702437b0
cargo: add lockfile for kernel-test
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-23 21:43:55 +08:00
Sean Cross
d16d0c9bd8
ticktimer-server: set quantum to 10ms
...
This is an experiment to see if this shorter time improves things.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-23 21:43:35 +08:00
Sean Cross
e624c184cd
ticktimer-server: rewrite sleep server as deadline
...
Use deadlines for sleep, rather than calculating the amount of remaining
time.
This keeps time consistent, because it means we don't have to
recalculate all sleeps whenever one expires.
It also allows us to take advantage of the hardware which will fire an
interrupt if we schedule a wakeup in the past.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-23 21:41:30 +08:00
Sean Cross
89cf0c1ab1
ticktimer-server: run rustfmt on Cargo.toml
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-23 21:37:52 +08:00
Sean Cross
861565054e
kernel: don't activate target thread on hosted mode
...
This operation is unneeded on hosted, and causes an error.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-23 21:35:52 +08:00
Sean Cross
bf3a3879d2
kernel: hosted: create thread id 1
...
This ensures that PID1 has a thread ID created as well.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-23 21:35:20 +08:00
Sean Cross
2a6de6ed67
kernel: hosted: remove unused interrupt calls
...
These were removed from riscv, and have no place in hosted mode.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-23 21:34:37 +08:00
Sean Cross
91647592ca
kernel-test: implement sleep test
...
This patch implements a simple sleep test.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-23 19:53:54 +08:00
Sean Cross
ff05fff4d6
kernel: syscall: run cargo fmt on syscall.rs
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-23 19:53:22 +08:00
Sean Cross
93fc8a0b99
kernel: cargo: add wrap-print feature
...
This is used to force kernel messages to be wrapped to 80 columns.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-23 19:52:53 +08:00
Sean Cross
0d77f704a9
kernel: services: run cargo fmt on this file
...
Minor text reformatting.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-23 19:51:33 +08:00
Sean Cross
00e7f07187
kernel: services: remember new thread if specified
...
If we switch to a thread and specify a thread ID, remember that as the
current thread ID.
This prevents thread starvation by repeatedly going back to the same
thread ID.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-23 19:50:12 +08:00
Sean Cross
9ab5b4880f
kernel: server: allow taking multiple messages from queue
...
Previously, we would only look at the top item on the server queue. If
it was not a known message, we would return an error.
This patch changes this behavior to look through the entire queue for
something we can take, and then clean it up as we go along.
This allow for having outstanding requests in the queue an forms the
backbone of the sleep server.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-23 19:45:32 +08:00
Sean Cross
ccc7264b79
kernel: main: use iterator when printing processes
...
This avoids a C-style for() loop.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-23 19:42:33 +08:00