This is a first try at a program to grok lxirqs.
Sanity check first, I'm not signing this off yet. Are the enable and invert tests correct below?
Long term goal is a program that will follow the IRQ through the magic rabbit hole and up to the CPU. I don't know how to do vr reads in user mode, however.
Here's the current output on alix1c, which is strange looking to me. IRQ A, GPIO pin 0 Input Enabled and Not Inverted IRQ B, GPIO pin 7 Input Enabled and Inverted IRQ C, GPIO pin 12 Input Enabled and Inverted IRQ D, GPIO pin 13 Input Disabled and Not Inverted
On 11.05.2008 21:33, ron minnich wrote:
This is a first try at a program to grok lxirqs.
Sanity check first, I'm not signing this off yet. Are the enable and invert tests correct below?
Long term goal is a program that will follow the IRQ through the magic rabbit hole and up to the CPU. I don't know how to do vr reads in user mode, however.
What do you mean with VR? MSRs? If so, we have code in flashrom you can copy (it's basically opening /dev/msr as file, then seeking to the desired MSR, followed by read/write). Pleas be aware that you need to modprobe msr before using /dev/msr.
Here's the current output on alix1c, which is strange looking to me. IRQ A, GPIO pin 0 Input Enabled and Not Inverted IRQ B, GPIO pin 7 Input Enabled and Inverted IRQ C, GPIO pin 12 Input Enabled and Inverted IRQ D, GPIO pin 13 Input Disabled and Not Inverted
Regards, Carl-Daniel
On Sun, May 11, 2008 at 1:09 PM, Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net wrote:
I don't know how to do vr reads in user mode, however.
What do you mean with VR? MSRs?
A vr is a virtual register managed by VSA, as in this: vr_write((VRC_MISCELLANEOUS << 8) + PCI_INT_AB, (sb->enable_gpio_int_route & 0xFFFF));
which is this: /* * Read from a Virtual Register * @param class_index The register index * @return the 16-bit word of data */ static inline u16 vr_read(u16 class_index) { u16 data; outl(((u32) VR_UNLOCK << 16) | class_index, VRC_INDEX); data = inw(VRC_DATA); return data; }
which seems simple enough if I trust it. Guess I'll try it later. For now, it's not essential to use it since I know the value is 0x0d0c0700
ron