Commit graph

8528 commits

Author SHA1 Message Date
bunnie
e2379821e6 republish xous-rs to fix cargo test 2025-05-11 15:36:17 +08:00
bunnie
041369b059 add missing defines to the arch target of test/mem.rs 2025-05-11 15:34:30 +08:00
bunnie
c0b6965adc update pins 2025-05-11 15:06:54 +08:00
bunnie
8a4959056b bump version for xous crate update - commit so we can publish crates 2025-05-11 14:45:24 +08:00
bunnie
ed345ba4d7 cleanup dependency hacks from debbuging pddb issue 2025-05-11 14:42:26 +08:00
bunnie
6d858e9fce cleanup out of place/duplicated constant definitions 2025-05-11 14:42:08 +08:00
bunnie
28793c2d71 remove legacy dependency 2025-05-11 14:41:51 +08:00
bunnie
f76dd23067 fix weird PDDB dependency issue
more of a work-around than anything else. the observation is
the PDDB_A* series of constants aren't used outide of the crate
for gen2-targets and so we just remove it as a dependency in
the lib.rs side of things.

This clears up the cargo error we're getting. still don't know
why the dependency tree is not working for that particular target,
but someone is pulling a pddb dependency and it's not obvious who.
2025-05-11 14:40:19 +08:00
bunnie
fbcb59c69e migrations applied to pddb
still broken, there is a weird dependency problem on
board-baosec target that is still to be debugged, but
wanted to get everything committed so i can try bigger
experiments without losing state
2025-05-11 12:59:00 +08:00
bunnie
7af009be78 migrations for moving constants out of xous-rs/kernel and into board/platform
this is a fairly major re-org of where key constants go that
define platform features. things that were in xous-rs that were
platform specific (namely precursor) were moved into a boards file,
and things that are generic to the system (like PAGE_SIZE) are moved
to a public location in xous-rs::arch.
2025-05-11 12:50:02 +08:00
bunnie
63e4319314 add partial support for memory mapped flash (alloc virt without phys backing) 2025-05-11 12:49:23 +08:00
bunnie
f5315dc014 incorporate partial support for virtual-only alloc swap into kernel
also has migrations for constant locations
2025-05-11 12:46:56 +08:00
bunnie
52ee66e1a5 migrate kernel-to-board platform constants for swapper 2025-05-11 12:46:01 +08:00
bunnie
805ebd22a3 revert a couple things that were not meant to be committed 2025-05-11 12:45:29 +08:00
bunnie
4ef4b22cfc incorporate hal migration into bao-console 2025-05-11 12:41:39 +08:00
bunnie
ad3e4616dd incorporate xous-rs to hal migration into keystore-api 2025-05-11 12:40:56 +08:00
bunnie
d0e76fe424 incorporate arch migrations into vault
note that this also triggered a huge format of a crate
that was marked for non-formatting to make diffs easier to
the opensk mainline

however, it is OK to format these specific submodules because they
are platform implementations that don't exist in opensk, so there
is nothing to diff against
2025-05-11 12:39:41 +08:00
bunnie
ca04a3ea82 incorporate arch migrations into early-settings 2025-05-11 12:37:51 +08:00
bunnie
ee6fb3ef4f arch migrations make PDDB_LEN harder to reach in modals
this constant was just used to create a "realistic" test case
instead of trying to add the dependency we just hard-code the
constant into the test case, because in the end what we wanted
was that specific constant to test a specific edge case of
a progress bar.
2025-05-11 12:36:46 +08:00
bunnie
42c6417e46 incorporate rach mirgations into net 2025-05-11 12:36:33 +08:00
bunnie
6de085657a incorporate arch migrations into dns 2025-05-11 12:36:20 +08:00
bunnie
f27c78c918 add BOOKEND constants to the hal layer; add MMAP_VIRT range
BOOKEND test sentinels are moved out of xous-rs, and into the
board definitions allowing us more flexibility on configuration
board-specific test configs (before it was a xous-wide constant,
which seems a bad idea because it makes migrating test infra
hard as the manufacturing infra updates)

MMAP_VIRT as a range is also added is this commit
2025-05-11 12:34:48 +08:00
bunnie
a71873cb7a incorporate migrations into root-keys 2025-05-11 12:34:17 +08:00
bunnie
b6ab55c6b8 incorporate arch migration into shellchat 2025-05-11 12:33:50 +08:00
bunnie
d4f2951af5 add a HAL layer for Precursor
this allows us move board-specific parameters out of xous-rs
and into a board library that is consistent with the new board
libraries, reducing special case code for Precursor
2025-05-11 12:32:45 +08:00
bunnie
8a74ed6078 incorporate arch migrations into spinor 2025-05-11 12:32:29 +08:00
bunnie
ee22ff783c incorporate arch migrations to status 2025-05-11 12:32:05 +08:00
bunnie
a0c1b1e75a incorporate arch migrations to usb-device-xous 2025-05-11 12:31:46 +08:00
bunnie
ae2d137e12 incorporate arch migrations to xous-susres 2025-05-11 12:29:55 +08:00
bunnie
f8978d7511 move platform-specific locations into the xous-rs crates
This enables a couple of things that have been long wanting, including:

