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.

41 lines
1.0 KiB

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