Add memtest support.
[syslinux-debian/hramrach.git] / core / include / disk.h
blob0a19e8a1be099ff6dd19d54ca71fcafad6e97cf0
1 #ifndef DISK_H
2 #define DISK_H
4 #include <stddef.h>
5 #include <stdint.h>
6 #include <stdbool.h>
7 #include <core.h>
9 typedef uint64_t sector_t;
10 typedef uint64_t block_t;
12 struct bios_disk_private {
13 com32sys_t *regs;
17 * struct disk: contains the information about a specific disk and also
18 * contains the I/O function.
20 struct disk {
21 void *private; /* Firmware-private disk info */
22 unsigned int disk_number; /* in BIOS style */
23 unsigned int sector_size; /* gener512B or 2048B */
24 unsigned int sector_shift;
25 unsigned int maxtransfer; /* Max sectors per transfer */
27 unsigned int h, s; /* CHS geometry */
28 unsigned int secpercyl; /* h*s */
29 unsigned int _pad;
31 sector_t part_start; /* the start address of this partition(in sectors) */
33 int (*rdwr_sectors)(struct disk *, void *, sector_t, size_t, bool);
36 extern void read_sectors(char *, sector_t, int);
37 extern void getoneblk(struct disk *, char *, block_t, int);
39 /* diskio.c */
40 struct disk *bios_disk_init(void *);
41 struct device *device_init(void *);
43 #endif /* DISK_H */