Commit graph

10340 commits

Author SHA1 Message Date
bunnie
0f935a9a75 cram-console: use platform-neutral ux-api instead of graphics-server 2025-02-21 17:49:29 +08:00
bunnie
c8d00e890b ime-frontend: use platform-neutral ux-api instead of graphics-server 2025-02-21 17:49:13 +08:00
bunnie
5864d0fbeb ime-plugin-api: use platform-neutral ux-api instead of graphics-server 2025-02-21 17:48:59 +08:00
bunnie
ac673425da root-keys: use platform-neutral ux-api instead of graphics-server 2025-02-21 17:48:48 +08:00
bunnie
9cbe4a9721 shellchat: use platform-neutral ux-api instead of graphics-server 2025-02-21 17:48:38 +08:00
bunnie
931cf8f945 status: use platform-neutral ux-api instead of graphics-server 2025-02-21 17:47:53 +08:00
bunnie
8cdce12efc refactor gam to point to ux-api for graphics primitives 2025-02-21 17:47:32 +08:00
bunnie
813b72c863 refactor graphics-server to use ux-api for the "lib" layer
graphics-server now becomes just one possible implementation
of the API layer
2025-02-21 17:47:02 +08:00
bunnie
efb627bf4f remove slice size specifier from blitstr2
this makes the api portable
2025-02-21 17:46:28 +08:00
bunnie
0770d5437f bring chat lib up to date with new ux-api layer 2025-02-21 17:46:11 +08:00
bunnie
e27f468acd adjust native pixel api change in loader 2025-02-21 17:45:47 +08:00
bunnie
27e4b77792 cleanup compile warning in cramium-api 2025-02-21 17:45:27 +08:00
bunnie
19f3221417 final changes to make ux-api platform-independent 2025-02-21 17:44:54 +08:00
bunnie
30c5876ad4 add missing apis/derives to minigfx to make it precursor-compatible 2025-02-21 17:43:50 +08:00
bunnie
07563c44db add precursor as a platform to ux-api 2025-02-21 17:43:23 +08:00
bunnie
5e258916da migrate graphics library API to a platform-neutral service crate
this kicks off an enormous set of refactoring changes...
2025-02-21 17:42:39 +08:00
bunnie
8cd43cab20 update to use new api opcode name 2025-02-21 02:03:33 +08:00
bunnie
83cc5e5a6a fix drawing inversion & color mapping 2025-02-21 02:03:07 +08:00
bunnie
7bb50974ce cleanup warnings 2025-02-20 20:51:04 +08:00
bunnie
8859f3eff5 cleanup warnings 2025-02-20 20:50:43 +08:00
bunnie
2ad0a58a56 remove redundant constants 2025-02-20 20:48:00 +08:00
bunnie
4cf9e15d85 add logging api update to lockfile 2025-02-20 20:41:29 +08:00
bunnie
aab0a06ab5 add cramium-emu as a server for hosted mode
takes the place of cramium-hal-service
2025-02-20 20:41:00 +08:00
bunnie
b5a10fe0db fix emulation bugs 2025-02-20 20:40:39 +08:00
bunnie
10be900e11 migrate opcodes to neutral api crate 2025-02-20 20:39:50 +08:00
bunnie
385e4198f2 accommodate movement of the opcode api 2025-02-20 20:39:28 +08:00
bunnie
fc8e7060a3 migrate opcodes out to an agnostic platform crate 2025-02-20 20:39:04 +08:00
bunnie
7ad661658a
Merge pull request #623 from betrusted-io/modals-refactor
Fix doc-deps issue
2025-02-20 18:41:35 +08:00
bunnie
c7096ba379 Merge branch 'main' into modals-refactor 2025-02-20 18:39:01 +08:00
bunnie
f798f5cf3d fix doc-deps configuration 2025-02-20 18:37:58 +08:00
bunnie
547aac5056 fix lifetime issue on irq handler binding
using scoping for feature flags is tricky. also this
is like, all totally unsafe code.
2025-02-20 15:49:05 +08:00
bunnie
a2b0a28ee1
Merge branch 'main' into pddb-feat-down 2025-02-20 15:11:01 +08:00
bunnie
558c61ada7
Merge branch 'main' into cram-dev 2025-02-20 15:10:47 +08:00
bunnie
dd679d2d0c
Merge pull request #622 from betrusted-io/modals-refactor
Refactor baochip (cramium) APIs
2025-02-20 15:10:33 +08:00
bunnie
760d64e17c commit the API re-org in the lockfile 2025-02-20 15:08:02 +08:00
bunnie
7d8c3b9d74 add cramium-api and fix formatting in workspace 2025-02-20 15:07:46 +08:00
bunnie
5e825aa38c move cramium-emu path as it migrated location 2025-02-20 15:07:27 +08:00
bunnie
2e060e7bc3 bring xous-swapper up to api spec 2025-02-20 15:07:11 +08:00
bunnie
a3b918e8c6 add hosted-baosec to utra platform recognition. 2025-02-20 15:06:53 +08:00
bunnie
5ffacf63f3 cleanup bao-video to use the new API
also condense main into a single routine again, now that
we have gone through the trouble of creating interoperable
APIs.
2025-02-20 15:06:15 +08:00
bunnie
87c0e5ed12 re-org cramium-hal-service to reflect new API organization 2025-02-20 15:05:55 +08:00
bunnie
1cb2b1f7ca bring bao-console up to API spec 2025-02-20 15:05:34 +08:00
bunnie
130571b0f4 bring loader up to latest API spec 2025-02-20 15:05:23 +08:00
bunnie
671ac1625f add a link to the baochip api structure readme 2025-02-20 15:04:56 +08:00
bunnie
0bdfbd7832 add a readme that documents the baochip api structure 2025-02-20 15:04:45 +08:00
bunnie
affe4e6c54 move APIs out of cramium-hal
So the organization of the code is now the following tiers:

