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
bunnie
a70b858812
convert to using the urandom interface
2021-06-11 16:29:25 +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
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
Sean Cross
1818256f5e
kernel: mem: add ram_used_by() function
...
This can be used to determine the amount of ram used by a particular
process ID.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 14:37:33 +08:00
Sean Cross
5b92dd9874
kernel: services: use exception stack for kernel interrupts
...
When the kernel is processing an interrupt, use the exception stack.
This ensures that the kernel interrupt handler can switch processes
without having its stack go away.
This is used for debug information.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 14:37:33 +08:00
Sean Cross
ce66a6bde2
kernel: riscv: add exception const to mem
...
The address of the exception page is now available for use as a standard
variable.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 14:37:33 +08:00
Sean Cross
5bd9e40ace
kernel: riscv: add print_thread_* family
...
These calls can be used to print out thread information for debugging.
This augments the existing `print_thread()` call, which has been renamed
to `print_current_thread()`.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 14:37:33 +08:00
bunnie
08a86749fe
fix hosted mode bugs
2021-05-09 01:13:16 +08:00
bunnie
c0d72c282b
increase process limit
2021-05-06 00:44:32 +08:00
bunnie
f975884f1e
increase server limit to 128
2021-05-06 00:41:27 +08:00
Sean Cross
23e759ffd8
kernel: fix multi-page lending
...
Due to several errors, multi-page lending did not work properly.
To begin with, if a page was not allocated then it would not be able to
be sent. That is, if you allocated 8192 bytes but only ever accessed the
first 4096 bytes, then an error would be encountered when lending the
unaccessed upper page.
Furthermore, due to a striding error in accessing pointers, half-pages
were treated as full pages.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-05 10:58:12 +08:00
bunnie
46fe3885dc
cleanup more turds left over during the bringup of suspend/resume
2021-05-01 00:35:32 +08:00
bunnie
48074b626b
clean up more debug messages
2021-04-30 23:33:35 +08:00
bunnie
260b154741
clean up some boot process holdovers
2021-04-30 23:28:31 +08:00
bunnie
640ddb48e8
suspend/resume now works to hardware
2021-04-30 19:29:36 +08:00
bunnie
0e2d57c9fb
retrofit the kernel and loader to handle resume
...
and now the even harder debuggening begins...zomg o_O
2021-04-30 01:55:38 +08:00
bunnie
85211bb57d
add susres server skeleton
2021-04-27 00:38:51 +08:00
bunnie
308cda1af4
remove unused sie use
2021-04-25 21:44:21 +08:00
bunnie
77c44ccb76
depracate use of SIE by storing SIM to RAM-based backing
2021-04-25 18:49:57 +08:00
bunnie
aed2325f68
fix some minor bugs in hosted mode
...
memory is not page-aligned so `if !cfg()`-out the alignment
checks in hosted mode
2021-04-09 17:31:36 +08:00
Sean Cross
e2996935cf
0.8.0: tag release
...
This bumps version numbers to 0.8.0, indicating we're nearing final
release.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-04-07 16:34:16 +08:00
Sean Cross
21a8ddd458
kernel: services: don't remap memory on intra-process lends
...
This brings intra-process lending in-line with intra-process sending,
where memory is not remapped the pointer is simply reused.
We may change this at a later point in order to further enforce the
concept of lent-memory-is-inaccessible, so do not rely in this behavior.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-04-06 09:08:03 +08:00
Sean Cross
4830f3eb2c
kernel: server: implement DestroyServer(sid)
...
This implements a syscall to shut down a server. Servers may not be shut
down if they have outstanding messages that they have seen but not
responded to.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-04-05 18:18:48 +08:00