4 #include <klibc/compiler.h>
13 #include <syslinux/pmapi.h>
14 #include <syslinux/sysappend.h>
18 extern char core_xfer_buf
[65536];
19 extern char core_cache_buf
[65536];
20 extern char trackbuf
[];
21 extern char CurrentDirName
[];
22 extern char SubvolName
[];
23 extern char ConfigName
[];
24 extern char config_cwd
[];
25 extern char cmd_line
[];
26 extern char ConfigFile
[];
27 extern char syslinux_banner
[];
28 extern char copyright_str
[];
29 extern unsigned int __bcopyxx_len
;
32 * Mark symbols that are only used by BIOS as __weak until we can move
33 * all references out of the generic (EFI + BIOS) code and into
36 extern __weak
uint16_t BIOSName
;
37 extern __weak
char KernelName
[];
38 extern __weak
char StackBuf
[];
40 extern uint8_t KbdMap
[256];
42 extern const uint16_t IPAppends
[];
43 extern size_t numIPAppends
;
45 extern uint16_t SerialPort
;
46 extern uint16_t BaudDivisor
;
47 extern uint8_t FlowOutput
;
48 extern uint8_t FlowInput
;
49 extern uint8_t FlowIgnore
;
51 extern uint8_t ScrollAttribute
;
52 extern uint16_t DisplayCon
;
54 /* diskstart.inc isolinux.asm*/
55 extern void getlinsec(void);
58 void core_pm_null_hook(void);
59 extern void (*core_pm_hook
)(void);
62 extern void core_open(void);
65 extern void myputs(const char*);
68 extern int (*idle_hook_func
)(void);
69 extern void __idle(void);
70 extern void reset_idle(void);
72 /* mem/malloc.c, mem/free.c, mem/init.c */
73 extern void *lmalloc(size_t);
74 extern void *pmapi_lmalloc(size_t);
75 extern void *zalloc(size_t);
76 extern void free(void *);
77 extern void mem_init(void);
80 extern void print_sysappend(void);
81 extern const char *sysappend_strings
[SYSAPPEND_MAX
];
82 extern uint32_t SysAppends
;
83 extern void sysappend_set_uuid(const uint8_t *uuid
);
85 void __cdecl
core_intcall(uint8_t, const com32sys_t
*, com32sys_t
*);
86 void __cdecl
core_farcall(uint32_t, const com32sys_t
*, com32sys_t
*);
87 int __cdecl
core_cfarcall(uint32_t, const void *, uint32_t);
89 extern const com32sys_t zero_regs
;
90 void call16(void (*)(void), const com32sys_t
*, com32sys_t
*);
93 * __lowmem is in the low 1 MB; __bss16 in the low 64K
95 #ifdef __SYSLINUX_CORE__ /* Not supported in modules */
96 # define __lowmem __attribute__((nocommon,section(".lowmem")))
97 # define __bss16 __attribute__((nocommon,section(".bss16")))
101 * Helper routine to return a specific set of flags
103 static inline void set_flags(com32sys_t
*regs
, uint32_t flags
)
107 eflags
= regs
->eflags
.l
;
108 eflags
&= ~(EFLAGS_CF
|EFLAGS_PF
|EFLAGS_AF
|EFLAGS_ZF
|EFLAGS_SF
|EFLAGS_OF
);
110 regs
->eflags
.l
= eflags
;
113 extern int start_ldlinux(int argc
, char **argv
);
114 extern int create_args_and_load(char *);
116 extern void write_serial(char data
);
117 extern void writestr(char *str
);
118 extern void writechr(char data
);
119 extern void crlf(void);
120 extern int pollchar(void);
121 extern char getchar(char *hi
);
123 extern void cleanup_hardware(void);
124 extern void sirq_cleanup(void);
125 extern void adjust_screen(void);
127 extern void execute(const char *cmdline
, uint32_t type
, bool sysappend
);
128 extern void load_kernel(const char *cmdline
);
130 extern void dmi_init(void);
132 extern void do_sysappend(char *buf
);
134 extern void load_env32(com32sys_t
*regs
);