Sean Cross
fb01359821
server: fix Connect() call
...
This fixes the index in the Connect() call, so that clients can now
Connect to servers that exist.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-24 14:52:25 +08:00
Sean Cross
e298f125c9
kernel: rework server structures
...
They are now inverted and mvoed into their own file.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-24 14:13:11 +08:00
Sean Cross
484e21fd30
messaging: more work on transferring messages
...
Still need to work on passing messages.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-23 16:56:56 +08:00
Sean Cross
569a4196de
kernel: return a Result from syscall::handle
...
This will simplify error handling.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-23 14:07:54 +08:00
Sean Cross
f32596570f
services: don't map messaging region to userspace
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-23 12:59:48 +08:00
Sean Cross
fb69426f28
kernel: riscv: print "SYSTEM HALT" when halting system
...
This minor patch helps me remember that these errors are fatal.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-23 12:59:09 +08:00
Sean Cross
0be1b8b94c
kernel: mem: don't unilaterally hand memory to userspace
...
If it's needed for use in the kernel, don't hand it over.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-23 12:58:13 +08:00
Sean Cross
a31c4722fa
kernel: add space for message reply pointer
...
With this, we now have enough space to store the return context
information for when `message_reply()` is called.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-23 09:10:19 +08:00
Sean Cross
33162a1c1f
services: implement basics of ReceiveMessage
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-20 17:21:34 +08:00
Sean Cross
ae473b5aa7
kernel: broken commit: add server message polling
...
This [broken] commit starts to add message polling to the kernel, so a
server can use the MessageReceive call.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-19 17:25:12 +08:00
Sean Cross
04eb18e2fb
kernel: add Connect stub
...
It doesn't respond, but it prints a message now at least.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-19 08:54:52 +08:00
Sean Cross
ebe3efc097
kernel: properly zero out pages prior to handing them to userspace
...
Until now, we were relying on luck to ensure pages were zeroed.
However, now we properly zero pages in the kernel before handing them
off to userspace.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-17 11:35:38 +08:00
Sean Cross
85522602ea
kernel: silence warnings and remove excess prints
...
These prints were used to debug errors in the new process switching
architecture.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-16 19:03:10 +08:00
Sean Cross
022bedc8e3
kernel: refactor processes to support banking
...
We now have a concept of context banking. When an interrupt fires, the
process context is banked.
As part of this, process-level data is now stored in the page within the
process itself. This reduces memory consumption and allows us to have
features such as a hash within each process itself.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-16 18:22:59 +08:00
Sean Cross
99d19866cf
kernel: mem: zero out memory as part of alloc()
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-14 22:11:57 +08:00
Sean Cross
db87a94960
kernel: services: add a page for the queue
...
Eventually this will be rolled into an existing page.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-14 22:06:22 +08:00
Sean Cross
77c07f0d79
mem: add map_page()
...
This shortcut function ensures a page is mapped.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-14 22:06:00 +08:00
Sean Cross
9a10f50ce1
kernel: services: keep track of current pid
...
Currently we use the ASID inside the MMU to figure out the current PID.
We should also keep track of what we think it is, for consistency.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-14 21:28:01 +08:00
Sean Cross
845cef3771
kernel: services: add servers to SYSTEM_SERVICES
...
This array will be used to keep track of what servers are running.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-14 16:58:15 +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
08e416c776
kernel: support omitting virtual address when mapping
...
This forms the basis for message passing.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-13 12:44:23 +08:00
Sean Cross
967464df93
kernel: mem: rename last memory address variable
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-13 09:52:53 +08:00
Sean Cross
fb3da7294c
mem: turn function comment into rustdoc
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-13 08:32:44 +08:00
Sean Cross
4bb3f6db68
Merge branch 'master' of github.com:betrusted-io/xous-core
2020-03-13 08:30:55 +08:00
Sean Cross
f0d4e44254
kernel: processtable: add "last_default_address"
...
This will be used to accelerate allocations for ranges.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-12 17:02:03 +08:00
Sean Cross
87676c0fc5
mem: start implementing find_virtual_address()
...
Right now it just returns the address, which is exactly what we had
before.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-12 17:01:40 +08:00
Sean Cross
c1b575507d
mem: better handling of memory alloc failures
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-12 16:51:14 +08:00
Sean Cross
36faa8354f
riscv: mem: silence warnings when print-debug is disabled
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-12 16:50:55 +08:00
Sean Cross
09890a2ca3
riscv: use upstream riscv module
...
Still pulling from git, as the version number hasn't been bumped yet.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-11 17:49:03 +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