diff options
Diffstat (limited to 'newBoot/Source/Arch')
| -rw-r--r-- | newBoot/Source/Arch/AMD64/ATA.cxx | 18 | ||||
| -rw-r--r-- | newBoot/Source/Arch/AMD64/BIOSRuntime.cxx | 2 | ||||
| -rw-r--r-- | newBoot/Source/Arch/AMD64/BIOSRuntime0.asm | 4 | ||||
| -rw-r--r-- | newBoot/Source/Arch/AMD64/Processor.cxx | 16 | ||||
| -rw-r--r-- | newBoot/Source/Arch/AMD64/makefile | 1 | ||||
| -rw-r--r-- | newBoot/Source/Arch/PowerPC/.gitkeep | 0 |
6 files changed, 32 insertions, 9 deletions
diff --git a/newBoot/Source/Arch/AMD64/ATA.cxx b/newBoot/Source/Arch/AMD64/ATA.cxx index 5ddf3efa..ce905639 100644 --- a/newBoot/Source/Arch/AMD64/ATA.cxx +++ b/newBoot/Source/Arch/AMD64/ATA.cxx @@ -157,10 +157,16 @@ extern "C" UInt32 in32(UInt16 port) return value; } -extern "C" void rt_halt() { asm volatile("hlt"); } - -extern "C" void rt_cli() { asm volatile("cli"); } - -extern "C" void rt_sti() { asm volatile("sti"); } +extern "C" int init_ata_mpt(void) +{ + for (int i = 0; i < 255; ++i) + { + if (ATAInitDriver(i, ATA_MASTER)) + { + ATAInitDriver(i, ATA_SLAVE); + return 1; + } + } -extern "C" void rt_cld() { asm volatile("cld"); }
\ No newline at end of file + return 0; +}
\ No newline at end of file diff --git a/newBoot/Source/Arch/AMD64/BIOSRuntime.cxx b/newBoot/Source/Arch/AMD64/BIOSRuntime.cxx index b8a95560..611a48c4 100644 --- a/newBoot/Source/Arch/AMD64/BIOSRuntime.cxx +++ b/newBoot/Source/Arch/AMD64/BIOSRuntime.cxx @@ -5,4 +5,4 @@ #include <BootKit/Boot.hpp> #include "ATA.hxx" -extern "C" char __STACK[4096] = { 0 }; +extern "C" char __runtime_stack[4096] = { 0 }; diff --git a/newBoot/Source/Arch/AMD64/BIOSRuntime0.asm b/newBoot/Source/Arch/AMD64/BIOSRuntime0.asm index 5b5a6338..3a690d99 100644 --- a/newBoot/Source/Arch/AMD64/BIOSRuntime0.asm +++ b/newBoot/Source/Arch/AMD64/BIOSRuntime0.asm @@ -1,6 +1,6 @@ ;; Copyright Mahrouss Logic, all rights reserved -extern __STACK +extern __runtime_stack global NBRuntimeZero bits 16 @@ -36,7 +36,7 @@ NBProtectedMode: mov gs, ax mov ss, ax - mov esp, __STACK + mov esp, __runtime_stack jmp 0x8000000 NBLoopOne: diff --git a/newBoot/Source/Arch/AMD64/Processor.cxx b/newBoot/Source/Arch/AMD64/Processor.cxx new file mode 100644 index 00000000..65cf85cb --- /dev/null +++ b/newBoot/Source/Arch/AMD64/Processor.cxx @@ -0,0 +1,16 @@ +/* +* ======================================================== +* +* newBoot +* Copyright Mahrouss Logic, all rights reserved. +* +* ======================================================== +*/ + +extern "C" void rt_halt(void) { asm volatile("hlt"); } + +extern "C" void rt_cli(void) { asm volatile("cli"); } + +extern "C" void rt_sti(void) { asm volatile("sti"); } + +extern "C" void rt_cld(void) { asm volatile("cld"); } diff --git a/newBoot/Source/Arch/AMD64/makefile b/newBoot/Source/Arch/AMD64/makefile index fb4b0910..21860551 100644 --- a/newBoot/Source/Arch/AMD64/makefile +++ b/newBoot/Source/Arch/AMD64/makefile @@ -22,6 +22,7 @@ CCFLAGS = -c -ffreestanding -fno-rtti -fno-exceptions -std=c++20 -D__HAVE_HCORE build-crt0-bios: $(CC) $(CCFLAGS) BIOSRuntime.cxx $(CC) $(CCFLAGS) ATA.cxx + $(CC) $(CCFLAGS) Processor.cxx $(ASM) $(ASMFLAGS) BIOSRuntime0.asm $(LD) --oformat $(FMT) ATA.o -o $(ATAMOD) diff --git a/newBoot/Source/Arch/PowerPC/.gitkeep b/newBoot/Source/Arch/PowerPC/.gitkeep new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/newBoot/Source/Arch/PowerPC/.gitkeep |
