Improve some debugging messages.
Minor code clean ups.
Improve apmbios entry points (still untested).
return;
}
+ /* Debugging info */
+ BX_INFO("Booting from %x:%x\n", bootseg, bootip);
+
memset(&cr, 0, sizeof(cr));
cr.ip = bootip;
cr.cs = bootseg;
regs->cx = lba >> 16;
regs->dx = lba & 0xffff;
- disk_ret(regs, 0);
+ disk_ret(regs, DISK_RET_SUCCESS);
regs->ah = 3; // hard disk accessible
}
// keyboard_init
//--------------------------------------------------------------------------
// this file is based on LinuxBIOS implementation of keyboard.c
-// could convert to #asm to gain space
static void
keyboard_init()
{
// APM trampolines
.globl apm16protected_entry
apm16protected_entry:
+ pushfw // save flags
+ pushl %eax // dummy
ENTRY handle_1553
+ addw $4, %sp // pop dummy
+ popfw // restore flags
lretw
.code32
.globl apm32protected_entry
apm32protected_entry:
- pushw %cs
+ pushfw // save flags
+ pushw %cs // Setup for long jump to 16bitmode
incw (%esp)
- pushw apm16protected_entry
+ pushw 1f
lcallw *(%esp)
+ addl $4, %esp // pop call address
+ popfw
lretl
.code16gcc
+1: // 16bit entry point for apm32 code.
+ ENTRY handle_1553
+ lretw
.org 0xe2c3
IRQ_ENTRY nmi
case 0xe8: handle_15e8(regs); break;
default: handle_15XX(regs); break;
}
- debug_exit(regs);
+ //debug_exit(regs);
}
// INT 12h Memory Size Service Entry Point