diff options
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | dev/Kernel/HALKit/AMD64/HalCommonAPI.asm | 27 | ||||
| -rw-r--r-- | dev/Kernel/HALKit/AMD64/HalDescriptorLoader.cc | 8 | ||||
| -rw-r--r-- | dev/Kernel/HALKit/AMD64/HalInterruptAPI.asm | 28 | ||||
| -rw-r--r-- | dev/Kernel/HALKit/AMD64/Storage/ATA-PIO.cc | 16 | ||||
| -rw-r--r-- | dev/Kernel/POSIXKit/unix_layer.h | 2 | ||||
| -rw-r--r-- | public/tools/.keep | 0 | ||||
| -rw-r--r-- | public/tools/make_app/Common.h (renamed from public/tools/Common.h) | 0 | ||||
| -rw-r--r-- | public/tools/make_app/Framework.h (renamed from public/tools/Framework.h) | 0 | ||||
| -rw-r--r-- | public/tools/make_app/Steps.h (renamed from public/tools/Steps.h) | 0 | ||||
| -rw-r--r-- | public/tools/make_app/dist/.keep | 0 | ||||
| -rw-r--r-- | public/tools/make_app/make_app.json (renamed from public/tools/make_container.json) | 2 | ||||
| -rw-r--r-- | public/tools/make_app/src/CLI.cc (renamed from public/tools/src/CLI.cc) | 0 | ||||
| -rw-r--r-- | public/tools/make_application.sh | 3 |
14 files changed, 43 insertions, 45 deletions
@@ -10,7 +10,7 @@ xcuserdata/ */xcuserdata/* *.xcworkspacedata -public/tools/make_container +public/tools/make_app/dist/make_app minoskrnl/minoskrnl.xcodeproj/project.xcworkspace/xcshareddata/ diff --git a/dev/Kernel/HALKit/AMD64/HalCommonAPI.asm b/dev/Kernel/HALKit/AMD64/HalCommonAPI.asm index 6339fa8d..dd3901e8 100644 --- a/dev/Kernel/HALKit/AMD64/HalCommonAPI.asm +++ b/dev/Kernel/HALKit/AMD64/HalCommonAPI.asm @@ -51,3 +51,30 @@ rt_in32: mov rdx, rcx in eax, dx ret + +extern hal_system_call_enter +global mp_system_call_handler + +mp_system_call_handler: + + push r8 + push r9 + push r10 + push r11 + push r12 + push r13 + push r14 + push r15 + + jmp hal_system_call_enter + + pop r15 + pop r14 + pop r13 + pop r12 + pop r11 + pop r10 + pop r9 + pop r8 + + o64 sysret diff --git a/dev/Kernel/HALKit/AMD64/HalDescriptorLoader.cc b/dev/Kernel/HALKit/AMD64/HalDescriptorLoader.cc index 680aa6ed..2edbdc60 100644 --- a/dev/Kernel/HALKit/AMD64/HalDescriptorLoader.cc +++ b/dev/Kernel/HALKit/AMD64/HalDescriptorLoader.cc @@ -7,7 +7,7 @@ #include <ArchKit/ArchKit.h> #include <HALKit/AMD64/Processor.h> -#define kPITDefaultTicks (100U) +#define kPITDefaultTicks (1000U) namespace Kernel::HAL { @@ -26,11 +26,11 @@ namespace Kernel::HAL // Configure PIT to receieve scheduler interrupts. - UInt16 cCommDivisor = kPITFrequency / ticks; // 100 Hz. + UInt16 kPITCommDivisor = kPITFrequency / ticks; // 100 Hz. HAL::rt_out8(kPITControlPort, 0x36); // Command to PIT - HAL::rt_out8(kPITChannel0Port, cCommDivisor & 0xFF); // Send low byte - HAL::rt_out8(kPITChannel0Port, (cCommDivisor >> 8) & 0xFF); // Send high byte + HAL::rt_out8(kPITChannel0Port, kPITCommDivisor & 0xFF); // Send low byte + HAL::rt_out8(kPITChannel0Port, (kPITCommDivisor >> 8) & 0xFF); // Send high byte hal_clear_irq_mask(32); } diff --git a/dev/Kernel/HALKit/AMD64/HalInterruptAPI.asm b/dev/Kernel/HALKit/AMD64/HalInterruptAPI.asm index 02031c4c..53654d08 100644 --- a/dev/Kernel/HALKit/AMD64/HalInterruptAPI.asm +++ b/dev/Kernel/HALKit/AMD64/HalInterruptAPI.asm @@ -369,34 +369,6 @@ hal_reload_segments: ret global hal_load_idt -global hal_user_code_start - -extern hal_system_call_enter -global mp_system_call_handler - -mp_system_call_handler: - - push r8 - push r9 - push r10 - push r11 - push r12 - push r13 - push r14 - push r15 - - jmp hal_system_call_enter - - pop r15 - pop r14 - pop r13 - pop r12 - pop r11 - pop r10 - pop r9 - pop r8 - - o64 sysret hal_load_idt: lidt [rcx] diff --git a/dev/Kernel/HALKit/AMD64/Storage/ATA-PIO.cc b/dev/Kernel/HALKit/AMD64/Storage/ATA-PIO.cc index 9fc261ef..1829a25a 100644 --- a/dev/Kernel/HALKit/AMD64/Storage/ATA-PIO.cc +++ b/dev/Kernel/HALKit/AMD64/Storage/ATA-PIO.cc @@ -37,18 +37,18 @@ Boolean drv_std_wait_io(UInt16 IO) rt_in8(IO + ATA_REG_STATUS); ATAWaitForIO_Retry: - auto statRdy = rt_in8(IO + ATA_REG_STATUS); + auto rdy = rt_in8(IO + ATA_REG_STATUS); - if ((statRdy & ATA_SR_BSY)) + if ((rdy & ATA_SR_BSY)) goto ATAWaitForIO_Retry; ATAWaitForIO_Retry2: - statRdy = rt_in8(IO + ATA_REG_STATUS); + rdy = rt_in8(IO + ATA_REG_STATUS); - if (statRdy & ATA_SR_ERR) + if (rdy & ATA_SR_ERR) return false; - if (!(statRdy & ATA_SR_DRDY)) + if (!(rdy & ATA_SR_DRDY)) goto ATAWaitForIO_Retry2; return true; @@ -74,16 +74,16 @@ ATAInit_Retry: // identify until it's good - auto statRdy = rt_in8(IO + ATA_REG_STATUS); + auto rdy = rt_in8(IO + ATA_REG_STATUS); - if (statRdy & ATA_SR_ERR) + if (rdy & ATA_SR_ERR) { kcout << "ATA Error, aborting...\r"; return false; } - if ((statRdy & ATA_SR_BSY)) + if ((rdy & ATA_SR_BSY)) { kcout << "Retrying as controller is busy...\r"; goto ATAInit_Retry; diff --git a/dev/Kernel/POSIXKit/unix_layer.h b/dev/Kernel/POSIXKit/unix_layer.h index d6c0fa1c..5da6d24b 100644 --- a/dev/Kernel/POSIXKit/unix_layer.h +++ b/dev/Kernel/POSIXKit/unix_layer.h @@ -9,3 +9,5 @@ #include <NewKit/Defines.h>
#include <KernelKit/UserProcessScheduler.h>
#include <KernelKit/PEFCodeMgr.h>
+#include <SystemKit/TeamScheduler.h>
+#include <SystemKit/SwapDisk.h>
\ No newline at end of file diff --git a/public/tools/.keep b/public/tools/.keep new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/public/tools/.keep diff --git a/public/tools/Common.h b/public/tools/make_app/Common.h index 65748608..65748608 100644 --- a/public/tools/Common.h +++ b/public/tools/make_app/Common.h diff --git a/public/tools/Framework.h b/public/tools/make_app/Framework.h index bd2adf08..bd2adf08 100644 --- a/public/tools/Framework.h +++ b/public/tools/make_app/Framework.h diff --git a/public/tools/Steps.h b/public/tools/make_app/Steps.h index c503c56c..c503c56c 100644 --- a/public/tools/Steps.h +++ b/public/tools/make_app/Steps.h diff --git a/public/tools/make_app/dist/.keep b/public/tools/make_app/dist/.keep new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/public/tools/make_app/dist/.keep diff --git a/public/tools/make_container.json b/public/tools/make_app/make_app.json index 1f66e5af..ba103467 100644 --- a/public/tools/make_container.json +++ b/public/tools/make_app/make_app.json @@ -3,7 +3,7 @@ "compiler_std": "c++20", "headers_path": ["./"], "sources_path": ["src/CLI.cc"], - "output_name": "make_container", + "output_name": "./dist/make_app", "cpp_macros": [ "kMKFVersion=0x0100", "kMKFVersionHighest=0x0100", diff --git a/public/tools/src/CLI.cc b/public/tools/make_app/src/CLI.cc index ed686294..ed686294 100644 --- a/public/tools/src/CLI.cc +++ b/public/tools/make_app/src/CLI.cc diff --git a/public/tools/make_application.sh b/public/tools/make_application.sh deleted file mode 100644 index 2878f5b6..00000000 --- a/public/tools/make_application.sh +++ /dev/null @@ -1,3 +0,0 @@ -# !/bin/sh - -cp make_framework.o make_application.o
\ No newline at end of file |
