Commit graph

556 commits

Author SHA1 Message Date
bunnie
d331d405ee bump version numbers for publication 2022-10-25 17:23:40 +08:00
bunnie
805a7d528c flip back to using remote references 2022-10-20 16:30:06 +08:00
bunnie
8e05925cfa somehow the transition to local paths got missed in the merge 2022-10-18 00:39:01 +08:00
bunnie
0584ad2f2c switch to local paths to see if this helps the build 2022-10-18 00:26:56 +08:00
bunnie
4b368d71db bump versions of crates 2022-10-15 01:31:54 +08:00
bunnie
63a87ca1bc bump all the versions 2022-10-14 16:54:43 +08:00
bunnie
ff30131f43 absorb more fixes into the kernel 2022-10-13 04:08:56 +08:00
bunnie
51752aac9d
Merge pull request #239 from Foundation-Devices/baremetal
Use CARGO_CFG_TARGET_OS in build scripts.
2022-10-12 12:56:17 -07:00
bunnie
3503965f98 bump versions to absorb xous-rs changes 2022-10-13 03:41:16 +08:00
Jean-Pierre De Jesus DIAZ
955fbc8788
xous: Use CARGO_CFG_TARGET_OS in build scripts.
This allows for a more reliable detection of target_os configuration
in build scripts. The target is inconsistent between some architectures,
notably armv7a is `armv7a-none-eabi` skipping the `unknown` (the vendor,
I guess) part. This happen with some of the unrelated Cortex-M targets
present, and others may also be.

Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2022-10-12 19:03:46 +02:00
bunnie
94aa4b62b1 forgot to bump kernel version 2022-10-10 03:09:27 +08:00
bunnie
02b80425f5 bump xous-rs to absorb change in language specification 2022-10-10 03:07:44 +08:00
bunnie
3bca9de2a0 bump version numbers for xous-kernel patch
this fixes tests in CI
2022-10-05 23:51:35 +08:00
bunnie
969f93b001 cross-repo update versions from xous-rs bump 2022-10-05 18:32:44 +08:00
bunnie
5c6dc80249 xous-rs change bumps kernel rev 2022-10-05 17:33:25 +08:00
bunnie
d699ddf998 also move utralib change into kernel, update cargo.lock 2022-10-02 02:21:27 +08:00
bunnie
df96605531 update utralib reference 2022-09-29 22:22:33 +08:00
bunnie
96300db925 add license to kernel Cargo.toml 2022-09-27 18:43:39 +08:00
bunnie
c9f3d6a3d5 bump utralib ref in kernel so it works with the renode target 2022-09-27 18:32:04 +08:00
bunnie
ab940e18db fixup warnings 2022-09-27 17:27:21 +08:00
bunnie
755556611c prep kernel for packaging
- strip out gdb-stub. Per xobs, the feature never worked, and it
depends upon a branch of a git repo which is not allowed by crates.io
Since the feature hasn't been developed, and crates.io will not
allow even an optional feature that points to a git repo, the feature
was stripped out.

- rename "kernel" to "xous-kernel", so that we can live in a crates.io
package namespace that is specific to Xous.

still have to figure out the riscv package issue.
2022-09-27 17:02:20 +08:00
bunnie
57673052bf pass the v2p dependency onto xous-rs when it's activated in the kernel 2022-09-15 19:17:00 +08:00
bunnie
ea37ce2ea1 add feature gate on v2p per xobs' request 2022-09-15 14:06:07 +08:00
bunnie
6d9848c239 add virt_to_phys syscall
this will help speed up performance profiling as we can
resolve the physical address of the performance buffer allocated
in RAM and use a USB command to read it out, instead of streaming
it over serial.
2022-09-14 18:09:13 +08:00
Sean Cross
c9d5074dd2 kernel: riscv: use pointers for pagetable entries
Instead of passing a constructed mutable ref from the pagetable entry,
pass a raw pointer and use `read_volatile()` / `write_volatile(x)` on
this pointer.

This should remove a little bit of UB from the kernel.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-30 19:46:54 +08:00
Sean Cross
426fe4b91f kernel: riscv: don't crash when mapping invalid memory
Previously, the kernel would dutifully try to map memory that was in the
kernel space. It did this by investigating the kernel memory offset,
which immediately causes a double-fault.

