diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2008-12-21 17:51:36 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2008-12-21 17:51:36 -0500 |
commit | 0c3068d2ef293f59241c0e10d308309ebaa60277 (patch) | |
tree | d2ba5ed58e23f35114759b1f0dd7338864a65721 /src/romlayout.S | |
parent | fb630a9fa89264ff5cdd1e82c3b0854e5599731f (diff) | |
download | seabios-0c3068d2ef293f59241c0e10d308309ebaa60277.tar.gz |
Initial PnP bios call support.
This commit provides just enough PnP support for gPXE to not hook int19.
Diffstat (limited to 'src/romlayout.S')
-rw-r--r-- | src/romlayout.S | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/src/romlayout.S b/src/romlayout.S index 52449b5a..0d8e58a4 100644 --- a/src/romlayout.S +++ b/src/romlayout.S @@ -329,6 +329,35 @@ entry_resume: cli jmp handle_resume +// PnP trampolines + .global entry_pnp_real, entry_pnp_prot +entry_pnp_prot: + pushl %esp + jmp 1f +entry_pnp_real: + pushl %esp // Backup %esp, then clear high bits + movzwl %sp, %esp +1: + pushfl // Save registers clobbered by C code + pushl %eax + pushl %ecx + pushl %edx + pushw %es + pushw %ds + movw %ss, %cx // Move %ss to %ds + movw %cx, %ds + lea 28(%esp), %eax // %eax points to start of u16 args + calll handle_pnp + movw %ax, 12(%esp) // Modify %eax to return %ax + popw %ds + popw %es + popl %edx + popl %ecx + popl %eax + popfl + popl %esp + lretw + // APM trampolines .global apm16protected_entry apm16protected_entry: @@ -478,16 +507,6 @@ rombios32_gdt: .word 0xffff, 0, 0x9300, 0x008f rombios32_gdt_end: -// We need a copy of this string in the 0xf000 segment, but we are not -// actually a PnP BIOS, so make sure it is *not* aligned, so OSes will -// not see it if they scan. - .global pnp_string - .type pnp_string, @object - .balign 2 - .byte 0 -pnp_string: - .ascii "$PnP" - /**************************************************************** * Interrupt entry points (continued) |