diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-06-23 21:54:41 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-24 09:27:13 +0200 |
commit | 38fca26f542bcc9fa68755323ac4eadb5ecd4586 (patch) | |
tree | e39f3f0a04dff799a41823fdb30a8067b23aa98c /Kernel/Scheduler.cpp | |
parent | f2eb759901f1fb7c96654b2461ae8fc348e250bb (diff) | |
download | serenity-38fca26f542bcc9fa68755323ac4eadb5ecd4586.zip |
Kernel: Add stubs for missing x86_64 functionality
This adds just enough stubs to make the kernel compile on x86_64. Obviously
it won't do anything useful - in fact it won't even attempt to boot because
Multiboot doesn't support ELF64 binaries - but it gets those compiler errors
out of the way so more progress can be made getting all the missing
functionality in place.
Diffstat (limited to 'Kernel/Scheduler.cpp')
-rw-r--r-- | Kernel/Scheduler.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Kernel/Scheduler.cpp b/Kernel/Scheduler.cpp index a3b25aad4b..5ce6449381 100644 --- a/Kernel/Scheduler.cpp +++ b/Kernel/Scheduler.cpp @@ -228,10 +228,14 @@ bool Scheduler::pick_next() auto& thread_to_schedule = pull_next_runnable_thread(); if constexpr (SCHEDULER_DEBUG) { +#if ARCH(I386) dbgln("Scheduler[{}]: Switch to {} @ {:04x}:{:08x}", Processor::id(), thread_to_schedule, thread_to_schedule.tss().cs, thread_to_schedule.tss().eip); +#else + PANIC("Scheduler::pick_next() not implemented"); +#endif } // We need to leave our first critical section before switching context, @@ -571,14 +575,22 @@ void dump_thread_list() dbgln("Scheduler thread list for processor {}:", Processor::id()); auto get_cs = [](Thread& thread) -> u16 { +#if ARCH(I386) if (!thread.current_trap()) return thread.tss().cs; +#else + PANIC("get_cs() not implemented"); +#endif return thread.get_register_dump_from_stack().cs; }; auto get_eip = [](Thread& thread) -> u32 { +#if ARCH(I386) if (!thread.current_trap()) return thread.tss().eip; +#else + PANIC("get_eip() not implemented"); +#endif return thread.get_register_dump_from_stack().eip; }; |