Commit graph

10340 commits

Author SHA1 Message Date
bunnie
e8fd388ae9 add support for paged mode debugging
we have to allocate the virtual page in our process space before
we can use the debug UART.
2024-12-22 00:34:16 +08:00
bunnie
6625e45dd2 remove a debug print that causes the uart to be claimed prematurely
the uart in the shared library is claimed by the first process
that touches it, so prints in the shared library at early boot have
to be carefully configured
2024-12-22 00:33:16 +08:00
bunnie
fa067f1137 retrofit swapper so that its print function can be selected out
so that we can share app uart with other processes that need it for debug
2024-12-22 00:32:40 +08:00
bunnie
6dcb23a53b add flags for configuring uart 2024-12-22 00:32:14 +08:00
bunnie
44f50a992a add irq disabling routine 2024-12-22 00:31:54 +08:00
bunnie
c66a7c47fb another spot where the irq enable has to be moved 2024-12-22 00:31:32 +08:00
bunnie
e07ab36984 fixup IRQ handling
- disable IRQs on departure
- put EV enable outside of the HAL function
this is necessary because we need all HAL calls to be finished
before an interrupt happens to avoid locking problems
2024-12-22 00:30:27 +08:00
bunnie
b66b60497b make the app uart configurable
so processes other than swap can use it
2024-12-22 00:29:50 +08:00
bunnie
d1835f8e4b add PID reporting to console boot 2024-12-22 00:28:33 +08:00
bunnie
f7b95dc942 configure baosec for usb dev 2024-12-22 00:28:13 +08:00
bunnie
c204e4b4a3 update timestamp on imported file 2024-12-22 00:27:54 +08:00
bunnie
5ea6a349ee
Merge pull request #605 from betrusted-io/update-ipc
Update ipc
2024-12-16 19:04:54 +08:00
bunnie
3b21dc77c2 update verifier 2024-12-16 18:55:36 +08:00
bunnie
bd7d2d767a update lock file 2024-12-16 18:55:29 +08:00
bunnie
83dad63fa2 re-add the kernel publish argument
i forgot this was commented out
2024-12-16 18:55:08 +08:00
bunnie
45a8eb2227 stage tomls for version bump: try_send added to xous-ipc 2024-12-16 18:50:11 +08:00
bunnie
cb3f792f46
Merge pull request #604 from betrusted-io/cram-dev
Rewrite of USB stack
2024-12-16 18:49:00 +08:00
bunnie
370eb75ac1
Merge branch 'main' into cram-dev 2024-12-16 18:48:00 +08:00
bunnie
11ce81c6ea add frunk to the cargo lock for cramium usb 2024-12-16 18:47:17 +08:00
bunnie
e90bd02cae note that debug-print needs to be mutually exclusive
...with other crates that might want to use the application
console, e.g., the USB crate.
2024-12-16 18:03:11 +08:00
bunnie
eb7973f939 make the keyboard API more public
this allows us to access the mappings function in other crates
2024-12-16 18:02:42 +08:00
bunnie
f5cae8b975 add visibility for third-party IRQ implementation
Had to promote the visibility of a bunch of event handler
structures so we can put an IRQ handler outside of the core
USB crate.
2024-12-16 18:02:01 +08:00
bunnie
186534187e add a try_send() routine to buffers
this allows us to send memory messages from an IRQ context
2024-12-16 18:00:51 +08:00
bunnie
9a0bbbd2fb initial stab at a usb-cramium implementation
The approach here turns the usb-device crate "inside out". The
working hypothesis for the unreliability of the previous implementation
is that we try to do all the IRQ-handling in userspace, where
the operation can be pre-empted. Unfortunately, this doesn't set well
with the corigine USB hardware driver, as it assumes that it has
the full CPU attention while its state is being manipulated (and
some things must be responded to in basically real time otherwise
you get protocol inconsistencies).

In this implementation, we use the Xous subsystem to do the
API-level exchanges of information to a USB handler that, for the
most part, runs directly inside an IRQ context.

There's some trickiness in terms of sharing the hardware state
across the boundary between IRQ and userland, but most of it
got handled I think fairly cleanly in this implemnetation by
using the xous-native server queuing mechanism to shuttle data
in between the two domains. The main spot where I think panics
can creep in is in data transmission, where the Tx data is
shoved into a RefCell and then the IRQ is invoked to pull the
data from a RefCell. As long as we don't invoke the IRQ to
pull data from the RefCell while it's borrowed mutably, we should
be OK.

