mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:24:58 +00:00
Kernel: Take some baby steps towards x86_64
Make more of the kernel compile in 64-bit mode, and make some things pointer-size-agnostic (by using FlatPtr.) There's a lot of work to do here before the kernel will even compile.
This commit is contained in:
parent
eb08a0edd5
commit
8f70528f30
12 changed files with 187 additions and 118 deletions
|
@ -48,7 +48,7 @@ static u8 parse_hex_digit(char nibble)
|
|||
return 10 + (nibble - 'a');
|
||||
}
|
||||
|
||||
u32 address_for_kernel_symbol(const StringView& name)
|
||||
FlatPtr address_for_kernel_symbol(const StringView& name)
|
||||
{
|
||||
for (size_t i = 0; i < s_symbol_count; ++i) {
|
||||
if (!strncmp(name.characters_without_null_termination(), s_symbols[i].name, name.length()))
|
||||
|
@ -57,7 +57,7 @@ u32 address_for_kernel_symbol(const StringView& name)
|
|||
return 0;
|
||||
}
|
||||
|
||||
const KernelSymbol* symbolicate_kernel_address(u32 address)
|
||||
const KernelSymbol* symbolicate_kernel_address(FlatPtr address)
|
||||
{
|
||||
if (address < g_lowest_kernel_symbol_address || address > g_highest_kernel_symbol_address)
|
||||
return nullptr;
|
||||
|
@ -147,7 +147,7 @@ NEVER_INLINE static void dump_backtrace_impl(FlatPtr base_pointer, bool use_ksym
|
|||
FlatPtr* stack_ptr = (FlatPtr*)base_pointer;
|
||||
while (stack_ptr && safe_memcpy(copied_stack_ptr, stack_ptr, sizeof(copied_stack_ptr), fault_at)) {
|
||||
FlatPtr retaddr = copied_stack_ptr[1];
|
||||
dbgln("{:p} (next: {:p})", retaddr, stack_ptr ? (u32*)copied_stack_ptr[0] : 0);
|
||||
dbgln("{:p} (next: {:p})", retaddr, stack_ptr ? (FlatPtr*)copied_stack_ptr[0] : 0);
|
||||
stack_ptr = (FlatPtr*)copied_stack_ptr[0];
|
||||
}
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue