multiboot_tool/multiboot.h

41 lines
1.0 KiB
C
Raw Normal View History

2014-12-26 11:36:32 +01:00
#ifndef _MULTIBOOT_H_
#define _MULTIBOOT_H_
#include <stdint.h>
#include "filedata.h"
2017-03-07 20:09:48 +01:00
struct multiboot
{
2014-12-26 11:36:32 +01:00
struct multiboot_ops *ops;
void *privdata;
int verify;
void (* progress_cb)(const char *msg, int pos, int max);
};
2017-03-07 20:09:48 +01:00
struct multiboot_ops
{
2019-08-11 11:16:26 +02:00
const char * exec_name;
2014-12-26 11:36:32 +01:00
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);
2014-12-26 11:36:32 +01:00
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;
2014-12-26 12:18:21 +01:00
extern struct multiboot_ops funk_ops;
2019-08-11 11:16:26 +02:00
extern struct multiboot_ops eprog_ops;
2020-01-17 23:26:41 +01:00
extern struct multiboot_ops butterfly_ops;
2014-12-26 11:36:32 +01:00
#endif /* _MULTIBOOT_H_ */