Commit graph

315 commits

Author SHA1 Message Date
bunnie
34e7474b80 add work-around for DAR-620
UDMA Rx busy bit seems to get stuck occassionally. This seems
to be aggravated if we insert a dcache_flush in the poll loop.

The current time-out code seems to mitigate the problem, but
I have low confidencne that this is a 100% solution. I have a feeling
we'll be revisiting this again soon.
2024-05-22 18:08:50 +08:00
bunnie
9e66c1bee2 commit the version bump 2024-05-07 01:03:05 +08:00
bunnie
0f79056ac7 refactor spim divider equation to reflect reality 2024-05-06 03:32:41 +08:00
bunnie
6723b9d67c cleanup missing APIs
- need to be able to specify the mode that a SPIM could be in
that was set up by the bootloader
- make yield() optional - it could be useful if the API is used
in userland contexts, but in an interrupt context (e.g. swapper)
it should not be used.
2024-05-06 02:26:55 +08:00
bunnie
58308656a0 fix feature flags for xous deployment 2024-05-06 02:25:09 +08:00
bunnie
be2e450686 fix address ordering error on RAM 2024-05-05 21:48:04 +08:00
bunnie
914acb9c12 apply the optimization to writes as well 2024-05-05 16:41:00 +08:00
bunnie
6d7d3b244d slight optimization to SPIM read 2024-05-05 16:39:59 +08:00
bunnie
ad4f05bed5 fix address ordering bug; cleanup chip select timing 2024-05-05 16:31:21 +08:00
bunnie
a0aeaae106 issue command to exit quad mode, in quad mode
if not in quad mode, command is ignored; but without this,
the command is never accepted if you are in quad mode.

the idea is you use this to reset the chip when you don't
know what mode it's in.
2024-05-05 03:23:37 +08:00
bunnie
7c0aa1bcbe add debugging support to HAL lib
tries to do the right thing in both Xous and bare metal environments,
although, xous formatting might be a little funky.
2024-04-30 17:12:41 +08:00
bunnie
1b4e6b310a SPIM bug fixes
- improve visibility of core structures for debugging
- add qpi-mode ID readouts
- support different commands for flash/ram ID readout
- fix bit-shift bug on cmd (docus say to "align to MSB" but
I don't know what MSB they are talking about, it only works if
you align the commands to LSB).
2024-04-30 17:11:02 +08:00
bunnie
436be7ae9c fix masking bug in iox implementation 2024-04-30 17:10:28 +08:00
bunnie
34489d5f94 raise visibility of internal ifram structures
allows for abstraction violations but at this stage of debugging,
we'll need it.
2024-04-30 17:08:09 +08:00
bunnie
e5dfd14daa fix bugs found by rustc
thanks, rustc, for finding these bugs!

this is why we cleanup warnings regularly.
2024-04-29 04:08:52 +08:00
bunnie
0131315e3a cleanup trng warnings -- it's going to be a while before this is fixed
I think I may have to be patient on waiting for docus on how to
tune the trng, so, turning off these warnings for now. trng tuning
will be "an event", I expect.
2024-04-29 04:07:52 +08:00
bunnie
431ca216f9 improve visibility of hal elements 2024-04-29 03:43:03 +08:00
bunnie
e3e3b3125c cleanup warnings 2024-04-28 02:57:24 +08:00
bunnie
588e1cf9f1 add some debugging, convenience routines to trng driver 2024-04-28 02:44:10 +08:00
bunnie
c407db877e change DUART ports to accommodate jtag breakout 2024-04-22 11:00:06 +08:00
bunnie
4ace363abc this resolves comments from @xobs' code review 2024-04-09 18:23:09 +08:00
bunnie
588e7aaf0a add spi memory drivers to udma library
totally untested, but, at least structurally present so we
have a chance that our memory structures and APIs can work.
2024-04-06 22:54:34 +08:00
bunnie
d6b33159a5 stage version pin bump 2024-04-01 15:46:26 +08:00
bunnie
5911808611
Merge pull request #509 from betrusted-io/bio
WIP: BIO driver
2024-03-12 18:24:38 +08:00
bunnie
133bb2b74f fix a few minor details missing in the tests
also update docs and completion tracker
2024-03-12 13:54:07 +08:00
bunnie
4fa3dd3b59 add spi unit test 2024-03-12 04:53:37 +08:00
bunnie
a96abc669f add interrupt clear call 2024-03-07 01:32:15 +08:00
bunnie
2f5a717e65 add unit test for inter-core events and fifo events
synthetic test that exercises multiple cores triggering each
other, waiting on each other to complete tasks, and waiting on
the host to meet conditions such as fifo fullness levels before
running.

