Kernel: Don't directly include <Kernel/Arch/x86/TrapFrame.h>

This adds a new arch-independent header which in turn includes the
correct header for the build architecture.
This commit is contained in:
Gunnar Beutner 2022-10-16 16:57:21 +02:00 committed by Linus Groh
parent 918fdf9e2c
commit 1e3edb3b76
Notes: sideshowbarker 2024-07-17 18:46:30 +09:00
9 changed files with 25 additions and 8 deletions

17
Kernel/Arch/TrapFrame.h Normal file
View file

@ -0,0 +1,17 @@
/*
* Copyright (c) 2022, Gunnar Beutner <gbeutner@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Platform.h>
#if ARCH(X86_64) || ARCH(I386)
# include <Kernel/Arch/x86/TrapFrame.h>
#elif ARCH(AARCH64)
# include <Kernel/Arch/aarch64/TrapFrame.h>
#else
# error "Unknown architecture"
#endif

View file

@ -30,8 +30,8 @@
#include <Kernel/Arch/Processor.h>
#include <Kernel/Arch/RegisterState.h>
#include <Kernel/Arch/SafeMem.h>
#include <Kernel/Arch/TrapFrame.h>
#include <Kernel/Arch/x86/ISRStubs.h>
#include <Kernel/Arch/x86/TrapFrame.h>
extern FlatPtr start_of_unmap_after_init;
extern FlatPtr end_of_unmap_after_init;

View file

@ -24,10 +24,10 @@
#include <Kernel/Arch/Processor.h>
#include <Kernel/Arch/SafeMem.h>
#include <Kernel/Arch/ScopedCritical.h>
#include <Kernel/Arch/TrapFrame.h>
#include <Kernel/Arch/x86/CPUID.h>
#include <Kernel/Arch/x86/MSR.h>
#include <Kernel/Arch/x86/ProcessorInfo.h>
#include <Kernel/Arch/x86/TrapFrame.h>
#include <Kernel/Memory/PageDirectory.h>
#include <Kernel/Memory/ScopedAddressSpaceSwitcher.h>

View file

@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <Kernel/Arch/TrapFrame.h>
#include <Kernel/Arch/x86/DescriptorTable.h>
#include <Kernel/Arch/x86/TrapFrame.h>
// clang-format off
asm(

View file

@ -6,7 +6,7 @@
#include <AK/StdLibExtras.h>
#include <Kernel/Arch/Processor.h>
#include <Kernel/Arch/x86/TrapFrame.h>
#include <Kernel/Arch/TrapFrame.h>
#include <Kernel/Process.h>
#include <Kernel/Random.h>
#include <Kernel/Scheduler.h>

View file

@ -4,9 +4,9 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <Kernel/Arch/TrapFrame.h>
#include <Kernel/Arch/x86/DescriptorTable.h>
#include <Kernel/Arch/x86/Processor.h>
#include <Kernel/Arch/x86/TrapFrame.h>
extern "C" void syscall_entry();
extern "C" [[gnu::naked]] void syscall_entry()

View file

@ -9,7 +9,7 @@
#include <AK/Singleton.h>
#include <AK/Time.h>
#include <Kernel/Arch/InterruptDisabler.h>
#include <Kernel/Arch/x86/TrapFrame.h>
#include <Kernel/Arch/TrapFrame.h>
#include <Kernel/Debug.h>
#include <Kernel/Panic.h>
#include <Kernel/PerformanceManager.h>

View file

@ -6,8 +6,8 @@
*/
#include <Kernel/API/Syscall.h>
#include <Kernel/Arch/TrapFrame.h>
#include <Kernel/Arch/x86/Interrupts.h>
#include <Kernel/Arch/x86/TrapFrame.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Panic.h>
#include <Kernel/PerformanceManager.h>

View file

@ -11,7 +11,7 @@
#include <AK/Time.h>
#include <Kernel/Arch/InterruptDisabler.h>
#include <Kernel/Arch/SmapDisabler.h>
#include <Kernel/Arch/x86/TrapFrame.h>
#include <Kernel/Arch/TrapFrame.h>
#include <Kernel/Debug.h>
#include <Kernel/Devices/KCOVDevice.h>
#include <Kernel/FileSystem/OpenFileDescription.h>