mirror of
https://github.com/polhenarejos/pico-keys-sdk
synced 2026-06-01 11:01:21 +02:00
Do not use secboot in Phy.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
15
src/fs/phy.c
15
src/fs/phy.c
@@ -48,14 +48,7 @@ int phy_serialize_data(const phy_data_t *phy, uint8_t *data, uint16_t *len) {
|
|||||||
}
|
}
|
||||||
*p++ = PHY_OPTS;
|
*p++ = PHY_OPTS;
|
||||||
*p++ = 2;
|
*p++ = 2;
|
||||||
uint16_t opts = phy->opts;
|
p += put_uint16_t_be(phy->opts, p);
|
||||||
if (otp_is_secure_boot_enabled()) {
|
|
||||||
opts |= PHY_OPT_SECBOOT;
|
|
||||||
}
|
|
||||||
if (otp_is_secure_boot_locked()) {
|
|
||||||
opts |= PHY_OPT_SECLOCK;
|
|
||||||
}
|
|
||||||
p += put_uint16_t_be(opts, p);
|
|
||||||
if (phy->up_btn_present) {
|
if (phy->up_btn_present) {
|
||||||
*p++ = PHY_UP_BTN;
|
*p++ = PHY_UP_BTN;
|
||||||
*p++ = 1;
|
*p++ = 1;
|
||||||
@@ -123,12 +116,6 @@ int phy_unserialize_data(const uint8_t *data, uint16_t len, phy_data_t *phy) {
|
|||||||
case PHY_OPTS:
|
case PHY_OPTS:
|
||||||
if (tlen == 2) {
|
if (tlen == 2) {
|
||||||
phy->opts = get_uint16_t_be(p);
|
phy->opts = get_uint16_t_be(p);
|
||||||
if (otp_is_secure_boot_enabled()) {
|
|
||||||
phy->opts |= PHY_OPT_SECBOOT;
|
|
||||||
}
|
|
||||||
if (otp_is_secure_boot_locked()) {
|
|
||||||
phy->opts |= PHY_OPT_SECLOCK;
|
|
||||||
}
|
|
||||||
p += 2;
|
p += 2;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -34,8 +34,6 @@
|
|||||||
#define PHY_OPT_DIMM 0x2
|
#define PHY_OPT_DIMM 0x2
|
||||||
#define PHY_OPT_DISABLE_POWER_RESET 0x4
|
#define PHY_OPT_DISABLE_POWER_RESET 0x4
|
||||||
#define PHY_OPT_LED_STEADY 0x8
|
#define PHY_OPT_LED_STEADY 0x8
|
||||||
#define PHY_OPT_SECBOOT 0x10
|
|
||||||
#define PHY_OPT_SECLOCK 0x20
|
|
||||||
|
|
||||||
#define PHY_CURVE_SECP256R1 0x1
|
#define PHY_CURVE_SECP256R1 0x1
|
||||||
#define PHY_CURVE_SECP384R1 0x2
|
#define PHY_CURVE_SECP384R1 0x2
|
||||||
|
|||||||
Reference in New Issue
Block a user