Subject: PCI Conf Space in application mode

From: JinuM <[email-masked]>
Date: Mon, 26 May 2003 18:56:13 +0530

Hi!

I am looking at an application to print PCI Configuration space on MIPS
platform in user mode.

On my x86 system i do that using iopl() call n then accessing PCI Conf space
through ADDRESS port(0xCF8) and DATA port(0xCFC). Here i have no problems
accessing the IO ports.

But i believe its not the same in MIPS architecture. How can i read n write
into some IO port(memory mapped in MIPS) on MIPS platform. Can i only access
these ports in driver mode?

The x86 code does compile with a mips cross compiler and i am able to
execute it. But the output that i see is some junk getting printed on one
line. 

Thanx in advance.

Regards,
Jinu

---

From: "Maciej W. Rozycki" <[email-masked]>
Date: Mon, 26 May 2003 15:43:04 +0200 (MET DST)

> these ports in driver mode?

 Use /dev/port or /dev/mem.

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: [email-masked], PGP key available        +

---

From: Alan Cox <[email-masked]>
Date: 27 May 2003 00:33:12 +0100

> through ADDRESS port(0xCF8) and DATA port(0xCFC). Here i have no problems

This is wrong. If the kernel does a PCI config access between your two
accesses you will break the system. See pcilib as used by lspci