|
@@ -32,6 +32,12 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
32
|
32
|
* PXE API entry point
|
33
|
33
|
*/
|
34
|
34
|
|
|
35
|
+/* Disambiguate the various error causes */
|
|
36
|
+#define EINFO_EPXENBP \
|
|
37
|
+ __einfo_uniqify ( EINFO_EPLATFORM, 0x01, \
|
|
38
|
+ "External PXE NBP error" )
|
|
39
|
+#define EPXENBP( status ) EPLATFORM ( EINFO_EPXENBP, status )
|
|
40
|
+
|
35
|
41
|
/** Vector for chaining INT 1A */
|
36
|
42
|
extern struct segoff __text16 ( pxe_int_1a_vector );
|
37
|
43
|
#define pxe_int_1a_vector __use_text16 ( pxe_int_1a_vector )
|
|
@@ -257,7 +263,7 @@ rmjmp_buf pxe_restart_nbp;
|
257
|
263
|
int pxe_start_nbp ( void ) {
|
258
|
264
|
int jmp;
|
259
|
265
|
int discard_b, discard_c, discard_d, discard_D;
|
260
|
|
- uint16_t rc;
|
|
266
|
+ uint16_t status;
|
261
|
267
|
|
262
|
268
|
/* Allow restarting NBP via PXENV_RESTART_TFTP */
|
263
|
269
|
jmp = rmsetjmp ( pxe_restart_nbp );
|
|
@@ -271,7 +277,7 @@ int pxe_start_nbp ( void ) {
|
271
|
277
|
"sti\n\t"
|
272
|
278
|
"lcall $0, $0x7c00\n\t"
|
273
|
279
|
"addw $4, %%sp\n\t" )
|
274
|
|
- : "=a" ( rc ), "=b" ( discard_b ),
|
|
280
|
+ : "=a" ( status ), "=b" ( discard_b ),
|
275
|
281
|
"=c" ( discard_c ), "=d" ( discard_d ),
|
276
|
282
|
"=D" ( discard_D )
|
277
|
283
|
: "a" ( 0 ), "b" ( __from_text16 ( &pxenv ) ),
|
|
@@ -279,8 +285,10 @@ int pxe_start_nbp ( void ) {
|
279
|
285
|
"d" ( virt_to_phys ( &pxenv ) ),
|
280
|
286
|
"D" ( __from_text16 ( &ppxe ) )
|
281
|
287
|
: "esi", "ebp", "memory" );
|
|
288
|
+ if ( status )
|
|
289
|
+ return -EPXENBP ( status );
|
282
|
290
|
|
283
|
|
- return rc;
|
|
291
|
+ return 0;
|
284
|
292
|
}
|
285
|
293
|
|
286
|
294
|
REQUIRE_OBJECT ( pxe_preboot );
|