Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/platform/x86_pc/ioapic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ namespace x86
}
}

[[noreturn]] static void ioapic_panic(uint32_t entry) {
printf("Entry: %u\n", entry);
assert(0 && "Could not match I/O APIC to entry");
std::abort();
}

inline IOapic& get_ioapic_for(uint32_t entry)
{
uint32_t current = 0;
Expand All @@ -115,8 +121,7 @@ namespace x86
}
current += a.entries();
}
printf("Entry: %u\n", entry);
assert(0 && "Could not match I/O APIC to entry");
ioapic_panic(entry);
}

void IOAPIC::enable(uint8_t cpu, const ACPI::override_t& redir)
Expand Down
14 changes: 9 additions & 5 deletions vmbuild/elf_syms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,13 @@ static int prune_elf_symbols(char* location)
assert(hdr->e_ident[EI_MAG2] == ELFMAG2);
assert(hdr->e_ident[EI_MAG3] == ELFMAG3);

if (hdr->e_ident[EI_CLASS] == ELFCLASS32)
return prune_elf32_symbols(location);
else if (hdr->e_ident[EI_CLASS] == ELFCLASS64)
return prune_elf64_symbols(location);
assert(0 && "Unknown ELF class");
switch (hdr->e_ident[EI_CLASS]) {
case ELFCLASS32:
return prune_elf32_symbols(location);
case ELFCLASS64:
return prune_elf64_symbols(location);
default:
assert(false && "Unknown ELF class");
return 0;
}
}