Commit graph

230 commits

Author SHA1 Message Date
bunnie
9cfffb18e9 some minor fixes to the console debug system to make it more consistent
there is still some mysterious problem involving a race condition
of the raw hardware console UART Rx path deciding it doesn't want
to report new characters anymore to the interrupt handler that
is triggered when multi-byte sequences are shoved down the
pipe. So long as you're typing simple commands it's fine, but
escape sequences tend to lock things up. I don't think there's
enough ROI to continue investigating this facility.
2022-01-28 03:36:14 +08:00
bunnie
4c4ca1577f fix connection manager state machine
seems to work a lot better, but needs a lot more testing
2022-01-27 03:56:39 +08:00
bunnie
994e3d7cfb refactor llio crate (phase 1): organize files into sub-systems 2022-01-11 12:02:27 +08:00
bunnie
b3788a54af clarify the dependency policy 2022-01-10 16:50:10 +08:00
bunnie
995915ed4e nail down a couple more dependencies, and add a policy note to Cargo.toml
Each Cargo.toml now includes a comment which remnids maintainers
of the dependency policy for Xous (that is, nail down every dependency
to the minor number).
2022-01-10 15:54:27 +08:00
bunnie
dd943c5416 pin down versions and harmonize versions across servers
Versions are pinned down to the minor number. Yes, this means that
we don't automatically pull in features and bug updates from crates.io,
but it also means we don't pull in new attack surfaces and code that
hasn't been tested or reviewed. I'd like this process to be very deliberate
and not automatic for Xous.

The `rand` crate is almost pinned down to a single version, except
for an odd dependency that's pulled in by hosted mode that depends
on rand 0.8.4 via a subordinate dependency via the `tempfile` crate.
Pondering if it's worth it to try and eliminate that, because the
0.8.4 version doesn't get compiled into any version that touches
real hardware. It just makes it harder to analyze the Cargo.lock
file, mostly. I think I'll leave it as-is.
2022-01-10 15:39:55 +08:00
bunnie
c5fe1bc99b add sequencing to suspend/resume order of operations
this is necessary because we want to make sure that the SPINOR
service does not shut down before the PDDB service finishes syncing
its disks.
2022-01-10 13:45:56 +08:00
bunnie
489a26dd11 fix an issue where we don't decrement the connection counter on drop 2022-01-05 20:01:54 +08:00
bunnie
c2c919ba81 add oqc test service
this works around the problem with stdlib allocator not
working quite correctly in spawned threads.
2021-09-18 02:22:35 +08:00
bunnie
8edb02ba40 try a version using scalars, still crashes 2021-09-15 18:29:27 +08:00
bunnie
8ce0e8c789 intermediate checkpoint of failing memory-passing for keyrawstates 2021-09-15 17:59:13 +08:00
bunnie
ccbe7c479f improve braille testing flags, make them more consistent
i wonder if there isn't a workspace-level way to flip a flag...
2021-09-07 19:11:54 +08:00
bunnie
4c05ee2fe6 patch to fix backspace on console injection 2021-08-29 13:28:06 +08:00
bunnie
f5b69a8cef fix hosted mode 2021-08-24 23:34:33 +08:00
bunnie
47fef3c2d0 clean out debug messages and scaffolding 2021-08-24 01:48:30 +08:00
bunnie
80cae0d446 intermediate progress on issue #74
still not fixed, but things are leaned up.
2021-08-23 05:12:21 +08:00
bunnie
cf747f2844 fix keyboard repeat; accidentally eliminated it during power optimizations 2021-08-22 18:52:33 +08:00
bunnie
5df8275c00 major refactor of the keyboard server
This one gets rid of a ton of awful, crufty code that was pre-std.
It also removes the following features:

- raw scancode reporting: nobody uses them, and they've never been tested.
They can be added in later if someone wants to e.g. build a MAME emulator.
- multi-listener: there is no good reason to do this on a secure system.
multi-listener is basically a keyboard logger. It's better if we just
control it to a single keyboard listener.
2021-08-22 17:13:36 +08:00
bunnie
8b83fb7c65 remove heapless, go to libstd for all collections!!!!
*fistpump*
2021-08-04 01:25:32 +08:00
Sean Cross
b86e0a65cd services: recognize xous as a hardware OS
Support `xous` as a valid OS. This allows us to build the entire kernel
under this target.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-02 18:11:48 +08:00
bunnie
7cd8b4107a clear keyboard state vectors on resume
if any keys were pressed in the middle of a suspend...

