linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ioport range of 8259 aka pic1
@ 2001-11-06  9:11 Robert Schwebel
  2001-11-06 17:40 ` Randy.Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Schwebel @ 2001-11-06  9:11 UTC (permalink / raw)
  To: linux-kernel

Hi,

is there a reason why the kernel (tested with 2.4.13) picks up the io port
region from 0020-003f for pic1? All I could find on the net lets me assume
that only 0020-0021 are used by the interrupt controllers (may be wrong
here - hints for literature are welcome). Same problem with pic2.

I'm currently working with an AMD Elan SC410 (x86 embedded system on chip)
which has it's private registers at 0022 and following, which makes it
impossible to write "correct" drivers that request_region() their ports
before using them.

Robert
-- 
 +--------------------------------------------------------+
 |             Dipl.-Ing. Robert Schwebel                 |
 | Pengutronix - Linux Solutions for Science and Industry |
 |  Braunschweiger Straße 79, 31134 Hildesheim, Germany   |
 |     Phone: +49-5121-28619-0  Fax: +49-5121-28619-4     |
 +--------------------------------------------------------+


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ioport range of 8259 aka pic1
  2001-11-06  9:11 ioport range of 8259 aka pic1 Robert Schwebel
@ 2001-11-06 17:40 ` Randy.Dunlap
  2001-11-06 19:39   ` Maciej W. Rozycki
  0 siblings, 1 reply; 3+ messages in thread
From: Randy.Dunlap @ 2001-11-06 17:40 UTC (permalink / raw)
  To: robert; +Cc: linux-kernel

Robert Schwebel wrote:
> 
> is there a reason why the kernel (tested with 2.4.13) picks up the io port
> region from 0020-003f for pic1? All I could find on the net lets me assume
> that only 0020-0021 are used by the interrupt controllers (may be wrong
> here - hints for literature are welcome). Same problem with pic2.
> 
> I'm currently working with an AMD Elan SC410 (x86 embedded system on chip)
> which has it's private registers at 0022 and following, which makes it
> impossible to write "correct" drivers that request_region() their ports
> before using them.

The Intel chipset specs say that PIC1 uses:
  (all hex:) 20-21, 24-25, 28-29, 2c-2d, 30-31, 34-35, 38-39, 3c-3d.

Some of the older chipset specs say that all of these other than
20-21 are just aliases of 20-21 (like the 440MX spec).
Later specs don't say this (as in all of the 800-model ICH0/ICH2
specs).

In either case, port 0x22 should be available for you.  What
do you mean by "and following"?  What register range does it use?
What fixed IO addresses does the Elan require (consume)?

So in linux/arch/i386/kernel/setup.c, you could modify the
"standard IO resources" table to match your target system's
requirements.

Current table:
struct resource standard_io_resources[] = {
	{ "dma1", 0x00, 0x1f, IORESOURCE_BUSY },
	{ "pic1", 0x20, 0x3f, IORESOURCE_BUSY },
	{ "timer", 0x40, 0x5f, IORESOURCE_BUSY },
	{ "keyboard", 0x60, 0x6f, IORESOURCE_BUSY },
	{ "dma page reg", 0x80, 0x8f, IORESOURCE_BUSY },
	{ "pic2", 0xa0, 0xbf, IORESOURCE_BUSY },
	{ "dma2", 0xc0, 0xdf, IORESOURCE_BUSY },
	{ "fpu", 0xf0, 0xff, IORESOURCE_BUSY }
};

Just modify the "pic1" and "pic2" entries to be multiple shorter
entries.

~Randy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ioport range of 8259 aka pic1
  2001-11-06 17:40 ` Randy.Dunlap
@ 2001-11-06 19:39   ` Maciej W. Rozycki
  0 siblings, 0 replies; 3+ messages in thread
From: Maciej W. Rozycki @ 2001-11-06 19:39 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: robert, linux-kernel

On Tue, 6 Nov 2001, Randy.Dunlap wrote:

> The Intel chipset specs say that PIC1 uses:
>   (all hex:) 20-21, 24-25, 28-29, 2c-2d, 30-31, 34-35, 38-39, 3c-3d.
> 
> Some of the older chipset specs say that all of these other than
> 20-21 are just aliases of 20-21 (like the 440MX spec).
> Later specs don't say this (as in all of the 800-model ICH0/ICH2
> specs).

 These are chipset implementation details (i.e. address decoder's
shortcomings) only.  An 8259A only uses two I/O ports; in PC/AT systems,
these are 0x20, 0x21 and 0xa0, 0xa1 for the two PICs, respectively.  Since
the 0x00-0xff range is assigned to motherboard devices, there is no
problem with leaving aliases free -- they are never used by Linux.  You
still need to verify your extra devices are really present there. 

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-11-06 19:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-06  9:11 ioport range of 8259 aka pic1 Robert Schwebel
2001-11-06 17:40 ` Randy.Dunlap
2001-11-06 19:39   ` Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).