Files
ipxe/src/arch/x86/prefix/undiloader.S
T
Michael Brown f468f12b1e [bios] Add bin-x86_64-pcbios build platform
Move most arch/i386 files to arch/x86, and adjust the contents of the
Makefiles and the include/bits/*.h headers to reflect the new
locations.

This patch makes no substantive code changes, as can be seen using a
rename-aware diff (e.g. "git show -M5").

This patch does not make the pcbios platform functional for x86_64; it
merely allows it to compile without errors.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-02-16 19:32:32 +00:00

55 lines
1.0 KiB
ArmAsm

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
.text
.code16
.arch i386
.section ".prefix", "ax", @progbits
/* UNDI loader
*
* Called by an external program to load our PXE stack.
*/
.globl undiloader
undiloader:
/* Save registers */
pushl %esi
pushl %edi
pushl %ebp
pushw %ds
pushw %es
pushw %bx
/* ROM segment address to %ds */
pushw %cs
popw %ds
/* UNDI loader parameter structure address into %es:%di */
movw %sp, %bx
movw %ss:22(%bx), %di
movw %ss:24(%bx), %es
/* Install to specified real-mode addresses */
pushw %di
movw %es:12(%di), %bx
movw %es:14(%di), %ax
movl image_source, %esi
movl decompress_to, %edi
orl $0xffffffff, %ebp /* Allow arbitrary relocation */
call install_prealloc
popw %di
/* Call UNDI loader C code */
pushl $pxe_loader_call
pushw %cs
pushw $1f
pushw %ax
pushw $prot_call
lret
1: popw %bx /* discard */
popw %bx /* discard */
/* Restore registers and return */
popw %bx
popw %es
popw %ds
popl %ebp
popl %edi
popl %esi
lret
.size undiloader, . - undiloader