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

Changes/fixes on top of v11 AMD patches for non-PSP case #26

Draft
wants to merge 26 commits into
base: grub-sl-2.12-v11-amd
Choose a base branch
from

Conversation

SergiiDmytruk
Copy link
Member

Significant number commits are meant to be squashed into other commits on the base branch later on.

Just use grub_divmod64() explicitly like all other code does.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
grub-core/loader/multiboot_elfxx.c Outdated Show resolved Hide resolved
grub-core/loader/multiboot_mbi2.c Outdated Show resolved Hide resolved
grub-core/loader/multiboot_mbi2.c Outdated Show resolved Hide resolved
grub-core/loader/slaunch/psp.c Outdated Show resolved Hide resolved
grub-core/loader/slaunch/skl.c Outdated Show resolved Hide resolved
grub-core/loader/slaunch/txt.c Outdated Show resolved Hide resolved
include/grub/slaunch.h Outdated Show resolved Hide resolved
SergiiDmytruk and others added 24 commits November 29, 2024 19:48
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
The behaviour is implementation specific and in case of GCC 32-bit
pointers are **sign-extended** on conversions to a larger integer type,
thus producing invalid values.

The opposite isn't dangerous, but still generates compiler warnings.

Go through `grub_addr_t` in both cases.

https://gcc.gnu.org/onlinedocs/gcc/Arrays-and-pointers-implementation.html

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Only the case of legacy boot has slparams->mle_start and
slparams->mle_mem different.  Other places are updated for consistency.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Make them more comprehensive and remove the `skl_size <
(8*GRUB_PAGE_SIZE)` one which doesn't make much sense.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Not all boot methods are Linux EFI boot methods.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
GRUB_MULTIBOOT(get_mbi_size) returns an upper bound on MBI's size
instead of the actual size.  It could also be used for measurements
after zeroing unused parts of the buffer, but using an actual size seems
like a better option as the same MBI will always have the same hash
regardless of the amount of extra memory that follows it.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
The code makes sure that MBI entry goes first in DRTM, so the payload
can measure it first on launch.  Then goes SLRT and other typical
entries, while MB2 modules are added at the end.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Signed-off-by: Tomasz Żyjewski <tomasz.zyjewski@3mdeb.com>
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Just return bool.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
…_device()

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Copy link
Member Author

@SergiiDmytruk SergiiDmytruk left a comment

Choose a reason for hiding this comment

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

GitHub: You need to leave a comment indicating the requested changes.
Me: Shut up and post my replies to outdated conversations.

P.S. Private browsing suggests that it did post them.

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.

3 participants