mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-28 14:02:51 +00:00
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.
This commit is contained in:
parent
f2eb759901
commit
38fca26f54
Notes:
sideshowbarker
2024-07-18 11:35:51 +09:00
Author: https://github.com/gunnarbeutner
Commit: 38fca26f54
Pull-request: https://github.com/SerenityOS/serenity/pull/8225
21 changed files with 295 additions and 40 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <Kernel/Debug.h>
|
||||
#include <Kernel/FileSystem/Custody.h>
|
||||
#include <Kernel/FileSystem/FileDescription.h>
|
||||
#include <Kernel/Panic.h>
|
||||
#include <Kernel/PerformanceManager.h>
|
||||
#include <Kernel/Process.h>
|
||||
#include <Kernel/VM/Region.h>
|
||||
|
@ -43,6 +44,7 @@ KResultOr<pid_t> Process::sys$fork(RegisterState& regs)
|
|||
dbgln_if(FORK_DEBUG, "fork: child={}", child);
|
||||
child->space().set_enforces_syscall_regions(space().enforces_syscall_regions());
|
||||
|
||||
#if ARCH(I386)
|
||||
auto& child_tss = child_first_thread->m_tss;
|
||||
child_tss.eax = 0; // fork() returns 0 in the child :^)
|
||||
child_tss.ebx = regs.ebx;
|
||||
|
@ -62,6 +64,10 @@ KResultOr<pid_t> Process::sys$fork(RegisterState& regs)
|
|||
child_tss.ss = regs.userspace_ss;
|
||||
|
||||
dbgln_if(FORK_DEBUG, "fork: child will begin executing at {:04x}:{:08x} with stack {:04x}:{:08x}, kstack {:04x}:{:08x}", child_tss.cs, child_tss.eip, child_tss.ss, child_tss.esp, child_tss.ss0, child_tss.esp0);
|
||||
#else
|
||||
(void)regs;
|
||||
PANIC("Process::sys$fork() not implemented.");
|
||||
#endif
|
||||
|
||||
{
|
||||
ScopedSpinLock lock(space().get_lock());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue