1
0
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:
Adrien Bourmault 2020-02-17 19:10:59 +01:00
parent 3ed5a9ef45
commit 701b0f0804
No known key found for this signature in database
GPG Key ID: AFEE5788AEE3F4EC
3 changed files with 18 additions and 4 deletions

View File

@ -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 IoDumpSector(void);
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
#endif

View File

@ -32,6 +32,7 @@
#include <ke/sched.h>
#include <sh/shell.h>
#include <io/vga.h>
#include <io/ata.h>
#include <io/keyb.h>
#include <io/cursor.h>
#include <io/acpi.h>
@ -88,6 +89,9 @@ noreturn void BtStartKern(multiboot_info_t *mbInfo, uint mbMagic, void *codeSeg)
// PCI express
IoInitPCI();
// Drivers
IoDetectATA();
// Scheduler
PsInitSched();

View File

@ -45,5 +45,13 @@ void IoDumpFirstSector(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);
}