From 62f9377656a18bcca1b1616f43dc3ba85dedd8c0 Mon Sep 17 00:00:00 2001 From: Hendiadyoin1 Date: Tue, 22 Jun 2021 17:40:16 +0200 Subject: Kernel: Move special sections into Sections.h This also removes a lot of CPU.h includes infavor for Sections.h --- Kernel/ACPI/DynamicParser.cpp | 1 + Kernel/ACPI/Initialize.cpp | 1 + Kernel/ACPI/MultiProcessorParser.cpp | 1 + Kernel/ACPI/Parser.cpp | 1 + Kernel/Arch/x86/CPU.h | 3 --- Kernel/Arch/x86/common/ASM_wrapper.cpp | 2 +- Kernel/Arch/x86/common/Interrupts.cpp | 1 + Kernel/Arch/x86/common/Processor.cpp | 2 +- Kernel/Arch/x86/i386/ASM_wrapper.cpp | 2 +- Kernel/Arch/x86/i386/Processor.cpp | 2 +- Kernel/Arch/x86/x86_64/ASM_wrapper.cpp | 2 +- Kernel/Arch/x86/x86_64/Processor.cpp | 2 +- Kernel/CommandLine.cpp | 2 +- Kernel/ConsoleDevice.cpp | 1 + Kernel/DMI.cpp | 1 + Kernel/Devices/FullDevice.cpp | 2 +- Kernel/Devices/HID/HIDManagement.cpp | 1 + Kernel/Devices/HID/I8042Controller.cpp | 1 + Kernel/Devices/HID/KeyboardDevice.cpp | 2 +- Kernel/Devices/HID/PS2KeyboardDevice.cpp | 2 +- Kernel/Devices/HID/PS2MouseDevice.cpp | 1 + Kernel/Devices/HID/VMWareMouseDevice.cpp | 1 + Kernel/Devices/MemoryDevice.cpp | 1 + Kernel/Devices/NullDevice.cpp | 3 ++- Kernel/Devices/PCISerialDevice.cpp | 1 + Kernel/Devices/PCSpeaker.cpp | 1 - Kernel/Devices/RandomDevice.cpp | 1 + Kernel/Devices/SB16.cpp | 1 + Kernel/Devices/SerialDevice.cpp | 1 + Kernel/Devices/USB/UHCIController.cpp | 1 + Kernel/Devices/VMWareBackdoor.cpp | 2 +- Kernel/Devices/ZeroDevice.cpp | 3 ++- Kernel/FileSystem/VirtualFileSystem.cpp | 1 + Kernel/Graphics/BochsGraphicsAdapter.cpp | 1 + Kernel/Graphics/Console/TextModeConsole.cpp | 1 + Kernel/Graphics/Console/VGAConsole.cpp | 1 + Kernel/Graphics/FramebufferDevice.cpp | 4 ++-- Kernel/Graphics/GraphicsManagement.cpp | 1 + Kernel/Graphics/VGACompatibleAdapter.cpp | 1 + Kernel/Heap/SlabAllocator.cpp | 1 + Kernel/Heap/kmalloc.cpp | 2 +- Kernel/Interrupts/APIC.cpp | 1 + Kernel/Interrupts/IOAPIC.cpp | 1 + Kernel/Interrupts/InterruptManagement.cpp | 1 + Kernel/Interrupts/PIC.cpp | 1 + Kernel/Interrupts/SharedIRQHandler.cpp | 1 + Kernel/Interrupts/SpuriousInterruptHandler.cpp | 1 + Kernel/KSyms.cpp | 1 + Kernel/Net/E1000ENetworkAdapter.cpp | 1 + Kernel/Net/E1000NetworkAdapter.cpp | 1 + Kernel/Net/NE2000NetworkAdapter.cpp | 1 + Kernel/Net/NetworkingManagement.cpp | 1 + Kernel/Net/RTL8139NetworkAdapter.cpp | 1 + Kernel/Net/RTL8168NetworkAdapter.cpp | 1 + Kernel/PCI/Access.cpp | 2 +- Kernel/PCI/IOAccess.cpp | 2 +- Kernel/PCI/Initializer.cpp | 1 + Kernel/PCI/MMIOAccess.cpp | 2 +- Kernel/PCI/WindowedMMIOAccess.cpp | 2 +- Kernel/Process.cpp | 1 + Kernel/Random.cpp | 1 + Kernel/Scheduler.cpp | 1 + Kernel/Sections.h | 12 ++++++++++++ Kernel/Storage/AHCIController.h | 2 +- Kernel/Storage/AHCIPort.h | 1 + Kernel/Storage/AHCIPortHandler.h | 1 + Kernel/Storage/BMIDEChannel.cpp | 1 + Kernel/Storage/IDEChannel.cpp | 1 + Kernel/Storage/IDEController.cpp | 1 + Kernel/Storage/PATADiskDevice.cpp | 1 + Kernel/Syscall.cpp | 1 + Kernel/TTY/ConsoleManagement.cpp | 1 + Kernel/TTY/PTYMultiplexer.cpp | 1 + Kernel/TTY/VirtualConsole.cpp | 2 +- Kernel/Tasks/FinalizerTask.cpp | 1 + Kernel/Tasks/SyncTask.cpp | 1 + Kernel/Thread.cpp | 1 + Kernel/Time/APICTimer.cpp | 2 +- Kernel/Time/HPET.cpp | 1 + Kernel/Time/HPETComparator.cpp | 2 +- Kernel/Time/PIT.cpp | 3 ++- Kernel/Time/TimeManagement.cpp | 1 + Kernel/TimerQueue.cpp | 2 +- Kernel/VM/MemoryManager.cpp | 2 +- Kernel/VM/PageDirectory.cpp | 1 + Kernel/VM/PhysicalPage.h | 1 - Kernel/VM/Range.cpp | 2 +- Kernel/VM/RangeAllocator.h | 1 - Kernel/VirtIO/VirtIO.cpp | 1 + Kernel/VirtIO/VirtIOConsole.cpp | 1 + Kernel/VirtIO/VirtIORNG.cpp | 1 + Kernel/WorkQueue.cpp | 1 + Kernel/init.cpp | 1 + 93 files changed, 104 insertions(+), 34 deletions(-) create mode 100644 Kernel/Sections.h diff --git a/Kernel/ACPI/DynamicParser.cpp b/Kernel/ACPI/DynamicParser.cpp index 7c6d6c6a60..b2d9f1aa59 100644 --- a/Kernel/ACPI/DynamicParser.cpp +++ b/Kernel/ACPI/DynamicParser.cpp @@ -6,6 +6,7 @@ #include #include +#include namespace Kernel { namespace ACPI { diff --git a/Kernel/ACPI/Initialize.cpp b/Kernel/ACPI/Initialize.cpp index 9988a19a2d..9b40ceaa01 100644 --- a/Kernel/ACPI/Initialize.cpp +++ b/Kernel/ACPI/Initialize.cpp @@ -7,6 +7,7 @@ #include #include +#include namespace Kernel { namespace ACPI { diff --git a/Kernel/ACPI/MultiProcessorParser.cpp b/Kernel/ACPI/MultiProcessorParser.cpp index 6ef63622e8..8266d6411e 100644 --- a/Kernel/ACPI/MultiProcessorParser.cpp +++ b/Kernel/ACPI/MultiProcessorParser.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/Kernel/ACPI/Parser.cpp b/Kernel/ACPI/Parser.cpp index 9b56d2acbf..1706445c7e 100644 --- a/Kernel/ACPI/Parser.cpp +++ b/Kernel/ACPI/Parser.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include diff --git a/Kernel/Arch/x86/CPU.h b/Kernel/Arch/x86/CPU.h index 32c1bde4f2..298ed8d12a 100644 --- a/Kernel/Arch/x86/CPU.h +++ b/Kernel/Arch/x86/CPU.h @@ -11,9 +11,6 @@ #include -#define READONLY_AFTER_INIT __attribute__((section(".ro_after_init"))) -#define UNMAP_AFTER_INIT NEVER_INLINE __attribute__((section(".unmap_after_init"))) - /* Map IRQ0-15 @ ISR 0x50-0x5F */ #define IRQ_VECTOR_BASE 0x50 #define GENERIC_INTERRUPT_HANDLERS_COUNT (256 - IRQ_VECTOR_BASE) diff --git a/Kernel/Arch/x86/common/ASM_wrapper.cpp b/Kernel/Arch/x86/common/ASM_wrapper.cpp index 787f291225..49f33dd3e8 100644 --- a/Kernel/Arch/x86/common/ASM_wrapper.cpp +++ b/Kernel/Arch/x86/common/ASM_wrapper.cpp @@ -7,8 +7,8 @@ #include #include -#include #include +#include namespace Kernel { diff --git a/Kernel/Arch/x86/common/Interrupts.cpp b/Kernel/Arch/x86/common/Interrupts.cpp index bcd5e5e663..a5b619735f 100644 --- a/Kernel/Arch/x86/common/Interrupts.cpp +++ b/Kernel/Arch/x86/common/Interrupts.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include diff --git a/Kernel/Arch/x86/common/Processor.cpp b/Kernel/Arch/x86/common/Processor.cpp index 17d798cc20..96281902d7 100644 --- a/Kernel/Arch/x86/common/Processor.cpp +++ b/Kernel/Arch/x86/common/Processor.cpp @@ -12,11 +12,11 @@ #include #include #include +#include #include #include #include -#include #include #include #include diff --git a/Kernel/Arch/x86/i386/ASM_wrapper.cpp b/Kernel/Arch/x86/i386/ASM_wrapper.cpp index f5ba002a5a..449529e8f2 100644 --- a/Kernel/Arch/x86/i386/ASM_wrapper.cpp +++ b/Kernel/Arch/x86/i386/ASM_wrapper.cpp @@ -7,8 +7,8 @@ #include #include -#include #include +#include namespace Kernel { diff --git a/Kernel/Arch/x86/i386/Processor.cpp b/Kernel/Arch/x86/i386/Processor.cpp index 4c35e351d9..dd08a0813a 100644 --- a/Kernel/Arch/x86/i386/Processor.cpp +++ b/Kernel/Arch/x86/i386/Processor.cpp @@ -5,12 +5,12 @@ */ #include -#include #include #include #include #include #include +#include #include namespace Kernel { diff --git a/Kernel/Arch/x86/x86_64/ASM_wrapper.cpp b/Kernel/Arch/x86/x86_64/ASM_wrapper.cpp index 9a463bf1b4..754f453fe7 100644 --- a/Kernel/Arch/x86/x86_64/ASM_wrapper.cpp +++ b/Kernel/Arch/x86/x86_64/ASM_wrapper.cpp @@ -7,8 +7,8 @@ #include #include -#include #include +#include namespace Kernel { diff --git a/Kernel/Arch/x86/x86_64/Processor.cpp b/Kernel/Arch/x86/x86_64/Processor.cpp index 17dae9352b..7db6c9ad4c 100644 --- a/Kernel/Arch/x86/x86_64/Processor.cpp +++ b/Kernel/Arch/x86/x86_64/Processor.cpp @@ -5,12 +5,12 @@ */ #include -#include #include #include #include #include #include +#include #include namespace Kernel { diff --git a/Kernel/CommandLine.cpp b/Kernel/CommandLine.cpp index 3d10641e2f..18ac77c149 100644 --- a/Kernel/CommandLine.cpp +++ b/Kernel/CommandLine.cpp @@ -5,9 +5,9 @@ */ #include -#include #include #include +#include #include namespace Kernel { diff --git a/Kernel/ConsoleDevice.cpp b/Kernel/ConsoleDevice.cpp index dc4529047e..944ea48fe3 100644 --- a/Kernel/ConsoleDevice.cpp +++ b/Kernel/ConsoleDevice.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include diff --git a/Kernel/DMI.cpp b/Kernel/DMI.cpp index 293c99db28..8d821c3287 100644 --- a/Kernel/DMI.cpp +++ b/Kernel/DMI.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/Kernel/Devices/FullDevice.cpp b/Kernel/Devices/FullDevice.cpp index 855d6a85f3..fec5cc50c9 100644 --- a/Kernel/Devices/FullDevice.cpp +++ b/Kernel/Devices/FullDevice.cpp @@ -7,8 +7,8 @@ #include "FullDevice.h" #include #include -#include #include +#include #include namespace Kernel { diff --git a/Kernel/Devices/HID/HIDManagement.cpp b/Kernel/Devices/HID/HIDManagement.cpp index 03e8068f08..67c2073007 100644 --- a/Kernel/Devices/HID/HIDManagement.cpp +++ b/Kernel/Devices/HID/HIDManagement.cpp @@ -9,6 +9,7 @@ #include #include #include +#include namespace Kernel { diff --git a/Kernel/Devices/HID/I8042Controller.cpp b/Kernel/Devices/HID/I8042Controller.cpp index 1a45a35326..26d4d1f687 100644 --- a/Kernel/Devices/HID/I8042Controller.cpp +++ b/Kernel/Devices/HID/I8042Controller.cpp @@ -9,6 +9,7 @@ #include #include #include +#include namespace Kernel { diff --git a/Kernel/Devices/HID/KeyboardDevice.cpp b/Kernel/Devices/HID/KeyboardDevice.cpp index 0d8facdd96..f7f04b05f4 100644 --- a/Kernel/Devices/HID/KeyboardDevice.cpp +++ b/Kernel/Devices/HID/KeyboardDevice.cpp @@ -10,10 +10,10 @@ #include #include #include -#include #include #include #include +#include #include namespace Kernel { diff --git a/Kernel/Devices/HID/PS2KeyboardDevice.cpp b/Kernel/Devices/HID/PS2KeyboardDevice.cpp index ea739ab6be..743319d6b7 100644 --- a/Kernel/Devices/HID/PS2KeyboardDevice.cpp +++ b/Kernel/Devices/HID/PS2KeyboardDevice.cpp @@ -10,11 +10,11 @@ #include #include #include -#include #include #include #include #include +#include #include #include diff --git a/Kernel/Devices/HID/PS2MouseDevice.cpp b/Kernel/Devices/HID/PS2MouseDevice.cpp index a565e85252..942dbdfb5e 100644 --- a/Kernel/Devices/HID/PS2MouseDevice.cpp +++ b/Kernel/Devices/HID/PS2MouseDevice.cpp @@ -10,6 +10,7 @@ #include #include #include +#include namespace Kernel { diff --git a/Kernel/Devices/HID/VMWareMouseDevice.cpp b/Kernel/Devices/HID/VMWareMouseDevice.cpp index 2c54a285cb..6fb1dd197d 100644 --- a/Kernel/Devices/HID/VMWareMouseDevice.cpp +++ b/Kernel/Devices/HID/VMWareMouseDevice.cpp @@ -6,6 +6,7 @@ #include #include +#include namespace Kernel { diff --git a/Kernel/Devices/MemoryDevice.cpp b/Kernel/Devices/MemoryDevice.cpp index 5e644a9d21..4a7ee97e56 100644 --- a/Kernel/Devices/MemoryDevice.cpp +++ b/Kernel/Devices/MemoryDevice.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/Kernel/Devices/NullDevice.cpp b/Kernel/Devices/NullDevice.cpp index 9ceda5a96f..f54d132a50 100644 --- a/Kernel/Devices/NullDevice.cpp +++ b/Kernel/Devices/NullDevice.cpp @@ -4,9 +4,10 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#include "NullDevice.h" #include #include +#include +#include namespace Kernel { diff --git a/Kernel/Devices/PCISerialDevice.cpp b/Kernel/Devices/PCISerialDevice.cpp index 8e3449ec59..4ade853fee 100644 --- a/Kernel/Devices/PCISerialDevice.cpp +++ b/Kernel/Devices/PCISerialDevice.cpp @@ -5,6 +5,7 @@ */ #include +#include namespace Kernel { diff --git a/Kernel/Devices/PCSpeaker.cpp b/Kernel/Devices/PCSpeaker.cpp index 15f4773d4f..f4707f535e 100644 --- a/Kernel/Devices/PCSpeaker.cpp +++ b/Kernel/Devices/PCSpeaker.cpp @@ -4,7 +4,6 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#include #include #include #include diff --git a/Kernel/Devices/RandomDevice.cpp b/Kernel/Devices/RandomDevice.cpp index b2f0cf5e4b..302ab4a00b 100644 --- a/Kernel/Devices/RandomDevice.cpp +++ b/Kernel/Devices/RandomDevice.cpp @@ -7,6 +7,7 @@ #include #include #include +#include namespace Kernel { diff --git a/Kernel/Devices/SB16.cpp b/Kernel/Devices/SB16.cpp index 94a9f1b6b1..81a3ea3934 100644 --- a/Kernel/Devices/SB16.cpp +++ b/Kernel/Devices/SB16.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/Kernel/Devices/SerialDevice.cpp b/Kernel/Devices/SerialDevice.cpp index e97f2059eb..cf8b4e8127 100644 --- a/Kernel/Devices/SerialDevice.cpp +++ b/Kernel/Devices/SerialDevice.cpp @@ -8,6 +8,7 @@ #include #include #include +#include namespace Kernel { diff --git a/Kernel/Devices/USB/UHCIController.cpp b/Kernel/Devices/USB/UHCIController.cpp index e5b3af0cf8..153c825b58 100644 --- a/Kernel/Devices/USB/UHCIController.cpp +++ b/Kernel/Devices/USB/UHCIController.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/Kernel/Devices/VMWareBackdoor.cpp b/Kernel/Devices/VMWareBackdoor.cpp index 7d65ac97a1..17e61bed08 100644 --- a/Kernel/Devices/VMWareBackdoor.cpp +++ b/Kernel/Devices/VMWareBackdoor.cpp @@ -7,11 +7,11 @@ #include #include #include -#include #include #include #include #include +#include namespace Kernel { diff --git a/Kernel/Devices/ZeroDevice.cpp b/Kernel/Devices/ZeroDevice.cpp index 45cbf9f802..37324d2376 100644 --- a/Kernel/Devices/ZeroDevice.cpp +++ b/Kernel/Devices/ZeroDevice.cpp @@ -4,10 +4,11 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#include "ZeroDevice.h" #include #include +#include #include +#include namespace Kernel { diff --git a/Kernel/FileSystem/VirtualFileSystem.cpp b/Kernel/FileSystem/VirtualFileSystem.cpp index cce7e71f53..621ec6a779 100644 --- a/Kernel/FileSystem/VirtualFileSystem.cpp +++ b/Kernel/FileSystem/VirtualFileSystem.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include namespace Kernel { diff --git a/Kernel/Graphics/BochsGraphicsAdapter.cpp b/Kernel/Graphics/BochsGraphicsAdapter.cpp index 6e947113f5..5d764e2a05 100644 --- a/Kernel/Graphics/BochsGraphicsAdapter.cpp +++ b/Kernel/Graphics/BochsGraphicsAdapter.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/Kernel/Graphics/Console/TextModeConsole.cpp b/Kernel/Graphics/Console/TextModeConsole.cpp index 25bce279c9..2739ba4c7e 100644 --- a/Kernel/Graphics/Console/TextModeConsole.cpp +++ b/Kernel/Graphics/Console/TextModeConsole.cpp @@ -7,6 +7,7 @@ #include #include #include +#include namespace Kernel::Graphics { diff --git a/Kernel/Graphics/Console/VGAConsole.cpp b/Kernel/Graphics/Console/VGAConsole.cpp index 70472b55e7..73bcabb7e2 100644 --- a/Kernel/Graphics/Console/VGAConsole.cpp +++ b/Kernel/Graphics/Console/VGAConsole.cpp @@ -5,6 +5,7 @@ */ #include +#include namespace Kernel::Graphics { diff --git a/Kernel/Graphics/FramebufferDevice.cpp b/Kernel/Graphics/FramebufferDevice.cpp index 7f4447b144..b66583ff50 100644 --- a/Kernel/Graphics/FramebufferDevice.cpp +++ b/Kernel/Graphics/FramebufferDevice.cpp @@ -9,15 +9,15 @@ #include #include #include +#include #include +#include #include #include #include #include #include -#include - #define MAX_RESOLUTION_WIDTH 4096 #define MAX_RESOLUTION_HEIGHT 2160 diff --git a/Kernel/Graphics/GraphicsManagement.cpp b/Kernel/Graphics/GraphicsManagement.cpp index 6fde82ee5c..69a1528eb7 100644 --- a/Kernel/Graphics/GraphicsManagement.cpp +++ b/Kernel/Graphics/GraphicsManagement.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include namespace Kernel { diff --git a/Kernel/Graphics/VGACompatibleAdapter.cpp b/Kernel/Graphics/VGACompatibleAdapter.cpp index 19ece12e59..53603bbce6 100644 --- a/Kernel/Graphics/VGACompatibleAdapter.cpp +++ b/Kernel/Graphics/VGACompatibleAdapter.cpp @@ -9,6 +9,7 @@ #include #include #include +#include namespace Kernel { diff --git a/Kernel/Heap/SlabAllocator.cpp b/Kernel/Heap/SlabAllocator.cpp index d5980ad2aa..c83f3fd72c 100644 --- a/Kernel/Heap/SlabAllocator.cpp +++ b/Kernel/Heap/SlabAllocator.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include diff --git a/Kernel/Heap/kmalloc.cpp b/Kernel/Heap/kmalloc.cpp index 4562e82936..e6538cc561 100644 --- a/Kernel/Heap/kmalloc.cpp +++ b/Kernel/Heap/kmalloc.cpp @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -21,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/Kernel/Interrupts/APIC.cpp b/Kernel/Interrupts/APIC.cpp index 1c43d55da0..fe8de2a2c8 100644 --- a/Kernel/Interrupts/APIC.cpp +++ b/Kernel/Interrupts/APIC.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/Kernel/Interrupts/IOAPIC.cpp b/Kernel/Interrupts/IOAPIC.cpp index 8f498a2bc9..551327b598 100644 --- a/Kernel/Interrupts/IOAPIC.cpp +++ b/Kernel/Interrupts/IOAPIC.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #define IOAPIC_REDIRECTION_ENTRY_OFFSET 0x10 namespace Kernel { diff --git a/Kernel/Interrupts/InterruptManagement.cpp b/Kernel/Interrupts/InterruptManagement.cpp index 3d7098ac39..c9444cf19a 100644 --- a/Kernel/Interrupts/InterruptManagement.cpp +++ b/Kernel/Interrupts/InterruptManagement.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #define PCAT_COMPAT_FLAG 0x1 diff --git a/Kernel/Interrupts/PIC.cpp b/Kernel/Interrupts/PIC.cpp index 2045bf145d..ad7ea1423a 100644 --- a/Kernel/Interrupts/PIC.cpp +++ b/Kernel/Interrupts/PIC.cpp @@ -10,6 +10,7 @@ #include #include #include +#include namespace Kernel { diff --git a/Kernel/Interrupts/SharedIRQHandler.cpp b/Kernel/Interrupts/SharedIRQHandler.cpp index 130025b5eb..25d065e2de 100644 --- a/Kernel/Interrupts/SharedIRQHandler.cpp +++ b/Kernel/Interrupts/SharedIRQHandler.cpp @@ -10,6 +10,7 @@ #include #include #include +#include namespace Kernel { diff --git a/Kernel/Interrupts/SpuriousInterruptHandler.cpp b/Kernel/Interrupts/SpuriousInterruptHandler.cpp index 979a157fa5..fd9ec678e7 100644 --- a/Kernel/Interrupts/SpuriousInterruptHandler.cpp +++ b/Kernel/Interrupts/SpuriousInterruptHandler.cpp @@ -6,6 +6,7 @@ #include #include +#include namespace Kernel { diff --git a/Kernel/KSyms.cpp b/Kernel/KSyms.cpp index 8a21a9e661..6e138f6b04 100644 --- a/Kernel/KSyms.cpp +++ b/Kernel/KSyms.cpp @@ -11,6 +11,7 @@ #include #include #include +#include namespace Kernel { diff --git a/Kernel/Net/E1000ENetworkAdapter.cpp b/Kernel/Net/E1000ENetworkAdapter.cpp index 0a5716bb20..63749e1ce9 100644 --- a/Kernel/Net/E1000ENetworkAdapter.cpp +++ b/Kernel/Net/E1000ENetworkAdapter.cpp @@ -8,6 +8,7 @@ #include #include #include +#include namespace Kernel { diff --git a/Kernel/Net/E1000NetworkAdapter.cpp b/Kernel/Net/E1000NetworkAdapter.cpp index e51cd6878d..d8c831e499 100644 --- a/Kernel/Net/E1000NetworkAdapter.cpp +++ b/Kernel/Net/E1000NetworkAdapter.cpp @@ -8,6 +8,7 @@ #include #include #include +#include namespace Kernel { diff --git a/Kernel/Net/NE2000NetworkAdapter.cpp b/Kernel/Net/NE2000NetworkAdapter.cpp index 596882825b..438d40867d 100644 --- a/Kernel/Net/NE2000NetworkAdapter.cpp +++ b/Kernel/Net/NE2000NetworkAdapter.cpp @@ -8,6 +8,7 @@ #include #include #include +#include namespace Kernel { diff --git a/Kernel/Net/NetworkingManagement.cpp b/Kernel/Net/NetworkingManagement.cpp index 36e08853e1..8db21be7af 100644 --- a/Kernel/Net/NetworkingManagement.cpp +++ b/Kernel/Net/NetworkingManagement.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include namespace Kernel { diff --git a/Kernel/Net/RTL8139NetworkAdapter.cpp b/Kernel/Net/RTL8139NetworkAdapter.cpp index a5a655467c..2a970ce12c 100644 --- a/Kernel/Net/RTL8139NetworkAdapter.cpp +++ b/Kernel/Net/RTL8139NetworkAdapter.cpp @@ -8,6 +8,7 @@ #include #include #include +#include namespace Kernel { diff --git a/Kernel/Net/RTL8168NetworkAdapter.cpp b/Kernel/Net/RTL8168NetworkAdapter.cpp index ae3aebe86e..344e2935c3 100644 --- a/Kernel/Net/RTL8168NetworkAdapter.cpp +++ b/Kernel/Net/RTL8168NetworkAdapter.cpp @@ -9,6 +9,7 @@ #include #include #include +#include namespace Kernel { diff --git a/Kernel/PCI/Access.cpp b/Kernel/PCI/Access.cpp index eeb4099ad5..54ddb65d38 100644 --- a/Kernel/PCI/Access.cpp +++ b/Kernel/PCI/Access.cpp @@ -4,11 +4,11 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#include #include #include #include #include +#include namespace Kernel { namespace PCI { diff --git a/Kernel/PCI/IOAccess.cpp b/Kernel/PCI/IOAccess.cpp index 15e991e2aa..663f4f5e3a 100644 --- a/Kernel/PCI/IOAccess.cpp +++ b/Kernel/PCI/IOAccess.cpp @@ -4,10 +4,10 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#include #include #include #include +#include namespace Kernel { namespace PCI { diff --git a/Kernel/PCI/Initializer.cpp b/Kernel/PCI/Initializer.cpp index 36d449f641..f4074e90ce 100644 --- a/Kernel/PCI/Initializer.cpp +++ b/Kernel/PCI/Initializer.cpp @@ -12,6 +12,7 @@ #include #include #include +#include namespace Kernel { namespace PCI { diff --git a/Kernel/PCI/MMIOAccess.cpp b/Kernel/PCI/MMIOAccess.cpp index 8107901534..7522204b83 100644 --- a/Kernel/PCI/MMIOAccess.cpp +++ b/Kernel/PCI/MMIOAccess.cpp @@ -6,10 +6,10 @@ #include #include -#include #include #include #include +#include #include namespace Kernel { diff --git a/Kernel/PCI/WindowedMMIOAccess.cpp b/Kernel/PCI/WindowedMMIOAccess.cpp index 1415d5d0a9..4eeef08bf5 100644 --- a/Kernel/PCI/WindowedMMIOAccess.cpp +++ b/Kernel/PCI/WindowedMMIOAccess.cpp @@ -6,10 +6,10 @@ #include #include -#include #include #include #include +#include #include namespace Kernel { diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index 820cc538bf..f5e4aad973 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/Kernel/Random.cpp b/Kernel/Random.cpp index 3b0e8b0d5b..ca72e613bf 100644 --- a/Kernel/Random.cpp +++ b/Kernel/Random.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/Kernel/Scheduler.cpp b/Kernel/Scheduler.cpp index 62062ab38d..a3b25aad4b 100644 --- a/Kernel/Scheduler.cpp +++ b/Kernel/Scheduler.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include diff --git a/Kernel/Sections.h b/Kernel/Sections.h new file mode 100644 index 0000000000..5cd82429eb --- /dev/null +++ b/Kernel/Sections.h @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2018-2021, Andreas Kling + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include + +#define READONLY_AFTER_INIT __attribute__((section(".ro_after_init"))) +#define UNMAP_AFTER_INIT NEVER_INLINE __attribute__((section(".unmap_after_init"))) diff --git a/Kernel/Storage/AHCIController.h b/Kernel/Storage/AHCIController.h index ba57706506..f873ddd15f 100644 --- a/Kernel/Storage/AHCIController.h +++ b/Kernel/Storage/AHCIController.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -23,7 +24,6 @@ class AHCIController final : public StorageController friend class AHCIPortHandler; friend class AHCIPort; AK_MAKE_ETERNAL -public: public: UNMAP_AFTER_INIT static NonnullRefPtr initialize(PCI::Address address); virtual ~AHCIController() override; diff --git a/Kernel/Storage/AHCIPort.h b/Kernel/Storage/AHCIPort.h index 0b49490e98..a8730272b3 100644 --- a/Kernel/Storage/AHCIPort.h +++ b/Kernel/Storage/AHCIPort.h @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/Kernel/Storage/AHCIPortHandler.h b/Kernel/Storage/AHCIPortHandler.h index 48673b3947..1d5fe52321 100644 --- a/Kernel/Storage/AHCIPortHandler.h +++ b/Kernel/Storage/AHCIPortHandler.h @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/Kernel/Storage/BMIDEChannel.cpp b/Kernel/Storage/BMIDEChannel.cpp index b1e9c34a45..4636300699 100644 --- a/Kernel/Storage/BMIDEChannel.cpp +++ b/Kernel/Storage/BMIDEChannel.cpp @@ -4,6 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ +#include #include #include #include diff --git a/Kernel/Storage/IDEChannel.cpp b/Kernel/Storage/IDEChannel.cpp index 6239f7c834..188cf20553 100644 --- a/Kernel/Storage/IDEChannel.cpp +++ b/Kernel/Storage/IDEChannel.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/Kernel/Storage/IDEController.cpp b/Kernel/Storage/IDEController.cpp index a347081637..b0412b14d5 100644 --- a/Kernel/Storage/IDEController.cpp +++ b/Kernel/Storage/IDEController.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/Kernel/Storage/PATADiskDevice.cpp b/Kernel/Storage/PATADiskDevice.cpp index 294c1cf30f..078d69e53f 100644 --- a/Kernel/Storage/PATADiskDevice.cpp +++ b/Kernel/Storage/PATADiskDevice.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/Kernel/Syscall.cpp b/Kernel/Syscall.cpp index e88e300687..f7b32d1748 100644 --- a/Kernel/Syscall.cpp +++ b/Kernel/Syscall.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include diff --git a/Kernel/TTY/ConsoleManagement.cpp b/Kernel/TTY/ConsoleManagement.cpp index c1cf6d0d15..f768fca6a4 100644 --- a/Kernel/TTY/ConsoleManagement.cpp +++ b/Kernel/TTY/ConsoleManagement.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include namespace Kernel { diff --git a/Kernel/TTY/PTYMultiplexer.cpp b/Kernel/TTY/PTYMultiplexer.cpp index 467bcec8cf..1005fad74c 100644 --- a/Kernel/TTY/PTYMultiplexer.cpp +++ b/Kernel/TTY/PTYMultiplexer.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include namespace Kernel { diff --git a/Kernel/TTY/VirtualConsole.cpp b/Kernel/TTY/VirtualConsole.cpp index 318b2f414f..7dfc4a66d2 100644 --- a/Kernel/TTY/VirtualConsole.cpp +++ b/Kernel/TTY/VirtualConsole.cpp @@ -9,12 +9,12 @@ #include "VirtualConsole.h" #include #include -#include #include #include #include #include #include +#include #include #include #include diff --git a/Kernel/Tasks/FinalizerTask.cpp b/Kernel/Tasks/FinalizerTask.cpp index a66109d9da..ffdfb09ef3 100644 --- a/Kernel/Tasks/FinalizerTask.cpp +++ b/Kernel/Tasks/FinalizerTask.cpp @@ -5,6 +5,7 @@ */ #include +#include #include namespace Kernel { diff --git a/Kernel/Tasks/SyncTask.cpp b/Kernel/Tasks/SyncTask.cpp index 313cfb1528..f660e5c451 100644 --- a/Kernel/Tasks/SyncTask.cpp +++ b/Kernel/Tasks/SyncTask.cpp @@ -6,6 +6,7 @@ #include #include +#include #include #include diff --git a/Kernel/Thread.cpp b/Kernel/Thread.cpp index c84cdf127d..9e8f851004 100644 --- a/Kernel/Thread.cpp +++ b/Kernel/Thread.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/Kernel/Time/APICTimer.cpp b/Kernel/Time/APICTimer.cpp index c46d3afc6f..ab5932a3c8 100644 --- a/Kernel/Time/APICTimer.cpp +++ b/Kernel/Time/APICTimer.cpp @@ -4,11 +4,11 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#include #include #include #include #include +#include #include #include #include diff --git a/Kernel/Time/HPET.cpp b/Kernel/Time/HPET.cpp index c1d77dbffe..a7e331138e 100644 --- a/Kernel/Time/HPET.cpp +++ b/Kernel/Time/HPET.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/Kernel/Time/HPETComparator.cpp b/Kernel/Time/HPETComparator.cpp index 5e383e3ea3..55718053da 100644 --- a/Kernel/Time/HPETComparator.cpp +++ b/Kernel/Time/HPETComparator.cpp @@ -4,10 +4,10 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#include #include #include #include +#include #include #include diff --git a/Kernel/Time/PIT.cpp b/Kernel/Time/PIT.cpp index ed683320d9..68ec1fde87 100644 --- a/Kernel/Time/PIT.cpp +++ b/Kernel/Time/PIT.cpp @@ -4,11 +4,12 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#include #include #include +#include #include #include +#include #include #include #include diff --git a/Kernel/Time/TimeManagement.cpp b/Kernel/Time/TimeManagement.cpp index fc23f3e5cc..5c0028b938 100644 --- a/Kernel/Time/TimeManagement.cpp +++ b/Kernel/Time/TimeManagement.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/Kernel/TimerQueue.cpp b/Kernel/TimerQueue.cpp index 26856ec60f..fc6e59f3ef 100644 --- a/Kernel/TimerQueue.cpp +++ b/Kernel/TimerQueue.cpp @@ -7,8 +7,8 @@ #include #include #include -#include #include +#include #include #include diff --git a/Kernel/VM/MemoryManager.cpp b/Kernel/VM/MemoryManager.cpp index 33b7be6c76..cccfca3fc1 100644 --- a/Kernel/VM/MemoryManager.cpp +++ b/Kernel/VM/MemoryManager.cpp @@ -7,12 +7,12 @@ #include #include #include -#include #include #include #include #include #include +#include #include #include #include diff --git a/Kernel/VM/PageDirectory.cpp b/Kernel/VM/PageDirectory.cpp index b6b5287b48..27ef82a368 100644 --- a/Kernel/VM/PageDirectory.cpp +++ b/Kernel/VM/PageDirectory.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include diff --git a/Kernel/VM/PhysicalPage.h b/Kernel/VM/PhysicalPage.h index 5d2b572409..713815cf2d 100644 --- a/Kernel/VM/PhysicalPage.h +++ b/Kernel/VM/PhysicalPage.h @@ -7,7 +7,6 @@ #pragma once #include -#include #include #include #include diff --git a/Kernel/VM/Range.cpp b/Kernel/VM/Range.cpp index 6b846daaea..4dc3c01bbc 100644 --- a/Kernel/VM/Range.cpp +++ b/Kernel/VM/Range.cpp @@ -6,9 +6,9 @@ */ #include -#include #include #include +#include namespace Kernel { diff --git a/Kernel/VM/RangeAllocator.h b/Kernel/VM/RangeAllocator.h index de8148f6f2..bb5e866ab9 100644 --- a/Kernel/VM/RangeAllocator.h +++ b/Kernel/VM/RangeAllocator.h @@ -8,7 +8,6 @@ #include #include -#include #include #include diff --git a/Kernel/VirtIO/VirtIO.cpp b/Kernel/VirtIO/VirtIO.cpp index ba6b95f1a6..6594af428c 100644 --- a/Kernel/VirtIO/VirtIO.cpp +++ b/Kernel/VirtIO/VirtIO.cpp @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/Kernel/VirtIO/VirtIOConsole.cpp b/Kernel/VirtIO/VirtIOConsole.cpp index 3c97e24dac..17ccbff8c5 100644 --- a/Kernel/VirtIO/VirtIOConsole.cpp +++ b/Kernel/VirtIO/VirtIOConsole.cpp @@ -4,6 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ +#include #include namespace Kernel { diff --git a/Kernel/VirtIO/VirtIORNG.cpp b/Kernel/VirtIO/VirtIORNG.cpp index 8ce4d88048..87e5df815f 100644 --- a/Kernel/VirtIO/VirtIORNG.cpp +++ b/Kernel/VirtIO/VirtIORNG.cpp @@ -4,6 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ +#include #include namespace Kernel { diff --git a/Kernel/WorkQueue.cpp b/Kernel/WorkQueue.cpp index d1a79b0c90..1d00dcef1a 100644 --- a/Kernel/WorkQueue.cpp +++ b/Kernel/WorkQueue.cpp @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/Kernel/init.cpp b/Kernel/init.cpp index 9807bc3c33..50133c5c0b 100644 --- a/Kernel/init.cpp +++ b/Kernel/init.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include -- cgit v1.2.3