libs/cramium-api: contains hardware-abstracted API code to the hardware
layers (traits, some constants, enums, etc.). For example, "here is
an IO trait that lets you configure and set GPIO pins", which could
then be implemented in hardware or emulation. The APIs aren't entirely
generic across all SoCs because they are tweaked to accommodate
quirks of the cramium SoC.

libs/cramium-hal: contains board-specific driver codes that do not
require persistent services to be started. Possibly misnamed because
it also includes not just cramium-chip items, but also e.g. peripherals
to the cramium SoC, such as the PMIC and camera.

services/cramium-hal-service: contains the `main` process that manages
shared resources, such as UDMA, IO pins, IFRAM. These drivers cannot
be delegated to a `lib` crate because there can be only one instance
of these resources, and instead we have to dynamically allocate
access to these through IPC messaging.

services/cramium-emu: hosted mode emulation of things in
cramium-hal-service.

services/bao-video: contains a `main` process that integrates
the camera and OLED driver. This means that all graphic drawing
primitives also interface with this crate. These are condensed
into a single process space to speed up execution, and kept
separate from cramium-hal-services because we want the video
services to not be blocked by, for example, a thread that is
handling I2C things.
2025-02-20 13:54:46 +08:00
bunnie
2235f7a3f1 clean up ux-api to be no-std clean
ux-api can't do rkyv derives and rely on std items in a
no-std environment. This is necessary because some of the
base layer APIs (frame buffers, points, etc.) are relied
upon in a no-std loader environment to render diagnostics
to the screen. Thus ux-api needs to have a baseline of
primitives available without a std flag.
2025-02-20 13:32:52 +08:00
bunnie
1dcf7b191b adjust kernel dependencies to match new tree 2025-02-20 13:32:21 +08:00
bunnie
b33ca44e3b Complete move of cramium-emu from libs to services
I thought originally cramium-emu would be a library crate, but
actually, it makes more sense as a "services" crate. The APIs
that cramium-emu would live in cramium-api, and cramium-emu
itself is a bit closer to cramium-hal-service, filling in
the executable bits of code that allow emulation to run.
2025-02-20 13:30:55 +08:00
bunnie
7321169854 specify hosted for kernel build in baosec-emu target 2025-02-20 13:28:33 +08:00