mirror of
https://github.com/ipxe/ipxe
synced 2025-12-26 17:42:47 +03:00
Separate out pxe_start_nbp() from pxe_image.c into pxe_call.c
Implement PXENV_RESTART_TFTP.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user