summaryrefslogtreecommitdiff
path: root/Source/Kernel/Core
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-11-29 16:22:01 +0100
committerAlexis211 <alexis211@gmail.com>2009-11-29 16:22:01 +0100
commit41874c455c755f00ca73c2e2ee5ab8c4b0dbe61e (patch)
tree95986807bde312286c28297059873a6c66b72566 /Source/Kernel/Core
parenta913d4c2cb4daf10c0eac4d548fccb26b2a9f099 (diff)
downloadMelon-41874c455c755f00ca73c2e2ee5ab8c4b0dbe61e.tar.gz
Melon-41874c455c755f00ca73c2e2ee5ab8c4b0dbe61e.zip
Reading from HDD is now possible !
Diffstat (limited to 'Source/Kernel/Core')
-rw-r--r--Source/Kernel/Core/Sys.ns.cpp4
-rw-r--r--Source/Kernel/Core/Sys.ns.h1
-rw-r--r--Source/Kernel/Core/kmain.wtf.cpp2
3 files changed, 7 insertions, 0 deletions
diff --git a/Source/Kernel/Core/Sys.ns.cpp b/Source/Kernel/Core/Sys.ns.cpp
index 49b2725..c5af3e8 100644
--- a/Source/Kernel/Core/Sys.ns.cpp
+++ b/Source/Kernel/Core/Sys.ns.cpp
@@ -18,6 +18,10 @@ void outb (u16int port, u8int value) {
asm volatile ("outb %1, %0" : : "dN" (port), "a" (value));
}
+void outw (u16int port, u16int value) {
+ asm volatile ("outw %1, %0" : : "dN" (port), "a" (value));
+}
+
u8int inb (u16int port) {
u8int ret;
asm volatile ("inb %1, %0" : "=a" (ret) : "dN" (port));
diff --git a/Source/Kernel/Core/Sys.ns.h b/Source/Kernel/Core/Sys.ns.h
index 9b34dbf..26f04e6 100644
--- a/Source/Kernel/Core/Sys.ns.h
+++ b/Source/Kernel/Core/Sys.ns.h
@@ -26,6 +26,7 @@ extern SimpleVT* kvt;
namespace Sys {
void outb(u16int port, u8int value);
+ void outw(u16int port, u8int value);
u8int inb(u16int port);
u16int inw(u16int port);
void dumpRegs(registers_t *regs, VirtualTerminal& vt);
diff --git a/Source/Kernel/Core/kmain.wtf.cpp b/Source/Kernel/Core/kmain.wtf.cpp
index a028457..3eee14b 100644
--- a/Source/Kernel/Core/kmain.wtf.cpp
+++ b/Source/Kernel/Core/kmain.wtf.cpp
@@ -7,6 +7,7 @@
#include <Devices/Display/VESADisplay.class.h>
#include <Devices/Keyboard/PS2Keyboard.class.h>
#include <Devices/Floppy/FloppyDrive.class.h>
+#include <Devices/ATA/ATAController.class.h>
#include <Devices/Timer.class.h>
#include <DeviceManager/Disp.ns.h>
#include <DeviceManager/Dev.ns.h>
@@ -186,6 +187,7 @@ void kmain(multiboot_info_t* mbd, u32int magic) {
Kbd::setFocus(kvt); //Set focus to virtual terminal
if (enableVESA) Dev::registerDevice(new VESADisplay());
FloppyController::detect();
+ ATAController::detect();
//*************************************** MOUNT FILESYSTEMS