diff options
Diffstat (limited to 'src/romlayout.S')
-rw-r--r-- | src/romlayout.S | 50 |
1 files changed, 49 insertions, 1 deletions
diff --git a/src/romlayout.S b/src/romlayout.S index 89b3784d..c4a4635e 100644 --- a/src/romlayout.S +++ b/src/romlayout.S @@ -414,6 +414,53 @@ __csm_return: popfw lretw +// Serial console "hooked vga" entry point + DECLFUNC entry_sercon +entry_sercon: + // Setup for chain loading to real vga handler + pushfw + pushl %cs:sercon_real_vga_handler + + // Set %ds to varlow segment + cli + cld + pushw %ds + pushl %eax + movl $_zonelow_seg, %eax + movl %eax, %ds + + // Test if the sercon handler can be called + movl %esp, %eax // Test for broken x86emu + pushl $1f + retl +1: cmpl %esp, %eax + jne 4f + cmpb $0, sercon_enable // Test that sercon is enabled + je 3f + + // call handle_sercon + popl %eax + popw %ds +2: pushl $handle_sercon +#if CONFIG_ENTRY_EXTRASTACK + jmp irqentry_arg_extrastack +#else + jmp irqentry_arg +#endif + + // sercon disabled - check for legacy text modeset and otherwise exit +3: popl %eax + popw %ds + cmpw $0x0007, %ax + jle 2b + iretw + + // Running on broken x86emu - restore stack and exit +4: movl %eax, %esp + popl %eax + popw %ds + iretw + /**************************************************************** * Interrupt entry points @@ -597,7 +644,8 @@ entry_10_0x0f: iretw ORG 0xf065 - IRQ_ENTRY_ARG 10 +entry_10: + iretw // 0xf0a4 - VideoParams in misc.c |