Quoting Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net:
On 18.02.2008 02:45, joe@smittys.pointclark.net wrote:
Quoting Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net:
On 16.02.2008 17:57, joe@smittys.pointclark.net wrote:
Hello, How do I dump the GPIO I/O Registers in linux. I need to dump the GPIO's from the southbridge. Anyone?
Depends on the southbridge. It could be directly/indirectly memory-mapped or port-based. Simply tell us what the data sheet says about reading the GPIO state and we can help.
The southbridge is the Intel 82801DB ICH4. I don't see anything in the datasheet about reading the GPIO state....just says:
The control for the general purpose I/O signals is handled through a separate 64-byte I/O space.
I can find out the base offset address from the LPC pci configuration registers, but how do I dump it into human readable form??
Is this a memory address or I/O port number? Once you know that, you can modify existing utilities for your purpose. If you have no idea, tell us the values and we can guess. Having /proc/ioports and /proc/iomem contents would help guessing.
Here is /proc/ioports: 0000-001f : dma1 0020-0021 : pic1 0040-0043 : timer0 0050-0053 : timer1 0060-006f : keyboard 0070-0077 : rtc 0080-008f : dma page reg 00a0-00a1 : pic2 00c0-00df : dma2 00f0-00ff : fpu 0170-0177 : ide1 0376-0376 : ide1 03c0-03df : vga+ 03f8-03ff : serial 0400-047f : 0000:00:1f.0 0400-0403 : ACPI PM1a_EVT_BLK 0404-0405 : ACPI PM1a_CNT_BLK 0408-040b : ACPI PM_TMR 0410-0415 : ACPI CPU throttle 0420-0420 : ACPI PM2_CNT_BLK 0428-042f : ACPI GPE0_BLK 0460-047f : iTCO_wdt 0500-053f : 0000:00:1f.0 0a00-0a3f : pnp 00:0b 0cf8-0cff : PCI conf1 c000-cfff : PCI Bus #01 cc00-cc3f : 0000:01:08.0 cc00-cc3f : e100 d800-d81f : 0000:00:1d.0 d800-d81f : uhci_hcd d880-d89f : 0000:00:1d.1 d880-d89f : uhci_hcd dc00-dc1f : 0000:00:1d.2 dc00-dc1f : uhci_hcd e000-e01f : 0000:00:1f.3 e000-e01f : i801_smbus e080-e0bf : 0000:00:1f.5 e080-e0bf : Intel 82801DB-ICH4 e400-e4ff : 0000:00:1f.5 e400-e4ff : Intel 82801DB-ICH4 e800-e8ff : 0000:00:1f.6 ec00-ec7f : 0000:00:1f.6 ffa0-ffaf : 0000:00:1f.1 ffa0-ffa7 : ide0 ffa8-ffaf : ide1
Here is /proc/iomem: 00000000-0009fbff : System RAM 00000000-00000000 : Crash kernel 0009fc00-0009ffff : reserved 000a0000-000bffff : Video RAM area 000c0000-000c7fff : Video ROM 000f0000-000fffff : System ROM 00100000-077cffff : System RAM 00400000-006200ec : Kernel code 006200ed-00736543 : Kernel data 077d0000-077defff : ACPI Tables 077df000-077fffff : ACPI Non-volatile Storage 10000000-100003ff : 0000:00:1f.1 e8000000-efffffff : 0000:00:02.1 f0000000-f7ffffff : 0000:00:02.0 ff700000-ff7fffff : PCI Bus #01 ff7ff000-ff7fffff : 0000:01:08.0 ff7ff000-ff7fffff : e100 ff980000-ff9fffff : 0000:00:02.1 ffa7f400-ffa7f7ff : 0000:00:1d.7 ffa7f400-ffa7f7ff : ehci_hcd ffa7f800-ffa7f8ff : 0000:00:1f.5 ffa7f800-ffa7f8ff : Intel 82801DB-ICH4 ffa7fc00-ffa7fdff : 0000:00:1f.5 ffa7fc00-ffa7fdff : Intel 82801DB-ICH4 ffa80000-ffafffff : 0000:00:02.0 ffc00000-fff7ffff : pnp 00:08
According to the original bios I think the 64 bytes of I/O space for GPIO is 0x14. Does that make sense???
Thanks - Joe