* [parisc-linux] Port space on Elroy
@ 2001-09-01 7:21 Matthew Wilcox
2001-09-03 6:39 ` Grant Grundler
0 siblings, 1 reply; 2+ messages in thread
From: Matthew Wilcox @ 2001-09-01 7:21 UTC (permalink / raw)
To: parisc-linux
I just took a look at /proc/ioports on my j7k (running 2.4.9-pa1) and
I'm a little confused by what I see:
willy@jagu:~$ cat /proc/ioports
00000000-00001ffe : LBA PCI I/O Ports
00000020-0000003e : pic1
000000a0-000000be : pic2
000002f8-000002ff : serial(auto)
00000378-0000037a : parport0
000003f8-000003ff : serial(auto)
00000800-000008ff : sym53c8xx
00001000-0000107f : tulip
00004000-00004007 : serial(auto)
00004100-00004107 : serial(auto)
00004200-00004207 : serial(auto)
00004300-00004307 : serial(auto)
00012000-00013ffe : LBA PCI I/O Ports
00024000-00025ffe : LBA PCI I/O Ports
00038000-00039ffe : LBA PCI I/O Ports
0004c000-0004dffe : LBA PCI I/O Ports
(the only pci card i have in there is a quad-serial card).
First, why do all the ioport ranges go to ffe? Surely it should be fff?
If so, we should make this change:
@@ -1189,8 +1193,7 @@ lba_legacy_resources(struct parisc_devic
r->name = "LBA PCI I/O Ports";
r->flags = IORESOURCE_IO;
r->start = READ_REG32(pa_dev->hpa + LBA_IOS_BASE) & ~1L;
- r->end = r->start +
- (READ_REG32(pa_dev->hpa + LBA_IOS_MASK) ^ (HBA_PORT_SPACE_SIZE - 1)) - 1;
+ r->end = r->start + (READ_REG32(pa_dev->hpa + LBA_IOS_MASK) ^ (HBA_PORT_SPACE_SIZE - 1));
/* Virtualize the I/O Port space ranges */
lba_num = HBA_PORT_BASE(lba_dev->hba.hba_num);
And then, what are the four serial entries doing off by themselves?
Surely these should be underneath one of the elroys? /proc/pci says
they're on bus2, so I guess they should be under the 00024000-00025ffe
range (25fff? :-). I think the problem is that the start/end pair
aren't getting updated in the bus fixup. In which case, the patch looks
like this:
@@ -707,6 +707,7 @@ lba_fixup_bus(struct pci_bus *bus)
u16 status;
#endif
struct lba_device *ldev = LBA_DEV(bus->sysdata);
+ int lba_portbase = HBA_PORT_BASE(ldev->hba.hba_num);
#ifdef __LP64__
int i;
#endif
@@ -805,6 +806,9 @@ lba_fixup_bus(struct pci_bus *bus)
/* "Globalize" PCI address */
res->start |= ldev->lmmio_base;
res->end |= ldev->lmmio_base;
+ } else if (res->flags & IORESOURCE_IO) {
+ res->start |= lba_portbase;
+ res->end |= lba_portbase;
}
}
#endif
comments, please.
--
Revolutions do not require corporate support.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [parisc-linux] Port space on Elroy
2001-09-01 7:21 [parisc-linux] Port space on Elroy Matthew Wilcox
@ 2001-09-03 6:39 ` Grant Grundler
0 siblings, 0 replies; 2+ messages in thread
From: Grant Grundler @ 2001-09-03 6:39 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: parisc-linux
Matthew Wilcox wrote:
>
> I just took a look at /proc/ioports on my j7k (running 2.4.9-pa1) and
> I'm a little confused by what I see:
>
> willy@jagu:~$ cat /proc/ioports
> 00000000-00001ffe : LBA PCI I/O Ports
> 00000020-0000003e : pic1
> 000000a0-000000be : pic2
> 000002f8-000002ff : serial(auto)
> 00000378-0000037a : parport0
> 000003f8-000003ff : serial(auto)
> 00000800-000008ff : sym53c8xx
> 00001000-0000107f : tulip
All the built-ins. so far so good.
> 00004000-00004007 : serial(auto)
> 00004100-00004107 : serial(auto)
> 00004200-00004207 : serial(auto)
> 00004300-00004307 : serial(auto)
These are most likely under HBA 2 and they are being registered
w/o using the virtualized IO port space address.
> 00012000-00013ffe : LBA PCI I/O Ports
> 00024000-00025ffe : LBA PCI I/O Ports
> 00038000-00039ffe : LBA PCI I/O Ports
> 0004c000-0004dffe : LBA PCI I/O Ports
These are "virtualized" I/O port space addresses.
> (the only pci card i have in there is a quad-serial card).
>
> First, why do all the ioport ranges go to ffe? Surely it should be fff?
Yes.
> If so, we should make this change:
>
> @@ -1189,8 +1193,7 @@ lba_legacy_resources(struct parisc_devic
> r->name = "LBA PCI I/O Ports";
> r->flags = IORESOURCE_IO;
> r->start = READ_REG32(pa_dev->hpa + LBA_IOS_BASE) & ~1L;
> - r->end = r->start +
> - (READ_REG32(pa_dev->hpa + LBA_IOS_MASK) ^ (HBA_PORT_SPACE_SIZE -
> 1)) - 1;
> + r->end = r->start + (READ_REG32(pa_dev->hpa + LBA_IOS_MASK) ^ (HBA_
> PORT_SPACE_SIZE - 1));
>
> /* Virtualize the I/O Port space ranges */
> lba_num = HBA_PORT_BASE(lba_dev->hba.hba_num);
Urgh. please commit.
> And then, what are the four serial entries doing off by themselves?
> Surely these should be underneath one of the elroys? /proc/pci says
> they're on bus2, so I guess they should be under the 00024000-00025ffe
> range (25fff? :-).
Yes - as noted above.
> I think the problem is that the start/end pair
> aren't getting updated in the bus fixup. In which case, the patch looks
> like this:
>
> @@ -707,6 +707,7 @@ lba_fixup_bus(struct pci_bus *bus)
> u16 status;
> #endif
> struct lba_device *ldev = LBA_DEV(bus->sysdata);
> + int lba_portbase = HBA_PORT_BASE(ldev->hba.hba_num);
> #ifdef __LP64__
> int i;
> #endif
> @@ -805,6 +806,9 @@ lba_fixup_bus(struct pci_bus *bus)
> /* "Globalize" PCI address */
> res->start |= ldev->lmmio_base;
> res->end |= ldev->lmmio_base;
> + } else if (res->flags & IORESOURCE_IO) {
> + res->start |= lba_portbase;
> + res->end |= lba_portbase;
> }
> }
> #endif
I'm wondering how this worked before....
peer-to-peer from elroy 0 to elroy 2?
(ie we are poking elroy 0 to generate the IO cycle and elroy 2 is
picking it up somehow and passin it down it's bus.)
ah..willy just pointed out I used LBA_ASTRO_PORT_BASE (non-postable
IO port space in LMMIO) and that's routed by Astro to the right Elroy.
> comments, please.
I think this change is safe to commit too.
On PAT PDC boxes it will be redundant but harmless.
Trying A500 w/4-port serial card w/ and w/o this change
would be prudent and interesting respectively.
thanks willy!
grant
Grant Grundler
parisc-linux {PCI|IOMMU|SMP} hacker
+1.408.447.7253
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-09-03 6:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-01 7:21 [parisc-linux] Port space on Elroy Matthew Wilcox
2001-09-03 6:39 ` Grant Grundler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox