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

Logic error in FwPackageGetImageIndex #69

Closed
Lexmark-chad opened this issue Aug 3, 2023 · 2 comments · Fixed by #70
Closed

Logic error in FwPackageGetImageIndex #69

Lexmark-chad opened this issue Aug 3, 2023 · 2 comments · Fixed by #70

Comments

@Lexmark-chad
Copy link

While working on this pull request:

OE4T/meta-tegra#1285

I discovered what appears to be a bug in the logic that is attempting to find a match to either the compatibility or full TnSpec. I think the simple fix is to add a break here:

https://github.com/NVIDIA/edk2-nvidia/blob/main/Silicon/NVIDIA/Library/FwPackageLib/FwPackageLib.c#L267

The bug was exposed due to meta-tegra having additional bup specs that differed from the L4T 35.3.1 release (which was resolved in the PR). I was able to recreate it using the L4T release by simply adding this spec:

'boardid=3668;fab=200;boardsku=0001;boardrev=;fuselevel_s=1;chiprev=2;board=jetson-xavier-nx-devkit-emmc;rootdev=mmcblk0p1'

to the jetson-xavier-nx-devkit-emmc board of the t19x_spec in jetson_board_spec.cfg and then rebuilding the capsule per here. With the additional spec present the code will fail to break out of the loop and will match on the next entry, but since Found is now TRUE it will fall into the else clause that returns EFI_UNSUPPORTED.

@bobm21
Copy link
Contributor

bobm21 commented Aug 3, 2023

Thanks for opening this issue! We're checking on it and will get back to you soon.

@bobm21 bobm21 linked a pull request Aug 10, 2023 that will close this issue
@bobm21
Copy link
Contributor

bobm21 commented Aug 10, 2023

@Lexmark-chad the linked PR changes the loop you mention to give debug warnings if multiple matching images are in the capsule instead of rejecting the capsule with EFI_UNSUPPORTED. Thanks again for opening the issue.

@bobm21 bobm21 closed this as completed Aug 27, 2024
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 a pull request may close this issue.

2 participants