summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2022-09-02 11:35:12 +0300
committerLinus Groh <mail@linusgroh.de>2022-09-20 18:43:05 +0100
commitd5ee03ef5b30a269c775d7093a71468153a1d141 (patch)
tree0f47b29ed92cc368d0513792a4bc98cb942f0460 /Kernel
parente740d959dfc08f03d47e8890b7f652fe00c3537a (diff)
downloadserenity-d5ee03ef5b30a269c775d7093a71468153a1d141.zip
Kernel/x86: Move RTC and CMOS code to x86 arch-specific subdirectory
The RTC and CMOS are currently only supported for x86 platforms and use specific x86 instructions to produce only certain x86 plaform operations and results, therefore, we move them to the Arch/x86 specific directory.
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Arch/x86/common/CMOS.cpp (renamed from Kernel/CMOS.cpp)2
-rw-r--r--Kernel/Arch/x86/common/CMOS.h (renamed from Kernel/CMOS.h)0
-rw-r--r--Kernel/Arch/x86/common/RTC.cpp (renamed from Kernel/RTC.cpp)4
-rw-r--r--Kernel/Arch/x86/common/RTC.h (renamed from Kernel/RTC.h)0
-rw-r--r--Kernel/CMakeLists.txt4
-rw-r--r--Kernel/Coredump.cpp1
-rw-r--r--Kernel/Memory/MemoryManager.cpp1
-rw-r--r--Kernel/Scheduler.cpp1
-rw-r--r--Kernel/Time/RTC.cpp2
-rw-r--r--Kernel/Time/RTC.h2
-rw-r--r--Kernel/Time/TimeManagement.cpp1
-rw-r--r--Kernel/init.cpp2
12 files changed, 8 insertions, 12 deletions
diff --git a/Kernel/CMOS.cpp b/Kernel/Arch/x86/common/CMOS.cpp
index 79e76cc461..ad2b5ee015 100644
--- a/Kernel/CMOS.cpp
+++ b/Kernel/Arch/x86/common/CMOS.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/Arch/x86/IO.h>
-#include <Kernel/CMOS.h>
+#include <Kernel/Arch/x86/common/CMOS.h>
namespace Kernel::CMOS {
diff --git a/Kernel/CMOS.h b/Kernel/Arch/x86/common/CMOS.h
index fc3616da24..fc3616da24 100644
--- a/Kernel/CMOS.h
+++ b/Kernel/Arch/x86/common/CMOS.h
diff --git a/Kernel/RTC.cpp b/Kernel/Arch/x86/common/RTC.cpp
index d773af8a8f..7373c62f97 100644
--- a/Kernel/RTC.cpp
+++ b/Kernel/Arch/x86/common/RTC.cpp
@@ -7,8 +7,8 @@
#include <AK/Format.h>
#include <AK/Time.h>
#include <Kernel/Arch/Delay.h>
-#include <Kernel/CMOS.h>
-#include <Kernel/RTC.h>
+#include <Kernel/Arch/x86/common/CMOS.h>
+#include <Kernel/Arch/x86/common/RTC.h>
namespace Kernel::RTC {
diff --git a/Kernel/RTC.h b/Kernel/Arch/x86/common/RTC.h
index c57ec79acb..c57ec79acb 100644
--- a/Kernel/RTC.h
+++ b/Kernel/Arch/x86/common/RTC.h
diff --git a/Kernel/CMakeLists.txt b/Kernel/CMakeLists.txt
index d783aeb52f..a2e3bc2bf5 100644
--- a/Kernel/CMakeLists.txt
+++ b/Kernel/CMakeLists.txt
@@ -40,7 +40,6 @@ set(KERNEL_SOURCES
Bus/VirtIO/Device.cpp
Bus/VirtIO/Queue.cpp
Bus/VirtIO/RNG.cpp
- CMOS.cpp
CommandLine.cpp
Coredump.cpp
Credentials.cpp
@@ -226,7 +225,6 @@ set(KERNEL_SOURCES
ProcessSpecificExposed.cpp
ProcessGroup.cpp
ProcessProcFSTraits.cpp
- RTC.cpp
Random.cpp
Scheduler.cpp
StdLib.cpp
@@ -333,8 +331,10 @@ if ("${SERENITY_ARCH}" STREQUAL "i686" OR "${SERENITY_ARCH}" STREQUAL "x86_64")
${KERNEL_SOURCES}
Arch/Processor.cpp
+ Arch/x86/common/CMOS.cpp
Arch/x86/common/Delay.cpp
Arch/x86/common/I8042Reboot.cpp
+ Arch/x86/common/RTC.cpp
Arch/x86/common/ScopedCritical.cpp
Arch/x86/common/SmapDisabler.cpp
Arch/x86/common/Shutdown.cpp
diff --git a/Kernel/Coredump.cpp b/Kernel/Coredump.cpp
index cc0e963c9b..82c99329f1 100644
--- a/Kernel/Coredump.cpp
+++ b/Kernel/Coredump.cpp
@@ -17,7 +17,6 @@
#include <Kernel/Locking/Spinlock.h>
#include <Kernel/Memory/ScopedAddressSpaceSwitcher.h>
#include <Kernel/Process.h>
-#include <Kernel/RTC.h>
#include <LibC/elf.h>
#include <LibELF/Core.h>
diff --git a/Kernel/Memory/MemoryManager.cpp b/Kernel/Memory/MemoryManager.cpp
index 72e7e4c665..8035aee7df 100644
--- a/Kernel/Memory/MemoryManager.cpp
+++ b/Kernel/Memory/MemoryManager.cpp
@@ -14,7 +14,6 @@
#include <Kernel/Arch/PageFault.h>
#include <Kernel/Arch/RegisterState.h>
#include <Kernel/BootInfo.h>
-#include <Kernel/CMOS.h>
#include <Kernel/FileSystem/Inode.h>
#include <Kernel/Heap/kmalloc.h>
#include <Kernel/KSyms.h>
diff --git a/Kernel/Scheduler.cpp b/Kernel/Scheduler.cpp
index 3bfdd354dc..99eb151e46 100644
--- a/Kernel/Scheduler.cpp
+++ b/Kernel/Scheduler.cpp
@@ -14,7 +14,6 @@
#include <Kernel/Panic.h>
#include <Kernel/PerformanceManager.h>
#include <Kernel/Process.h>
-#include <Kernel/RTC.h>
#include <Kernel/Scheduler.h>
#include <Kernel/Sections.h>
#include <Kernel/Time/TimeManagement.h>
diff --git a/Kernel/Time/RTC.cpp b/Kernel/Time/RTC.cpp
index 8d9fbe897f..f0dd9cef14 100644
--- a/Kernel/Time/RTC.cpp
+++ b/Kernel/Time/RTC.cpp
@@ -7,7 +7,7 @@
#include <Kernel/Arch/InterruptDisabler.h>
#include <Kernel/Arch/x86/IO.h>
#include <Kernel/Arch/x86/NonMaskableInterruptDisabler.h>
-#include <Kernel/CMOS.h>
+#include <Kernel/Arch/x86/common/CMOS.h>
#include <Kernel/Time/RTC.h>
#include <Kernel/Time/TimeManagement.h>
diff --git a/Kernel/Time/RTC.h b/Kernel/Time/RTC.h
index a63cef27f6..b15e4aa7e1 100644
--- a/Kernel/Time/RTC.h
+++ b/Kernel/Time/RTC.h
@@ -6,8 +6,8 @@
#pragma once
+#include <Kernel/Arch/x86/common/RTC.h>
#include <Kernel/Library/NonnullLockRefPtr.h>
-#include <Kernel/RTC.h>
#include <Kernel/Time/HardwareTimer.h>
namespace Kernel {
diff --git a/Kernel/Time/TimeManagement.cpp b/Kernel/Time/TimeManagement.cpp
index 55e4bac899..fd085cdbf3 100644
--- a/Kernel/Time/TimeManagement.cpp
+++ b/Kernel/Time/TimeManagement.cpp
@@ -8,6 +8,7 @@
#include <AK/StdLibExtras.h>
#include <AK/Time.h>
#include <Kernel/Arch/InterruptDisabler.h>
+#include <Kernel/Arch/x86/common/RTC.h>
#include <Kernel/CommandLine.h>
#include <Kernel/Firmware/ACPI/Parser.h>
#include <Kernel/Interrupts/APIC.h>
diff --git a/Kernel/init.cpp b/Kernel/init.cpp
index e2768b3370..3f5e42e8b9 100644
--- a/Kernel/init.cpp
+++ b/Kernel/init.cpp
@@ -12,7 +12,6 @@
#include <Kernel/Bus/PCI/Initializer.h>
#include <Kernel/Bus/USB/USBManagement.h>
#include <Kernel/Bus/VirtIO/Device.h>
-#include <Kernel/CMOS.h>
#include <Kernel/CommandLine.h>
#include <Kernel/Devices/Audio/Management.h>
#include <Kernel/Devices/DeviceControlDevice.h>
@@ -49,7 +48,6 @@
#include <Kernel/Prekernel/Prekernel.h>
#include <Kernel/Process.h>
#include <Kernel/ProcessExposed.h>
-#include <Kernel/RTC.h>
#include <Kernel/Random.h>
#include <Kernel/Scheduler.h>
#include <Kernel/Sections.h>