bunnie
afd1086cda
commit unsaved changes meant to be part of previous commit
2021-12-27 12:32:18 +08:00
bunnie
1fab068296
add seed setting from the XOUS_SEED environment variable
2021-12-27 12:29:29 +08:00
bunnie
c0ce66ee51
fix permissions. windows is sort of stupid and makes everything +x
2021-08-19 23:34:29 +08:00
bunnie
2a2c75f420
add a rustfmt.toml and run rust fmt on the project
...
notably directories written by bunnie are excluded.
2021-08-19 23:33:23 +08:00
Sean Cross
83f88f6fde
xous: hosted: improve performance by removing a copy
...
Remove one copy step when receiving packets. This should improve
performance of Hosted mode by around 1.5x.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-18 18:22:07 +08:00
Sean Cross
034ab9a04c
xous: test: fix unnecessary mut warning
...
This fixes a warning in test builds where a field was marked as `mut`
that didn't need to be.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-16 15:08:04 +08:00
Sean Cross
1d0a952331
xous: hosted: redo control flow with condvars
...
This completely redoes the client-side of syscalls such that there is a
lot less lock contention. Processes now properly sleep rather than
spinning, unless they're waiting for a response due to a blocked server,
which rarely happens in practice.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-16 12:20:47 +08:00
Sean Cross
23ce9e5bf0
xous: arch: look for feature flag for tests
...
When running tests, `processes-as-threads` gets enabled. Look for this
feature flag to determine if we need to use that architecture.
Note that this change requires `resolver v2` to be enabled.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-16 12:19:53 +08:00
Sean Cross
5efe76f490
xous: arch: fix interface for test arch
...
Fix the interface for the `test` arch due to changes with the other
platforms.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-16 12:18:15 +08:00
Sean Cross
ae97ca4e14
xous: move rename native arch to riscv
...
This will enable adding more architectures later.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-16 12:16:06 +08:00
Sean Cross
c72ffc3dd4
Merge branch 'main' of github.com:betrusted-io/xous-core
2021-08-16 09:56:31 +08:00
bunnie
a19fc87687
clean up warnings, and fix some hosted mode issues
2021-08-15 00:46:16 +08:00
Sean Cross
dbbf85255d
xous: split test into its own arch
...
The `test` arch works with TLS and allows for multiple servers and
processes per "process".
This is a special case, and warrants its own arch.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-13 09:30:08 +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
bunnie
8cb4362824
trying to merge...what are all these changes?
2021-07-18 12:31:29 +08:00
Sean Cross
7b7be0fe9e
hosted: fix MemoryRange refactor
...
This fixes the MemoryRange refactor where `.addr` and `.size` are now
private fields.
Previously it had only been tested on baremetal mode.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-24 18:02:28 +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
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
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
c516919479
xous: run cargo fmt
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-19 14:20:47 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 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
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
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