Commit graph

33 commits

Author SHA1 Message Date
bunnie
4ef581a266 riddled with race conditions, but...sort of works 2021-01-08 05:20:53 +08:00
bunnie
b7263f7ef0 Merge remote-tracking branch 'origin/master' into hardware 2021-01-04 03:19:23 +08:00
bunnie
63234411e2 get fcc test working 2021-01-02 03:04:28 +08:00
bunnie
3ceb41208c checkpoint: problems with pds send line (borrowed memory) 2021-01-01 03:44:42 +08:00
Sean Cross
c9cb50b579 kernel: use crossbeam-channel internally
This provides better performance than MPSC.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-12-30 16:50:28 +08:00
bunnie
19a7a9ce98 get threaded version of COM handler working 2020-11-27 01:32:10 +08:00
bunnie
99d8f2a525 version with threads compiles, but doesn't work yet 2020-11-27 00:35:29 +08:00
bunnie
1aa01fdf5d confirm sleep works, some minor fixup to UTRA style usage 2020-11-23 19:02:02 +08:00
Sean Cross
6041269033 kernel: Cargo: minor spacing reformat
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 17:14:39 +08:00
bunnie
2d5bd20c16 bouncing ball "招财猫"-like totem now working 2020-11-23 03:18:43 +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
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
d0d687a239 utra: fix build on non-hardware release
This adds svd2utra, which enables building for non-embedded harware.

It also fixes some build issues, and paves the way for generating UTRA
at compile-time.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-05 10:13:51 +08:00
bunnie
711e5ea910 slot in utra references 2020-10-02 04:52:03 +08:00
bunnie
5deeebae3b the loader seems to be working now. 2020-09-26 00:03:46 +08:00
Sean Cross
750f05c322 kernel: cargo: add print-panics feature
With this feature enabled, the kernel will claim a UART and print panics
when they occur.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-30 00:33:30 +08:00
Sean Cross
0ca7fe6f12 kernel/loader: fix build arguments
Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-18 12:10:46 +08:00
Sean Cross
8920ab57cf xtask: remove loader, kernel from workspace to fix rebuilds
These packages modify RUSTFLAGS, which causes some packages to be
rebuilt every time. Move them out of the workspace so as to ensure they
don't use the same `target` directory.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-18 10:51:29 +08:00
Sean Cross
bb17038bfe kernel: rename "xous" to "xous-kernel" in import
Cargo appears to cache packages in the workspace when multiple packages
use the same crate. Unfortunately, Xous uses different features
depending on whether it's running in the kernel or in userspace.

Pull the kernel version of "xous" in under a different namespace in
order to force it to use a different build.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-17 18:37:40 +08:00
Sean Cross
49083081c3 xous: replace processes-as-threads with baremetal check
This gets it working on baremetal, and keeps processes-as-threads
available for running in hosted mode.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-06 23:25:28 +08:00
Sean Cross
bd99f33761 kernel: move debug-here to windows,unix
This uses lazy_static, which only works on libstd.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-06 23:08:03 +08:00
Sean Cross
21aa67b748 workspace: remove workspace
The kernel and userspace both need to use `xous`, but have different
requirements. If we use a workspace, then all instances of `xous-rs`
must have the same feature set.

This breaks them apart so the kernel can have one set of features and
programs can have another set.

As part of this change, tests are now integrated into the kernel, and a
new `create_process_as_thread()` and `wait_process_as_thread()` function
pair have been added.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-08-02 16:11:12 +08:00
Sean Cross
039975323e tests: add tests package
This package serves only to build tests for the kernel, because the
kernel wants to use a different mechanism for spawning processes.

Cargo doesn't support having `#[cfg(test)]` attributes on modules in
order to allow conditional compilation depending on whether we're
running a test or not. To work around this, `main.rs` is included in
another dummy crate.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-29 21:18:30 +08:00
Sean Cross
e7e8a2b748 kernel: get initial hosted non-test processes working
This now has the ability to fork off processes.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-29 17:52:01 +08:00
Sean Cross
19222c34a9 kernel: get shutdown and multi-clients working
THis now has proper authentication for tests.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-28 13:28:14 +08:00
Sean Cross
bf15ac08f4 kernel: tests: add memory measurement to test suite
This adds a feature to enable memory measurement, so we can determine if
we're leaking memory anywhere.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-07-15 17:08:05 +08:00
Sean Cross
723529ba20 wip: working on getting message passing working
The goal is to get a basic message passing engine working that will also
function as a device that works on real hardware.

This is still reworking it to function correctly on a desktop system.
Once that is working, it will be reworked to function once again on
hardware.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-15 18:13:10 +08:00
Sean Cross
17ae34a1c1 kernel: begin actor refactor
This refactors the kernel so that it *can* run on baremetal, but it can
also run as part of a full system.

This will aid in developing, and ensure that a minimum amount of unsafe
code is present within the kernel.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-03 15:34:55 +08:00
Sean Cross
bdb8eac9ad MemoryRange: move to using this struct for memory ranges
This is a combination of MemoryAddress and MemorySize.  This is
guaranteed to be not null.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-01 10:28:36 +08:00
Sean Cross
022bedc8e3 kernel: refactor processes to support banking
We now have a concept of context banking.  When an interrupt fires, the
process context is banked.

As part of this, process-level data is now stored in the page within the
process itself.  This reduces memory consumption and allows us to have
features such as a hash within each process itself.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-16 18:22:59 +08:00
Sean Cross
fcdc0da19f kernel: use upstream riscv crate
Now that this is published upstream, we can remove our dependency on a
particular git version.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-16 08:42:32 +08:00
Sean Cross
09890a2ca3 riscv: use upstream riscv module
Still pulling from git, as the version number hasn't been bumped yet.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-11 17:49:03 +08:00
Sean Cross
f50ec67553 initial commit
This pulls together many disparate repositories into one xous-core
repository.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 12:13:05 +08:00