Adding upstream version 4.00~pre53+dfsg.
[syslinux-debian/hramrach.git] / core / include / core.h
blobeb7bfcdb966ad491533334438cf4d2c8befbf4a3
1 #ifndef CORE_H
2 #define CORE_H
4 #include <klibc/compiler.h>
5 #include <com32.h>
6 #include <syslinux/pmapi.h>
8 extern char core_xfer_buf[65536];
9 extern char core_cache_buf[65536];
10 extern char trackbuf[];
11 extern char CurrentDirName[];
12 extern char SubvolName[];
13 extern char ConfigName[];
14 extern char KernelName[];
15 extern char cmd_line[];
16 extern char ConfigFile[];
18 /* diskstart.inc isolinux.asm*/
19 extern void getlinsec(void);
21 /* getc.inc */
22 extern void core_open(void);
24 /* hello.c */
25 extern void myputs(const char*);
27 /* idle.c */
28 extern int (*idle_hook_func)(void);
29 extern void __idle(void);
30 extern void reset_idle(void);
32 /* mem/malloc.c, mem/free.c, mem/init.c */
33 extern void *malloc(size_t);
34 extern void *lmalloc(size_t);
35 extern void *pmapi_lmalloc(size_t);
36 extern void *zalloc(size_t);
37 extern void free(void *);
38 extern void mem_init(void);
40 void __cdecl core_intcall(uint8_t, const com32sys_t *, com32sys_t *);
41 void __cdecl core_farcall(uint32_t, const com32sys_t *, com32sys_t *);
42 int __cdecl core_cfarcall(uint32_t, const void *, uint32_t);
44 extern const com32sys_t zero_regs;
45 void call16(void (*)(void), const com32sys_t *, com32sys_t *);
48 * __lowmem is in the low 1 MB; __bss16 in the low 64K
50 #define __lowmem __attribute__((nocommon,section(".lowmem")))
51 #define __bss16 __attribute__((nocommon,section(".bss16")))
54 * Section for very large aligned objects, not zeroed on startup
56 #define __hugebss __attribute__((nocommon,section(".hugebss"),aligned(4096)))
59 * Death! The macro trick is to avoid symbol conflict with
60 * the real-mode symbol kaboom.
62 __noreturn _kaboom(void);
63 #define kaboom() _kaboom()
66 * Basic timer function...
68 extern volatile uint32_t __jiffies;
69 static inline uint32_t jiffies(void)
71 return __jiffies;
74 #endif /* CORE_H */