this proves out the basic concept of inter-core eventing.
2024-03-04 04:08:01 +08:00
bunnie
0844cfbc52 more unit tests
fifo input/output from host with back-pressure works
gpio loopback input testing works

framework for automated assertion testing is in place;
all tests from this point forward will endeavor to include
some asserts that will cause the test to fail, so we don't require
manual inspection to check test results.
2024-03-03 18:33:30 +08:00
bunnie
8a7b5e5627 add the FIFO basic unit test + todo list of tests 2024-03-03 02:39:12 +08:00
bunnie
e1b0d83cbd add test plan 2024-03-02 02:02:02 +08:00
bunnie
e3cdb4a35d unit test for "hello multiverse"
four cores started all at once, each responsible for updating
a byte of the GPIO range, in unison.
2024-03-02 02:02:02 +08:00
bunnie
6c6634540c skip address tag embedded within the loadable program 2024-03-02 02:02:02 +08:00
bunnie
260ec0b39b wrap assembly code generator in a macro
This macro takes as arguments the name of the function
you want to use to retrieve the assembly code, and two labels,
one for the start and one for the end of the assembly code,
and the assembly code itself.

The labels for the start/end of assembly code are identifiers
and because of Rust's rules macros can't create identifiers out
of thin air (I wish instead of saying "partially hygienic", they
just said, "you can't create identifiers that don't exist". Yes,
I'm sure "partially hygienic" has some other meaning to computer
science people but to me it's just pretentious bullshit that
forces me to read through four blog posts and three issues to
come to the practical conclusion I really wanted to know; I
think maybe they wanted to refer to it as hygiene because the
limitation is super frustrating and hygiene sounds like a positive
way to spin something that is annoying. Sure. It's fine. You
didn't want to allow macros to make identifiers because it can lead
to surprising behavior and name space conflicts. That's your choice
as a language designer, just say it.).

Anyways. as usual, rust macro took way too long to write.
2024-03-02 02:02:02 +08:00
bunnie
f24746b88a start on a simple "multi-core" test 2024-03-02 02:02:02 +08:00
bunnie
633b76eb5d flesh out common useful routines for bio access 2024-03-02 02:02:02 +08:00
bunnie
e297c02cf3 add crate for BIO - better I/O - driver 2024-03-02 02:02:02 +08:00
bunnie
b6e5e7f2c2 apply formatting patch
@nworbnhoj, i saw you had explicitly done a formatting pass.
However, I think maybe the +nightly flag was missing, it looks
like the formatting ignored our custom rule set, which requires
nightly?
2024-03-02 01:26:51 +08:00
nworbnhoj
ffac721c6b rustfmt
deliberate check of automated rustfmt_check.yaml

confirmed - system works
2024-03-01 09:19:15 +10:00
nworbnhoj
01b13e0e32 replace vendored-in rustls::crypto:💍:SUPPORTED_SIG_ALGS with public access 2024-03-01 06:50:04 +10:00
nworbnhoj
7f19e660d9 add link to rustls issue
https://github.com/rustls/rustls/issues/1819
2024-02-29 09:53:02 +10:00
nworbnhoj
b217c1546e tls tidy-up 2024-02-29 06:52:50 +10:00
nworbnhoj
6d24f1af41 refine tls probe() remove unnecessary Option 2024-02-29 06:18:43 +10:00
nworbnhoj
17c1fabc1e refine shellchat net tls test for tls 1.3
https://docs.rs/rustls/latest/rustls/manual/_03_howto/index.html#unexpected-eof
2024-02-28 13:55:49 +10:00
nworbnhoj
332c2975ba reinstate tls::ota add_der_header() and rm_der_header()
In keeping with webpki-roots - the TrustAnchors are managed without the Der Tag::Sequence header

This in turn requires that:
- the header is removed from x509 fields before saving in the pddb, and
- the der Tag::Sequence is added to ota.subject before it can be decoded  () see ota.subject()
2024-02-28 12:40:05 +10:00
nworbnhoj
7760b02229 refine tls::ota.from(&TrustAnchor) 2024-02-28 06:59:38 +10:00
nworbnhoj
faece9783e refine tls:rota.subject() -> Result<String, Error> 2024-02-28 05:24:57 +10:00
nworbnhoj
8ed22b8257 refine shellchat net tls mozilla 2024-02-27 08:48:10 +10:00
nworbnhoj
a3740df71a refine shellchat net tls test 2024-02-27 07:23:09 +10:00
nworbnhoj
bb2b7f05e7 fix tls::ota.pddb_key() 2024-02-27 07:22:11 +10:00