mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-17 15:27:36 +00:00
Correct parsing of the grackle and uninorthpci ranges property.
Approved by: nwhitehorn (mentor)
This commit is contained in:
parent
22236d5f21
commit
d328763f19
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=217658
@ -199,11 +199,14 @@ grackle_attach(device_t dev)
|
||||
return (ENXIO);
|
||||
}
|
||||
|
||||
sc->sc_nrange /= sizeof(sc->sc_range[0]);
|
||||
|
||||
sc->sc_range[6].pci_hi = 0;
|
||||
io = NULL;
|
||||
nmem = 0;
|
||||
|
||||
for (rp = sc->sc_range; rp->pci_hi != 0; rp++) {
|
||||
for (rp = sc->sc_range; rp < sc->sc_range + sc->sc_nrange &&
|
||||
rp->pci_hi != 0; rp++) {
|
||||
switch (rp->pci_hi & OFW_PCI_PHYS_HI_SPACEMASK) {
|
||||
case OFW_PCI_PHYS_HI_SPACE_CONFIG:
|
||||
break;
|
||||
|
@ -45,7 +45,7 @@ struct grackle_softc {
|
||||
vm_offset_t sc_addr;
|
||||
vm_offset_t sc_data;
|
||||
int sc_bus;
|
||||
struct grackle_range sc_range[6];
|
||||
struct grackle_range sc_range[7];
|
||||
int sc_nrange;
|
||||
int sc_iostart;
|
||||
struct rman sc_io_rman;
|
||||
|
@ -231,11 +231,14 @@ uninorth_attach(device_t dev)
|
||||
return (ENXIO);
|
||||
}
|
||||
|
||||
sc->sc_nrange /= sizeof(sc->sc_range[0]);
|
||||
|
||||
sc->sc_range[6].pci_hi = 0;
|
||||
io = NULL;
|
||||
nmem = 0;
|
||||
|
||||
for (rp = sc->sc_range; rp->pci_hi != 0; rp++) {
|
||||
for (rp = sc->sc_range; rp < sc->sc_range + sc->sc_nrange &&
|
||||
rp->pci_hi != 0; rp++) {
|
||||
switch (rp->pci_hi & OFW_PCI_PHYS_HI_SPACEMASK) {
|
||||
case OFW_PCI_PHYS_HI_SPACE_CONFIG:
|
||||
break;
|
||||
|
@ -53,7 +53,7 @@ struct uninorth_softc {
|
||||
vm_offset_t sc_addr;
|
||||
vm_offset_t sc_data;
|
||||
int sc_bus;
|
||||
struct uninorth_range sc_range[6];
|
||||
struct uninorth_range sc_range[7];
|
||||
int sc_nrange;
|
||||
int sc_iostart;
|
||||
struct rman sc_io_rman;
|
||||
|
Loading…
Reference in New Issue
Block a user