diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-06-03 09:31:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-03 09:31:01 +0200 |
| commit | 6511afbf405c31513bc88ab06bca58218610a994 (patch) | |
| tree | e2509b7f9b59643b2a97773604aa383a2fd2e2f3 /dev/kernel/HALKit/AMD64 | |
| parent | 5c0bb7ee7b1b0fee02cc179fb21f4c57a61d6c2d (diff) | |
| parent | bebcbe04c2b47b3b4fcdc093b1736cc0295109fe (diff) | |
Merge pull request #36 from nekernel-org/dev
0.0.3 — NeKernel
Diffstat (limited to 'dev/kernel/HALKit/AMD64')
5 files changed, 18 insertions, 13 deletions
diff --git a/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc b/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc index 3e10d577..24a81af9 100644 --- a/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc +++ b/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc @@ -120,7 +120,9 @@ EXTERN_C BOOL mp_register_task(HAL::StackFramePtr stack_frame, ThreadID thrdid) HardwareThreadScheduler::The()[thrdid].Leak()->Busy(NO); - sched_jump_to_task(kHWThread[thrdid].mFramePtr); + if (!kSMPAware) { + sched_jump_to_task(kHWThread[thrdid].mFramePtr); + } return YES; } @@ -201,9 +203,9 @@ Void mp_init_cores(VoidPtr vendor_ptr) noexcept { volatile LAPIC* entry_struct = (volatile LAPIC*) entry_ptr; if (entry_struct->Flags & 0x1) { - kAPICLocales[kSMPCount] = entry_struct->ProcessorID; + kAPICLocales[kSMPCount] = entry_struct->ProcessorID; kHWThread[kSMPCount].mThreadID = kAPICLocales[kSMPCount]; - + ++kSMPCount; kout << "Kind: LAPIC: ON\r"; diff --git a/dev/kernel/HALKit/AMD64/HalDebugOutput.cc b/dev/kernel/HALKit/AMD64/HalDebugOutput.cc index b0463eb5..1e9fbab3 100644 --- a/dev/kernel/HALKit/AMD64/HalDebugOutput.cc +++ b/dev/kernel/HALKit/AMD64/HalDebugOutput.cc @@ -59,7 +59,7 @@ TerminalDevice::~TerminalDevice() = default; STATIC SizeT kX = kFontSizeX, kY = kFontSizeY; -EXTERN_C void ke_utf_io_write(IDeviceObject<const Utf8Char*>* obj, const Utf8Char* bytes) { +EXTERN_C void ke_utf_io_write(DeviceInterface<const Utf8Char*>* obj, const Utf8Char* bytes) { NE_UNUSED(bytes); NE_UNUSED(obj); @@ -115,7 +115,7 @@ EXTERN_C void ke_utf_io_write(IDeviceObject<const Utf8Char*>* obj, const Utf8Cha #endif // __DEBUG__ } -EXTERN_C void ke_io_write(IDeviceObject<const Char*>* obj, const Char* bytes) { +EXTERN_C void ke_io_write(DeviceInterface<const Char*>* obj, const Char* bytes) { NE_UNUSED(bytes); NE_UNUSED(obj); @@ -171,7 +171,7 @@ EXTERN_C void ke_io_write(IDeviceObject<const Char*>* obj, const Char* bytes) { #endif // __DEBUG__ } -EXTERN_C void ke_io_read(IDeviceObject<const Char*>*, const Char* bytes) { +EXTERN_C void ke_io_read(DeviceInterface<const Char*>*, const Char* bytes) { NE_UNUSED(bytes); #ifdef __DEBUG__ @@ -218,7 +218,7 @@ Utf8TerminalDevice::~Utf8TerminalDevice() = default; Utf8TerminalDevice Utf8TerminalDevice::The() noexcept { Utf8TerminalDevice out(Kernel::ke_utf_io_write, - [](IDeviceObject<const Utf8Char*>*, const Utf8Char*) -> Void {}); + [](DeviceInterface<const Utf8Char*>*, const Utf8Char*) -> Void {}); return out; } diff --git a/dev/kernel/HALKit/AMD64/HalSchedulerCorePrimitives.cc b/dev/kernel/HALKit/AMD64/HalSchedulerCorePrimitives.cc index 0c468e14..1dbce4ac 100644 --- a/dev/kernel/HALKit/AMD64/HalSchedulerCorePrimitives.cc +++ b/dev/kernel/HALKit/AMD64/HalSchedulerCorePrimitives.cc @@ -22,7 +22,7 @@ EXTERN_C Void __zka_pure_call(USER_PROCESS* process) { /// @param stack_ptr the frame pointer. /***********************************************************************************/ -EXTERN_C Bool hal_check_stack(HAL::StackFramePtr stack_ptr) { +EXTERN_C Bool hal_check_task(HAL::StackFramePtr stack_ptr) { if (!stack_ptr) return No; return stack_ptr->SP != 0 && stack_ptr->IP != 0; diff --git a/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc b/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc index b30bfc32..cd41480a 100644 --- a/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc +++ b/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc @@ -546,7 +546,8 @@ namespace Detail { /// @brief Read AHCI device. /// @param self device /// @param mnt mounted disk. - STATIC Void sk_io_read_ahci(IDeviceObject<MountpointInterface*>* self, MountpointInterface* mnt) { + STATIC Void sk_io_read_ahci(DeviceInterface<MountpointInterface*>* self, + MountpointInterface* mnt) { AHCIDeviceInterface* dev = (AHCIDeviceInterface*) self; err_global_get() = kErrorDisk; @@ -567,8 +568,8 @@ namespace Detail { /// @brief Write AHCI device. /// @param self device /// @param mnt mounted disk. - STATIC Void sk_io_write_ahci(IDeviceObject<MountpointInterface*>* self, - MountpointInterface* mnt) { + STATIC Void sk_io_write_ahci(DeviceInterface<MountpointInterface*>* self, + MountpointInterface* mnt) { AHCIDeviceInterface* dev = (AHCIDeviceInterface*) self; err_global_get() = kErrorDisk; diff --git a/dev/kernel/HALKit/AMD64/Storage/PIO+Generic.cc b/dev/kernel/HALKit/AMD64/Storage/PIO+Generic.cc index 99e1c619..6fccbdfa 100644 --- a/dev/kernel/HALKit/AMD64/Storage/PIO+Generic.cc +++ b/dev/kernel/HALKit/AMD64/Storage/PIO+Generic.cc @@ -200,7 +200,8 @@ namespace Detail { /// @brief Read PIO device. /// @param self device /// @param mnt mounted disk. - STATIC Void sk_io_read_pio(IDeviceObject<MountpointInterface*>* self, MountpointInterface* mnt) { + STATIC Void sk_io_read_pio(DeviceInterface<MountpointInterface*>* self, + MountpointInterface* mnt) { ATADeviceInterface* dev = (ATADeviceInterface*) self; err_global_get() = kErrorDisk; @@ -221,7 +222,8 @@ namespace Detail { /// @brief Write PIO device. /// @param self device /// @param mnt mounted disk. - STATIC Void sk_io_write_pio(IDeviceObject<MountpointInterface*>* self, MountpointInterface* mnt) { + STATIC Void sk_io_write_pio(DeviceInterface<MountpointInterface*>* self, + MountpointInterface* mnt) { ATADeviceInterface* dev = (ATADeviceInterface*) self; err_global_get() = kErrorDisk; |
