rulimine/stage2/drivers/disk.h

23 lines
519 B
C
Raw Normal View History

2020-01-23 03:48:35 +03:00
#ifndef __DRIVERS__DISK_H__
#define __DRIVERS__DISK_H__
#include <stddef.h>
2019-06-02 12:18:10 +03:00
#include <stdint.h>
2020-04-15 14:21:44 +03:00
#include <lib/part.h>
2019-06-02 12:18:10 +03:00
2020-10-18 07:23:39 +03:00
struct bios_drive_params {
uint16_t buf_size;
uint16_t info_flags;
uint32_t cyl;
uint32_t heads;
uint32_t sects;
uint64_t lba_count;
uint16_t bytes_per_sect;
uint32_t edd;
} __attribute__((packed));
2020-01-21 08:42:25 +03:00
int read(int drive, void *buffer, uint64_t loc, uint64_t count);
2020-04-15 14:21:44 +03:00
int read_partition(int drive, struct part *part, void *buffer, uint64_t loc, uint64_t count);
#endif