mirror of
https://gitlab.os-k.eu/os-k-team/os-k.git
synced 2023-08-25 14:03:10 +02:00
WIP : working on AHCI
This commit is contained in:
parent
3ed5a9ef45
commit
701b0f0804
@ -33,13 +33,15 @@
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------//
|
//----------------------------------------------------------------------------//
|
||||||
|
|
||||||
|
#define MASS_STORAGE_CLASS 0x1
|
||||||
|
#define SERIAL_ATA_SUBCLASS 0x6
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------//
|
||||||
|
|
||||||
|
void IoDetectATA(void);
|
||||||
void IoReadATA(void *sectorBuffer, char n, char first);
|
void IoReadATA(void *sectorBuffer, char n, char first);
|
||||||
void IoDumpSector(void);
|
void IoDumpSector(void);
|
||||||
|
|
||||||
//----------------------------------------------------------------------------//
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------//
|
//----------------------------------------------------------------------------//
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include <ke/sched.h>
|
#include <ke/sched.h>
|
||||||
#include <sh/shell.h>
|
#include <sh/shell.h>
|
||||||
#include <io/vga.h>
|
#include <io/vga.h>
|
||||||
|
#include <io/ata.h>
|
||||||
#include <io/keyb.h>
|
#include <io/keyb.h>
|
||||||
#include <io/cursor.h>
|
#include <io/cursor.h>
|
||||||
#include <io/acpi.h>
|
#include <io/acpi.h>
|
||||||
@ -88,6 +89,9 @@ noreturn void BtStartKern(multiboot_info_t *mbInfo, uint mbMagic, void *codeSeg)
|
|||||||
// PCI express
|
// PCI express
|
||||||
IoInitPCI();
|
IoInitPCI();
|
||||||
|
|
||||||
|
// Drivers
|
||||||
|
IoDetectATA();
|
||||||
|
|
||||||
// Scheduler
|
// Scheduler
|
||||||
PsInitSched();
|
PsInitSched();
|
||||||
|
|
||||||
|
@ -45,5 +45,13 @@ void IoDumpFirstSector(void)
|
|||||||
|
|
||||||
void IoDetectATA(void)
|
void IoDetectATA(void)
|
||||||
{
|
{
|
||||||
|
PciDev_t *ataDevice = IoPciGetDeviceByClass(MASS_STORAGE_CLASS,
|
||||||
|
SERIAL_ATA_SUBCLASS);
|
||||||
|
|
||||||
|
if(!ataDevice) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugLog("AHCI controller found ! PCI config addr = %p\n",
|
||||||
|
ataDevice->configAddr);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user