7 static uint32_t min_lowmem_heap
= 65536;
8 extern char __lowmem_heap
[];
9 uint8_t KbdFlags
; /* Check for keyboard escapes */
10 __export
uint8_t KbdMap
[256]; /* Keyboard map */
12 __export
uint16_t PXERetry
;
14 static inline void check_escapes(void)
16 com32sys_t ireg
, oreg
;
18 ireg
.eax
.b
[1] = 0x02; /* Check keyboard flags */
19 __intcall(0x16, &ireg
, &oreg
);
21 KbdFlags
= oreg
.eax
.b
[0];
23 /* Ctrl->skip 386 check */
24 if (oreg
.eax
.b
[0] & 0x04) {
26 * Now check that there is sufficient low (DOS) memory
28 * NOTE: Linux doesn't use all of real_mode_seg, but we use
29 * the same segment for COMBOOT images, which can use all 64K.
33 __intcall(0x12, &ireg
, &oreg
);
35 mem
= ((uint32_t)__lowmem_heap
) + min_lowmem_heap
+ 1023;
38 if (mem
< oreg
.eax
.w
[0]) {
41 snprintf(buf
, sizeof(buf
),
42 "It appears your computer has only "
43 "%dK of low (\"DOS\") RAM.\n"
44 "This version of Syslinux needs "
46 "If you get this\nmessage in error, "
47 "hold down the Ctrl key while booting, "
48 "and I\nwill take your word for it.\n",
56 extern uint32_t BIOS_timer_next
;
57 extern uint32_t timer_irq
;
58 static inline void bios_timer_init(void)
61 uint32_t *hook
= (uint32_t *)BIOS_timer_hook
;
64 BIOS_timer_next
= next
;
65 *hook
= (uint32_t)&timer_irq
;
68 void init(com32sys_t
*regs __unused
)
72 /* Initialize timer */
75 for (i
= 0; i
< 256; i
++)
80 /* CPU-dependent initialization and related checks. */