14 /** Segment used for COMBOOT PSP and image */
15 #define COMBOOT_PSP_SEG 0x07C0
17 /** Entry point address of COM32 images */
18 #define COM32_START_PHYS 0x101000
20 /** COM32 bounce buffer segment */
21 #define COM32_BOUNCE_SEG 0x07C0
23 /** Size of SYSLINUX file block in bytes */
24 #define COMBOOT_FILE_BLOCKSZ 512
26 /** COMBOOT feature flags (INT 22h AX=15h) */
27 #define COMBOOT_FEATURE_LOCAL_BOOT (1 << 0)
28 #define COMBOOT_FEATURE_IDLE_LOOP (1 << 1)
30 /** Maximum number of shuffle descriptors for
31 * shuffle and boot functions
32 * (INT 22h AX=0012h, 001Ah, 001Bh)
34 #define COMBOOT_MAX_SHUFFLE_DESCRIPTORS 682
43 uint16_t gs; /* Offset 0 */
44 uint16_t fs; /* Offset 2 */
45 uint16_t es; /* Offset 4 */
46 uint16_t ds; /* Offset 6 */
48 com32_reg32_t edi; /* Offset 8 */
49 com32_reg32_t esi; /* Offset 12 */
50 com32_reg32_t ebp; /* Offset 16 */
51 com32_reg32_t _unused_esp; /* Offset 20 */
52 com32_reg32_t ebx; /* Offset 24 */
53 com32_reg32_t edx; /* Offset 28 */
54 com32_reg32_t ecx; /* Offset 32 */
55 com32_reg32_t eax; /* Offset 36 */
57 com32_reg32_t eflags; /* Offset 40 */
64 } comboot_shuffle_descriptor;
66 extern void hook_comboot_interrupts ( );
67 extern void unhook_comboot_interrupts ( );
69 /* These are not the correct prototypes, but it doens't matter,
70 * as we only ever get the address of these functions;
71 * they are only called from COM32 code running in PHYS_CODE
73 extern void com32_intcall_wrapper ( );
74 extern void com32_farcall_wrapper ( );
75 extern void com32_cfarcall_wrapper ( );
77 /* Resolve a hostname to an (IPv4) address */
78 extern int comboot_resolv ( const char *name, struct in_addr *address );
80 /* setjmp/longjmp context buffer used to return after loading an image */
81 extern jmp_buf comboot_return;
83 /* Replacement image when exiting with COMBOOT_EXIT_RUN_KERNEL */
84 extern struct image *comboot_replacement_image;
86 extern void *com32_external_esp;
88 #define COMBOOT_EXIT 1
89 #define COMBOOT_EXIT_RUN_KERNEL 2
90 #define COMBOOT_EXIT_COMMAND 3
92 extern void comboot_force_text_mode ( void );
94 #define COMBOOT_VIDEO_GRAPHICS 0x01
95 #define COMBOOT_VIDEO_NONSTANDARD 0x02
96 #define COMBOOT_VIDEO_VESA 0x04
97 #define COMBOOT_VIDEO_NOTEXT 0x08