1#ifndef _SYSLINUX_FIRMWARE_H 2#define _SYSLINUX_FIRMWARE_H 3 4#include <inttypes.h> 5#include <stdbool.h> 6 7struct term_state; 8 9struct output_ops { 10 void (*erase) (int, int, int, int, uint8_t); 11 void (*write_char) (uint8_t, uint8_t); 12 void (*showcursor) (const struct term_state *); 13 void (*scroll_up) (uint8_t, uint8_t, uint8_t); 14 void (*set_cursor) (int, int, bool); 15 void (*beep) (void); 16 void (*get_mode)(int *, int *); 17 void (*text_mode)(void); 18 void (*get_cursor)(uint8_t *, uint8_t *); 19}; 20 21struct input_ops { 22 char (*getchar)(char *); 23 int (*pollchar)(void); 24 uint8_t (*shiftflags)(void); 25}; 26 27struct adv_ops { 28 void (*init)(void); 29 int (*write)(void); 30}; 31 32struct vesa_info; 33enum vesa_pixel_format; 34struct win_info; 35 36struct vesa_ops { 37 int (*set_mode)(struct vesa_info *, int *, int *, enum vesa_pixel_format *); 38 void (*screencpy)(size_t, const uint32_t *, size_t, struct win_info *); 39 int (*font_query)(uint8_t **); 40}; 41 42enum heap; 43struct mem_ops { 44 void *(*malloc)(size_t, enum heap, size_t); 45 void *(*realloc)(void *, size_t); 46 void (*free)(void *); 47}; 48 49struct initramfs; 50struct setup_data; 51 52struct firmware { 53 void (*init)(void); 54 void (*adjust_screen)(void); 55 void (*cleanup)(void); 56 struct disk *(*disk_init)(void *); 57 struct output_ops *o_ops; 58 struct input_ops *i_ops; 59 void (*get_serial_console_info)(uint16_t *, uint16_t *, uint16_t *); 60 struct adv_ops *adv_ops; 61 int (*boot_linux)(void *, size_t, struct initramfs *, 62 struct setup_data *, char *); 63 struct vesa_ops *vesa; 64 struct mem_ops *mem; 65}; 66 67extern struct firmware *firmware; 68 69extern void syslinux_register_bios(void); 70extern void init(void); 71 72#endif /* _SYSLINUX_FIRMWARE_H */ 73