Commit graph

448 commits

Author SHA1 Message Date
Sean Cross
6e312ffc8a kernel: process: only print process inits when printing is enabled
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 20:42:57 +08:00
Sean Cross
e5003eee6d kernel: only print RISC-V exceptions when printing is enabled
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 20:42:25 +08:00
Sean Cross
f46f7c6e81 shell: use new String struct from xous
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 11:19:43 +08:00
Sean Cross
9192775e5e graphics-server: use String for String opcode
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 11:19:17 +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
4df3296d99 cargo: commit lockfile
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:31:37 +08:00
Sean Cross
c33794c859 shell: use new graphics subsystem
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:30:34 +08:00
Sean Cross
7fc8dafc39 shell: add StringBuffer struct
Add a StringBuffer struct that can be used to create string messages.

This will eventually be promoted to Xous.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:29:58 +08:00
Sean Cross
2d4a2bf871 ticktimer: use millis instead of nanos on hosted
The `elapsed_ms()` function should probably return milliseconds rather
than nanoseconds. Time marches on.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:29:12 +08:00
Sean Cross
c7164c461d log-server: unify print messages for log_string
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:28:01 +08:00
Sean Cross
5823c23472 log-server: unify log messages
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:27:13 +08:00
Sean Cross
d9f858bcf0 log-server: remove pancurses dependency
This hasn't been required in a very long time.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:26:16 +08:00
Sean Cross
af1a7f5ba5 graphics-server: first general merge of gfxlib
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:22:03 +08:00
Sean Cross
7607b0f9ee graphics-server: remove embedded-graphics from backends
Use native drawing for these platforms.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:21:06 +08:00
Sean Cross
a2fd6b0438 graphics-server: remove dependency on embedded-graphics
The graphics server will implement its own routines.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:20:19 +08:00
Sean Cross
49d3ce8a6f kernel: syscall: unify print!() messages
Use `print!()` instead of `println!()` in order to make error messages
easier to read in the debug console.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:19:28 +08:00
Sean Cross
b3d918358e kernel: syscall: don't error on unaligned memory when Hosted
When running in a Hosted environment, unaligned memory is not an error,
so don't return `BadAlignment`.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:18:50 +08:00
Sean Cross
95ab9d3c02 kernel: server: unify print messages
Don't use `println!()`, and instead prefer to use `print!()` when in the
kernel.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:17:27 +08:00
Sean Cross
20a65b88f2 kernel: server: don't Forget Borrow and MutableBorrow messages
These should be returned to the client process after the message is
done, not forgotten straightaway.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:16:52 +08:00
Sean Cross
cb2d810b38 kernel: irq: prefix pagefault message with KERNEL(pid)
This unifies this message with other kernel messages.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:16:14 +08:00
Sean Cross
04a3493550 kernel: hosted: print status adding memory to return val
When returning memory to a thread, attach memory if present.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:15:32 +08:00
Sean Cross
74b3fde198 kernel: add memory from Results to network packets
If a Result contains attached memory, add that memory on to the network
packet that gets sent by the kernel.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:14:43 +08:00
Sean Cross
702676031e kernel: hosted: run rustfmt
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:14:33 +08:00
Sean Cross
5f6b42d534 kernel: hosted: print pid of a process that exited
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:14:02 +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
6225cf11b0 cargo: sync lockfile
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-29 19:48:23 +08:00
Sean Cross
fa9a3e0954 kernel: rework hosted network protocol
This fixes issues regarding passing memory between processes.

We now properly catch `ReturnMemory` and give the memory back.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-29 19:46:17 +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
ca32e4f9c1 macros: call xous::init() at init-time
This allows for hooking things like the panic handler.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-29 19:39:34 +08:00
Sean Cross
ef33cc577f macros: use matches!() to fix build warning
This is a new feature, and Rust really wants us to use it.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-29 19:39:12 +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
0bce0eeb53 ticktimer: implement hosted version of ticktimer
This gets the basic ticktimer server working in a hosted environment.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-28 11:14:26 +08:00
Sean Cross
4334e7c23e shell: fix build for hosted
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-28 11:14:09 +08:00
Sean Cross
f9af2322f7 log-server: fix compiling for hosted builds
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-28 11:13:39 +08:00
Sean Cross
09452a5ee8 xtask: remove unused CsvFile option
We don't use csv files anymore.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-15 12:00:09 +08:00
Sean Cross
4e55967abc xtask: use renode svd instead of csv
The CSV is no longer used, because it is not in sync with the SVD
anymore. The SVD file now includes everything we need, so the CSV is
redundant.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-15 11:58:44 +08:00
Sean Cross
dfed13bd9f shell: initialize the logstr before using it
This fixes UB when accessing an uninitialized value.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-15 11:58:23 +08:00
Sean Cross
ffcccab513 emulation: add ticktimer and serial uarts
This updates renode's emulation to match the current system design.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-15 11:56:41 +08:00
bunnie
9ee43a7acc some more attempts to get log strings working... 2020-10-15 00:01:02 +08:00
bunnie
c8a2f34998 add debug output to log_string 2020-10-14 23:15:33 +08:00
bunnie
9a8c402cc2 add hosted mode bits back in 2020-10-14 23:04:54 +08:00
bunnie
6ff8c8518c Merge branch 'master' of github.com:betrusted-io/xous-core 2020-10-14 23:02:14 +08:00
bunnie
ac4d79ea68 logging server bringup 2020-10-14 23:01:57 +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
Sean Cross
30ac202e65 Merge branch 'master' of github.com:betrusted-io/xous-core into master 2020-10-14 19:25:02 +08:00
Sean Cross
797d622cc7 kernel: use connect() for some kernel tests
Now that `connect()` works, use that for some tests rather than
exclusively using `try_connect()`.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-14 19:19:01 +08:00
Sean Cross
80a003c839 kernel: syscall: implement connect()
This implements the `connect()` syscall as a blocking version of
`try_connect()`.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-14 19:18:16 +08:00