2 * Our pretty trivial BIOS emulation
6 #include <kvm/assembly.h>
11 #define EFLAGS_CF (1 << 0)
15 /* If you change these macros, remember to update 'struct biosregs' */
29 .macro RESTORE_BIOSREGS
43 * fake interrupt handler, nothing can be faster ever
47 * Set CF to indicate failure. We don't want callers to think that the
48 * interrupt handler succeeded and then treat the return values in
49 * registers as valid data.
51 orl $EFLAGS_CF, 0x4(%esp)
54 ENTRY_END(bios_intfake)
57 * int 10 - video - service
63 /* this is way easier than doing it in assembly */
64 /* just push all the regs and jump to a C handler */
69 /* Clear CF to indicate success. */
70 andl $~EFLAGS_CF, 0x4(%esp)