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.

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