Wrapping the structure in a Mutex actually doesn't help here
because the IRQ context can't do a "wait" to get a lock - it
would never get it, because it's in an uninterruptable context.
Thus we skip the complexity of a Mutex and let Rust panic if
we mesesd up the data hand-off.
2024-12-16 17:56:05 +08:00
bunnie
bd3e99c606
Merge pull request #603 from betrusted-io/cram-dev
Merge cram-dev WIP to avoid branch divergence & check CI status
2024-12-12 15:09:47 +08:00
bunnie
5d35dee4f6 final i2c changes based on sim results 2024-12-11 04:05:24 +08:00
bunnie
946c0f7c4f
Merge pull request #602 from rowr111/small-updates-to-the-locales-readme
small updates to the locales readme
2024-12-10 23:53:39 +08:00
Jeanie
3f6778450b small revision 2024-12-10 23:23:45 +09:00
Jeanie
4f5f4e2a90 small updates to the locales readme 2024-12-10 23:18:42 +09:00
bunnie
4d148c9a55 check only the busy status bit for i2c to confirm command initiation 2024-12-10 18:18:15 +08:00
bunnie
90317b0adb wait for i2c commands to propagate before moving on 2024-12-10 18:06:24 +08:00
bunnie
a3ef478688 more mpw vs nto differences 2024-12-10 17:10:24 +08:00
bunnie
6e1023e5ea update comments 2024-12-10 17:05:59 +08:00
bunnie
f66bd30951 adjust timeouts for simulation 2024-12-10 17:03:52 +08:00
bunnie
5cd21f4330 add an RTL-only i2c test mode
The test is abridged because i2c is a pretty slow protocol, so we
do the bare minimum to exercise a write and a read.
2024-12-10 14:25:14 +08:00
bunnie
c8e4392a95 pass a handle to udma_global to i2c init 2024-12-06 03:33:39 +08:00
bunnie
76ffbf6e27 loader feature for mpw 2024-12-06 03:33:10 +08:00
bunnie
785826ca23 modifications to the HAL for DAR-699 2024-12-06 03:32:49 +08:00
bunnie
a5ebcf5d0f refactor reset api for UDMA
there's now unfortunately branch divergence in the NTO/MPW
code base

The methodology is to code like we're running on NTO, and
if the "mpw" feature is selected, we put hacks in to run
on MPW hardware.

Under the theory that MPW should be totally deprecated
once NTO comes out, and therefore the hacks should accumulate
in the MPW code base (and ideally be somewhat easy to cull when
the time comes).
2024-12-06 03:28:13 +08:00
bunnie
9c1d3c37c9 absorb DAR-699 (udma reset change)
Peripheral reset is now controlled by udma_global
(and actually does something, instead of being a /dev/null)
2024-12-06 03:27:25 +08:00
bunnie
7c727e026f bump release notes with some of the cramium developments 2024-12-06 02:20:57 +08:00
bunnie
a57f3f1977 rework camera main loop to be interrupt driven
this will free up some time for concurrent processing instead of
spin-waiting on new frames
2024-12-04 16:15:58 +08:00
bunnie
02b2b86184 add notes for NTO rework 2024-12-04 16:15:44 +08:00
bunnie
b8ecabedcf add more peripherals to register set 2024-12-03 01:05:50 +08:00
bunnie
05f0f96940
Merge pull request #601 from rowr111/fix-up-i18n_helper.py
Fix up i18n_helper.py
2024-12-02 22:52:00 +08:00
Jeanie
56e741207a just handle errors, no need for the unicode specific stuff.. 2024-12-02 23:30:57 +09:00
Jeanie
6f9e371754 add back cheeky comment 2024-12-02 23:18:55 +09:00
Jeanie
9995ba4852 get this script working again and handle all the decoding error issues 2024-12-02 23:17:38 +09:00
bunnie
9aecddad69
Merge pull request #600 from betrusted-io/rust-1.83-fixes
bump lockfile to track sha2 rev
2024-12-02 21:53:49 +08:00
bunnie
e522c153d2 bump lockfile to track sha2 rev 2024-12-02 21:49:46 +08:00