probably, the user didn't care to have them still pressed on resume!
2021-07-13 23:10:10 +08:00
bunnie
c0d4cbe81d make the menu object more generic; demo with emoji selection 2021-06-19 04:44:21 +08:00
bunnie
2b5ba61552 add some useful messages on boot for the hosted mode users 2021-06-19 01:05:42 +08:00
bunnie
3664ff6718 clean up keyboard event handling so the GAM is the gateway server
this allows the GAM to handle authentication for listening requests.
2021-06-17 01:12:25 +08:00
bunnie
eee9f4e765 refactor xous-names to permit only a fixed number of connections
this prevents less trusted processes from connecting to servers
after the kernel initializations are done.

this works so long as we don't have disconnects from the kernel
servers. In order to support disconnects we will also need a
way to re-enumerate the SID to guarantee that we don't have a re-use
problem. But for now, the kernel is not designed with any practical
disconnect mechanism; there is no code that calls the Quit mechanism
on any server.
2021-06-15 17:41:14 +08:00
bunnie
fadc9c29ab Merge remote-tracking branch 'origin/master' into bunnie-dev 2021-06-02 03:59:25 +08:00
bunnie
61f95363fd mark a commit for the latest build submitted for testing 2021-06-01 15:33:48 +08:00
bunnie
3c0e951803 woo i have a dvorak layout now. 2021-05-29 02:28:54 +08:00
bunnie
30aa794f30 add reference counting on connections between servers
the connection number is re-used for all objects created
within a process space, so you can't `Drop` the connection
immediately when an object goes out of scope. You have to
make sure all instance of the object go out of scope. This
patch adds reference counting to all the objects so that
the `Drop` function works as intended.
2021-05-21 16:24:30 +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
bunnie
391122823d refactor heapless version in attempt to debug issue that cropped up in xous-names
somehow, updating the toolchain has broken the FnvIndexMap implementation
2021-05-08 18:44:23 +08:00
bunnie
b17753ce8b retrofit the rest of the servers for suspend/resume
we can now do suspend/resume in the xous chat!
2021-05-02 01:38:44 +08:00
bunnie
087bb39ea7 chase down some bugs
noted there is a heisenbug on the ticktimer, it only manifests
when the log level is at info. go figure!
2021-05-01 02:26:28 +08:00
bunnie
809f0445e1 add vibe command 2021-04-16 19:27:48 +08:00
bunnie
fc4ae9851f revert braille-specific debug config 2021-04-16 18:57:34 +08:00
bunnie
0ef50b178f basic chording is working 2021-04-16 18:01:48 +08:00
bunnie
d807098ed1 more mods for the braille branch 2021-04-16 05:34:08 +08:00
bunnie
ac40075140 add keyboard input via UART 2021-04-16 04:11:25 +08:00
bunnie
84853c696a drop message should be non-blocking 2021-04-09 18:53:41 +08:00
bunnie
2916eb3775 relocate the destroy callback call to after the server exits 2021-04-09 18:51:43 +08:00
bunnie
b9162fda3d gettin' there! major modules now mostly working under v0.8 2021-04-06 19:32:35 +08:00
bunnie
9ba2fb134c refactor most major modules, but Xous now crashes 2021-04-05 23:50:00 +08:00
bunnie
9cc94d05ec cleanup warnings 2021-04-04 21:25:26 +08:00
bunnie
44899d073e clean up some efforts to fix log trace level 2021-04-04 18:25:53 +08:00
bunnie
9416e9dbe0 turn off trace on keyboard 2021-04-04 18:23:49 +08:00
bunnie
6d4916972b keyboard refactor now working 2021-04-04 18:23:26 +08:00
bunnie
da7ace04d4 rebuild and prep for testing on hardware 2021-04-04 02:15:46 +08:00
bunnie
bd54b48f8f initial cut of a major refactor of the keyboard server
- debounce is now in hardware (requires latest version of betrusted-soc)
- key events originate from an interrupt context and propagate through
  to the listeners as messages
- attempt to reduce the use of heapless::Vec; there is an awkward
interposer step still between the array methodology and the Vec
methodology

I'm not sure if trying to eliminate the Vec is a good idea,
because...I'm finding that we're just re-implementing Vec, but
much worse.

