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 939B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. clc /* Allow relocation */
  31. call install_prealloc
  32. popw %di
  33. /* Call UNDI loader C code */
  34. pushl $pxe_loader_call
  35. pushw %cs
  36. pushw $1f
  37. pushw %ax
  38. pushw $prot_call
  39. lret
  40. 1: popw %bx /* discard */
  41. popw %bx /* discard */
  42. /* Restore registers and return */
  43. popw %bx
  44. popw %es
  45. popw %ds
  46. popl %edi
  47. popl %esi
  48. lret
  49. .size undiloader, . - undiloader