|
@@ -26,6 +26,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
26
|
26
|
#include <ipxe/uaccess.h>
|
27
|
27
|
#include <ipxe/init.h>
|
28
|
28
|
#include <ipxe/profile.h>
|
|
29
|
+#include <ipxe/netdevice.h>
|
29
|
30
|
#include <setjmp.h>
|
30
|
31
|
#include <registers.h>
|
31
|
32
|
#include <biosint.h>
|
|
@@ -358,6 +359,31 @@ int pxe_start_nbp ( void ) {
|
358
|
359
|
return 0;
|
359
|
360
|
}
|
360
|
361
|
|
|
362
|
+/**
|
|
363
|
+ * Notify BIOS of existence of network device
|
|
364
|
+ *
|
|
365
|
+ * @v netdev Network device
|
|
366
|
+ * @ret rc Return status code
|
|
367
|
+ */
|
|
368
|
+static int pxe_notify ( struct net_device *netdev ) {
|
|
369
|
+
|
|
370
|
+ /* Do nothing if we already have a network device */
|
|
371
|
+ if ( pxe_netdev )
|
|
372
|
+ return 0;
|
|
373
|
+
|
|
374
|
+ /* Activate (and deactivate) PXE stack to notify BIOS */
|
|
375
|
+ pxe_activate ( netdev );
|
|
376
|
+ pxe_deactivate();
|
|
377
|
+
|
|
378
|
+ return 0;
|
|
379
|
+}
|
|
380
|
+
|
|
381
|
+/** PXE BIOS notification driver */
|
|
382
|
+struct net_driver pxe_driver __net_driver = {
|
|
383
|
+ .name = "PXE",
|
|
384
|
+ .probe = pxe_notify,
|
|
385
|
+};
|
|
386
|
+
|
361
|
387
|
REQUIRING_SYMBOL ( pxe_api_call );
|
362
|
388
|
REQUIRE_OBJECT ( pxe_preboot );
|
363
|
389
|
REQUIRE_OBJECT ( pxe_undi );
|