You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
914B

  1. #ifndef _MULTIBOOT_H_
  2. #define _MULTIBOOT_H_
  3. #include <stdint.h>
  4. #include "filedata.h"
  5. struct multiboot {
  6. struct multiboot_ops *ops;
  7. void *privdata;
  8. int verify;
  9. void (* progress_cb)(const char *msg, int pos, int max);
  10. };
  11. struct multiboot_ops {
  12. struct multiboot * (* alloc)(void);
  13. void (* free)(struct multiboot *mboot);
  14. int (* get_memtype)(struct multiboot *mboot, const char *memname);
  15. int (* get_memsize)(struct multiboot *mboot, int memtype);
  16. int (* open)(struct multiboot *mboot);
  17. int (* close)(struct multiboot *mboot);
  18. int (* read)(struct multiboot *mboot, struct databuf *dbuf, int memtype);
  19. int (* verify)(struct multiboot *mboot, struct databuf *dbuf, int memtype);
  20. int (* write)(struct multiboot *mboot, struct databuf *dbuf, int memtype);
  21. };
  22. extern struct multiboot_ops twi_ops;
  23. extern struct multiboot_ops mpm_ops;
  24. #endif /* _MULTIBOOT_H_ */