* @ret rc Return status code
*/
int pxe_start_nbp ( void ) {
- int discard_b, discard_c;
+ int discard_b, discard_c, discard_d;
uint16_t rc;
/* Far call to PXE NBP */
"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" );
+ "=c" ( discard_c ), "=d" ( discard_d )
+ : "a" ( __from_text16 ( &ppxe ) ),
+ "b" ( __from_text16 ( &pxenv ) ),
+ "c" ( rm_cs ),
+ "d" ( virt_to_phys ( &pxenv ) )
+ : "esi", "edi", "ebp", "memory" );
return rc;
}
* Returns:
* %ax : 0x564e
* %es:bx : Far pointer to the PXENV+ structure
+ * %edx : Physical address of the PXENV+ structure
* CF cleared
* Corrupts:
* none
cmpw $0x5650, %ax
jne 1f
/* INT 1A,5650 - PXE installation check */
- pushw %cs
- popw %es
+ xorl %edx, %edx
+ movw %cs, %dx
+ movw %dx, %es
movw $pxenv, %bx
+ shll $4, %edx
+ addl $pxenv, %edx
movw $0x564e, %ax
popfw
clc