Sean Cross
1991a464bd
core: add Workspace back in
...
The Workspace turns out to be useful, particularly when handled
correctly. This allows for a unification of all packages.
Additionally, since we now are focusing on applications and servers now,
the decision of which packages to build by default becomes clearer.
Finally, we'll be able to use `xbuild` to construct more complex
workflows with a full Workspace.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-17 18:39:33 +08:00
Sean Cross
bb17038bfe
kernel: rename "xous" to "xous-kernel" in import
...
Cargo appears to cache packages in the workspace when multiple packages
use the same crate. Unfortunately, Xous uses different features
depending on whether it's running in the kernel or in userspace.
Pull the kernel version of "xous" in under a different namespace in
order to force it to use a different build.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-17 18:37:40 +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
89d6259819
graphics: correct the default color
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-14 18:51:15 +08:00
Sean Cross
dc3dc20bd3
graphics: add embedded-graphics
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-14 18:46:23 +08:00
Sean Cross
6abe2af34e
graphics: use dumb lfsr instead of rand crate
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-14 18:20:37 +08:00
Sean Cross
92a21a9fce
graphics: initial version
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-14 17:25:20 +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
45bd670138
examples: shell: get shell working on baremetal
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-10 23:04:36 +08:00
Sean Cross
4b58e5108e
examples: log: remove unused addr field
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-10 22:47:18 +08:00
Sean Cross
cb959eb1cf
kernel: fix interrupts
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-10 22:43:38 +08:00
Sean Cross
31f63c3f5f
kernel: threads work now
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-10 22:05:06 +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
75449f1deb
kernel: get PID1 running, now working on PID2
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-10 00:35:37 +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
bef0168c20
kernel: more warning fixes
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-09 22:14:14 +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
0006d4d99c
kernel: get building
...
This is where the story really starts...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-09 21:33:21 +08:00
Sean Cross
8ccecb6d99
kernel: down to 12 errors again
...
Slowly chipping away at it.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-09 20:59:31 +08:00
Sean Cross
299b9fc298
kernel: start working on lifetime errors
...
Only about 24 errors, so it's better than it could have been.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-09 19:45:02 +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
30fef020f2
baremetal: just one more build error for this phase
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-09 19:27:43 +08:00
Sean Cross
e7a4927943
kernel: down to 7 compile errors
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-09 19:21:54 +08:00
Sean Cross
9bba5cbe4d
server: pass memory buffer to server init
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-09 19:02:05 +08:00
Sean Cross
e48e1820f6
kernel: down to 12 errors
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-09 18:27:18 +08:00
Sean Cross
814be7cd84
kernel: down to 29 errors on bare metal
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-09 16:48:58 +08:00
Sean Cross
ebf568dadd
baremetal: slowly whittling down the number of errors
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-09 16:14:34 +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
fb6d42be55
kernel: begin re-porting xous to baremetal
...
Only 68 errors to fix!
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-07 18:57:55 +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
bd99f33761
kernel: move debug-here to windows,unix
...
This uses lazy_static, which only works on libstd.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-06 23:08:03 +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
09be029ad0
tools: refactor to make clippy happy
...
This fixes a lot of small clippy warnings.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-29 20:02:58 +08:00
Sean Cross
c2ac69a752
shell: hack to get test working
...
THis can now connect to the log server.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-29 19:31:49 +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
d9024076c6
kernel: beginnings of hosted mode
...
This splits hosted mode out from tests so they can run standalone.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-28 18:41:49 +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
f925011ea2
kernel: fix multiple contexts test
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-28 14:03:44 +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
c40e0a138d
kernel: convert scalar message test to use processes
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-28 13:40:02 +08:00