-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmultiboot.h
More file actions
40 lines (30 loc) · 1.04 KB
/
multiboot.h
File metadata and controls
40 lines (30 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef _MULTIBOOT_H_
#define _MULTIBOOT_H_
#include <stdint.h>
#include "filedata.h"
struct multiboot
{
struct multiboot_ops *ops;
void *privdata;
int verify;
void (* progress_cb)(const char *msg, int pos, int max);
};
struct multiboot_ops
{
const char * exec_name;
struct multiboot * (* alloc)(void);
void (* free)(struct multiboot *mboot);
int (* get_memtype)(struct multiboot *mboot, const char *memname);
uint32_t (* get_memsize)(struct multiboot *mboot, int memtype);
int (* open)(struct multiboot *mboot);
int (* close)(struct multiboot *mboot);
int (* read)(struct multiboot *mboot, struct databuf *dbuf, int memtype);
int (* verify)(struct multiboot *mboot, struct databuf *dbuf, int memtype);
int (* write)(struct multiboot *mboot, struct databuf *dbuf, int memtype);
};
extern struct multiboot_ops twi_ops;
extern struct multiboot_ops mpm_ops;
extern struct multiboot_ops funk_ops;
extern struct multiboot_ops eprog_ops;
extern struct multiboot_ops butterfly_ops;
#endif /* _MULTIBOOT_H_ */