Skip to content

zynqmp: Fix decoding errors in DisplayBhAttributes#49

Open
bradfa wants to merge 1 commit into
Xilinx:masterfrom
bradfa:master-display-attributes-v2
Open

zynqmp: Fix decoding errors in DisplayBhAttributes#49
bradfa wants to merge 1 commit into
Xilinx:masterfrom
bradfa:master-display-attributes-v2

Conversation

@bradfa

@bradfa bradfa commented Jun 23, 2026

Copy link
Copy Markdown

DisplayBhAttributes decodes the fsblAttributes word (boot header offset 0x44, UG1085 Table 11-5 "Image Attributes") for display. Four fields were decoded incorrectly; none affect image generation but proper decoding may help debug secure boot failures.

opt_key ([3:2]) was extracted using AUTH_ONLY_BIT_SHIFT instead of OPT_KEY_BIT_SHIFT, and its value was then overwritten before the DisplayAttributes call, so it was never shown.

auth_hash ([13:12], "SHA2 select") was not shown at all.

The core/CPU select field ([11:10]) was treated as a boolean, producing [enabled] or [disabled]. It is a four-value field per the Core enum and UG1085 v2.5 Table 11-5.

puf_mode was extracted from AUTH_HASH_BIT_SHIFT ([13:12]) instead of BH_PUF_MODE_BIT_SHIFT ([17:16]), and used case constant 2 where the PufMode enum defines 0 as puf-12k. The value was also overwritten by the bh_auth switch before display.

All attribute decodings now consistently match the flow of "set val, copy to val1, set val, display attributes" which already existed for some attributes.

DisplayBhAttributes decodes the fsblAttributes word (boot header offset
0x44, UG1085 Table 11-5 "Image Attributes") for display. Four fields
were decoded incorrectly; none affect image generation but proper
decoding may help debug secure boot failures.

opt_key ([3:2]) was extracted using AUTH_ONLY_BIT_SHIFT instead of
OPT_KEY_BIT_SHIFT, and its value was then overwritten before the
DisplayAttributes call, so it was never shown.

auth_hash ([13:12], "SHA2 select") was not shown at all.

The core/CPU select field ([11:10]) was treated as a boolean, producing
[enabled] or [disabled]. It is a four-value field per the Core enum and
UG1085 v2.5 Table 11-5.

puf_mode was extracted from AUTH_HASH_BIT_SHIFT ([13:12]) instead of
BH_PUF_MODE_BIT_SHIFT ([17:16]), and used case constant 2 where the
PufMode enum defines 0 as puf-12k. The value was also overwritten by the
bh_auth switch before display.

All attribute decodings now consistently match the flow of "set val,
copy to val1, set val, display attributes" which already existed for
some attributes.

Signed-off-by: Andrew Bradford <andrew.bradford@konsulko.com>
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.

1 participant