You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

undiloader.S 971B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. FILE_LICENCE ( GPL2_OR_LATER )
  2. .text
  3. .code16
  4. .arch i386
  5. .section ".prefix", "ax", @progbits
  6. /* UNDI loader
  7. *
  8. * Called by an external program to load our PXE stack.
  9. */
  10. .globl undiloader
  11. undiloader:
  12. /* Save registers */
  13. pushl %esi
  14. pushl %edi
  15. pushw %ds
  16. pushw %es
  17. pushw %bx
  18. /* ROM segment address to %ds */
  19. pushw %cs
  20. popw %ds
  21. /* UNDI loader parameter structure address into %es:%di */
  22. movw %sp, %bx
  23. movw %ss:18(%bx), %di
  24. movw %ss:20(%bx), %es
  25. /* Install to specified real-mode addresses */
  26. pushw %di
  27. movw %es:12(%di), %bx
  28. movw %es:14(%di), %ax
  29. movl image_source, %esi
  30. movl decompress_to, %edi
  31. clc /* Allow relocation */
  32. call install_prealloc
  33. popw %di
  34. /* Call UNDI loader C code */
  35. pushl $pxe_loader_call
  36. pushw %cs
  37. pushw $1f
  38. pushw %ax
  39. pushw $prot_call
  40. lret
  41. 1: popw %bx /* discard */
  42. popw %bx /* discard */
  43. /* Restore registers and return */
  44. popw %bx
  45. popw %es
  46. popw %ds
  47. popl %edi
  48. popl %esi
  49. lret
  50. .size undiloader, . - undiloader