Commit graph

8697 commits

Author SHA1 Message Date
bunnie
45e1fa306e fix linker script for the simulation target
no need to include fonts in the verilator target environment
2025-07-23 01:23:22 +08:00
bunnie
80e367c519 add ticktimer to simulation set so we can do context switch benchamrking 2025-07-23 01:22:35 +08:00
bunnie
b241b84014 update soc details to add some reporting conveniences 2025-07-23 01:22:14 +08:00
bunnie
0782418440
Merge pull request #665 from betrusted-io/vexii
Merge Vexii testing changes
2025-07-22 01:46:05 +08:00
bunnie
c0735374f0 fix hosted mode 2025-07-22 01:43:58 +08:00
bunnie
ee5bf1fccf commit current baremetal state checkpoint
various tests & stuff in flux
2025-07-22 01:11:35 +08:00
bunnie
9bb7c12b0b add ramtests module to artyvexii 2025-07-22 00:48:34 +08:00
bunnie
65bbaaecd2 changes and updates to artyvexii baremetal config 2025-07-22 00:47:55 +08:00
bunnie
b76f376f77 utralib updates based on soc changes 2025-07-22 00:47:33 +08:00
bunnie
a0a2d1728c loader changes for vexii
primarily modify the loading method to mark pages with A/D flags
as needed to work around lack of A/D handling in the trap handler
of Xous.

Also inside main.rs is a todo list for polishing off the vex-ii
port and turning into something actually sustainable for Denarius
once we have more of a full SoC model available.
2025-07-22 00:46:04 +08:00
bunnie
815c082153 add breadcrumb for improving the cbo.flush instruction
whenever rust stabilizes "zicbom" in RV we can remove the ugly
.word hard-coding of the flush instruction.
2025-07-21 19:12:37 +08:00
bunnie
6eaf3501bd add cbo.flush support for vexii targets
Spinor is the one location where memory changes out "from underneath
the CPU" in a cacheable region. This happens when we update a block
of FLASH.

Vex-ii has a physically tagged d-cache, but the cbo.flush instruction
needs the *virtual* address to be passed (it then goes through a page
walk or TLB lookup to resolve the tag). The virtual address only
exists and can be correctly resolved to a physical address in the
process space of the owner of the region that maps to the SPINOR
FLASH. Thus, we introduce a flush routine in the lib.rs side that
calls the cbo.flush instruction on every line that has been potentially
modified by the flash write routine.

Note that cbo.flush is not yet natively supported by Rust stable,
so it's coded as a series of hex words fixed to a given register (a0)
to avoid introducing a nightly dependency. Once the cbo.flush
assembly instructions stabilize we can make the assembly read more
nicely, but functionally it should compile to exactly the same code.
2025-07-21 19:09:05 +08:00
bunnie
77d7094d3b reduce the pddb size for the vexii-test target 2025-07-21 19:03:24 +08:00
bunnie
75556b2321 add feature flags for vexii-test in rootkeys and shellchat 2025-07-21 19:02:21 +08:00
bunnie
4dda0da6c9 swap out curve25519 backend for vexii-test targets
we don't have a curve25519 accelerator on the vexii-test device
due to a lack of space to fit it. so for vexii-test targets
we swap in the u32 (vs u32e) backend.

This requires re-writing the config.toml file based on the
presence (or absence) of a vexii-test flag.
2025-07-21 19:01:10 +08:00
bunnie
a3d350b86f note aes performance on vex-ii; fix typo on aes256soft_test
aes256 soft test was running on hw before by accident.
2025-07-21 17:19:22 +08:00
bunnie
cb7f6d50b1 add vexii-test feature to pddb 2025-07-21 17:14:02 +08:00
bunnie
1effeab858 add legacy_int handler to the kernel, handle vexii init case
The "main" product line is affected here in that the UART
init is hosted above the trng init. This should have no impact
on security or boot time, but allows us to more easily debug
TRNG init issues. This is necessary because in the vexii test
version the XADC interface is broken by the slower clocking
and I'm not taking the time to trace down that issue as it
does nothing to further the goal of testing the vex-ii core
in a non-production config.

legacy_int handler allows vex-ii to emulate/behave like the vex-i
in terms of interrupt handling.

eventually this will be replaced with/augmeted by a PLIC.
2025-07-21 17:11:23 +08:00
bunnie
52abe83b74 handle vex-ii a/d flags and error gracefully on page re-allocates
1. Instead of panicing when a page is re-requested, return an
error message to the caller. This allows us to have the UART
pre-allocated by the loader and the kernel to request it prophylactically

