Last change
on this file was
e16e8f2,
checked in by Edwin Eefting <edwin@datux.nl>, 3 years ago
|
bootstuff
|
-
Property mode set to
100644
|
File size:
909 bytes
|
Line | |
---|
1 | .text |
---|
2 | .code16 |
---|
3 | .arch i386 |
---|
4 | .section ".prefix", "ax", @progbits |
---|
5 | |
---|
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 | 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 |
---|
Note: See
TracBrowser
for help on using the repository browser.