device/pci_ops: Make PCI_BDF() available in all stages

Caller needs to take into account that bus numbers may
have not been assigned yet. Same issue existed before
with early ramstage and mostly does not cause problems
when used with static devices on bus 0.

Change-Id: I4865b4277dbc858c8c2ffd2052defcaa1a92173c
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34614
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Kyösti Mälkki
2019-07-29 16:38:14 +03:00
committed by Martin Roth
parent e825d3f4d6
commit 3f98d41b6e
3 changed files with 22 additions and 21 deletions

View File

@@ -14,6 +14,7 @@
#define __SIMPLE_DEVICE__
#include <stdint.h>
#include <console/console.h>
#include <device/pci.h>
#include <device/pci_def.h>
#include <device/pci_ops.h>
@@ -85,3 +86,8 @@ u16 pci_s_find_capability(pci_devfn_t dev, u16 cap)
{
return pci_s_find_next_capability(dev, cap, 0);
}
void __noreturn pcidev_die(void)
{
die("PCI: dev is NULL!\n");
}