8 typedef uint64_t sector_t
;
9 typedef uint64_t block_t
;
12 * struct disk: contains the information about a specific disk and also
13 * contains the I/O function.
16 unsigned int disk_number
; /* in BIOS style */
17 unsigned int sector_size
; /* gener512B or 2048B */
18 unsigned int sector_shift
;
19 unsigned int maxtransfer
; /* Max sectors per transfer */
21 unsigned int h
, s
; /* CHS geometry */
22 unsigned int secpercyl
; /* h*s */
25 sector_t part_start
; /* the start address of this partition(in sectors) */
27 int (*rdwr_sectors
)(struct disk
*, void *, sector_t
, size_t, bool);
30 extern void read_sectors(char *, sector_t
, int);
31 extern void getoneblk(struct disk
*, char *, block_t
, int);
34 struct disk
*disk_init(uint8_t, bool, sector_t
, uint16_t, uint16_t, uint32_t);
35 struct device
*device_init(uint8_t, bool, sector_t
, uint16_t, uint16_t, uint32_t);