Skip to content

User/ekarabulut/otp optional items#483

Merged
ekarabu merged 26 commits intomainfrom
user/ekarabulut/otp_optional_items
May 30, 2025
Merged

User/ekarabulut/otp optional items#483
ekarabu merged 26 commits intomainfrom
user/ekarabulut/otp_optional_items

Conversation

@ekarabu
Copy link
Collaborator

@ekarabu ekarabu commented May 23, 2025

  1. Updated FUSE macro map, updated size of FUSE items (IDevID Cert vs Attribute).
  2. Updated documentation and explained optional FUSE partitions/items.
  3. Cleaned up the code space (removing redundant semicolons).
  4. Extended MCI state translation capacity and covered Volatile RAW Unlock state.

andrea-caforio and others added 6 commits May 21, 2025 05:58
This extends the functionality of the `gen_fuse_ctrl_partitions.py`
script to also generate Markdown documentation of the register file.
In the process, we fix some dead links in the integration specification
documentation.

Signed-off-by: Andrea Caforio <andrea.caforio@lowrisc.org>
…updated timestamp and hash after successful run
Signed-off-by: Andrea Caforio <andrea.caforio@lowrisc.org>
andrea-caforio
andrea-caforio previously approved these changes May 25, 2025
Copy link
Contributor

@andrea-caforio andrea-caforio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @ekarabu. I removed the hardcoded values from the TB services and fixed the failing tests. The remaining things look good to me.

@taku202107
Copy link

Thank you for fixing the size of CPTRA_CORE_IDEVID_CERT_IDEVID_ATTR, but the size in "opt_ctrl_mmap.md" is still 7952B.
Please check it.

@Alexandiz
Copy link

Hi,
Thank you for fix! I reviewed the changes in updated document [caliptra-ss/src/fuse_ctrl/doc/otp_ctrl_field_descriptions.md at 98ebd3811883d1e6f57c7467b96dfe6918ced2b8 · chipsalliance/caliptra-ss](https://github.com/chipsalliance/caliptra-ss/blob/98ebd3811883d1e6f57c7467b96dfe6918ced2b8/src/fuse_ctrl/doc/otp_ctrl_field_descriptions.md) . These are new opens:

CPTRA_SS_OWNER_PQC_KEY_TYPE1..15 – missing in the list. Exist only index ‘0’
CPTRA_SS_OWNER_PK_HASH1..15 – missing in the list. Exist only index ‘0’
CPTRA_SS_OWNER_MLDSA_REVOCATION_1..15 - missing in the list. Exist only index ‘0’
CPTRA_SS_OWNER_ECC_REVOCATION_1..15 - missing in the list. Exist only index ‘0’
CPTRA_SS_OWNER_PK_HASH_VALID - shall cover 16 keys, not 1 (shall be 2 bytes)
CPTRA_SS_OWNER_LMS_REVOCATION_0..15 – why it is not 1 bit per key x 16 keys? (2 bytes total)
CPTRA_CORE_ECC_REVOCATION_0..15 - why it is not 1 bit per key x 16 keys? (2 bytes total)
CPTRA_CORE_LMS_REVOCATION_0..15 - why it is not 1 bit per key x 16 keys? (2 bytes total)
CPTRA_CORE_MLDSA_REVOCATION_0..15 - why it is not 1 bit per key x 16 keys? (2 bytes total)
missing:

  • CPTRA_CORE_UDS_SEED
  • CPTRA_CORE_FIELD_ENTROPY_0 .. 3
  • LC_TRANSITION_CNT
  • csr_mode

@andrea-caforio
Copy link
Contributor

Thank you for fixing the size of CPTRA_CORE_IDEVID_CERT_IDEVID_ATTR, but the size in "opt_ctrl_mmap.md" is still 7952B. Please check it.

Where do you see that? It's 96 bytes here:

| | | | 32bit | CPTRA_CORE_IDEVID_CERT_IDEVID_ATTR | 0x0D1 | 96 |

@taku202107
Copy link

Thank you for fixing the size of CPTRA_CORE_IDEVID_CERT_IDEVID_ATTR, but the size in "opt_ctrl_mmap.md" is still 7952B. Please check it.

Where do you see that? It's 96 bytes here:

| | | | 32bit | CPTRA_CORE_IDEVID_CERT_IDEVID_ATTR | 0x0D1 | 96 |

Sorry for my ambiguous comment. Please check "Preview" page of opt_ctrl_mmap.md.

@andrea-caforio
Copy link
Contributor

Thank you for fixing the size of CPTRA_CORE_IDEVID_CERT_IDEVID_ATTR, but the size in "opt_ctrl_mmap.md" is still 7952B. Please check it.

Where do you see that? It's 96 bytes here:

| | | | 32bit | CPTRA_CORE_IDEVID_CERT_IDEVID_ATTR | 0x0D1 | 96 |

Sorry for my ambiguous comment. Please check "Preview" page of opt_ctrl_mmap.md.

Can you give a me link to where it is 7952? :-) In this PR it's 96.

@taku202107
Copy link

taku202107 commented May 27, 2025

Thank you for fixing the size of CPTRA_CORE_IDEVID_CERT_IDEVID_ATTR, but the size in "opt_ctrl_mmap.md" is still 7952B. Please check it.

Where do you see that? It's 96 bytes here:

| | | | 32bit | CPTRA_CORE_IDEVID_CERT_IDEVID_ATTR | 0x0D1 | 96 |

Sorry for my ambiguous comment. Please check "Preview" page of opt_ctrl_mmap.md.

Can you give a me link to where it is 7952? :-) In this PR it's 96.

