Sean Cross
80860f0a51
Merge remote-tracking branch 'origin/main' into debugger
2021-06-21 13:22:51 +08:00
Sean Cross
13204d1714
Merge branch 'master' into debugger
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-18 10:56:30 +08:00
bunnie
799bae0386
Merge remote-tracking branch 'origin/master' into ux-refactor
2021-06-16 18:38:50 +08:00
Sean Cross
00e9ead818
xous: definitions: dispose of Vec on hosted
...
When running on Hosted mode, reconstitute the Vec and dispose of it
rather than freeing the memory by passing it back to the kernel.
This is because the data was previously allocated by way of a vec, and
only a reconstituted vec knows how to properly dispose of the data.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-16 18:35:18 +08:00
Sean Cross
486d993c4c
xous: hosted: don't over-allocate memory messages
...
Call `shrink_to_fit()` on the array that contains memory messages. This
is beacuse we throw away the `capacity` field, and we want to make sure
we can reconstitute the vector at a later stage.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-16 18:35:17 +08:00
Sean Cross
62623f995c
Merge branch 'master' of github.com:betrusted-io/xous-core
2021-06-16 16:54:06 +08:00
bunnie
5301f4af20
major refactor of the Ux -- can create, redirect I/O contexts
...
getting ready for Precursor to do more than just one thing.
2021-06-16 04:50:26 +08:00
Sean Cross
651844ba20
Merge remote-tracking branch 'origin/master' into debugger
2021-06-06 19:21:18 +08:00
bunnie
bbfe0fb605
Merge remote-tracking branch 'betrusted/aes' into bunnie-dev
2021-06-02 14:49:11 +08:00
bunnie
fadc9c29ab
Merge remote-tracking branch 'origin/master' into bunnie-dev
2021-06-02 03:59:25 +08:00
Sean Cross
b22ec0369e
xous: asm: add aes calls for vexriscv
...
VexRiscv has accelerated AES instructions. This adds ASM hooks for these
instructions so they can be called from Rust.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-01 19:52:37 +08:00
Sean Cross
bbda4365ae
wip commit
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-01 17:57:01 +08:00
bunnie
7c55925926
intermediate check-in on wfi
2021-05-30 23:07:16 +08:00
bunnie
7529628053
partial progress on EC updater
2021-05-24 04:34:50 +08:00
Sean Cross
18a86a9a19
xous: add homepage and repository fields to Cargo.toml
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-21 16:43:30 +08:00
Sean Cross
8d41777dc1
release 0.8.3
...
This implements the `JoinThread(tid)` syscall.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-21 16:41:13 +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
ca53abbd25
xous: wire up wait_thread for baremetal
...
Now that we have a `JoinThread`, connect the `wait_thread` syscall.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-21 16:37:19 +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
3b540e4e9a
xous: tag 0.8.2
...
This contains some minor modifications to the ABI.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-20 11:53:02 +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
efe5a8b9e8
xous: tag v0.8.1
...
This adds the `stringbuffer` object.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-19 14:27:58 +08:00
Sean Cross
c516919479
xous: run cargo fmt
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-19 14:20:47 +08:00
Sean Cross
a1b16a74cb
xous: definitions: add default constructors for Message
...
Enable creating new_lend() and new_scalar() messages.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-19 14:14:21 +08:00
Sean Cross
7fe10b6463
xous: stringbuffer: fix build in libstd
...
When building as part of libstd, we need to manually specify flags.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-19 14:13:38 +08:00
Sean Cross
04055c1bf5
xous: add StringBuffer
...
This is a simple lendable StringBuffer variant of String that is
suitable for sending across process boundaries.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-12 21:22:15 +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
Sean Cross
32d740aa15
xous: run cargo fmt on definitions
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-12 21:22:15 +08:00
Sean Cross
0962453812
xous: definitions: make SID a [u32; 4]
...
This has a well-defined C representation, and is more portable than the
tuple format.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 14:37:33 +08:00
bunnie
fe86207469
make docs reflect the error message actually thrown
2021-05-06 00:41:38 +08:00
bunnie
e7e7711f2d
remove unused buffer package
2021-05-05 01:37:03 +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
ac40075140
add keyboard input via UART
2021-04-16 04:11:25 +08:00
bunnie
06f7f6ff7f
add a define for the maximum CID
2021-04-14 03:20:30 +08:00
bunnie
01a0fcc73f
Merge branch 'master' of github.com:betrusted-io/xous-core into bunnie-dev
2021-04-07 18:30:13 +08:00
bunnie
0f9eea10d9
flesh out callback handling of events in LLIO
2021-04-07 18:29:50 +08:00
Sean Cross
e2996935cf
0.8.0: tag release
...
This bumps version numbers to 0.8.0, indicating we're nearing final
release.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-04-07 16:34:16 +08:00
Sean Cross
c497cd4864
Revert "remove legacy buffer/string from xous-rs"
...
This reverts commit 628be639f6 .
This file is still in use by at least one project, and will be used by
the libstd implementation.
2021-04-07 16:30:08 +08:00
bunnie
628be639f6
remove legacy buffer/string from xous-rs
2021-04-07 00:50:11 +08:00
bunnie
35353f38dd
bring benchmarks to v0.8 and record benchmark results
2021-04-07 00:45:11 +08:00
bunnie
ea43e236ee
refactor fcc-agent for v0.8
2021-04-06 23:09:33 +08:00
bunnie
b9162fda3d
gettin' there! major modules now mostly working under v0.8
2021-04-06 19:32:35 +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
bunnie
4a504943dc
part-way through the GAM refactor
2021-04-05 05:47:17 +08:00
bunnie
75a6f779f8
initial refactor of ime-frontend
2021-04-05 03:39:14 +08:00
bunnie
bd54b48f8f
initial cut of a major refactor of the keyboard server
...
- debounce is now in hardware (requires latest version of betrusted-soc)
- key events originate from an interrupt context and propagate through
to the listeners as messages
- attempt to reduce the use of heapless::Vec; there is an awkward
interposer step still between the array methodology and the Vec
methodology
I'm not sure if trying to eliminate the Vec is a good idea,
because...I'm finding that we're just re-implementing Vec, but
much worse.
However, for the purpose of movement of data across
IPC boundaries, it's more robust to use primitive types,
because serializing Vec is not possible without either
forking the heapless crate to derive the rkyv traits; or, we'd
have to do some probably quite dangerous conversion of the Vec
to a raw slice which also doesn't feel nice.
2021-04-04 01:42:30 +08:00
bunnie
b9ff993845
refactor graphics server
2021-04-03 00:53:30 +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
bunnie
0e936eaee3
add a macro to help reduce the burden of unpacking messages
...
The syntax to pattern-match a message is a pretty heavy cognitive
burden. Try to ease that by introducing a macro.
The main coin-toss here is whether to include the "what you do
with the message" expression within the macro, or to allow it to
be a block that trails it.
The main benefit of including the body inside the macro is that
we can append an "else" clause that spits out an error message
in case the template didn't match. The drawback is the awkwardness
of putting curly braces inside the parens of the macro expansion.
I think Rust coders are probably more OK with that awkwardness,
even though I find it visually unappealing; and the benefit is that
scalars sent to opcodes expecting blockingscalars (and vice versa)
don't go to a "black hole" -- you'll get an error message.
This error message will probably save someone an hour of debugging
someday, so we'll go with the awkwardness.
2021-04-02 15:34:39 +08:00
bunnie
d21c0fa3e7
refactor of COM
...
this was much harder than I liked.
2021-04-02 05:43:47 +08:00
bunnie
3c34517632
add a convenience method for creating messages
...
reduces the cognitive load of writing library functions
2021-04-02 02:44:24 +08:00
bunnie
a3adf797b0
refactor TRNG server to new API
2021-04-01 17:20:36 +08:00
Sean Cross
fdce58d06e
ipc: convert project to use xous-ipc
...
This rewrites the entire project so that most runnable projects now use
`xous-ipc` instead of `xous::String` where possible.
This also removes `rkyv` from the list of dependencies in `xous-rs`.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-26 20:22:33 +08:00
Sean Cross
16ea102e94
xous: string: allow any stringlike thing to be used
...
Anything that can be turned into a string can now be used in
`from_str()`.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-26 17:14:26 +08:00
Sean Cross
32ebee0b8f
xous: String: implement AsRef<str>
...
This allows xous Strings to be used in functions that expect to be able
to stringify arguments.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-26 12:31:59 +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
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
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
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
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
bunnie
6677d79834
initial RTC framework
2021-03-18 16:22:08 +08:00
bunnie
2d5c1dd6db
leverage min_const_generics and cleanup
...
the spoils of a hard fought battle to refactor to rkyv 0.4.1
2021-03-18 04:00:38 +08:00
bunnie
ea8b208a15
finalize rkyv 0.4.1 refactor
2021-03-18 03:54:48 +08:00
bunnie
8fbd900a4c
Merge branch 'hardware-no-cb' into rkyv-refactor
...
Bring the two branches up to date, while also laying the groundwork
for XousServerName to be used as a native index type in xous-names
so we aren't burdening xous::String with a hasher
2021-03-17 16:06:06 +08:00
bunnie
d68e3e8cf4
an attempt to refactor to rkyv 0.4.1
...
unfortunately, it looks like deserialize requires an alloc??
2021-03-16 02:02:53 +08:00
Sean Cross
55a09990f0
hosted: pre-allocate buffers for performace boost
...
Buffers have a known size. We can avoid reallocations by preallocating
buffers to this known size.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-14 18:29:45 +08:00
Sean Cross
ff8a839ac0
xous: string: implement as_str() for ArchivedString
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-13 18:06:23 +08:00
Sean Cross
9c8b562711
hosted: set tcp_nodelay
...
This might have a performance impact, but it's unclear.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-13 18:05:11 +08:00
Sean Cross
b742dcade2
xous: make macros optional
...
These are not used when building libstd.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-12 09:19:39 +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
f4e8e73887
xous: tag 0.1.1
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-11 10:48:25 +08:00
Sean Cross
e00b958308
hosted: transmit PID to clients
...
Prior to this patch, all clients assumed they were PID 1.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-10 17:35:57 +08:00
bunnie
4f74ad9470
add string appending feature
2021-03-10 04:19:25 +08:00
bunnie
b5411851fd
rudimentary shellchat -- commit for help on debug Move message
2021-03-09 03:52:39 +08:00
bunnie
8a8c1e6a66
foundations for predictive text display
2021-03-08 00:57:50 +08:00
bunnie
49d6018e5e
new feature: backspace (*gasp* iknowrite?)
...
harder than it looks with utf8 and variable-width characters
2021-03-06 19:37:22 +08:00
bunnie
161b1943eb
fix push() function on string
...
didn't hnadle variable length encoding of the utf8 correctly
2021-03-06 02:55:14 +08:00
bunnie
5ea2a21d2d
tighten up APIs, implement a very 0th-order input loop
...
this is where the debugging begins of the beginning of
the API. it's like finally finding the start of a roll
of clear tape.
2021-03-04 19:02:56 +08:00
Sean Cross
5a0533d6bc
xous: definitions: add Display to MemoryType
...
Useful in debugging and error messages.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-03 21:16:45 +08:00
bunnie
8f809c2a51
start layering in the IME front end and prediction APIs
2021-03-03 14:53:33 +08:00
bunnie
d1609d2a31
another commit checkpoint. somehow, i have a race condition now.
2021-03-01 15:08:08 +08:00
bunnie
66902b6bfb
cleanup minor formatting detail
2021-03-01 13:47:06 +08:00
bunnie
4640dc404f
make panic messages a bit more helpful
2021-03-01 13:45:36 +08:00
bunnie
c5e6391e22
remove mention of Sendable and the ipc.rs module
2021-02-18 02:01:11 +08:00
bunnie
0af72ffb6d
clean up Sendable references and warnings
2021-02-17 23:29:20 +08:00
Sean Cross
14f661f565
xous: remove id field from lend()
...
This argument is no longer used.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-17 20:54:08 +08:00
Sean Cross
c349345ce8
xous: get rid of most warnings
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-17 20:40:27 +08:00
Sean Cross
f361bd6e7e
xous: buffer: impl Drop for Buffer
...
This will release a Buffer to the kernel when it goes out of scope.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-17 20:31:02 +08:00
bunnie
2b003f8a7d
intermediate checkin
2021-02-16 00:28:44 +08:00
bunnie
2a46f541f2
add PID identification facility to help with debugging
2021-02-15 19:15:58 +08:00
bunnie
af012c48dc
getting a little further with the port, but still crashing on a borrow message
2021-02-15 04:42:30 +08:00
bunnie
fc8290cdb4
futzing around and something is kind of working on xous-string port to rkyv
2021-02-15 00:05:42 +08:00
bunnie
7e0902344c
move XousBuffer to xous-rs
2021-02-13 01:42:31 +08:00
bunnie
9f79367d1c
Merge branch 'hardware-rkyv' into hardware
2021-02-12 01:56:50 +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
8ed37a0dcb
add API framework for LLIO
2021-01-27 13:33:03 +08:00
bunnie
31e58c3337
add benchmarks. this commit exhibits a mysterious problem with Lookup API
2021-01-22 04:11:02 +08:00
bunnie
4406f73539
remove usize from xous::String structure
2021-01-22 01:33:06 +08:00
bunnie
8da2601b42
other minor changes
2021-01-21 03:57:57 +08:00
bunnie
f247e557e8
now to the point of testing the general message flow in hosted mode
2021-01-19 18:58:57 +08:00
bunnie
82e7855b24
add some new error codes
...
maybe they don't belong here?? they are error codes for
the GAM.
2021-01-19 00:04:55 +08:00
bunnie
73286828c8
more GAM API fleshing out; now to the point of updating a TextView
2021-01-18 04:12:40 +08:00
bunnie
b6efb15488
add debug trait to xous-string
2021-01-17 17:00:57 +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
8a1991876f
add basic TRNG service
2021-01-13 15:04:14 +08:00
bunnie
aeadbfb1b5
fix up keyboard API to use scalars, add demo connection
...
also fix a bunch of other idiomatic weirdnesses
2021-01-12 00:00:57 +08:00
bunnie
f166073954
first draft of keyboard server
2021-01-11 06:11:15 +08:00
bunnie
ea78de8014
convert all services to use xous-names server
2021-01-09 02:12:01 +08:00
bunnie
4ef581a266
riddled with race conditions, but...sort of works
2021-01-08 05:20:53 +08:00
bunnie
8a8d675ebf
add the names.rs
2021-01-07 22:30:54 +08:00
bunnie
95d4f03591
intermediate checkin
2021-01-07 21:53:08 +08:00
bunnie
9716eba039
Merge remote-tracking branch 'origin/master' into hardware
2021-01-07 20:34:04 +08:00
Sean Cross
6ccbacf65f
loader: assign sections to process ownership
...
This ensures these addresses aren't re-used and handed out again by
memory allocation.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-01-07 20:33:21 +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
bunnie
cce89395f6
test framework for xous-names
2021-01-04 23:34:18 +08:00
Sean Cross
f6c3d955ea
xous: add ipc module
...
This module is a stopgap to allow for transferring structs and enums
between modules.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-01-03 18:57:46 +08: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
b094f1147b
xous: implement sender.pid()
...
This is mostly an implementation detail, but appears to work.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-12-04 22:38:35 +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
322051e8c1
xous-rs: log panics to log-server
...
When a process panics, log the contents of the panic to the log server.
This removes the dependency on a `println!()` implementation needing to
be defined in a project.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-27 13:55:36 +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
b3b57f5eb5
xous: temporarily remove debug-here
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-24 22:04:26 +08:00
Sean Cross
aeef0638e7
xous: set license to MIT/Apache-2
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-24 22:02:02 +08:00
Sean Cross
222bde8db7
xous: remove extra prints from network
...
This was useful when tracking down network issues.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 20:05:10 +08:00
Sean Cross
693800ac9d
xous: hosted: retry when we get WouldBlock
...
When this is returned, we need to stop and retry the whole packet rather
than merely waiting as we do when we receive a Blocking message.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 20:03:00 +08:00
Sean Cross
b24719a0fc
xous: fix blocking return values
...
These values weren't being properly returned when Yielding or when
calling operations that would block, or that actually blocked.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 17:20:20 +08:00
Sean Cross
5f52acfa9b
xous: document WouldBlock and BlockedProcess
...
These results have similar names but are very different in terms of what
they do.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 17:19:37 +08:00
Sean Cross
98fb7f739d
xous: hosted: remove excess debug from network packets
...
These packets were always printed, which is excessive.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 16:15:19 +08:00
Sean Cross
4f0d53e9a6
xous: fix hosted process response
...
This uses a slightly different approach to looking at a process
response.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-11 17:33:08 +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
6b1dc7f853
xous: hosted: fix sync error with mis-ordered replies
...
Replies would get mis-ordered, which became bad when data had memory
attached.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-11 12:51:41 +08:00
Sean Cross
08fb5e0a0b
xous: add send() to String
...
This call can be used to send a string to a Server.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-01 16:28:47 +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
4650e865fb
xous: String: add from_message() as an initializer
...
Allow creating a `String` from a `MemoryMessage`.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 20:51:29 +08:00
Sean Cross
f149c086ef
xous: add String
...
This is a basic String that can be passed as a Message.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 11:18:48 +08:00
Sean Cross
39c9ef30b7
xous: definitions: add memory() call to Result
...
This is used to get attached Memory from a Result, if any.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:13:09 +08:00
Sean Cross
8115c2e7cf
xous: hosted: remove print!() monitoring network traffic
...
This was useful when tracking down network traffic issues. It is no
longer useful.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:12:32 +08:00
Sean Cross
a35a75b1f2
xous: carton: use send_message()
...
This function now works as expected.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:11:35 +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
67adccf16a
xous: hosted: attach to debugger on panic
...
When a `panic!()` is hit and we're running in a hosted environment,
attach a debugger using `debug-here`.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-29 19:38:27 +08:00
Sean Cross
4ca97125ad
xous: hosted: retry when WouldBlock is received
...
Retry a message when we receive a WouldBlock response.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-14 19:26:33 +08:00
Sean Cross
2b66378556
xous: definitions: add WouldBlock
...
This opcode indicates a command would block and should be retried.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-14 19:26:13 +08:00
bunnie
5cf8e9e3bc
Merge remote-tracking branch 'origin/master' into ticktimer
2020-10-14 15:30:47 +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
bunnie
4d21f2d868
intermediate progress on debugging return messages
2020-10-14 01:28:10 +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
Sean Cross
81a927e31f
xous: definitions: Message: add has_memory()
...
This function can be used to determine if a function has any memory
attached to the message.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-09-22 21:25:28 +08:00
Sean Cross
6c941855be
xous: definitions: add is_blocking() to Message
...
This function can be used to determine if a Message will block when sent
to the host.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-09-22 21:23:18 +08:00
Sean Cross
799c1c3822
xous: definitions: add Scalar1 and Scalar2 return values
...
These return values can be used to return something other than "Success"
from a blocking call.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-09-22 21:19:37 +08:00
Sean
f1353e8ff0
xous: hosted: free MemoryMessage::Move after send
...
This ensures that these messages aren't leaked. In a native system, this
memory would be "freed" by the kernel as it is attached to the new
memory space.
Signed-off-by: Sean <xobs@ci.betrusted.io>
2020-09-03 13:22:13 +08:00
Sean
5b45382489
xous: make SysCallNumber pub
...
Signed-off-by: Sean <xobs@ci.betrusted.io>
2020-09-03 13:21:52 +08:00
Sean
eb725ec57f
xous: carton: leak memory when converting into_message()
...
When converting into a message, the associated memory should be leaked
and not freed when the Carton is dropped. This is because the Message
can outlive the MemoryMessage, and the Carton is then immediately
dropped.
Signed-off-by: Sean <xobs@ci.betrusted.io>
2020-09-03 13:20:36 +08:00
Sean Cross
d057cba0fb
xous: add "logging" feature
...
This will connect to a logging server to allow for log messages.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-30 17:39:58 +08:00
Sean Cross
1a0bb99890
xous: hosted: read back memory for TrySendMessage
...
Like SendMessage, the TrySendMessage requires us to read back memory.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-30 17:38:24 +08:00
Sean Cross
7a2e5fbde8
xous: add try_ variants for connect/send_message
...
These will return if the server is full. Note that the previous variants
are now unimplemented.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-30 17:37:39 +08:00
Sean Cross
98854d8e2f
xous: rename message body from "message" to "body"
...
This makes more sense since we already have a "header" field.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-30 00:37:21 +08:00
Sean Cross
eaf2b038c1
xous: be more generous in specifying bitflags crate
...
Presumably it won't change much.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-30 00:36:57 +08:00
Sean Cross
776fd72483
xous: syscall: work around clippy warnings on Result::Ok
...
clippy warns that "Result::Ok" is redundant. Work around clippy by using
the fully-qualified path.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-30 00:05:02 +08:00
Sean Cross
87c7335afc
xous: don't panic when non-Ok is returned by send_message
...
Sometimes the queue is full, in which case something other than Ok is
returned. Don't panic when this happens.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-18 17:01:28 +08:00
Sean Cross
dfd11f846d
hosted: fix hosted builds
...
We can now run `cargo xtask run` and it will do the right thing.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-18 13:52:43 +08:00
Sean Cross
f469bfcffc
xous-rs: remove baremetal cfg
...
We now check if `target_os = "none"`.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-14 19:53:33 +08:00
Sean Cross
3ed964507d
xous: add #[xous::xous_main] proc-macro
...
This is used to annotate a main function that is compatible with both
hosted and baremetal environments.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-14 16:44:08 +08:00
Sean Cross
1d23bc5aae
kernel: first multiple threads working
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-10 21:17:48 +08:00
Sean Cross
a467d6fcc7
kernel: baremetal: 2nd process starts to run and crashes
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-10 16:06:38 +08:00
Sean Cross
10ecacd136
kernel: native: create process for initial processes
...
These all need to bootstrap themselves.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-09 23:08:54 +08:00
Sean Cross
ba30b4919d
kernel: remove more warnings
...
Still haven't run it on real hardware, but this removes more warnings
from the system.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-09 21:52:28 +08:00
Sean Cross
8925964754
kernel: on to lifetime issues now!
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-09 19:38:15 +08:00
Sean Cross
6a098a222b
xous: Add missing mem functions
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-07 18:58:36 +08:00
Sean Cross
49083081c3
xous: replace processes-as-threads with baremetal check
...
This gets it working on baremetal, and keeps processes-as-threads
available for running in hosted mode.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-06 23:25:28 +08:00
Sean Cross
4643155318
cross-platform: fix building on native and hosted
...
This makes some minor changes to get builds working on both platforms.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-03 18:25:46 +08:00
Sean Cross
285b92401e
mem: get tests working again on hosted
...
This fixes all tests so they now work (and pass!) when running in a
hosted environment.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-03 18:15:56 +08:00
Sean Cross
6ab4133165
xous: begin using hooks for memory allocation
...
This moves memory allocation into hooks, and allows for a common syscall
regardless of platform.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-03 17:58:22 +08:00
Sean Cross
ea3a473c9f
reworking memory allocation
...
The kernel should run in a `no_std` environment, which means it must
currently run without `alloc`. We have our own allocation methods when
running on baremetal hardware.
Begin the work to break out the allocation method so that it will work
on both desktop and baremetal environments.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-03 17:40:57 +08:00
Sean Cross
21aa67b748
workspace: remove workspace
...
The kernel and userspace both need to use `xous`, but have different
requirements. If we use a workspace, then all instances of `xous-rs`
must have the same feature set.
This breaks them apart so the kernel can have one set of features and
programs can have another set.
As part of this change, tests are now integrated into the kernel, and a
new `create_process_as_thread()` and `wait_process_as_thread()` function
pair have been added.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-02 16:11:12 +08:00
Sean Cross
cbbc6613c6
xous: hosted: remove Option<> from ProcessArgs
...
There is no reason to make this an Option, since it will always exist.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-30 14:55:02 +08:00
Sean Cross
ef0ef924c8
fix more clippy warnings
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-29 22:48:48 +08:00
Sean Cross
869ebcff8b
kernel: get tests and running working
...
This fixes process creation so that it works for both tests and running
it as a program.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-29 22:37:03 +08:00
Sean Cross
039975323e
tests: add tests package
...
This package serves only to build tests for the kernel, because the
kernel wants to use a different mechanism for spawning processes.
Cargo doesn't support having `#[cfg(test)]` attributes on modules in
order to allow conditional compilation depending on whether we're
running a test or not. To work around this, `main.rs` is included in
another dummy crate.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-29 21:18:30 +08:00
Sean Cross
cece761ff1
xous: SID: convert to using newtype
...
Rather than simply casting a tuple as a type, create a new struct SID.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-29 20:03:21 +08:00
Sean Cross
e7e8a2b748
kernel: get initial hosted non-test processes working
...
This now has the ability to fork off processes.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-29 17:52:01 +08:00
Sean Cross
fbcbc8dfa1
kernel: fix deadlock in threaded messages
...
Due to an ordering issue, it was possible for thread message responses
to become deadlocked, wherein a message would get stored in the shared
table in between checking the table value and locking the network
connection.
This change makes a second check of the table after the network
connection is locked, in order to prevent this condition.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-28 18:12:52 +08:00
Sean Cross
9af0fec049
kernel: convert multi-thread test (it's broken right now)
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-28 13:54:11 +08:00
Sean Cross
1512d2138e
kernel: tests: remove excess prints
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-28 13:35:15 +08:00
Sean Cross
19222c34a9
kernel: get shutdown and multi-clients working
...
THis now has proper authentication for tests.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-28 13:28:14 +08:00
Sean Cross
7258fc83b7
kernel: rework process creation
...
This now uses a system of access keys to associate processes with the
kernel.
This currently does not pass tests.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-27 21:44:50 +08:00
Sean Cross
ab7a56937c
create_process: rename from spawn_process
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-27 09:30:43 +08:00
Sean Cross
b9d211af3b
xous: begin adding a create_process() call
...
This will mimic the `create_thread()` call and will obviate our own
process-creation code.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-26 10:54:54 +08:00
Sean Cross
cb576c19d5
xous: support taking server addr from environment
...
This allows for setting an environment variable -- `XOUS_SERVER` -- to
indicate which server to connect to.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-23 19:07:13 +08:00
Sean Cross
8242f1b53f
kernel: make server IDs 128 bits
...
This makes server IDs a full 128 bits, and changes the argument to
CreateServer from 32-bits to 128-bits.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-21 17:28:18 +08:00
Sean Cross
4130ce7bd1
kernel: fix threading and multiplexing issues
...
Connections weren't getting multiplexed correctly. As a result, they
would respond with the wrong message to a given thread.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-21 15:51:51 +08:00
Sean Cross
1a6b1160a3
syscall: move send_message into its own function
...
This breaks up the giant `handle()` function.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-21 09:44:16 +08:00
Sean Cross
42f95e6488
threading: get basic threading tests working
...
With this, we can now run two "threads" within one process.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-16 12:23:09 +08:00
Sean Cross
e2296fceac
ThreadID: rename from CtxID
...
Contexts are now renamed to Threads, which better reflects what they
actually are.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-16 11:04:31 +08:00
Sean Cross
b52847e467
xous-rs: mark Scalar messaages as Clone,Copy
...
They are all scalar values, so there's no reason not to mark them Copy.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-16 10:22:04 +08:00
Sean Cross
1216963d24
rename contexts -> threads and spawn -> create
...
This ensures we're more consistent in naming for these constructs.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-16 10:17:46 +08:00
Sean Cross
62cff0b9c7
xous-rs: add a function call to get current server address
...
This function will assist us in creating calls to spawn processes and
threads.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-16 10:04:17 +08:00
Sean Cross
e652150c6e
kernel: get multiple message passing working
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-15 16:09:42 +08:00
Sean Cross
0ffbaa369a
kernel: fix remaining warnings
...
This just silences them, which isn't great in the long run.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-14 15:16:51 +08:00
Sean Cross
b93abcc926
kernel: test: implement mutable borrow
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-14 15:10:25 +08:00
Sean Cross
d7006e675e
kernel: get send_borrow_message test working
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-14 12:11:57 +08:00
Sean Cross
964b6e0f46
kernel: disable more debug prints
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-14 10:08:49 +08:00
Sean Cross
05d1cf71dc
port: use kernel-assigned port number for tests
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-13 19:57:30 +08:00
Sean Cross
b388d2e1f4
kernel: use SocketAddr instead of &str
...
This is easier to copy around and seems to be more informative.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-13 19:45:29 +08:00
Sean Cross
8f74159674
rename ImmutableBorrow -> Borrow
...
THis is more in-line with Rust conventions.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-13 19:19:25 +08:00
Sean Cross
05ccba9450
kernel: implement move test
...
We can now `Move` memory from one "process" to another.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-13 18:31:51 +08:00
Sean Cross
40ed6365e2
first memory message works
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-13 17:41:50 +08:00
Sean Cross
acf9b049f7
hosted: start working on memory-based message passing
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-12 11:18:26 +08:00
Sean Cross
9f1b1e7ec8
kernel: tests: get both tests working
...
We now have two tests. These tests may be run either in parallel or in series.
If they are run in parallel, then they will each have their own thread
local storage, and each will initialize things from scratch.
If they are run in series, then the thread local storage will be reused
between the two processes.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-25 17:41:17 +08:00
Sean Cross
54a0db50b3
kernel: start using tls
...
This allows us to run multiple kernels in parallel.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-24 17:51:31 +08:00
Sean Cross
04faa898c7
hosted: cutting down on println messages
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-23 16:40:51 +08:00
Sean Cross
e9469991be
test: get initial test passing
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-23 14:42:01 +08:00
Sean Cross
b1a41978ba
shutdown: add shutdown syscall
...
This will be used during testing to shutdown the kernel once it's
finished.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-23 13:58:15 +08:00
Sean Cross
14bb1ac1e5
kernel: working on getting process termination functioning
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-22 17:42:24 +08:00
Sean Cross
9361055aec
kernel: work-in-progress for process termination
...
Processes can go away. This is initial work to support process
termination.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-18 11:39:46 +08:00
Sean Cross
2786ad697b
kernel: get scalar message passing working again
...
This gets basic scalar message passing working again. With this, the
following operations may be performed:
* Starting a server
* Connecting to a server
* Sending a scalar message
Care must be taken to not overflow a server's queue, particularly if
writers are faster than readers.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-16 16:34:49 +08:00
Sean Cross
723529ba20
wip: working on getting message passing working
...
The goal is to get a basic message passing engine working that will also
function as a device that works on real hardware.
This is still reworking it to function correctly on a desktop system.
Once that is working, it will be reworked to function once again on
hardware.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-15 18:13:10 +08:00
Sean Cross
322e2e7804
xous: remove all instances of raw pointers
...
We now use MemoryAddress and MemorySize wrappers where applicable.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-03 15:40:15 +08:00
Sean Cross
e059494a7f
xous-rs: begin adding support for native message passing
...
This will send data via a TCP connection to simulate making syscalls.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-03 12:06:46 +08:00
Sean Cross
40d4483e4f
clippy: fix several clippy warnings
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-01 11:36:19 +08:00
Sean Cross
1f478925ce
kernel: return context on failure
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-06 10:43:26 +08:00
Sean Cross
3799397be9
xous: dangerous_syscall: mark whole function as unsafe
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-03 15:44:08 +08:00
Sean Cross
8789203eb3
test mutable borrows
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-03 14:24:02 +08:00
Sean Cross
9c5cb3da32
kernel: properly share pages between processes
...
This improves page sharing. Permissions are retained during sharing,
and we should now be able to share multiple pages. Additionally, this
lays the groundwork for mutable sharing.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-03 12:28:44 +08:00
Sean Cross
bedb499edb
kernel: get immutable borrows working
...
We can now pass memory immutably between processes
Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-01 17:27:59 +08:00
Sean Cross
d6f985c141
syscall: add call to return memory from a message
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-01 13:21:23 +08:00
Sean Cross
bdb8eac9ad
MemoryRange: move to using this struct for memory ranges
...
This is a combination of MemoryAddress and MemorySize. This is
guaranteed to be not null.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-01 10:28:36 +08:00
Sean Cross
4be5f4031b
xous: add UnmapMemory syscall
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-31 18:36:53 +08:00
Sean Cross
abce9eb0c1
message::move: implement movable messages
...
This is the first implementation of message passing with moving memory.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-31 18:03:19 +08:00
Sean Cross
8c3f931445
messaging: first message passing example
...
THis commit allows us to pass Scalar messages between processes.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-30 16:07:58 +08:00
Sean Cross
405a9227cf
xous: add contextid return value
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-27 16:22:51 +08:00
Sean Cross
d8d0c3838a
xous: add context id and context error
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-27 13:32:41 +08:00
Sean Cross
dafec2bb89
kernel: make contexts first-class
...
Due to an initial misunderstanding of how the RISC-V is architected,
contexts were going to be an emergent property of the kernel.
However, after further consideration, contexts must now be baked into
the kernel. Switching between contexts can be handled by the scheduler,
but the kernel must keep track of processor registers.
Keep track of context IDs and ensure they are sane. With this patch,
interrupts work, as does basic context switching.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-27 12:30:29 +08:00
Sean Cross
97238861a1
xous: syscall: define the return value for SwitchTo
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-25 14:08:13 +08:00
Sean Cross
a05258654c
xous: rename WaitMessage -> ReceiveMessage
...
It might not wait. The name `ReceiveMessage` better reflects the
operation.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-24 15:26:25 +08:00
Sean Cross
537e9da79d
xous: adjust message envelope struct
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-20 17:22:02 +08:00
Sean Cross
646cf9340e
xous: add Connect syscall
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-19 17:26:01 +08:00
Sean Cross
2dd62e50fd
xous: rework definition of message structs
...
Message structs are used to pass memory between processes. Rework how
this struct is laid out so as to better describe this process.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-19 08:52:25 +08:00
Sean Cross
19ddb32d9d
xous: add syscalls for connecting to a server
...
This is required because server IDs are 128 bits, but we only have
enough space for 32 bits in the message.
This is fine, because it means we can drop "Connect" permissions to
prevent compromised clients from making new connections.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-17 13:00:06 +08:00
Sean Cross
d10bc2e894
syscalls: begin adding message-passing syscalls
...
These are still not connected, however their existence is starting to
solidify the API.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-17 10:27:03 +08:00
Sean Cross
1b8f97a5a3
xous-rs: implement create_server call
...
This call isn't properly handled by the kernel, but it's now available
in the standard library.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-16 19:03:51 +08:00
Sean Cross
5a1bcf4c21
xous-rs: implement create_server syscall
...
The kernel doesn't have this wired up yet, but the syscall works.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-14 15:57:58 +08:00
Sean Cross
9508201db9
xous-rs: add claim_interrupt wrapper
...
Rather than calling the raw function, add a wrapper for programs to use.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-14 15:41:44 +08:00
Sean Cross
7a3e038e6b
syscall: add intial CreateServer call
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-13 22:41:25 +08:00
Sean Cross
c2008e5fe8
syscall: implement map_memory wrapper
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-13 20:33:08 +08:00
Sean Cross
f50ec67553
initial commit
...
This pulls together many disparate repositories into one xous-core
repository.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 12:13:05 +08:00