Commit graph

21 commits

Author SHA1 Message Date
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
9f3647f3a3 have audio off by default on power-on to save power 2021-06-01 00:44:33 +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
08a86749fe fix hosted mode bugs 2021-05-09 01:13:16 +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
15fc4a6c36 audio working, trying out longer samples 2021-05-08 03:14:14 +08:00
bunnie
fe6b417643 checkpoint 2021-05-08 01:13:30 +08:00
bunnie
b3a60faec2 audio checkpoint 2021-05-07 15:09:51 +08:00
bunnie
7dd66a4c18 playback is mostly working and stable 2021-05-07 05:42:39 +08:00
bunnie
adc7f8e98d cleanup the i2c API
condense async/sync methods into a single one and decide which
is which based upon the presence of an Option<callback>
2021-05-06 14:03:06 +08:00
bunnie
bc82dbd157 transition i2c api on codec, finally found the damn race condition 2021-05-06 05:05:17 +08:00
bunnie
b596c40dd6 refactor I2C to have work queue, cleaner (but untested) APIs 2021-05-06 03:40:04 +08:00
bunnie
bb5bc1d212 refactor i2c to break out the i2c machine to a separate server
the concurrency issues on I2C are getting hairy, and it was probably a
dubious decision from the start to merge I2C into the LLIO block; but
originally this was motivated by the idea of keeping all the
"miscellaneous slow stuff" in one process to keep the memory footprint
small and make code a bit more readable.

Keeping I2C in the same process space as the LLIO but splitting it
into its own thread and server splits the difference, by giving us
more options to deal with the concurrency, without inflating the size
of the kernel binary and allocating a lot of extra static data.
2021-05-06 00:45:14 +08:00
bunnie
d17ae106f1 kernel panic on memory lend 2021-05-05 00:58:48 +08:00
bunnie
7a7e77d346 intermediate checkin, taking a break 2021-05-04 19:08:56 +08:00
bunnie
61611caddd some general ideas to debug later 2021-05-04 02:47:03 +08:00
bunnie
f8979d6341 intermediate progress on audio. doesn't compile. 2021-05-04 02:22:35 +08:00
bunnie
50174f99e5 re-org the codec crate so that it can accommodate gnarly backends
This is in anticipation of:

1) supply chain issues causing CODEC chips to change out
2) host integration being a PITA
2021-05-03 00:31:05 +08:00
bunnie
f558f75116 add the skeleton for the codec server 2021-05-03 00:20:51 +08:00