|
tape-kernel 1.0
a modular modern independent kernel
|

Go to the source code of this file.
Functions | |
| void | __ideinit (void) |
| ideinit initializes the ide disk controller | |
| void | __irsec (uint32_t lba, uint8_t *buff) |
| irsec reads a single 512 byte sector from disk | |
| void | __iwrt (uint32_t lba, uint8_t *buff) |
| iwrt writes a single 512 byte sector to disk | |
| int | __idesize (uint32_t *secs) |
| idesize queries the ide drive for its total sector count | |
| void __ideinit | ( | void | ) |
ideinit initializes the ide disk controller
ideinit is a function that resets the ide controller, selects the master drive, and verifies the drive is present and ready
using ideinit is done with
Definition at line 21 of file ide.c.
References assert, IDE_DEVICE, IDE_PRIMARY_CONTROL, IDE_STATUS, inb, and outb.
| int __idesize | ( | uint32_t * | secs | ) |
idesize queries the ide drive for its total sector count
idesize is a function that sends the IDENTIFY command to the ide drive and reads back the total number of lba28 sectors
| secs,a | pointer to store the total sector count |
using idesize is done with
Definition at line 144 of file ide.c.
References IDE_COMMAND, IDE_DATA, IDE_DEVICE, IDE_STATUS, inb, inw, and outb.
irsec reads a single 512 byte sector from disk
irsec is a function that reads one sector from the ide drive at the given lba
| lba,the | logical block address to read from |
| buff,the | 512 byte buffer to store the read data |
using irsec is done with
Definition at line 59 of file ide.c.
References assert, IDE_COMMAND, IDE_DATA, IDE_DEVICE, IDE_LBA_HIGH, IDE_LBA_LOW, IDE_LBA_MID, IDE_SECTORS, IDE_STATUS, inb, inw, NULL, and outb.
iwrt writes a single 512 byte sector to disk
iwrt is a function that writes one sector to the ide drive at the given lba
| lba,the | logical block address to write to |
| buff,the | 512 byte buffer containing the data to write |
using iwrt is done with
Definition at line 99 of file ide.c.
References assert, IDE_COMMAND, IDE_DATA, IDE_DEVICE, IDE_LBA_HIGH, IDE_LBA_LOW, IDE_LBA_MID, IDE_SECTORS, IDE_STATUS, inb, NULL, outb, and outw.