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

UefiPayloadPkg: Minor fixes #10571

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MdePkg/Library/BaseFdtLib/libfdt
1 change: 1 addition & 0 deletions UefiPayloadPkg/Tools/MkFitImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,4 +274,5 @@ def ReplaceFv (UplBinary, SectionFvFile, SectionName, Arch):
return 0
except Exception as Ex:
print(Ex)
raise
return 1
4 changes: 2 additions & 2 deletions UefiPayloadPkg/UniversalPayloadBuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ def BuildUniversalPayload(Args):
BuildDir = os.path.join(os.environ['WORKSPACE'], os.path.normpath("Build/UefiPayloadPkg{}").format (Args.Arch))
if Args.Arch == 'X64':
BuildArch = "X64"
FitArch = "x86_64"
FitArch = "i386"
Copy link
Contributor

Choose a reason for hiding this comment

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

As I said on the other change, this shouldn't be here. coreboot will call payloads in 32-bit mode no matter what, so coreboot will always pass -a IA32 to the script

Copy link
Author

Choose a reason for hiding this comment

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

UPL needs to work with other projects, though. The 'arch' property in UPL images indicates which architecture the image was built for. So if we have x86_64 here, U-Boot will happily boot it in 64-bit mode, thus causing a crash.

elif Args.Arch == 'IA32':
BuildArch = "IA32 -a X64"
FitArch = "x86"
FitArch = "i386"
elif Args.Arch == 'RISCV64':
BuildArch = "RISCV64"
FitArch = "RISCV64"
Expand Down
Loading