- the ability to know what PAGE_SIZE is from a single central define
- the ability to determine where certain virtual memory ranges are
located (useful for the userspace swapper).

Previously these were "hidden" from crates because they were embedded
directly in the kernel implementation module, which is not accessible
as a dependency, thus causing us to e.g. create redundant copies of
the PAGE_SIZE variable. This hopefully makes migrating to a larger
page size in some future version of the OS a bit simpler.
2025-05-11 12:27:41 +08:00
bunnie
5945634f5e add a flag for memory that is allocated as swapped
this indicates to the OS to reserve the virtual pages for
the memory, mark them as swapped, but don't actually put
anything in physical memory.
2025-05-11 12:26:47 +08:00
bunnie
6083c8e70c
Merge pull request #642 from betrusted-io/pddb-hosted-debug
Pddb hosted debug
2025-05-10 08:25:43 +08:00
bunnie
58f20057b4 update strategy 2025-05-10 08:22:38 +08:00
bunnie
c7225d227d migrate pddb size to board:: and fix boot init
the policy is to format the PDDB automatically on boot if
it can't be mounted.

Need to think about whether this is the right thing to do
or not for the product: if there is any sort of error, it will
just wipe the PDDB entirely, making it unrecoverable.

That being said, why would there be an error? if that happens,
something bad probably happened to the hardware. I feel like
if the SPI interface is reliable this shouldn't be a problem.
So the solution is to make sure the hardware is reliable...
on the other hand, fundamentally, SPI flash can wear out, so
this could aggravate problems at EOL for the device (i.e.
it will take small problems and "amplify them up" into a huge
problem).

The trade-off is...the auto-format makes the token "just work"
on boot. Maybe the right thing to do is to add some code that
checks to see if we're in a true blank state, and if so,
autoformat; and if it looks like something was there before,
prompt for a format?

tbd.
2025-05-08 16:06:42 +08:00
bunnie
f92839602e feature flag fixes for moving sizes to board:: 2025-05-08 16:04:36 +08:00
bunnie
fe599c2fe0 migrate lengths to board:: for gen2; fix opcode numbering bug
opcode numbering bug only affects test mode, fortunately. just
bit-rot from tests long not run...
2025-05-08 16:03:48 +08:00
bunnie
2ea777e04f fix key encoding bug; set DNA to "0" in emulation mode
this matches what's done in hosted mode, allowing the analysis
scripts to work on the images generated by this version
2025-05-08 16:02:52 +08:00
bunnie
34a1a33165 fix off-by-one arg error on Dna routine
this is a common api problem because yes, while arg1 is strictly
the second item, previously arg0 was hidden and in the argument
list arg1 took the first place not the second. so i make this
mistake a lot...
2025-05-08 16:01:46 +08:00
bunnie
0cb80c2afb remove sizes from the emu lib, so it can live in board:: 2025-05-08 16:01:11 +08:00
bunnie
5417c2bd87 add more test features to the console; absorb board:: api for sizes 2025-05-08 16:00:28 +08:00
bunnie
645846e32e move pddb, spinor params into the board section of the HAL for hosted
this makes code a little cleaner when porting to new targets
2025-05-08 15:59:31 +08:00
bunnie
399742a3d4 feature-out some battery testing code in hosted mode 2025-05-07 23:10:04 +08:00
bunnie
231aff1f80
Merge pull request #641 from betrusted-io/axp-batt
Battery settings to confirm/test prior to fusing out TG28
2025-05-06 19:14:43 +08:00
bunnie
e2f5892e29 add a target for the kernel specifically on the boards
this allows us to map the spinor values in for the swapper
without having to break other abstractions
2025-05-06 19:09:37 +08:00
bunnie
ad4a3ef3f2 KB_C2 pin just died?
KB_C2 pin on this test board just got shorted to ground internally
in the chip. I think it may have been due to power glitches
when the ammeter was switching modes feeding through and causing
trouble for the system.

Anyawys, disable that row and remap some keys so we can continue
with testing. MPW boards will hopefully be retired soon enough...
2025-05-06 19:07:25 +08:00
bunnie
a399702403 add proposed values for TG28 fusing & testing
include some readback testing and make addresses pub so they
don't throw warnings when not referenced in the crate
2025-05-06 19:06:44 +08:00
bunnie
a2d9699bee fix argument change in api 2025-05-06 19:06:23 +08:00
bunnie
c5d2689e12 add periodic updates from the charger 2025-05-06 19:06:04 +08:00
bunnie
a358d89ede modify args so we can build for testing 2025-05-06 19:05:47 +08:00
bunnie
0772b76a92
Merge pull request #640 from betrusted-io/less-debug
reduce debug out put as this makes it hard to see what's going on in CI
2025-05-06 12:55:43 +08:00