Skip to content
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

bfcfg: support additional UEFI settings #234

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

Conversation

kblaiech
Copy link
Contributor

This commit implements the following changes:

  • Update control flags for Arm settings; add flags to manage UEFI secure boot settings and UEFI password settings.
  • Add extra Arm UEFI system attributes, i.e., SYS_ENABLE_I2C3 and SYS_ENABLE_FORCE_BOOT_RETRY.
  • Support Arm UEFI Secure Boot PCP; to enroll UEFI secure boot certificate files.

RM #4049059
RM #4049061

Fixes: c134069 ("bfcfg: enhance 'cfg2bin' command and add 'bin2cfg' command")

bfcfg Show resolved Hide resolved
# item. Also the capsule doesn't embed any driver.
#

local uefi_cap_hdr_len=32
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the header length 28 or 32 ? Because based on the capfile_len calculation below it is read from offset 24 with size 4 bytes which evaluates the size to 28 based on the EFI_CAPSULE_HEADER structure defined below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Very good catch Mahantesh!

The capsule header is 28 bytes (packed) but there are extra 4 bytes padding. It is in reality 8 byte aligned, This is not obvious, though. You can refer to https://github.com/tianocore/edk2/blob/master/BaseTools/Source/Python/Common/Uefi/Capsule/UefiCapsuleHeader.py#L43

Let me add a comment to explain the reason why the the header length doesn't match the size of the data structure.

Copy link
Collaborator

Choose a reason for hiding this comment

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

ACK

@kblaiech kblaiech force-pushed the master branch 2 times, most recently from 90a3b6c to 21d5df2 Compare September 3, 2024 14:05
This commit implements the following changes:
 * Improve UEFI Capsule header parsing; the existing parser
   doesn't support signed UEFI capsules.
 * Update control flags for Arm settings; add flags to manage
   UEFI secure boot settings and UEFI password settings.
 * Add extra Arm UEFI system attributes, i.e., SYS_ENABLE_I2C3,
   SYS_ENABLE_FORCE_BOOT_RETRY and SYS_ENABLE_OEM_MFG_CONFIG.
 * Support Arm UEFI Secure Boot PCP; to enroll UEFI secure
   boot certificate files.

RM #4049059
RM #4049061
RM #3879059
RM #4063109

Fixes: c134069 ("bfcfg: enhance 'cfg2bin' command and add 'bin2cfg' command")
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.

None yet

2 participants