Skip to content

How_to_Guides: Enabling protected UEFI variables in U-Boot #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eballetbo
Copy link

This guide details the process of enabling protected UEFI variables in U-Boot specifically for the J784S4 platforms. Protected UEFI variables offer a secure storage mechanism within the board's eMMC flash, accessible only by authorized software.

This guide details the process of enabling protected UEFI variables in U-Boot
specifically for the J784S4 platforms. Protected UEFI variables offer a secure
storage mechanism within the board's eMMC flash, accessible only by authorized
software.

Signed-off-by: Enric Balletbo i Serra <[email protected]>
Copy link

New warnings found with rstcheck:

source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:86: (INFO/1) Unexpected possible title overline or transition.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:88: (ERROR/3) Unexpected indentation.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:86: (WARNING/2) Inline literal start-string without end-string.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:94: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:94: (INFO/1) Unexpected possible title overline or transition.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:94: (WARNING/2) Inline literal start-string without end-string.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:94: (WARNING/2) Inline interpreted text or phrase reference start-string without end-string.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:97: (INFO/1) Blank line missing before literal block (after the "::")? Interpreted as a definition list item.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:2: (WARNING/2) Duplicate explicit target name: "u-boot documentation".
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:134: (INFO/1) Unexpected possible title overline or transition.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:137: (ERROR/3) Unexpected indentation.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:134: (WARNING/2) Inline literal start-string without end-string.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:140: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:252: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:252: (INFO/1) Unexpected possible title overline or transition.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:252: (WARNING/2) Inline literal start-string without end-string.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:252: (WARNING/2) Inline interpreted text or phrase reference start-string without end-string.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:262: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:268: (ERROR/3) Unexpected indentation.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:264: (WARNING/2) Inline literal start-string without end-string.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:264: (WARNING/2) Inline interpreted text or phrase reference start-string without end-string.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:271: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:271: (INFO/1) Unexpected possible title overline or transition.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:271: (WARNING/2) Inline literal start-string without end-string.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:271: (WARNING/2) Inline interpreted text or phrase reference start-string without end-string.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:353: (ERROR/3) Unexpected indentation.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:348: (WARNING/2) Inline literal start-string without end-string.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:348: (WARNING/2) Inline interpreted text or phrase reference start-string without end-string.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:356: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:356: (WARNING/2) Inline substitution_reference start-string without end-string.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:356: (WARNING/2) Inline literal start-string without end-string.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:356: (WARNING/2) Inline interpreted text or phrase reference start-string without end-string.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:362: (WARNING/2) Inline literal start-string without end-string.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:362: (WARNING/2) Inline interpreted text or phrase reference start-string without end-string.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:373: (WARNING/2) Inline literal start-string without end-string.
source/linux/How_to_Guides/Target/How_to_enable_protected_UEFI_variables_with_U-Boot_for_J784S4.rst:373: (WARNING/2) Inline interpreted text or phrase reference start-string without end-string.

Copy link
Member

@cshilwant cshilwant left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. The PR doesn't seem to follow the commit message convention mentioned in guidelines - https://github.com/TexasInstruments/processor-sdk-doc/blob/master/CONTRIBUTING.md#commit-formatting

& this is leading the commit check workflow to fail - https://github.com/TexasInstruments/processor-sdk-doc/actions/runs/13306258631?pr=163

@nsaulnier-ti
Copy link
Contributor

I assume this will not actually build into the J784 docs without also adding the file to configs/<part_number>/<part_number>_linux_toc.txt? Any other devices that the page should show up for?

https://github.com/TexasInstruments/processor-sdk-doc/blob/master/configs/J784S4/J784S4_linux_toc.txt

Copy link
Collaborator

@praneethbajjuri praneethbajjuri left a comment

Choose a reason for hiding this comment

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

@uditkumarti , @manorit2001 for review

make CROSS_COMPILE="$CC32" CROSS_COMPILE64="$CC64" \
PLATFORM="$OPTEE_PLATFORM" CFG_ARM64_core=y $OPTEE_EXTRA_ARGS \
CFG_RPMB_FS_DEV_ID=0 CFG_REE_FS=n CFG_RPMB_FS=y \
CFG_RPMB_WRITE_KEY=y CFG_RPMB_TESTKEY=y \
Copy link
Contributor

Choose a reason for hiding this comment

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

I see hardcoding CFG_RPMB_TESTKEY=y would not use our HUK at all, we should keep it disabled otherwise we'd always end up programming the test key.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, would be better to just tell the extra configs that are required and point to normal build commands of op-tee?would help in future incase something changes..

CFG_RPMB_FS_DEV_ID=0 CFG_REE_FS=n CFG_RPMB_FS=y \
CFG_RPMB_WRITE_KEY=y CFG_RPMB_TESTKEY=y \
CFG_STMM_PATH=BL32_AP_MM.fd \
CFG_CORE_HEAP_SIZE=524288 CFG_CORE_DYN_SHM=y CFG_SCTLR_ALIGNMENT_CHECK=n \
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we clearing alignment check btw? Could you explain the various flags as to why they are required

Copy link
Collaborator

@bryanbrattlof bryanbrattlof left a comment

Choose a reason for hiding this comment

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

Hey this is a great improvement! Thanks for the addition

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