However, for the purpose of movement of data across
IPC boundaries, it's more robust to use primitive types,
because serializing Vec is not possible without either
forking the heapless crate to derive the rkyv traits; or, we'd
have to do some probably quite dangerous conversion of the Vec
to a raw slice which also doesn't feel nice.
2021-04-04 01:42:30 +08:00
bunnie
470b5c6440 finalize API refactor for xous-names 2021-03-30 02:13:23 +08:00
bunnie
f35d478cf0 attempt to refactor xous_names 2021-03-29 04:35:11 +08:00
bunnie
e889765caf refactor the Ticktimer API. 2021-03-28 18:14:41 +08:00
Sean Cross
fdce58d06e ipc: convert project to use xous-ipc
This rewrites the entire project so that most runnable projects now use
`xous-ipc` instead of `xous::String` where possible.

This also removes `rkyv` from the list of dependencies in `xous-rs`.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-26 20:22:33 +08:00
bunnie
d68e3e8cf4 an attempt to refactor to rkyv 0.4.1
unfortunately, it looks like deserialize requires an alloc??
2021-03-16 02:02:53 +08:00
bunnie
63159e50db wire up some function keys in hosted mode, add some fun glyphs for testing 2021-03-10 01:58:38 +08:00
bunnie
c9e82c427e fix a bunch of minor bugs 2021-03-08 05:12:26 +08:00
bunnie
e62256b3df clean up hosted mode warnings 2021-03-03 22:50:46 +08:00
bunnie
d1609d2a31 another commit checkpoint. somehow, i have a race condition now. 2021-03-01 15:08:08 +08:00
bunnie
70aa5b792b check in for inspection 2021-03-01 14:40:39 +08:00
bunnie
0c20f1dac1 add a test character for hanzi plane 2021-02-27 15:53:10 +08:00
bunnie
2795dc4d8a creepy Heapless bug cropping up again...this time u32s aren't being stored right 2021-02-27 15:52:40 +08:00
bunnie
c5e6391e22 remove mention of Sendable and the ipc.rs module 2021-02-18 02:01:11 +08:00
bunnie
0af72ffb6d clean up Sendable references and warnings 2021-02-17 23:29:20 +08:00
Sean Cross
6ecc25b7e0 services: keyboard: fix build warnings in lib
Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-17 20:52:44 +08:00
bunnie
b77827f2ed fix data type for hosted mode 2021-02-17 16:58:46 +08:00
bunnie
8646662804 commit checkpoint for xobs 2021-02-17 16:10:05 +08:00
bunnie
2b003f8a7d intermediate checkin 2021-02-16 00:28:44 +08:00
bunnie
07b3dd9afa add PID printout to every service as it starts 2021-02-15 19:16:21 +08:00
bunnie
af012c48dc getting a little further with the port, but still crashing on a borrow message 2021-02-15 04:42:30 +08:00
Sean Cross
7d40c749f0 keyboard: remove internal xous_names API
This API is now private.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-10 15:13:25 +08:00
bunnie
0115f0f656 the great usize extinction event continues: keyboard
btw this is to eliminate "usize" primarily in `structs` that
are `repr(C)`. usize is ok in most other places.
2021-01-22 00:36:24 +08:00
bunnie
cc66c3911a starting to lay out initial framework for the graphical abstraction manager (GAM) 2021-01-17 04:02:08 +08:00
bunnie
72b8d6a3de add keyboard input emulation in hosted mode 2021-01-13 23:17:09 +08:00
bunnie
8a1991876f add basic TRNG service 2021-01-13 15:04:14 +08:00
bunnie
2eafe825b8 refactor COM to use generic name registrations for event listeners 2021-01-12 18:44:02 +08:00
bunnie
cd4ea5ed17 make the run variant not break 2021-01-12 04:20:37 +08:00
bunnie
426c747f8f keyboard server basics seem working 2021-01-12 04:13:15 +08:00
bunnie
5cad631569 now it works! changing usize -> u8 did the trick. don't know why. spooky. 2021-01-12 02:08:20 +08:00
bunnie
6a3833ebc7 commit of mysterious tuple-vec problem 2021-01-12 01:37:52 +08:00
bunnie
aeadbfb1b5 fix up keyboard API to use scalars, add demo connection
also fix a bunch of other idiomatic weirdnesses
2021-01-12 00:00:57 +08:00
bunnie
f166073954 first draft of keyboard server 2021-01-11 06:11:15 +08:00