File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ impl Display for Error {
104
104
pub struct Elf ;
105
105
106
106
impl Elf {
107
+ /// Verifies that magic numbers are present in the Elf header.
107
108
fn validate_header ( ehdr : & elf:: Elf64_Ehdr ) -> std:: result:: Result < ( ) , Error > {
108
109
// Sanity checks
109
110
if ehdr. e_ident [ elf:: EI_MAG0 as usize ] != elf:: ELFMAG0 as u8
@@ -248,6 +249,12 @@ impl KernelLoader for Elf {
248
249
}
249
250
}
250
251
252
+ /// Examines a supplied elf program header of type `PT_NOTE` to determine if it contains an entry
253
+ /// of type `XEN_ELFNOTE_PHYS32_ENTRY` (0x12). Notes of this type encode a physical 32-bit entry
254
+ /// point address into the kernel, which is used when launching guests in 32-bit (protected) mode
255
+ /// with paging disabled, as described by the PVH boot protocol.
256
+ /// Returns the encoded entry point address, or `None` if no `XEN_ELFNOTE_PHYS32_ENTRY` entries are
257
+ /// found in the note header.
251
258
fn parse_elf_note < F > ( phdr : & elf:: Elf64_Phdr , kernel_image : & mut F ) -> Result < Option < GuestAddress > >
252
259
where
253
260
F : Read + Seek ,
You can’t perform that action at this time.
0 commit comments