Просмотр исходного кода

[bofm] Report {slot,port} to {bus:dev.fn,mport} mapping on newer BOFM builds

Newer BOFM builds provide support for mapping multiple physical ports
to a single PCI bus:dev.fn via PCI VPD descriptions.  These builds
will also leave the {slot,port} field intact, and will populate the
mport field with a meaningful value.

Older BOFM builds will zero out the {slot,port} field.  A zero value
in this field may indicate either a genuine zero value (i.e. slot 0
first port) or an older build.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 лет назад
Родитель
Сommit
bfd8b3bff9
1 измененных файлов: 7 добавлений и 2 удалений
  1. 7
    2
      src/interface/bofm/bofm.c

+ 7
- 2
src/interface/bofm/bofm.c Просмотреть файл

@@ -306,11 +306,16 @@ int bofm ( userptr_t bofmtab, struct pci_device *pci ) {
306 306
 			      en.slot, ( en.port + 1 ) );
307 307
 			continue;
308 308
 		}
309
+		DBG ( "BOFM: slot %d port %d%s is " PCI_FMT " mport %d\n",
310
+		      en.slot, ( en.port + 1 ),
311
+		      ( ( en.slot || en.port ) ? "" : "(?)" ),
312
+		      PCI_BUS ( en.busdevfn ), PCI_SLOT ( en.busdevfn ),
313
+		      PCI_FUNC ( en.busdevfn ), en.mport );
309 314
 		bofm = bofm_find_busdevfn ( en.busdevfn );
310 315
 		if ( ! bofm ) {
311
-			DBG ( "BOFM: " PCI_FMT " ignored\n",
316
+			DBG ( "BOFM: " PCI_FMT " mport %d ignored\n",
312 317
 			      PCI_BUS ( en.busdevfn ), PCI_SLOT ( en.busdevfn ),
313
-			      PCI_FUNC ( en.busdevfn ) );
318
+			      PCI_FUNC ( en.busdevfn ), en.mport );
314 319
 			continue;
315 320
 		}
316 321
 		if ( ( rc = bofm_en ( bofm, &en ) ) == 0 ) {

Загрузка…
Отмена
Сохранить