Sean Cross
80df40d8fa
xous-rs: implement UpdateMemoryFlags syscall
...
Implement this syscall and create a wrapper function
`update_memory_flags()`.
Signed-off-by: Sean Cross <sean@xobs.io>
2022-02-07 13:37:23 +08:00
Sean Cross
3380a0e0ed
xous: syscall: document returns of more syscalls
...
Add more documentation to various syscall returns.
Signed-off-by: Sean Cross <sean@xobs.io>
2022-02-07 11:23:55 +08:00
bunnie
002e098538
Fix issue #90
...
Turns out we didn't end up needing this capability, so, commenting it
out because it is a shy too powerful and is like packing a live
mortar shell in a storage unit: eventually, someone is going to
get hurt, even though it seems mostly harmless at the moment.
Code just commented out in case we need this feature in the future,
but, the main reason it was asked for (the PDDB) was accomplished
without it.
2022-02-02 00:37:57 +08:00
Sean Cross
7dee05082c
xous: syscall: add function to modify memory ptr
...
Add a function to modify the pointer of a MemoryRange. This is used by
`hosted` mode in order to modify memory pointers when we receive them
from the remote client.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-18 18:21:19 +08:00
Sean Cross
d705d6d14e
xous: handle new syscall naming
...
The syscall function is now exported by the arch, rather than being a
magic name.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-16 12:23:59 +08:00
Sean Cross
32eb3c202c
xous: add exception handler support
...
This has been tested end-to-end. We now have exception handler support.
There is a potential issue when passing messages to our own process in
an exception handler. This will need to be investigated.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-06 17:48:17 +08:00
Sean Cross
d7a9b64d82
xous: add SetExceptionHandler syscall
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-05 16:59:06 +08:00
Sean Cross
66005b8b6f
xous: fix various clippy warnings
...
This stylistic cleanup fixes several clippy warnings.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-05 16:57:48 +08:00
Sean Cross
977a175bb5
xous: mark MemoryRange::new() as unsafe
...
This function allows for creating arbitrary memory ranges. Mark this
function as `unsafe` in order to warn users that this can be used to
create invalid memory regions.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-24 17:02:02 +08:00
bunnie
fadc9c29ab
Merge remote-tracking branch 'origin/master' into bunnie-dev
2021-06-02 03:59:25 +08:00
bunnie
7c55925926
intermediate check-in on wfi
2021-05-30 23:07:16 +08:00
Sean Cross
a83cf9fe48
xous: document some more functions
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-21 16:40:33 +08:00
Sean Cross
091a655a0a
xous: document disconnect
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-21 16:32:27 +08:00
Sean Cross
6b70922381
xous: add JoinThread syscall
...
The `JoinThread` call will eventually be used to let one thread wait on
another.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-21 13:01:03 +08:00
Sean Cross
eb7895d601
xous: add a return code to TerminateProcess
...
As part of this refactor, make `terminate_process()` a divergent call.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-20 11:01:00 +08:00
Sean Cross
b74396cfe7
syscall: add return_memory_offset_valid()
...
This sets the `valid` field in addition to the `offset` field when
returning a MemoryMessage.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-12 21:22:15 +08:00
bunnie
fe86207469
make docs reflect the error message actually thrown
2021-05-06 00:41:38 +08:00
bunnie
cad9c15849
intermediate save of suspend resume
...
building an awful rube-goldberg contraption of a "clean-suspend"
record.
2021-04-28 19:28:04 +08:00
bunnie
9ba2fb134c
refactor most major modules, but Xous now crashes
2021-04-05 23:50:00 +08:00
Sean Cross
03bed02393
xous: make terminate_process divergent
...
This allows for terminating a process when something goes wrong.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-04-05 18:19:33 +08:00
Sean Cross
461d6f23ee
syscall: add wrapper functions for destroy_server and disconnect
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-04-02 17:33:36 +08:00
Sean Cross
0230ccb252
xous: syscall: add definitions for Disconnect and DestroyServer
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-04-02 17:30:32 +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
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
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
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
27c35223cd
xous: run cargo-fmt
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-18 20:10:26 +08:00
Sean Cross
071f2047f8
xous: return TID and PID from current_tid() and current_pid()
...
These should return the raw values, rather than the Result values.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-18 20:10:01 +08:00
Sean Cross
a0c82ee25c
xous: initial draft of xous target support
...
This is an initial cut of the library as it will be included in the
libstd.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-11 12:27:55 +08:00
Sean Cross
530e105fe4
xous: add GetProcessID and GetThreadID syscalls
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-11 11:19:51 +08:00
Sean Cross
f98c8cc07c
xous: make thread IDs u32
...
This keeps them consistent across platforms.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-01 17:18:24 +08:00
bunnie
cc66c3911a
starting to lay out initial framework for the graphical abstraction manager (GAM)
2021-01-17 04:02:08 +08:00
bunnie
4ef581a266
riddled with race conditions, but...sort of works
2021-01-08 05:20:53 +08:00
hasheddan
666be8db7f
Fix server typos in syscall doc comments
...
Fixes a few minor typos in the sycall documentation comments.
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2021-01-05 16:28:08 -06:00
Sean Cross
7b50d00eb8
repo: run cargo fmt
...
This reformats line endings to be consistent, and reinforces the
contents of `.gitattributes`.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-01-03 18:31:51 +08:00
Sean Cross
1875126dba
xous: connect_for_process: add wrapper function
...
This provides a functional call around the raw syscall.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-12-04 22:50:49 +08:00
Sean Cross
06daa06921
xous: add syscall definition for ConnectForProcess
...
This call allows one process to establish a connection on behalf of
another process.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-12-04 22:47:01 +08:00
Sean Cross
1fa83d1d94
xous: make MessageSender a struct
...
This is now an object instead of an alias for `usize`, in preparation
for adding a `.pid()` function.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-12-04 22:16:24 +08:00
Sean Cross
f165130931
xous: add CreateServer syscall
...
This syscall has not yet been wired up.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-12-04 20:44:45 +08:00
Sean Cross
25e4d16de3
xous-os: rename CreateServer to CreateServerWithAddress
...
Servers will, by default, get randomly-assigned SIDs. Certain servers
will want to have well-known SIDs, such as the log server or the
nameserver. These will use a separate call in order to perform this
priveledged operation.
A subsequent patch will add `CreateServer`.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-12-04 20:33:33 +08:00
Sean Cross
6604bfcdb0
xous-rs: add TryReceiveMessage
...
This non-blocking function call will retrieve a message if one exists,
or will immediately return None if the queue is empty.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-25 20:20:59 +08:00
Sean Cross
b497ad113e
xous: terminate process on panic
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-11 12:52:12 +08:00
Sean Cross
bb304d412a
xous: add can_call_from_interrupt() to SysCall
...
This function can be used to determine if a particular syscall may be
called from an interrupt context.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-01 16:26:33 +08:00
Sean Cross
719549a2cb
xous: rename ReturnToParentI -> ReturnToParent
...
This syscall isn't the only one that can be called from an interrupt
context.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-01 16:26:19 +08:00
Sean Cross
7aab01c95d
xous: fix memory messages in hosted environment
...
This fixes passing memory between clients and servers when running
n a hosted environment.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-29 19:40:41 +08:00
Sean Cross
ac321be7e9
xous: implement send_message()
...
This fixes `send_message()` so it works as expected.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-14 11:18:02 +08:00
Sean Cross
ad154e998e
xous: add NewServerID return value
...
This is used when creating a new Server. In addition to the ServerID, it
also returns the ConnectionID. This is the ID that can be expected when
receiving messages.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-09-23 10:51:27 +08:00
Sean Cross
d8edcb8b9e
xous: implement ReturnScalar and ReturnScalar2
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-09-22 23:36:11 +08:00
Sean Cross
446fe17273
xous: add syscall for BlockingScalar
...
This enables this to be passed to the kernel.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-09-22 22:21:21 +08:00
Sean Cross
673577a10e
xous: syscall: add BlockingScalar to syscall handling
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-09-22 21:33:09 +08:00