diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-06-24 14:33:40 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-06-24 14:34:18 +0200 |
| commit | 9784f940cf71aef91ccbeb1a11651a83a3eff213 (patch) | |
| tree | bf0294e5ad8161372aaa27cacbfba4eb3e81eda0 /Kernel/HALKit/AMD64 | |
| parent | 7738550a55d6fa79447d0298c53fe6320a3135b2 (diff) | |
IMP: UIAccessibilty class, work in progress Core CoreGraphics (GPU/FB
SDK).
REFACTOR: Moved Builtins to Modules/
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Kernel/HALKit/AMD64')
| -rw-r--r-- | Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx | 2 | ||||
| -rw-r--r-- | Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp | 2 | ||||
| -rw-r--r-- | Kernel/HALKit/AMD64/HalHart.cpp | 1 | ||||
| -rw-r--r-- | Kernel/HALKit/AMD64/HalKernelMain.cxx | 70 | ||||
| -rw-r--r-- | Kernel/HALKit/AMD64/HalKernelMouse.cxx | 6 | ||||
| -rw-r--r-- | Kernel/HALKit/AMD64/HalPageAlloc.hpp | 18 | ||||
| -rw-r--r-- | Kernel/HALKit/AMD64/Processor.hpp | 12 | ||||
| -rw-r--r-- | Kernel/HALKit/AMD64/Storage/AHCI.cxx | 2 | ||||
| -rw-r--r-- | Kernel/HALKit/AMD64/Storage/ATA-DMA.cxx | 6 | ||||
| -rw-r--r-- | Kernel/HALKit/AMD64/Storage/ATA-PIO.cxx | 2 |
10 files changed, 61 insertions, 60 deletions
diff --git a/Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx b/Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx index 213be057..7a54edfa 100644 --- a/Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx +++ b/Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx @@ -4,7 +4,7 @@ ------------------------------------------- */ -#include <Builtins/ACPI/ACPIFactoryInterface.hxx> +#include <Modules/ACPI/ACPIFactoryInterface.hxx> #include <HALKit/AMD64/Processor.hpp> #include <NewKit/String.hpp> #include <ArchKit/ArchKit.hpp> diff --git a/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp b/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp index c8eb094c..e4a2d99c 100644 --- a/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp +++ b/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp @@ -4,7 +4,7 @@ ------------------------------------------- */ -#include <Builtins/ACPI/ACPIFactoryInterface.hxx> +#include <Modules/ACPI/ACPIFactoryInterface.hxx> #include <HALKit/AMD64/Processor.hpp> #include <NewKit/KernelCheck.hpp> #include <ArchKit/ArchKit.hpp> diff --git a/Kernel/HALKit/AMD64/HalHart.cpp b/Kernel/HALKit/AMD64/HalHart.cpp index 069f3767..4718d4ab 100644 --- a/Kernel/HALKit/AMD64/HalHart.cpp +++ b/Kernel/HALKit/AMD64/HalHart.cpp @@ -29,6 +29,5 @@ namespace NewOS { /* nohing, code is spinning */ } - } } // namespace NewOS diff --git a/Kernel/HALKit/AMD64/HalKernelMain.cxx b/Kernel/HALKit/AMD64/HalKernelMain.cxx index 88add1d1..0381e4ab 100644 --- a/Kernel/HALKit/AMD64/HalKernelMain.cxx +++ b/Kernel/HALKit/AMD64/HalKernelMain.cxx @@ -5,7 +5,7 @@ ------------------------------------------- */ #include <ArchKit/ArchKit.hpp> -#include <Builtins/GX/GX> +#include <Modules/CoreCG/CoreCG.hxx> #include <FirmwareKit/Handover.hxx> #include <KernelKit/FileManager.hpp> #include <KernelKit/Framebuffer.hpp> @@ -14,6 +14,7 @@ #include <KernelKit/ProcessScheduler.hxx> #include <KernelKit/UserHeap.hpp> #include <NewKit/Json.hpp> +#include <Modules/CoreCG/Accessibility.hxx> #include <KernelKit/CodeManager.hpp> /// @brief This symbol is the kernel main symbol. @@ -24,7 +25,7 @@ EXTERN_C NewOS::VoidPtr kInterruptVectorTable[]; struct PACKED HeapAllocInfo final { NewOS::VoidPtr fThe; - NewOS::Size fTheSz; + NewOS::Size fTheSz; }; struct PACKED ProcessBlockInfo final @@ -38,7 +39,7 @@ struct PACKED ProcessExitInfo final STATIC constexpr auto cReasonLen = 512; NewOS::Int64 fCode; - NewOS::Char fReason[cReasonLen]; + NewOS::Char fReason[cReasonLen]; }; namespace NewOS::HAL @@ -98,30 +99,30 @@ EXTERN_C void hal_init_platform( register basic syscalls. */ - constexpr auto cSerialWriteInterrupt = 0x10; // 16 - constexpr auto cTlsInterrupt = 0x11; // 17 - constexpr auto cTlsInstallInterrupt = 0x12; // 18 - constexpr auto cNewInterrupt = 0x13; // 19 - constexpr auto cDeleteInterrupt = 0x14; // 20 - constexpr auto cExitInterrupt = 0x15; - constexpr auto cLastExitInterrupt = 0x16; - constexpr auto cCatalogOpen = 0x17; - constexpr auto cForkRead = 0x18; - constexpr auto cForkWrite = 0x19; - constexpr auto cCatalogClose = 0x20; - constexpr auto cCatalogRemove = 0x21; - constexpr auto cCatalogCreate = 0x22; - - kSyscalls[cSerialWriteInterrupt].Leak().Leak()->fProc = [](NewOS::VoidPtr rdx) -> void { + constexpr auto cSerialAlertInterrupt = 0x10; // 16 + constexpr auto cTlsInterrupt = 0x11; // 17 + constexpr auto cTlsInstallInterrupt = 0x12; // 18 + constexpr auto cNewInterrupt = 0x13; // 19 + constexpr auto cDeleteInterrupt = 0x14; // 20 + constexpr auto cExitInterrupt = 0x15; + constexpr auto cLastExitInterrupt = 0x16; + constexpr auto cCatalogOpen = 0x17; + constexpr auto cForkRead = 0x18; + constexpr auto cForkWrite = 0x19; + constexpr auto cCatalogClose = 0x20; + constexpr auto cCatalogRemove = 0x21; + constexpr auto cCatalogCreate = 0x22; + + kSyscalls[cSerialAlertInterrupt].Leak().Leak()->fProc = [](NewOS::VoidPtr rdx) -> void { const char* msg = (const char*)rdx; NewOS::kcout << "newoskrnl: " << msg << "\r"; }; - kSyscalls[cTlsInterrupt].Leak().Leak()->fProc = [](NewOS::VoidPtr rdx)->void { + kSyscalls[cTlsInterrupt].Leak().Leak()->fProc = [](NewOS::VoidPtr rdx) -> void { tls_check_syscall_impl(rdx); }; - kSyscalls[cNewInterrupt].Leak().Leak()->fProc = [](NewOS::VoidPtr rdx)->void { + kSyscalls[cNewInterrupt].Leak().Leak()->fProc = [](NewOS::VoidPtr rdx) -> void { /// get HAC struct. HeapAllocInfo* rdxInf = reinterpret_cast<HeapAllocInfo*>(rdx); @@ -129,7 +130,7 @@ EXTERN_C void hal_init_platform( rdxInf->fThe = NewOS::ProcessScheduler::The().Leak().TheCurrent().Leak().New(rdxInf->fTheSz); }; - kSyscalls[cDeleteInterrupt].Leak().Leak()->fProc = [](NewOS::VoidPtr rdx)->void { + kSyscalls[cDeleteInterrupt].Leak().Leak()->fProc = [](NewOS::VoidPtr rdx) -> void { /// get HAC struct. HeapAllocInfo* rdxInf = reinterpret_cast<HeapAllocInfo*>(rdx); @@ -137,36 +138,37 @@ EXTERN_C void hal_init_platform( NewOS::ProcessScheduler::The().Leak().TheCurrent().Leak().Delete(rdxInf->fThe, rdxInf->fTheSz); }; - kSyscalls[cTlsInstallInterrupt].Leak().Leak()->fProc = [](NewOS::VoidPtr rdx)->void { + kSyscalls[cTlsInstallInterrupt].Leak().Leak()->fProc = [](NewOS::VoidPtr rdx) -> void { ProcessBlockInfo* rdxPb = reinterpret_cast<ProcessBlockInfo*>(rdx); /// install the process's fTIB and fPIB. rt_install_tib(rdxPb->fTIB, rdxPb->fPIB); }; - kSyscalls[cExitInterrupt].Leak().Leak()->fProc = [](NewOS::VoidPtr rdx)->void { + kSyscalls[cExitInterrupt].Leak().Leak()->fProc = [](NewOS::VoidPtr rdx) -> void { ProcessExitInfo* rdxEi = reinterpret_cast<ProcessExitInfo*>(rdx); NewOS::kcout << "newoskrnl: " << rdxEi->fReason << "\r"; NewOS::ProcessScheduler::The().Leak().TheCurrent().Leak().Exit(rdxEi->fCode); }; - kSyscalls[cLastExitInterrupt].Leak().Leak()->fProc = [](NewOS::VoidPtr rdx)->void { + kSyscalls[cLastExitInterrupt].Leak().Leak()->fProc = [](NewOS::VoidPtr rdx) -> void { ProcessExitInfo* rdxEi = reinterpret_cast<ProcessExitInfo*>(rdx); - rdxEi->fCode = NewOS::rt_get_exit_code(); + rdxEi->fCode = NewOS::rt_get_exit_code(); }; - kSyscalls[cSerialWriteInterrupt].Leak().Leak()->fHooked = true; - kSyscalls[cTlsInterrupt].Leak().Leak()->fHooked = true; - kSyscalls[cTlsInstallInterrupt].Leak().Leak()->fHooked = true; - kSyscalls[cDeleteInterrupt].Leak().Leak()->fHooked = true; - kSyscalls[cNewInterrupt].Leak().Leak()->fHooked = true; - kSyscalls[cExitInterrupt].Leak().Leak()->fHooked = true; - kSyscalls[cLastExitInterrupt].Leak().Leak()->fHooked = true; - - KeMain(); + kSyscalls[cSerialAlertInterrupt].Leak().Leak()->fHooked = true; + kSyscalls[cTlsInterrupt].Leak().Leak()->fHooked = true; + kSyscalls[cTlsInstallInterrupt].Leak().Leak()->fHooked = true; + kSyscalls[cDeleteInterrupt].Leak().Leak()->fHooked = true; + kSyscalls[cNewInterrupt].Leak().Leak()->fHooked = true; + kSyscalls[cExitInterrupt].Leak().Leak()->fHooked = true; + kSyscalls[cLastExitInterrupt].Leak().Leak()->fHooked = true; + NewOS::UIAccessibilty::The().Show("RCM", NewOS::UIAccessibilty::The().Width(), NewOS::UIAccessibilty::The().Height()); NewOS::HAL::hal_system_get_cores(kHandoverHeader->f_HardwareTables.f_RsdPtr); + KeMain(); + NewOS::ke_stop(RUNTIME_CHECK_BOOTSTRAP); } diff --git a/Kernel/HALKit/AMD64/HalKernelMouse.cxx b/Kernel/HALKit/AMD64/HalKernelMouse.cxx index 5d50e4f2..71644d46 100644 --- a/Kernel/HALKit/AMD64/HalKernelMouse.cxx +++ b/Kernel/HALKit/AMD64/HalKernelMouse.cxx @@ -4,9 +4,9 @@ ------------------------------------------- */ -#include <Builtins/PS2/PS2MouseInterface.hxx> -#include <Builtins/GX/GX> -#include <Builtins/GX/Rsrc/Cursor.rsrc> +#include <Modules/PS2/PS2MouseInterface.hxx> +#include <Modules/CoreCG/CoreCG.hxx> +#include <Modules/CoreCG/Rsrc/Cursor.rsrc> #include <KernelKit/Framebuffer.hpp> #include <NewKit/Defines.hpp> diff --git a/Kernel/HALKit/AMD64/HalPageAlloc.hpp b/Kernel/HALKit/AMD64/HalPageAlloc.hpp index 332c8ed4..bda7d902 100644 --- a/Kernel/HALKit/AMD64/HalPageAlloc.hpp +++ b/Kernel/HALKit/AMD64/HalPageAlloc.hpp @@ -38,16 +38,16 @@ namespace NewOS::HAL { struct PACKED PageTable64 final { - bool Present : 1; - bool Rw : 1; - bool User : 1; - bool Wt : 1; - bool Cache : 1; - bool Accessed : 1; - NewOS::Int32 Reserved : 6; + bool Present : 1; + bool Rw : 1; + bool User : 1; + bool Wt : 1; + bool Cache : 1; + bool Accessed : 1; + NewOS::Int32 Reserved : 6; NewOS::UInt64 PhysicalAddress : 36; - NewOS::Int32 Reserved1 : 15; - bool ExecDisable : 1; + NewOS::Int32 Reserved1 : 15; + bool ExecDisable : 1; }; namespace Detail diff --git a/Kernel/HALKit/AMD64/Processor.hpp b/Kernel/HALKit/AMD64/Processor.hpp index 98a5aee6..d39a7984 100644 --- a/Kernel/HALKit/AMD64/Processor.hpp +++ b/Kernel/HALKit/AMD64/Processor.hpp @@ -28,10 +28,10 @@ #define IsActiveLow(FLG) (FLG & 2) #define IsLevelTriggered(FLG) (FLG & 8) -#define kInterruptGate (0x8E) -#define kTrapGate (0xEF) -#define kTaskGate (0b10001100) -#define kGdtCodeSelector (0x08) +#define kInterruptGate (0x8E) +#define kTrapGate (0xEF) +#define kTaskGate (0b10001100) +#define kGdtCodeSelector (0x08) #define cHeapStartOffset (0x10000000) namespace NewOS @@ -54,7 +54,7 @@ namespace NewOS namespace NewOS::HAL { - /// @brief Virtual memory flags. + /// @brief Virtual memory flags. enum { eFlagsUser, @@ -147,7 +147,7 @@ namespace NewOS::HAL using RawRegister = UInt64; - using InterruptId = UShort; /* For each element in the IVT */ + using InterruptId = UShort; /* For each element in the IVT */ using InterruptTrapKind = UIntPtr(UIntPtr sp); typedef UIntPtr Reg; diff --git a/Kernel/HALKit/AMD64/Storage/AHCI.cxx b/Kernel/HALKit/AMD64/Storage/AHCI.cxx index 587c64cb..8555b3de 100644 --- a/Kernel/HALKit/AMD64/Storage/AHCI.cxx +++ b/Kernel/HALKit/AMD64/Storage/AHCI.cxx @@ -15,7 +15,7 @@ * */ -#include <Builtins/AHCI/AHCI.hxx> +#include <Modules/AHCI/AHCI.hxx> #include <KernelKit/PCI/Iterator.hpp> #ifdef __AHCI__ diff --git a/Kernel/HALKit/AMD64/Storage/ATA-DMA.cxx b/Kernel/HALKit/AMD64/Storage/ATA-DMA.cxx index 4e41e3ce..b6dacf21 100644 --- a/Kernel/HALKit/AMD64/Storage/ATA-DMA.cxx +++ b/Kernel/HALKit/AMD64/Storage/ATA-DMA.cxx @@ -17,7 +17,7 @@ #include <StorageKit/PRDT.hpp> -#include <Builtins/ATA/ATA.hxx> +#include <Modules/ATA/ATA.hxx> #include <ArchKit/ArchKit.hpp> using namespace NewOS; @@ -28,11 +28,11 @@ STATIC PRDT kPRDT; #ifdef __ATA_DMA__ #ifdef __ATA_PIO__ -#error !!! You cant have both PIO and DMA enabled! !!! +#error !!! You cant have both PIO and DMA enabled! !!! #endif /* ifdef __ATA_PIO__ */ #ifdef __AHCI__ -#error !!! You cant have both ATA and AHCI enabled! !!! +#error !!! You cant have both ATA and AHCI enabled! !!! #endif /* ifdef __AHCI__ */ #endif /* ifdef __ATA_DMA__ */ diff --git a/Kernel/HALKit/AMD64/Storage/ATA-PIO.cxx b/Kernel/HALKit/AMD64/Storage/ATA-PIO.cxx index e4ab1367..7853d497 100644 --- a/Kernel/HALKit/AMD64/Storage/ATA-PIO.cxx +++ b/Kernel/HALKit/AMD64/Storage/ATA-PIO.cxx @@ -15,7 +15,7 @@ * */ -#include <Builtins/ATA/ATA.hxx> +#include <Modules/ATA/ATA.hxx> #include <ArchKit/ArchKit.hpp> #ifdef __ATA_PIO__ |