2. add A/D flags for R/W pages in vexii-testing. This is a work-around
until we have proper A/D tracking in the page lifecycle mechanism.
2025-07-21 17:08:56 +08:00
bunnie
de8ddbf9c2 handle case where uart is re-allocated by the kernel
this case happens when the loader is instructed to pre-allocate
the kernel UART page based on the early-printk feature.
2025-07-21 17:07:28 +08:00
bunnie
7dc09bbc73 updated AES library with Vex-II drivers
This will also be the version we'll use for the daric chip once
it's available; the prior software-only version hack for MPW will
be retired soon.

Note that only AES-256 is implemented in this commit, AES-128
isn't used on the system and so is provided as a software-only
fallback path.
2025-07-21 16:34:05 +08:00
bunnie
a858c09e53 add vexii-test feature to aes lib 2025-07-21 03:10:04 +08:00
bunnie
4fb3a3da43 add vexii-test shims for irq subsystem in kernel 2025-07-20 19:03:29 +08:00
bunnie
8f2727c582 better formatting on documentation 2025-07-20 19:01:22 +08:00
bunnie
ac1a5c100d
Merge pull request #664 from betrusted-io/baremetal
WIP: Track baremetal target to base branch
2025-07-10 15:05:21 +08:00
bunnie
54dc0d9183 fix typo 2025-07-10 14:57:58 +08:00
bunnie
91c51920c6 add differentiated baremetal targets for bringup tasks 2025-07-10 14:57:24 +08:00
bunnie
1e02746d9e add vexii baremetal target for utralib 2025-07-10 14:57:06 +08:00
bunnie
f0b7afe68a add a baremetal target for vexii bringup
here lies the beginning of the path to upgrading the CPU
in the Xous ecosystem.
2025-07-10 14:56:27 +08:00
bunnie
1bff1eebf1 add repl environment to baremetal
This will help keep the command somewhat organized as things
are developed.

Also provides some templating for e.g. how to handle carriage
returns, etc.
2025-06-15 23:53:02 +08:00
bunnie
25afa24411 update lock file as we now pull in a more modern riscv crate
this is for baremetal
2025-06-15 23:23:42 +08:00
bunnie
cfe9f4d5c4 significant ergonomic improvements to baremetal
- IRQ handling added
- alloc crate is now available
- critical_section support enabled

Baseline uart RX handler added.
2025-06-15 23:22:47 +08:00
bunnie
53bdf11c3b update artybio target as FPGA was rebuilt 2025-06-15 23:22:24 +08:00
bunnie
a5eab45a86 add some comments to explain where the code is currently at 2025-06-15 02:06:27 +08:00
bunnie
5d3e0eba6c add baremetal to lock 2025-06-15 01:04:31 +08:00
bunnie
e35fc7ee98 add some early smoke tests of the BIO subsystem 2025-06-15 01:04:09 +08:00
bunnie
51c5fc75be add artybio target, remove debug prints that don't map to the target 2025-06-15 01:03:01 +08:00
bunnie
b3a04e349a add an initial baremetal trial target
just prints hello world for now!
2025-06-14 01:43:32 +08:00
bunnie
2433fe9179 add baremetal option to the workspace 2025-06-14 01:43:02 +08:00
bunnie
ae06dfe1be add baremetal target
this is a minimal target for building test images that need
none of the xous goodies, but may rely upon e.g. APIs and
libraries. Closer to coding for a baremetal embedded system.
2025-06-14 01:42:23 +08:00
bunnie
0f6f6d10dc add artybio target to utralib 2025-06-14 01:42:06 +08:00
bunnie
20140b2cdd
Merge pull request #661 from betrusted-io/add-bmp180
Add BMP180
2025-06-11 15:08:17 +08:00
Sam Chin
04bf756b8e theoretically clean version which has been tested with and without the feature 2025-06-11 15:05:59 +08:00
Sam Chin
0412a401d8 no more deadcode 2025-06-10 21:51:55 +08:00
Sam Chin
2659fc0894 wip'
'
2025-06-10 21:51:55 +08:00
bunnie
63b18ec42d
Merge pull request #660 from betrusted-io/sam.i2c-fix
add back in the reading part of `i2c_read`
2025-06-10 17:19:59 +08:00
Sam Chin
c9116cffd9 adding line back in 2025-06-10 16:00:16 +08:00
bunnie
0e1cebf329
Merge pull request #656 from betrusted-io/sam.hello-world
adding bao-console functions (`i2cdetect` and `cute`)
2025-06-09 18:52:28 +08:00
bunnie
7d23064d08
Leave in bao-video
I think we can leave in the bao-video package without breaking the size of the swap.img file...
2025-06-09 18:50:46 +08:00
bunnie
59db16aa99
remove debug message 2025-06-09 18:49:28 +08:00