Kaynağa Gözat

[pxe] Fix interoperability with the Intel DOS UNDI driver

The Intel DOS UNDI driver fails when run on top of gPXE because we do
not fill in the ServiceFlags field in PXENV_UNDI_GET_IFACE_INFO.

Fix by filling in the ServiceFlags field with reasonable values
indicating our approximate feature capabilities.
tags/v0.9.8
Michael Brown 15 yıl önce
ebeveyn
işleme
0b922595fe

+ 19
- 0
src/arch/i386/include/pxe_api.h Dosyayı Görüntüle

1417
 /** PXE API function code for pxenv_undi_get_iface_info() */
1417
 /** PXE API function code for pxenv_undi_get_iface_info() */
1418
 #define	PXENV_UNDI_GET_IFACE_INFO	0x0013
1418
 #define	PXENV_UNDI_GET_IFACE_INFO	0x0013
1419
 
1419
 
1420
+/** Broadcast supported */
1421
+#define SUPPORTED_BROADCAST		0x0001
1422
+/** Multicast supported */
1423
+#define SUPPORTED_MULTICAST		0x0002
1424
+/** Functional/group addressing supported */
1425
+#define SUPPORTED_GROUP			0x0004
1426
+/** Promiscuous mode supported */
1427
+#define SUPPORTED_PROMISCUOUS		0x0008
1428
+/** Software settable station address */
1429
+#define SUPPORTED_SET_STATION_ADDRESS	0x0010
1430
+/** InitiateDiagnostics supported */
1431
+#define SUPPORTED_DIAGNOSTICS		0x0040
1432
+/** Reset MAC supported */
1433
+#define SUPPORTED_RESET			0x0400
1434
+/** Open / Close Adapter supported */
1435
+#define SUPPORTED_OPEN_CLOSE		0x0800
1436
+/** Interrupt Request supported */
1437
+#define SUPPORTED_IRQ			0x1000
1438
+
1420
 /** Parameter block for pxenv_undi_get_iface_info() */
1439
 /** Parameter block for pxenv_undi_get_iface_info() */
1421
 struct s_PXENV_UNDI_GET_IFACE_INFO {
1440
 struct s_PXENV_UNDI_GET_IFACE_INFO {
1422
 	PXENV_STATUS_t	Status;		/**< PXE status code */
1441
 	PXENV_STATUS_t	Status;		/**< PXE status code */

+ 4
- 1
src/arch/i386/interface/pxe/pxe_undi.c Dosyayı Görüntüle

534
 	snprintf ( ( char * ) undi_get_iface_info->IfaceType,
534
 	snprintf ( ( char * ) undi_get_iface_info->IfaceType,
535
 		   sizeof ( undi_get_iface_info->IfaceType ), "gPXE" );
535
 		   sizeof ( undi_get_iface_info->IfaceType ), "gPXE" );
536
 	undi_get_iface_info->LinkSpeed = 10000000; /* 10 Mbps */
536
 	undi_get_iface_info->LinkSpeed = 10000000; /* 10 Mbps */
537
-	undi_get_iface_info->ServiceFlags = 0;
537
+	undi_get_iface_info->ServiceFlags =
538
+		( SUPPORTED_BROADCAST | SUPPORTED_MULTICAST |
539
+		  SUPPORTED_SET_STATION_ADDRESS | SUPPORTED_RESET |
540
+		  SUPPORTED_OPEN_CLOSE | SUPPORTED_IRQ );
538
 	memset ( undi_get_iface_info->Reserved, 0,
541
 	memset ( undi_get_iface_info->Reserved, 0,
539
 		 sizeof(undi_get_iface_info->Reserved) );
542
 		 sizeof(undi_get_iface_info->Reserved) );
540
 
543
 

Loading…
İptal
Kaydet