-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stage0_bin_tdx jumps to 64-bit long mode
This CR adds the page tables to linker script. TD loads the pml4 address into cr3 and long jumps to 64-bit long mode entry point. Also it uses a TEMP_MEM section for the low 640KiB memory area, zeros out the .bss section, and set up the stack. The Rust entrypoint prints a hello world message, checks if .data section is in good shape, prints TdInfo and loops infinitely. Temporarily park AP in a dead loop. Also it fixes a bug in oak_tdx_guest, where the Attributes should contain a bit for SEPT_VE_DISABLE. Without it, guest would crash on get_td_info(). I used ver 1.5.05.44 of the TDX module ABI spec for reference. Example log: ttyS0: Hello from stage0_bin_tdx! ttyS0: TEST_DATA: deadbeaf ttyS0: td_info.gpa_width: 0000000000000034 ttyS0: td_info.attributes: 0000000010000000 ttyS0: td_info.max_vcpus: 00000004 ttyS0: td_info.num_vcpus: 00000004 Bug: 352784756 Change-Id: I83aec1a8ca704409cbb074480d94d1bc3c5b8443
- Loading branch information
Showing
8 changed files
with
282 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.