now only breaks at acpi
This commit is contained in:
parent
9f68ee84b6
commit
9b8503f915
|
@ -128,7 +128,7 @@ impl Serialize for MemoryMap {
|
|||
}
|
||||
|
||||
fn size(&self) -> usize {
|
||||
core::mem::size_of::<EFIMemoryMapHeader>() + self.as_raw().0.len()
|
||||
core::mem::size_of::<EFIMemoryMapHeader>().next_multiple_of(16) + self.as_raw().0.len()
|
||||
}
|
||||
|
||||
fn serialize_raw(&self, out: &mut [u8]) {
|
||||
|
@ -148,7 +148,7 @@ impl Serialize for MemoryMap {
|
|||
};
|
||||
|
||||
out[..header_size].copy_from_slice(header_bytes);
|
||||
out[header_size..].copy_from_slice(raw);
|
||||
out[header_size.next_multiple_of(16)..].copy_from_slice(raw);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ trampoline_size:
|
|||
);
|
||||
|
||||
unsafe {
|
||||
let entry_addr = kernel.entry_addr(kernel_start);
|
||||
let entry_addr = kernel.entry_addr();
|
||||
log::debug!(
|
||||
"Calling trampoline at {:#x} for kernel at {:#x}",
|
||||
misc_buf.trampoline.as_ptr() as usize,
|
||||
|
|
|
@ -62,8 +62,8 @@ impl<'a> Kernel<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn entry_addr(&self, serialize_addr: *const u8) -> *const u8 {
|
||||
unsafe { serialize_addr.byte_add(self.parsed.header.e_entry as usize - self.min_loadaddr) }
|
||||
pub fn entry_addr(&self) -> *const u8 {
|
||||
self.parsed.header.e_entry as usize as *const u8
|
||||
}
|
||||
|
||||
fn find_symbol_headers(parsed: &Elf) -> Option<(SectionHeader, SectionHeader)> {
|
||||
|
@ -198,7 +198,7 @@ impl<'a> Module for Kernel<'a> {
|
|||
];
|
||||
|
||||
if self.symbol_headers.is_some() {
|
||||
let start_symbols = self.min_loadaddr + self.size_load_segments();
|
||||
let start_symbols = self.size_load_segments() + (1 << 21);
|
||||
let end_symbols = start_symbols + self.size_symbols();
|
||||
|
||||
items.push(ModuleInfoItem {
|
||||
|
|
Loading…
Reference in a new issue