Commit graph

104 commits

Author SHA1 Message Date
bunnie
c6445c9a9b add an API for accessing one-way counter values
A macro is added, a bit like this one:

```
encode_oneway! {
    #[offset = 80]
    pub enum BootWaitCoding {
        Disable,
        Enable,
    }
}
```

Which encodes possible one-way counter states along with their
offset in the one-way counter array.

The states in the enum correspond to the evolution of the counter,
modulo the number of elements in the enume.

The macro also creates a getter for the states, and an incrementer
to try and make this whole process less error-prone.
2025-09-29 13:40:14 +08:00
bunnie
094207fe40 add signatures API
this allows us to generate signatures using the same API
that we use to check 'em.
2025-09-26 22:56:19 +08:00
bunnie
a3a7bf9f3a add a format for passing static initialized data to baremetal
a small, 256-byte record is added to the top of baremetal records
that is a "poke table" that incorporates what values to put where
for baremetal targets, as well as a zeroization region.

This is generally more efficient because most values are set to
zero, and the only things that generally have a non-zero value
are 'static' variables, which are used extremely sparingly.
2025-09-21 21:50:48 +08:00
bunnie
1255bf12d9 FLAG DAY: fix all names to harmonize around 'bao1x'
The code base had evolved through several code names, interim
names, company names and chip names that alternatively did or did
not exist.

Baochip is the definitive name of the company, and the Baochip1x
(full part number BAO1X2S4F-WA) is the definitivey part number of
the SoC. For convenience, the part number is shortened to 'bao1x'
in most feature flags and variable references.

This commit fixes all of the odd names and removes some unmaintained
early targets.
2025-09-18 21:25:51 +08:00