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