Check to make sure a userspace process is not trying to map kernel
memory before checking the valid page.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-30 19:45:08 +08:00
Sean Cross
dcc964c3c1 kernel: riscv: use klog for memory exception printing
Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-30 19:44:06 +08:00
Sean Cross
748d4ce87d Merge remote-tracking branch 'origin/main' into libstd-fs 2022-06-27 09:14:04 +08:00
Sean Cross
581603b205 kernel: services: fix compile error when debugging enabled
Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-26 16:45:41 +08:00
Sean Cross
08958745ba kernel: implement AdjustProcessLimit syscall
Implement the syscall to adjust a process' limit. Currently this
only supports adjusting the heap maximum and the heap size.

In order to adjust a limit, you must first present the current limit.
This can be obtained by requesting a bogus value. The current limit is
returned as part of the result.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-24 00:09:35 +08:00
bunnie
6793f9c5da return non-0 heap size in case of increaseheap of 0
this allows hosted mode to work, as it always reports a 0
heap size.
2022-06-17 02:00:52 +08:00
bunnie
7456158fa9 remove custom ditherpunk flag from kernel
we can now do per-process stack size adjustment
2022-06-16 03:39:25 +08:00
Sean Cross
c6c9a26bf9 kernel: syscall: return heap size for DecreaseHeap
Return the heap size and offset when decreasing the heap. Additionally,
return the heap size when increasing the heap by 0 bytes.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-15 12:35:34 +08:00
bunnie
c687f7dc02 add a kernel feature flag so we can adjust stack size for ditherpunk
Don't want to make the stack size adjustment across the board
because it's helpful for managing/checking bloat as it happens.
2022-06-14 17:08:32 +08:00
bunnie
e32ea4d3f5 fix #174 2022-06-10 21:36:53 +08:00
Sean Cross
a1474b3e40
Merge pull request #166 from codemaster138/patch-1
chore: fix typo in build.rs
2022-06-10 19:42:39 +08:00
bunnie
2f096c1435 remove kernel Cargo.lock file
This is no longer  used since we moved to a monorepo. This also
removes some stale dependencies.
2022-06-07 14:10:54 +08:00
bunnie
aad8391a3e remove stale crossbeam-utils entry from Cargo.lock
unused lock dependency refers to a vulnerable version of
crossbeam-utils.
2022-06-07 14:06:01 +08:00
bunnie
09a968ef09 remove debug-here dependency
this contains a dependency to `failure` two levels down that has a critical
vulnerability. Unfortunately no new versions of debug-here have been
published in a while. It's no longer used, so just stripping it out
altogether.
2022-06-07 14:00:25 +08:00
Sean Cross
8edf03a243 kernel: fix warning in hosted mode
Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-31 11:18:43 +08:00
Sean Cross
75e855cc4d hosted: fix hosted mode after CreateProcess addition
Hosted mode spawns processes very differently, and this difference was
not reflected after changes were made to native mode.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-30 13:41:05 +08:00
Sean Cross
a241d89b5b kernel: ignore "ppid unused" warning for now
Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-29 19:41:13 +08:00
Sean Cross
4250d5bb10 kernel: re-disable verbose kernel messages
Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-29 19:39:45 +08:00
Sean Cross
9aa83bbfb5 kernel: unmap child process pages after setup
Unmap the pages from the child process after we're done setting them up.
This ensures they're not still aliased by our process, despite being
marked as "owned" by the other process.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-29 19:38:22 +08:00
Sean Cross
a2e57195ba kernel: implement CreateProcess for riscv
Implement a functioning CreateProcess syscall on riscv. This call
creates a server in the child process, and connects the server to the
parent. The parent can communicate with the child process using this
server.

The Server ID is passed as four `u32` values to the entrypoint function.
This can be reassembled into something that can then be passed to the
`ReceiveMessage` syscall.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-29 18:47:37 +08:00
Sean Cross
2e69ae8a12 spawn: compiles, but does not work yet
Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-28 05:10:48 +08:00
Jake
ac8b3acbd7
chore: fix ypo in build.rs 2022-05-26 17:53:33 +02:00
Sean Cross
d8eb7be352 process: finish implementing ProcessStartup as return
We now us `ProcessStartup` as the return type. This builds in tset
mode, hosted mode, and RISC-V mode.

Process Startup is still not implemented for RISC-V mode.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-28 22:43:42 -04:00
Sean Cross
6d294c97c5 kernel: print connection count on per-process output
Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-05 15:11:47 +08:00
Sean Cross
ab512c8996 kernel: services: fix recursion warning in Process
The `Process::defualt()` implementation started getting a recursion
warning in 1.60.0.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-05 13:32:48 +08:00