-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds information to the ELF binary so that a loader will know where to start the executable. This now allows the firmware to be booted via the PVH Boot Protocol. Signed-off-by: Joe Richey <[email protected]>
- Loading branch information
Showing
3 changed files
with
24 additions
and
1 deletion.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
global_asm!(include_str!("note.s")); | ||
global_asm!(include_str!("ram32.s")); | ||
global_asm!(include_str!("ram64.s")); | ||
global_asm!(include_str!("gdt64.s")); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.section .note, "a" | ||
|
||
# From xen/include/public/elfnote.h, "Physical entry point into the kernel." | ||
XEN_ELFNOTE_PHYS32_ENTRY = 18 | ||
|
||
# We don't bother defining an ELFNOTE macro, as we only have one note. | ||
# This is equialent to the kernel's: | ||
# ELFNOTE(Xen, XEN_ELFNOTE_PHYS32_ENTRY, .long pvh_start) | ||
.align 4 | ||
.long name_end - name_start # namesz | ||
.long desc_end - desc_start # descsz | ||
.long XEN_ELFNOTE_PHYS32_ENTRY # type | ||
name_start: | ||
.asciz "Xen" | ||
name_end: | ||
.align 4 | ||
desc_start: | ||
.long ram32_start | ||
desc_end: | ||
.align 4 |