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
e4d02301ee
kernel: support pluggable debug printing
...
This allows us to support different printers in the kernel. For example,
this can be used to swap out the println!() function to print to GDB
when a debugger is attached.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-23 17:51:59 +08:00
Sean Cross
931b992063
kernel: gdb_server: return 0xff on read error
...
This seems to be rather universal.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-21 20:23:22 +08:00
Sean Cross
524df22667
kernel: riscv: ensure pages are writable when poking
...
Ensure pages of memory can be written to when we write to them. This
lets us patch program code to, for example, insert breakpoints.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-21 20:22:45 +08:00
Sean Cross
973e4601e4
kernel: don't use debug_here in CI
...
When running in CI, cause processes to panic rather than waiting for a
debugger to attach. This will ensure test failures are caught sooner
rather than later.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-21 20:05:24 +08:00
Sean Cross
4901453e3d
syscall: retor_mem: switch to client in hosted mode
...
Switch to the message client when returning memory in Hosted mode. This
properly marks a process as ready-to-run, which was otherwise not
correctly done.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-21 20:04:22 +08:00
Sean Cross
86dd38f7fa
kernel: fix hosted build
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-21 14:24:16 +08:00
Sean Cross
57b502e2c6
kernel: add gdb support to riscv
...
This adds various primitives that can be used to attach a debugger to
the kernel.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-21 14:13:01 +08:00
Sean Cross
0332959068
kernel: debug: add gdb_server support
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-21 14:12:42 +08:00
Sean Cross
f1041f6f6e
kernel: add gdbserver to Cargo.toml
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-21 14:11:26 +08:00
Sean Cross
80860f0a51
Merge remote-tracking branch 'origin/main' into debugger
2021-06-21 13:22:51 +08:00
Sean Cross
2a1aa24040
kernel: debug: add command to print processes
...
This changes the `p` command to only print processes, and renames the
existing behavior to `P` which prints processes and threads.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-18 12:56:27 +08:00
Sean Cross
9ced90190e
kernel: fix process suspension
...
This enables processes to be "suspended" by going into a Debug state.
Messages will back up and processes will continue to be scheduled around
the suspended process, while the system will continue to operate.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-18 12:55:21 +08:00
Sean Cross
13204d1714
Merge branch 'master' into debugger
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-18 10:56:30 +08:00
bunnie
96ca0eb8a1
Merge remote-tracking branch 'origin/master' into ux-refactor
2021-06-16 17:56:44 +08:00
Sean Cross
180c99aa8d
kernel: services: free servers on process termination
...
When a process is terminated, we disconnect it from all other processes.
We also need to free the slot in the server table.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-16 17:55:23 +08:00
Sean Cross
76b16579b0
kernel: syscall: remove warning in hosted mode
...
This was a function whose only purpose is useful in baremetal mode.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-16 17:54:55 +08:00
Sean Cross
62623f995c
Merge branch 'master' of github.com:betrusted-io/xous-core
2021-06-16 16:54:06 +08:00
Sean Cross
fb839f3217
wip
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-16 16:53:40 +08:00
bunnie
a70b858812
convert to using the urandom interface
2021-06-11 16:29:25 +08:00
Sean Cross
651844ba20
Merge remote-tracking branch 'origin/master' into debugger
2021-06-06 19:21:18 +08:00
Sean Cross
664bd5b26a
kernel: use git for feature/state-machine-recv-packet
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-06 11:49:37 +08:00
Sean Cross
3becfc03c5
kernel: debug: store only a single object in GDB_STATE
...
This keeps a single object in the global singleton.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-06 11:46:00 +08:00
Sean Cross
29c36c3b0f
debug: get kernel building
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-06 11:39:41 +08:00
bunnie
bbfe0fb605
Merge remote-tracking branch 'betrusted/aes' into bunnie-dev
2021-06-02 14:49:11 +08:00
bunnie
fadc9c29ab
Merge remote-tracking branch 'origin/master' into bunnie-dev
2021-06-02 03:59:25 +08:00
Sean Cross
bbda4365ae
wip commit
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-01 17:57:01 +08:00
bunnie
2f9fa57bdd
clock-gate based power management now seems to be more or less working
2021-05-31 23:14:35 +08:00
bunnie
d9e56fd321
very preliminary power savings working
2021-05-31 05:20:54 +08:00
bunnie
7c55925926
intermediate check-in on wfi
2021-05-30 23:07:16 +08:00
Sean Cross
be6e0a9895
kernel: fix thread termination and waiting
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-21 17:23:13 +08:00
Sean Cross
8d41777dc1
release 0.8.3
...
This implements the `JoinThread(tid)` syscall.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-21 16:41:13 +08:00
Sean Cross
714aff830c
kernel: implement JoinThread(tid)
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-21 16:32:38 +08:00
Sean Cross
7c2d3a2247
kernel: implement thread exit support
...
Threads now have the ability to exit. Previously this resulted in a
kernel panic.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-21 13:04:14 +08:00
Sean Cross
3b540e4e9a
xous: tag 0.8.2
...
This contains some minor modifications to the ABI.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-20 11:53:02 +08:00
Sean Cross
e616a4bf4f
kernel: fix hosted build/warnings
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-20 11:52:03 +08:00
Sean Cross
09b8242bb2
kernel: get process termination "working" on risc-v
...
This successfully allows a process to call `terminate_process(val)`.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-20 11:42:31 +08:00
Sean Cross
eb7895d601
xous: add a return code to TerminateProcess
...
As part of this refactor, make `terminate_process()` a divergent call.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-20 11:01:00 +08:00
Sean Cross
6e57fbe29b
kernel: riscv: make sure to flush mmu
...
THe MMU flushing logic got disabled due to an experiment. Re-enable it
to ensure pages are consistent when shifting them across boundaries.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-19 20:55:45 +08:00
Sean Cross
d15127fef6
kernel: run cargo fmt
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-19 14:18:46 +08:00
Sean Cross
47bf453325
kernel: riscv: use raw pointers for mmu mapping
...
This avoids using uninitialized arrays to manage the pagetables, and
instead uses raw pointers. This should avoid using potentially
uninitialized data.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-19 14:17:53 +08:00
Sean Cross
25f976dbb6
kernel: claim uart irq before we enable irqs
...
In order to prevent a race at the start, claim the IRQ before we enable
the IRQ.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-19 14:17:07 +08:00
Sean Cross
30b82b25b1
kernel: run cargo fmt
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-19 14:12:01 +08:00
Sean Cross
9a9cd25414
kernel: debug: add help screen to debug output
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 19:37:30 +08:00
Sean Cross
1b7ee904b2
kernel: print running total of memory usage size
...
Print the total of all processes in the system.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 15:09:46 +08:00
Sean Cross
7087fbe823
Cargo: add hooks to reduce binary size
...
These can be turned on if we want to reduce the size of our binaries.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 15:09:24 +08:00
Sean Cross
5bca939c37
kernel: mem: fix build on hosted mode
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 14:42:53 +08:00
Sean Cross
49904988c3
kernel: debug: add simple uart interface
...
Wire up the interrupt handler to allow printing various debug
information.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 14:37:33 +08:00
Sean Cross
1b85d8a4de
kernel: format syscalls as hex
...
This improves readability, particuarly when addresses are involved.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 14:37:33 +08:00
Sean Cross
040759af25
kernel: services: add process_name(pid)
...
Add a function to determine the name of a process.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 14:37:33 +08:00