On Sat, Aug 15, 2009 at 12:00 AM, Chris Kindtchriskindt@umbc.edu wrote:
+static union u64_u32_u lx_msrRead(u32 msrAddr) +{
- union u64_u32_u val;
- asm __volatile__ (
- "movw $0x0AC1C, %%dx \n"
- "movl $0xFC530007, %%eax \n"
- "outl %%eax, %%dx \n"
- "addb $2, %%dl \n"
- "inw %%dx, %%ax \n"
- : "=a" (val.lo), "=d"(val.hi)
- : "c"(msrAddr)
Does the geode do something "magical" with the above sequence? Otherwise, I'm a bit confused on how the asm works.
This is a magic port. The geode SMM (VSA2) provides a few functions from this interface.
To be a little more clear, writing to port ac1c causes an SMI, VSA looks at the value written to the fake port, does whatever it is asked, and returns things based on the "function" being called. If this particular case is just used to read an MSR, you could just do it natively instead.