diff options
| author | Michael Brown | 2007-06-30 15:56:35 +0200 |
|---|---|---|
| committer | Michael Brown | 2007-06-30 15:56:35 +0200 |
| commit | 8130443f9ffd64f48a756d440e11d0265925765e (patch) | |
| tree | b92c33226b361b83513fbbc1af2dc4e3d1d8c727 /src/arch/i386/interface | |
| parent | Don't build option-overloaded packets; they just confuse people (ISC (diff) | |
| download | ipxe-8130443f9ffd64f48a756d440e11d0265925765e.tar.gz ipxe-8130443f9ffd64f48a756d440e11d0265925765e.tar.xz ipxe-8130443f9ffd64f48a756d440e11d0265925765e.zip | |
Separate out pxe_start_nbp() from pxe_image.c into pxe_call.c
Implement PXENV_RESTART_TFTP.
Diffstat (limited to 'src/arch/i386/interface')
| -rw-r--r-- | src/arch/i386/interface/pxe/pxe_call.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/arch/i386/interface/pxe/pxe_call.c b/src/arch/i386/interface/pxe/pxe_call.c index 7a1851555..8ecacf1d1 100644 --- a/src/arch/i386/interface/pxe/pxe_call.c +++ b/src/arch/i386/interface/pxe/pxe_call.c @@ -363,3 +363,28 @@ void pxe_init_structures ( void ) { ppxe.StructCksum -= pxe_checksum ( &ppxe, sizeof ( ppxe ) ); pxenv.Checksum -= pxe_checksum ( &pxenv, sizeof ( pxenv ) ); } + +/** + * Start PXE NBP at 0000:7c00 + * + * @ret rc Return status code + */ +int pxe_start_nbp ( void ) { + int discard_b, discard_c; + uint16_t rc; + + /* Far call to PXE NBP */ + __asm__ __volatile__ ( REAL_CODE ( "pushw %%cx\n\t" + "pushw %%ax\n\t" + "movw %%cx, %%es\n\t" + "lcall $0, $0x7c00\n\t" + "addw $4, %%sp\n\t" ) + : "=a" ( rc ), "=b" ( discard_b ), + "=c" ( discard_c ) + : "a" ( & __from_text16 ( ppxe ) ), + "b" ( & __from_text16 ( pxenv ) ), + "c" ( rm_cs ) + : "edx", "esi", "edi", "ebp", "memory" ); + + return rc; +} |
