Sean Cross
ac321be7e9
xous: implement send_message()
...
This fixes `send_message()` so it works as expected.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-14 11:18:02 +08:00
Sean Cross
54a8de2776
kernel: fix return_scalar and return_scalar2
...
These didn't correctly set the thread status in the server when
returning a value. Instead of marking a server as runnable, it remained
in an idle state.
This correctly sets the thread status in the server, and resumes the
client.
This has been tested in Renode as well as using `cargo test`.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-14 11:16:21 +08:00
Sean Cross
ecd2d00f47
kernel: fix return_scalar2
...
This call did not work, because it wasn't properly returning control to
the parent process.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-14 10:54:23 +08:00
Sean Cross
61fdd5be15
kernel: hosted: add current_tid() to Process
...
This allows us to mock the current TID for debugging purposes on hosted
environments.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-14 10:54:19 +08:00
Sean Cross
e5100bcb33
kernel: syscall: implement SendMessage
...
SendMessage is a blocking version of TrySendMessage, except this call
will block if the server queue is full.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-14 10:14:43 +08:00
Sean Cross
0c344efb60
kernel: syscall: move do_yield() to its own function
...
This will allow us to call `Yield` for other operations that need to be
blocking.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-14 10:14:43 +08:00
Sean Cross
585e55e8b7
kernel: implement retry_instruction()
...
This function is used to decrement the program counter to re-run a given
instruction. This can be used as a cheap way to implement blocking
calls.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-14 10:04:36 +08:00
Sean Cross
a0a90cc3ab
emulation: rename example.svd to renode.svd
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-14 10:04:20 +08:00
Sean Cross
39c7dced01
kernel: services: switch address space prior to passing messages
...
Switch address spaces to pass messages to the new process, and switch
backafterwards.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-13 22:54:43 +08:00
Sean Cross
53f1b3c416
kernel: main: make utralib incusion conditional
...
Only include utralib when running on baremetal.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-13 22:54:12 +08:00
Sean Cross
bb0db65e58
utralib: fix build dependency on svd file
...
Previously, the svd file was treated as an environment variable to
watch. Naturally this never changed, so an updated svd file never
triggered a rebuild.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-13 08:32:39 +08:00
Sean Cross
5e4c702c02
xtask: fix renode build
...
This properly sets the environment variable required for UTRA.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-12 22:25:55 +08:00
bunnie
2fdc83b588
convert to UTRA abstraction
2020-10-12 17:26:34 +08:00
bunnie
fc02a3e4e1
add 32-bit field width option
2020-10-12 16:54:03 +08:00
bunnie
d36a2f2327
tweak API for better/unambiguous path resolution in page allocations
2020-10-12 04:12:21 +08:00
bunnie
9a50de8b4e
refactor: utra -> utralib naming
...
this cleans up some namespace issues when including
the utra crate which also refers to utra::generated::utra,
and there are CONST at the crate-level, and also functions
at the module-level which need disambiguation. By naming
the crate utra-lib this saves a bit of syntatic wrangling
at the top of every file.
2020-10-12 03:56:10 +08:00
bunnie
cb6fcb60e8
add doc pointer
2020-10-12 03:25:11 +08:00
bunnie
49db984000
add code to render sleep screen bitmap
2020-10-12 03:23:15 +08:00
bunnie
e414c87414
add doc notes on the UTRA
2020-10-12 03:21:20 +08:00
bunnie
27d061fae2
Merge remote-tracking branch 'betrusted/master' into dvt-hardware
2020-10-11 16:08:39 +08:00
bunnie
6ce2c50c02
add static sleep screen
2020-10-11 15:42:57 +08:00
Sean Cross
2c5ef03a09
cargo: re-enable fat lto mode for whole project
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-11 09:16:46 +08:00
Sean Cross
5687dcc292
loader: enable fat lto mode
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-11 09:16:16 +08:00
Sean Cross
28f5f79b7d
kernel: re-enable fat lto
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-11 09:15:49 +08:00
Sean Cross
fb027c569b
kernel: lock: add new dependencies for utra
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-11 09:15:45 +08:00
Sean Cross
6a872151b2
cargo: commit lockfile including anyhow
...
This is used by `svd2utra`.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-11 09:08:53 +08:00
Sean Cross
4847469f03
svd2utra: implement svd2utra command
...
This now has proper command line handling.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-11 09:08:30 +08:00
Sean Cross
c04b23ec67
utra: remove example rust file
...
This isn't used anymore, and can be regenerated from the file in
`examples`.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-11 09:07:40 +08:00
Sean Cross
ad19337760
generate: impl Error for ParseError
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-11 09:04:53 +08:00
Sean Cross
3590fa3d4b
svd2utra: wire up tests
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-11 08:24:56 +08:00
bunnie
a397981355
change references to "ci" to "hw-image"
2020-10-06 00:57:26 +08:00
bunnie
7dc011e6d8
make build process a bit more transparent
...
- print help messages when running svd2utra from command line for
development
- do not allow utra to silently fall back to a default if one
has not been specified in the environment
2020-10-06 00:48:34 +08:00
bunnie
c5d8ccc67c
update the example.rs file with the latest run
2020-10-06 00:35:42 +08:00
bunnie
9417984752
add a buildpush script, instead of a package script
...
packaging is now done by the `ci` command
2020-10-06 00:35:13 +08:00
bunnie
d55fc0fc26
commit last changes to package-xous so we can nuke it
2020-10-06 00:34:56 +08:00
bunnie
16b3d78feb
add interrupt generation to svd2utra
2020-10-06 00:34:18 +08:00
Sean Cross
53b4918c54
xtask: create ci command that builds xous.img
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-05 12:25:32 +08:00
Sean Cross
eb97fcf9fb
xtask: add ci command
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-05 11:59:48 +08:00
Sean Cross
a3f6e6ea48
cargo: add svd2utra to lockfile
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-05 11:38:31 +08:00
Sean Cross
dd3e646a46
utra: mark entire library as no_std
...
This library should be usable with embedded projects.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-05 11:38:11 +08:00
Sean Cross
96df91f53b
create-image: support generating an image from an svd
...
Now that we can parse svd files, support creating an image using an svd
instead of a csv file.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-05 11:37:44 +08:00
Sean Cross
e9d9315418
svd2utra: mark base field as pub
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-05 11:37:18 +08:00
Sean Cross
da50dffa94
sv2utra: fix no_std attribute generation
...
We only need `no_std` when building for embedded platforms, and it no
longer goes inside the library file.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-05 11:27:47 +08:00
Sean Cross
422789eda7
svd2utra: make svd parsing public
...
This will be useful when replacing `csr.csv` with the svd file.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-05 10:57:01 +08:00
Sean Cross
30abc1413a
utra: move example.svd to emulation
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-05 10:52:43 +08:00
Sean Cross
9140482a6b
lock: add missing lockfiles
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-05 10:52:26 +08:00
Sean Cross
bcbfec466e
utra: add real package in
...
This does not use a submodule.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-05 10:40:29 +08:00
Sean Cross
d3d055ff4b
utra: really remove submodule
...
Git submodules are hard and weird.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-05 10:39:44 +08:00
Sean Cross
453e934ffd
utra: remove submodule
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-05 10:37:59 +08:00
Sean Cross
2691d67e30
gitignore: don't ignore utra anymore
...
This is now generated based on environment variables.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-05 10:35:42 +08:00