Please check the index 6 of the following link:
https://github.com/chipsalliance/caliptra-ss/blob/main/src/fuse_ctrl/doc/otp_ctrl_mmap.md

You are referring to the main branch where it is still 7982. This PR has not been merged yet. Once it is it will also be correct on the main branch.

Signed-off-by: Andrea Caforio <andrea.caforio@lowrisc.org>
andrea-caforio
andrea-caforio previously approved these changes May 28, 2025
bharatpillilli
bharatpillilli previously approved these changes May 28, 2025
@Alexandiz
Copy link

  • CPTRA_CORE_UDS_SEED
  • CPTRA_CORE_FIELD_ENTROPY_0 .. 3
  • LC_TRANSITION_CNT
  • csr_mode

Please review https://github.com/chipsalliance/caliptra-ss/blob/main/src/fuse_ctrl/doc/otp_ctrl_mmap.md

  1. CPTRA_CORE_UDS_SEED, CPTRA_CORE_FIELD_ENTROPY_0 .. 3, LC_TRANSITION_CNT present in otp_ctrl_mmap.md, but missing in otp_ctrl_field_descriptions.md
  2. csr_mode is missing in both otp_ctrl_mmap.md and otp_ctrl_field_descriptions.md

@bharatpillilli
Copy link
Collaborator

"csr_mode is missing in both otp_ctrl_mmap.md and otp_ctrl_field_descriptions.md" -> Can you please explain?

@Alexandiz
Copy link

"csr_mode is missing in both otp_ctrl_mmap.md and otp_ctrl_field_descriptions.md" -> Can you please explain?
I read again the specifications and looks like CSR_MODE is not an OTP setting, but a software-writeable bit in the HMAC control register.
I assume it is SOC decision if CSR Mode is enabled or not. I think it would be more convenience to handle it as OTP setting.
what do you think?

@bharatpillilli
Copy link
Collaborator

"csr_mode is missing in both otp_ctrl_mmap.md and otp_ctrl_field_descriptions.md" -> Can you please explain?
I read again the specifications and looks like CSR_MODE is not an OTP setting, but a software-writeable bit in the HMAC control register.
I assume it is SOC decision if CSR Mode is enabled or not. I think it would be more convenience to handle it as OTP setting.
what do you think?

Are you talking about HMAC operations within Caliptra core? If so, please check Caliptra RT FW on the APIs and modes it has in terms of the current usage. from HW point of view, its a write-only register and Caliptra RT FW controls it and it controls the externally available APIs -> https://chipsalliance.github.io/caliptra-rtl/main/internal-regs/?p=clp.hmac_reg.HMAC512_CTRL

@bharatpillilli
Copy link
Collaborator

@Alexandiz - can you please state your affiliation/company since its not obvious from your githubID?

ekarabu added 2 commits May 28, 2025 12:03
@ekarabu ekarabu dismissed stale reviews from bharatpillilli and andrea-caforio via 9b72d28 May 28, 2025 19:03
nileshbpat
nileshbpat previously approved these changes May 28, 2025
…ms' with updated timestamp and hash after successful run
@Alexandiz
Copy link

@Alexandiz - can you please state your affiliation/company since its not obvious from your githubID?

Sure. I updated profile and contacted you over slack

@Alexandiz
Copy link

"csr_mode is missing in both otp_ctrl_mmap.md and otp_ctrl_field_descriptions.md" -> Can you please explain?
I read again the specifications and looks like CSR_MODE is not an OTP setting, but a software-writeable bit in the HMAC control register.
I assume it is SOC decision if CSR Mode is enabled or not. I think it would be more convenience to handle it as OTP setting.
what do you think?

Are you talking about HMAC operations within Caliptra core? If so, please check Caliptra RT FW on the APIs and modes it has in terms of the current usage. from HW point of view, its a write-only register and Caliptra RT FW controls it and it controls the externally available APIs -> https://chipsalliance.github.io/caliptra-rtl/main/internal-regs/?p=clp.hmac_reg.HMAC512_CTRL

@bharatpillilli ,
How you suggest to discuss this flow E2E? over slack? in this thread? in weekly meeting?
Thank you

@bharatpillilli
Copy link
Collaborator

"csr_mode is missing in both otp_ctrl_mmap.md and otp_ctrl_field_descriptions.md" -> Can you please explain?
I read again the specifications and looks like CSR_MODE is not an OTP setting, but a software-writeable bit in the HMAC control register.
I assume it is SOC decision if CSR Mode is enabled or not. I think it would be more convenience to handle it as OTP setting.
what do you think?

Are you talking about HMAC operations within Caliptra core? If so, please check Caliptra RT FW on the APIs and modes it has in terms of the current usage. from HW point of view, its a write-only register and Caliptra RT FW controls it and it controls the externally available APIs -> https://chipsalliance.github.io/caliptra-rtl/main/internal-regs/?p=clp.hmac_reg.HMAC512_CTRL

@bharatpillilli , How you suggest to discuss this flow E2E? over slack? in this thread? in weekly meeting? Thank you

Plz open a GitHub issue. Further hmac is not exposed to SoC for random injections. It would be best to look through the spec one more time before filing the issue itself.

bharatpillilli
bharatpillilli previously approved these changes May 29, 2025
@Alexandiz
Copy link

@bharatpillilli ,
@bharatpillilli
I opened this issue: chipsalliance/Caliptra#374
Thank you

ekarabu and others added 2 commits May 30, 2025 12:59
@ekarabu ekarabu merged commit cfc6547 into main May 30, 2025
8 checks passed
@ekarabu ekarabu deleted the user/ekarabulut/otp_optional_items branch May 30, 2025 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants