Commit graph

414 commits

Author SHA1 Message Date
bunnie
232a4b6c6c bump xous version 2023-01-18 00:02:46 +08:00
bunnie
bb5d7b3adf bump versions to absorb hosted mode fix 2023-01-05 14:07:24 +08:00
bunnie
64fa83cec4
Merge pull request #290 from betrusted-io/reply-and-receive-next-syscall
Fix ReplyAndReceiveNext for hosted mode
2023-01-05 13:56:24 +08:00
Sean Cross
81351bed32 xous: syscall: support call.memory() for ReplyAndReceiveNext
Much of the hosted machinery requires the ability to access memory on
syscalls. This feature was overlooked in the previous implementation of
ReplyAndReceiveNext, which caused it to not properly return memory.

Implement the ability to call `.memory()` on ReplyAndReceiveNext
messages.

Note that this requires the use of a sentinal value in the
previously-unused `valid` field.

Signed-off-by: Sean Cross <sean@xobs.io>
2023-01-05 11:53:59 +08:00
bunnie
36398810dd bump version numbers to absorb new syscalls 2022-12-30 15:24:36 +08:00
Sean Cross
d88254b1b1 xous: add reply_and_receive_next_legacy call
This call is used to return values while simultaneously listening for
new messages.

The -legacy suffix is used to disambiguate scalar values, so we know
whether to send Scalar1, Scalar2, or Scalar5 messages.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-12-29 21:00:35 +08:00
Sean Cross
64c88f9942 xous: add Message type
This type actually contains the message contents, and will be used to
return data to the caller.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-12-29 21:00:05 +08:00
Sean Cross
d463f9563f xous: rename Message to MessageEnvelope
This reflects the fact that up until now, the `Message` struct has
merely been the envelope that surrounds the message. It does not contain
any actual Message contents.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-12-29 20:58:51 +08:00
Sean Cross
be56af6303 xous: add wrapper for reply_and_receive_next
This wrapper enables userspace programs to use the new
ReplyAndReceiveNext syscall easily.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-12-29 16:26:37 +08:00
Sean Cross
36e6e6c30b xous: syscall: add ReplyAndReceiveNext call
Signed-off-by: Sean Cross <sean@xobs.io>
2022-12-29 16:26:34 +08:00
bunnie
5370ce396d bump all revs due to SoC artifact update 2022-12-12 16:07:20 +08:00
bunnie
1d1b3a35b7 commit version bump 2022-11-26 10:00:44 +08:00
bunnie
aa9977cc58 bump all the things because we changed utralib again 2022-11-17 22:13:40 +08:00
bunnie
dabbfd6c35 bump all the things to absorb the SoC change 2022-11-17 19:39:18 +08:00
bunnie
30583bdf07 bump versions with xous change 2022-11-06 03:48:12 +08:00
Sean Cross
c9f751f5f0 xous: add api support for scalar5
With the addition of scalar5, existing api calls must be updated to take
advantage of it. This will allow `send_message()` to return a `scalar5`.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-11-05 18:44:01 +08:00
Sean Cross
c8bb039c41 xous: add api support for Scalar5
Add syscall and return definitions for Scalar5, as well as
ReturnScalar5. This will enable us to pass up to five scalars as a
return from a blockingscalar call.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-11-05 18:39:06 +08:00
bunnie
ba28dd8795 bump to absorb utralib straggler configs 2022-10-28 15:11:17 +08:00
bunnie
dfb10ed7f2 bump crate numbers to publish lang-fr change into xous-rs 2022-10-28 14:01:09 +08:00
bunnie
0ee9ec1d80 bump version numbers for crate publication 2022-10-25 22:38:58 +08:00
Jean-Pierre De Jesus DIAZ
f5176ea380
Remove xous-rs unused features
The rationale is that xous-rs should have only architecture
specific code, e.g.: riscv, arm, x86, etc. To make other
crates that depend on it not specify the features.

This could be useful when using xous-rs with `libstd`
for example.

Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2022-10-25 13:29:15 +02:00
Jean-Pierre De Jesus DIAZ
14b92dede4
Remove baremetal cfg detection in build script
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2022-10-25 13:24:59 +02:00
bunnie
d331d405ee bump version numbers for publication 2022-10-25 17:23:40 +08:00
Sean Cross
6066619906 xous-rs: use target_os and target_arch cfgs
Look at `target_os` to determine whether to enter "hosted" mode or not.
If `target_os` is "xous", then the Xous standard library should default
to using builtin Rust libstd features.

If it is "xous", then we should instead use our arch-specific
implementations.

This enables third-party programs to directly use the `xous` crate
without specifying feature flags.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-10-25 15:50:53 +08:00
bunnie
9c4a39066d rollback the cache clear instruction in the asm entry
this causes instability when present with the older vex core.
2022-10-20 04:20:59 +08:00
bunnie
7b0f30c318 add Charles' flush command + recommended nops
the Vex has a custom flush instruction, after contacting
charles he recommends maybe adding some nops to make sure it
completes (maybe hardware bug? unclear. we're about to find out.)
2022-10-19 23:42:43 +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
966cdef65f remove warning 2022-10-13 04:03:08 +08:00
bunnie
64b942f3b4 fix errors is the test module from PR#238 2022-10-13 04:01:43 +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
bunnie
84bdfa1d2f fix some escapes from #237/#238 due to xous-rs being on crates.io 2022-10-13 03:29:46 +08:00
bunnie
be239f9812
Merge pull request #238 from Foundation-Devices/from-into
Implement From instead of Into.
2022-10-12 11:49:19 -07: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
Jean-Pierre De Jesus DIAZ
3cbcf7b7e4
xous-rs: Implement Display instead of Into
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2022-10-12 15:39:02 +02:00
Jean-Pierre De Jesus DIAZ
c74d54f345
xous-rs: Implement From instead of Into
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2022-10-12 15:38:44 +02: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
32e3cf588f bump xous-rs to 0.9.11 to absorb feature flags into the kernel API 2022-10-05 18:26:58 +08:00
bunnie
0ae89626fe add default for crates 2022-10-05 17:20:26 +08:00
bunnie
644a52e784 defaults for cargo packaging 2022-10-05 17:18:54 +08:00
bunnie
586f2bddf6 bump xous-rs version to absorb feature flag changes from utralib 2022-10-05 17:15:28 +08:00
bunnie
4e40ae6c5d move from target selectors to feature selectors for back-ends
This will allow for e.g. xous on riscv32-imac but not a precursor
target, for example: by using feature selectors we get to have
a bigger range of targets that we support, such as for implementations
that haven't been upstreamed or have official target-triples.

The downsides are:

- patch override libraries don't absorb feature flags. so, for
example, the AES crate that is used to patch other crates won't
be aware of the target features without modifying the referencing
crates.

- features are normally meant to be additive, but target features
are mutually exclusive. The mutex is enforced by a check in
utralib that throws a panic on build if two targets are accidentally
selected at the same time.
2022-10-02 02:56:44 +08:00
bunnie
147d55bdf8 bump xous-rs version 2022-09-26 11:08:22 +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
bunnie
d3337bdaba make constant naming consistent (prefix indicates the address space offset) 2022-07-13 04:36:17 +08:00