summaryrefslogtreecommitdiffstats
path: root/sys/i386/pci
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-09-05 17:07:07 +0000
committerjhb <jhb@FreeBSD.org>2002-09-05 17:07:07 +0000
commit55985c4b6c74a4581f534911def8a68308e54f11 (patch)
tree560757f39a773a529a775c457c265bffc541af9f /sys/i386/pci
parentcb4604919fc3c4fef1de7daff27468d6c5fbd56d (diff)
downloadFreeBSD-src-55985c4b6c74a4581f534911def8a68308e54f11.zip
FreeBSD-src-55985c4b6c74a4581f534911def8a68308e54f11.tar.gz
Test PCIbios.ventry against 0 to see if we found a PCIbios entry point,
not the 'entry' member. The entry point is formed from both a base and a relative entry point. 'entry' is that relative offset. It is perfectly valid to have an entry point with a relative offset of 0. PCIbios.ventry is the virtual address of the entry point that takes both 'base' and 'entry' into account, thus it is the proper variable to test to see if we have an entry point or not.
Diffstat (limited to 'sys/i386/pci')
-rw-r--r--sys/i386/pci/pci_cfgreg.c4
-rw-r--r--sys/i386/pci/pci_pir.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/i386/pci/pci_cfgreg.c b/sys/i386/pci/pci_cfgreg.c
index a5bc0a2..adc7173 100644
--- a/sys/i386/pci/pci_cfgreg.c
+++ b/sys/i386/pci/pci_cfgreg.c
@@ -109,7 +109,7 @@ pcibios_get_version(void)
{
struct bios_regs args;
- if (PCIbios.entry == 0) {
+ if (PCIbios.ventry == 0) {
PRVERB(("pcibios: No call entry point\n"));
return (0);
}
@@ -552,7 +552,7 @@ pcibios_cfgopen(void)
{
u_int16_t v = 0;
- if (PCIbios.entry != 0 && enable_pcibios) {
+ if (PCIbios.ventry != 0 && enable_pcibios) {
v = pcibios_get_version();
if (v > 0)
printf("pcibios: BIOS version %x.%02x\n",
diff --git a/sys/i386/pci/pci_pir.c b/sys/i386/pci/pci_pir.c
index a5bc0a2..adc7173 100644
--- a/sys/i386/pci/pci_pir.c
+++ b/sys/i386/pci/pci_pir.c
@@ -109,7 +109,7 @@ pcibios_get_version(void)
{
struct bios_regs args;
- if (PCIbios.entry == 0) {
+ if (PCIbios.ventry == 0) {
PRVERB(("pcibios: No call entry point\n"));
return (0);
}
@@ -552,7 +552,7 @@ pcibios_cfgopen(void)
{
u_int16_t v = 0;
- if (PCIbios.entry != 0 && enable_pcibios) {
+ if (PCIbios.ventry != 0 && enable_pcibios) {
v = pcibios_get_version();
if (v > 0)
printf("pcibios: BIOS version %x.%02x\n",
OpenPOWER on IntegriCloud