From f469da7e0b874dbb121ecf0135e6e92d72a27932 Mon Sep 17 00:00:00 2001 From: karina Date: Thu, 23 Apr 2026 22:17:56 +0400 Subject: [PATCH] refactor(kernel): minor refactor. Changed naming convention --- Kernel/Include/Arch/IO.h | 4 ++-- Kernel/Include/IO/{IOSerial.h => Serial.h} | 0 Kernel/Source/Arch/Exceptions.c | 2 +- Kernel/Source/IO/{IOSerial.c => Serial.c} | 2 +- Kernel/Source/KernelMain.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename Kernel/Include/IO/{IOSerial.h => Serial.h} (100%) rename Kernel/Source/IO/{IOSerial.c => Serial.c} (95%) diff --git a/Kernel/Include/Arch/IO.h b/Kernel/Include/Arch/IO.h index 6b378d1..91f494b 100644 --- a/Kernel/Include/Arch/IO.h +++ b/Kernel/Include/Arch/IO.h @@ -1,13 +1,13 @@ #pragma once #include -static inline void IOAddressWrite32(UInt64 address, UInt32 value) { +static inline void IOAddressWrite32(Address address, UInt32 value) { __asm__ volatile ("dsb sy" ::: "memory"); // wait till all previous writes are finished physically *(volatile UInt32*)address = value; __asm__ volatile ("dsb sy" ::: "memory"); // wait till my write is finished physically } -static inline UInt32 IOAddressRead32(UInt64 address) { +static inline UInt32 IOAddressRead32(Address address) { UInt32 value = *(volatile UInt32*)address; __asm__ volatile ("dsb ld" ::: "memory"); // wait till my read is finished physically return value; diff --git a/Kernel/Include/IO/IOSerial.h b/Kernel/Include/IO/Serial.h similarity index 100% rename from Kernel/Include/IO/IOSerial.h rename to Kernel/Include/IO/Serial.h diff --git a/Kernel/Source/Arch/Exceptions.c b/Kernel/Source/Arch/Exceptions.c index 952d356..200e529 100644 --- a/Kernel/Source/Arch/Exceptions.c +++ b/Kernel/Source/Arch/Exceptions.c @@ -1,6 +1,6 @@ #include #include -#include +#include void ExceptionsHandler(ExceptionsContext* context, ExceptionsType type) { IOSerialPutString("Exception occurred"); diff --git a/Kernel/Source/IO/IOSerial.c b/Kernel/Source/IO/Serial.c similarity index 95% rename from Kernel/Source/IO/IOSerial.c rename to Kernel/Source/IO/Serial.c index e2cf1f2..2a92d13 100644 --- a/Kernel/Source/IO/IOSerial.c +++ b/Kernel/Source/IO/Serial.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/Kernel/Source/KernelMain.c b/Kernel/Source/KernelMain.c index ddd4caf..131de92 100644 --- a/Kernel/Source/KernelMain.c +++ b/Kernel/Source/KernelMain.c @@ -1,5 +1,5 @@ #include -#include +#include void KernelMain(void) { IOSerialPutString("Meow nya!!\n");