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

multiboot2: Switch to using SLRT interface #14

Merged
merged 3 commits into from
Dec 8, 2023

Conversation

SergiiDmytruk
Copy link
Member

No description provided.

@SergiiDmytruk SergiiDmytruk force-pushed the intel-txt-aem-mb2-slrt branch from 12f3a3e to 87f124a Compare October 27, 2023 17:14
@SergiiDmytruk SergiiDmytruk marked this pull request as ready for review October 27, 2023 17:15
Base automatically changed from intel-txt-aem-slrt to intel-txt-aem-2.06 November 8, 2023 14:02
grub-core/loader/multiboot_mbi2.c Outdated Show resolved Hide resolved
include/grub/slr_table.h Outdated Show resolved Hide resolved
Just extract grub_slaunch_add_slrt_policy_entry() calls into separate
functions to be able to call them in needed order.

Signed-off-by: Sergii Dmytruk <[email protected]>
GRUB_MULTIBOOT(get_mbi_size) doesn't look like an accurate source of the
final size, more like a minimal memory buffer size.

Signed-off-by: Sergii Dmytruk <[email protected]>
Copy link
Member

@krystian-hebel krystian-hebel left a comment

Choose a reason for hiding this comment

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

With these changes I can boot into Xen, however it still doesn't fully work. Depending on whether I comment out grub_multiboot2_set_video_mode() (to get final lines printed on VGA) Xen either hangs somewhere (if not commented out) or reboots with TXT.ERRORCODE set to 0x8000000a (commented out).

grub-core/loader/multiboot.c Outdated Show resolved Hide resolved
grub-core/loader/multiboot_mbi2.c Outdated Show resolved Hide resolved
grub-core/loader/multiboot.c Show resolved Hide resolved
@SergiiDmytruk
Copy link
Member Author

Depending on whether I comment out grub_multiboot2_set_video_mode() (to get final lines printed on VGA) Xen either hangs somewhere (if not commented out) or reboots with TXT.ERRORCODE set to 0x8000000a (commented out).

Which commit of TrenchBoot/xen#7 was used? 0x8000000a is that "catch all" error code which doesn't mean much.

I guess this also tests changes from #13.

grub-core/loader/multiboot.c Outdated Show resolved Hide resolved
grub-core/loader/multiboot.c Show resolved Hide resolved
grub-core/loader/multiboot.c Outdated Show resolved Hide resolved
The code makes sure that MBI entry goes first in DRTM, so the payload
can measure it first on launch.

SLRT table is allocated on the heap first, size for it is reserved
inside TXT heap by TXT code and data is later copied into its final
place.

Signed-off-by: Sergii Dmytruk <[email protected]>
@SergiiDmytruk SergiiDmytruk force-pushed the intel-txt-aem-mb2-slrt branch from e1bdaf2 to b293777 Compare December 4, 2023 18:37
Copy link
Member

@krystian-hebel krystian-hebel left a comment

Choose a reason for hiding this comment

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

Seems that GRUB side works, but Xen still triple-faults. I'm approving this PR but I'll hold with merging until I can confirm that only Xen needs changes.

@krystian-hebel krystian-hebel merged commit b293777 into intel-txt-aem-2.06 Dec 8, 2023
1 check passed
@krystian-hebel krystian-hebel deleted the intel-txt-aem-mb2-slrt branch December 8, 2023 12:55
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.

2 participants