StuBS
Harddisk Class Reference

Simpler ATA Treiber, der 28bit Adressierung und polling über IOPorts verwendet. More...

#include <fs/harddisk.h>

Inheritance diagram for Harddisk:
[legend]
Collaboration diagram for Harddisk:
[legend]

Public Member Functions

 Harddisk (Drive drive=primary_bus_master)
 
Block fix (uint64_t block_number)
 
void unfix (Block *block)
 
int sync ()
 
int sync (Block *block)
 
- Public Member Functions inherited from BlockDevice
virtual Block fix (uint64_t block_number)=0
 
virtual void unfix (Block *block)=0
 
virtual int sync (Block *block)=0
 
virtual int sync ()=0
 
bool set_blocksize (unsigned int blocksize)
 
template<typename T >
divide_by_blocksize (T val) const
 
template<typename T >
modulo_blocksize (T val) const
 

Public Attributes

bool attached
 
uint32_t max_lba
 
- Public Attributes inherited from BlockDevice
unsigned int blocksize
 
unsigned int blocksize_bits
 

Detailed Description

Simpler ATA Treiber, der 28bit Adressierung und polling über IOPorts verwendet.

Hinweis für block_number und sector: Die block_number von fix() verwendet stets die Blockgröße, die über set_blocksize festgelegt wurde. Intern entspricht ein Sektor 512 byte, da die IOPorts diese Adressierung verwenden. block_number wird in read_sectors() oder write_sectors() per convert_lba() abhängig von this->blocksize umgewandelt.

Siehe https://wiki.osdev.org/ATA_PIO_Mode

Member Function Documentation

◆ fix()

Block Harddisk::fix ( uint64_t  block_number)
virtual

Implements BlockDevice.

◆ unfix()

void Harddisk::unfix ( Block block)
virtual

Implements BlockDevice.

◆ sync() [1/2]

int Harddisk::sync ( )
virtual

Implements BlockDevice.

◆ sync() [2/2]

int Harddisk::sync ( Block block)
virtual

Implements BlockDevice.


The documentation for this class was generated from the following files: