7 static uint32_t min_lowmem_heap
= 65536;
8 extern char __lowmem_heap
[];
9 uint8_t KbdFlags
; /* Check for keyboard escapes */
11 static inline void check_escapes(void)
13 com32sys_t ireg
, oreg
;
15 ireg
.eax
.b
[1] = 0x02; /* Check keyboard flags */
16 __intcall(0x16, &ireg
, &oreg
);
18 KbdFlags
= oreg
.eax
.b
[0];
20 /* Ctrl->skip 386 check */
21 if (oreg
.eax
.b
[0] & 0x04) {
23 * Now check that there is sufficient low (DOS) memory
25 * NOTE: Linux doesn't use all of real_mode_seg, but we use
26 * the same segment for COMBOOT images, which can use all 64K.
30 __intcall(0x12, &ireg
, &oreg
);
32 mem
= ((uint32_t)__lowmem_heap
) + min_lowmem_heap
+ 1023;
35 if (mem
< oreg
.eax
.w
[0]) {
38 snprintf(buf
, sizeof(buf
),
39 "It appears you computer has less than "
40 "%dK of low (DOS)\nRAM. Syslinux "
41 "needs at least this amount to boot. "
42 "If you get\nthis message in error, "
43 "hold down the Ctrl key while\nbooting, "
44 "and I will take your word for it.\n",
52 extern uint32_t BIOS_timer_next
;
53 extern uint32_t timer_irq
;
54 static inline void bios_timer_init(void)
57 uint32_t *hook
= (uint32_t *)BIOS_timer_hook
;
60 BIOS_timer_next
= next
;
61 *hook
= (uint32_t)&timer_irq
;
64 extern void printf_init(void);
65 void init(com32sys_t
*regs __unused
)
69 /* Initialize timer */
72 for (i
= 0; i
< 256; i
++)
78 /* Init the memory subsystem */
81 /* CPU-dependent initialization and related checks. */