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
85c719643a
kernel: tests: factor out common connect code
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-13 19:15:51 +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
e1a92e929c
kernel: replace more unimplemented!() with UnhandledSyscall
...
This should prevent pacnics when calling unhandled functions.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-04 11:58:18 +08:00
Sean Cross
acfe8e5076
kernel: fix pid termination
...
Previously, we were recycling PIDs when devices disconnected, however we
weren't cleaning up PIDs within the system-level table.
This now cleans up these entries.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-25 18:15:36 +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
abcba48a2a
kernel: add tests
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-24 12:29:04 +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
cbd8ec3a30
test: get message passing working
...
We are now able to pass messages around as part of a test.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-23 15:47:18 +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
973945fce2
tools: read-tags: fix bad pointer arithmetic
...
This removes raw pointer usage that could cause unaligned accesses.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-15 12:30:21 +08:00
Sean Cross
7da67f050a
tools: fix most clippy warnings
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-15 12:04:23 +08:00
Sean Cross
c1c31dbfe4
loader: fix most clippy warnings
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-15 12:03:59 +08:00
Sean Cross
a6c45339e2
docs: remove outdated syscall documentation
...
This document was horribly out of date. The canonical implementation is
located within `syscall.rs`.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-10 10:29:16 +08:00
Sean Cross
21c46de60e
kernel: move to allow hosted init
...
This prepares for new calls to init SystemServices and the MemoryManager
so that they can be initialized with something other than a
KernelArguments struct.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-03 18:28:22 +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
6ad48ab062
examples: shell: adapt to new form of syscalls
...
We're not slinging raw pointers around anymore.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-03 15:39:48 +08:00
Sean Cross
8cc43d64b5
examples: log: get building cross-platform
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-03 15:39:38 +08:00
Sean Cross
17ae34a1c1
kernel: begin actor refactor
...
This refactors the kernel so that it *can* run on baremetal, but it can
also run as part of a full system.
This will aid in developing, and ensure that a minimum amount of unsafe
code is present within the kernel.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-03 15:34:55 +08:00
Sean Cross
0ad04605ad
cargo: add lazy_static to lockfile
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-03 12:07:33 +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
0fae191651
examples: shell: get building in a hosted env
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-03 11:02:44 +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
d4db20e516
kernel: add preemptive multitasking
...
This is still a work in progress, but we now can have multiple processes
running at once.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-06 15:52:07 +08:00
Sean Cross
aec047b944
loader: add test for minielf spanning a page
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-06 15:34:18 +08:00
Sean Cross
73ad16d367
loader: fix loading when init spans pages
...
Due to an issue withow MiniELF files were loaded, one page was mapped to
two addresses rather than having two adjacent addresses mapped. This
occurred when a small section spanned two pages.
This has now been corrected, and an additional test binary will be added
to demonstrate the issue.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-06 15:29:37 +08:00
Sean Cross
a1c88b4ffd
kernel: remove old code at top of syscall::handle
...
This was pseudocode from back before we had a better idea of how
everything would be laid out.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-06 10:44:41 +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
fd5cc8a1f0
kernel: implement mutable borrows
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-03 14:23:49 +08:00
Sean Cross
48717d3870
kernel: return a MessageResult after sending a message
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-03 14:23:15 +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
ed977fd564
kernel: initial work to support lending pages
...
This lays groundwork to support lending pages from one process to
another, and to restore permissions when pages are handed back.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-02 17:40:14 +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
834c637783
examples: go to sleep when we panic
...
This prevents this process from constantly hogging the CPU.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-01 13:20:31 +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
94459c8d43
examples: add log strings
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-31 18:37:40 +08:00
Sean Cross
a947d7fd79
kernel: clean up most warnings
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-31 18:37:19 +08:00