NeKernel dev
Loading...
Searching...
No Matches
PIO+Generic.cc File Reference

ATA driver (PIO mode). More...

#include <ArchKit/ArchKit.h>
#include <KernelKit/DriveMgr.h>
#include <StorageKit/ATA.h>
#include <modules/ATA/ATA.h>

Namespaces

namespace  Kernel
 UPS inline definitions.
namespace  Kernel::Detail
 Implementation details namespace.

Macros

#define kATADataLen   256
 BUGS: 0.

Functions

STATIC Void drv_pio_std_select (UInt16 Bus)
Boolean drv_pio_std_init (UInt16 Bus, UInt8 Drive, UInt16 &OutBus, UInt8 &OutMaster)
Void drv_pio_std_read (UInt64 Lba, UInt16 IO, UInt8 Master, Char *Buf, SizeT SectorSz, SizeT Size)
Void drv_pio_std_write (UInt64 Lba, UInt16 IO, UInt8 Master, Char *Buf, SizeT SectorSz, SizeT Size)
Boolean drv_pio_std_detected (Void)
 is ATA detected?
SizeT drv_pio_get_sector_count ()
SizeT drv_pio_get_size ()
 Get the drive size.
BOOL Kernel::sk_init_ata_device (BOOL is_master, UInt16 &io, UInt8 &master)
 Initialize an PIO device (StorageKit function).
STATIC Void Kernel::Detail::sk_io_read_pio (DeviceInterface< IMountpoint * > *self, IMountpoint *mnt)
 Read PIO device.
STATIC Void Kernel::Detail::sk_io_write_pio (DeviceInterface< IMountpoint * > *self, IMountpoint *mnt)
 Write PIO device.
ErrorOr< ATADeviceInterfaceKernel::sk_acquire_ata_device (Int32 drv_index)
 Acquires a new PIO device with drv_index in mind.

Variables

STATIC Boolean kATADetected = false
STATIC UInt16 kATAIdentifyData [kATADataLen] = {0}
STATIC Char kATADiskModel [50] = {"GENERIC PIO"}

Detailed Description

ATA driver (PIO mode).

Author
Amlal El Mahrouss (amlal.nosp@m.@nek.nosp@m.ernel.nosp@m..org)
Version
0.1
Date
2024-02-02

Macro Definition Documentation

◆ kATADataLen

#define kATADataLen   256

BUGS: 0.

Function Documentation

◆ drv_pio_get_sector_count()

SizeT drv_pio_get_sector_count ( )

◆ drv_pio_get_size()

SizeT drv_pio_get_size ( )

Get the drive size.

◆ drv_pio_std_detected()

Boolean drv_pio_std_detected ( Void )

is ATA detected?

◆ drv_pio_std_init()

Boolean drv_pio_std_init ( UInt16 Bus,
UInt8 Drive,
UInt16 & OutBus,
UInt8 & OutMaster )

fetch serial info model, speed, number of sectors...

◆ drv_pio_std_read()

Void drv_pio_std_read ( UInt64 Lba,
UInt16 IO,
UInt8 Master,
Char * Buf,
SizeT SectorSz,
SizeT Size )

◆ drv_pio_std_select()

STATIC Void drv_pio_std_select ( UInt16 Bus)

◆ drv_pio_std_write()

Void drv_pio_std_write ( UInt64 Lba,
UInt16 IO,
UInt8 Master,
Char * Buf,
SizeT SectorSz,
SizeT Size )

Variable Documentation

◆ kATADetected

STATIC Boolean kATADetected = false

◆ kATADiskModel

STATIC Char kATADiskModel[50] = {"GENERIC PIO"}

◆ kATAIdentifyData

STATIC UInt16 kATAIdentifyData[kATADataLen] = {0}