Add stubs to permit devices to specify their boot priority.
[seabios.git] / src / boot.h
1 // Storage for boot definitions.
2 #ifndef __BOOT_H
3 #define __BOOT_H
4
5
6 /****************************************************************
7  * Initial Program Load (IPL)
8  ****************************************************************/
9
10 struct ipl_entry_s {
11     u16 type;
12     u32 vector;
13 };
14
15 struct ipl_s {
16     struct ipl_entry_s bev[8];
17     int bevcount;
18     int checkfloppysig;
19     char **fw_bootorder;
20     int fw_bootorder_count;
21 };
22
23 #define IPL_TYPE_FLOPPY      0x01
24 #define IPL_TYPE_HARDDISK    0x02
25 #define IPL_TYPE_CDROM       0x03
26 #define IPL_TYPE_CBFS        0x20
27 #define IPL_TYPE_BEV         0x80
28 #define IPL_TYPE_BCV         0x81
29
30
31 /****************************************************************
32  * Function defs
33  ****************************************************************/
34
35 // boot.c
36 extern struct ipl_s IPL;
37 void boot_setup(void);
38 void boot_add_bev(u16 seg, u16 bev, u16 desc, int prio);
39 void boot_add_bcv(u16 seg, u16 ip, u16 desc, int prio);
40 struct drive_s;
41 void boot_add_floppy(struct drive_s *drive_g, int prio);
42 void boot_add_hd(struct drive_s *drive_g, int prio);
43 void boot_add_cd(struct drive_s *drive_g, int prio);
44 void boot_add_cbfs(void *data, const char *desc, int prio);
45 void boot_prep(void);
46 int bootprio_find_pci_device(int bdf);
47 int bootprio_find_ata_device(int bdf, int chanid, int slave);
48 int bootprio_find_fdc_device(int bfd, int port, int fdid);
49 int bootprio_find_pci_rom(int bdf, int instance);
50 int bootprio_find_named_rom(const char *name, int instance);
51
52 #endif // __BOOT_H