Oak Trail, PICs, APICs, etc

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
andymc
Member
Member
Posts: 33
Joined: Tue Feb 01, 2011 6:18 pm
Location: Sussex, UK
Contact:

Oak Trail, PICs, APICs, etc

Post by andymc »

Hello all,

I'm currently working with a couple of different touchscreen computers from HP and Motion that use Intel's "Oak Trail" (SM35) chipset and a BIOS from Insyde. We have a very simple USB stack specifically for dealing with the USB digitizer device and smart cards - stuff the BIOS doesn't do for us - in our real mode pre-OS code, which does user authentication and disk decryption.

With this chipset, we hook the real mode interrupt vector, and we see the first USB interrupt packet arrive from the touchscreen, but inside our interrupt handler, the 8259 PIC doesn't seem to know there's an active interrupt.

So, I tried looking at the local APIC, which also isn't showing anything in its In-service or request registers. Even though I service the USB controller, I never get another interrupt after that. Sending EOI to both the PIC and APIC doesn't seem to help matters.

I'm an APIC rookie, though, so I might be missing something important.

Basically all I want to be able to do is (preferably) query for the active interrupt, and send an EOI to the correct place.

Anyone have any tips, or suggestions about what to investigate?

Thanks in advance,
Andy
User avatar
andymc
Member
Member
Posts: 33
Joined: Tue Feb 01, 2011 6:18 pm
Location: Sussex, UK
Contact:

Re: Oak Trail, PICs, APICs, etc

Post by andymc »

PS> I'm not too familiar with the process of (P)IRQ routing/steering, but I'm starting to think that's where I'll have to go looking next...
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: Oak Trail, PICs, APICs, etc

Post by gerryg400 »

Can you even access the APIC in real mode ? I haven't tried, but it has a 32bit address. How can you do it ?
If a trainstation is where trains stop, what is a workstation ?
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Oak Trail, PICs, APICs, etc

Post by Combuster »

You have Unreal mode for the right way, and an MSR for the really bad way.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
andymc
Member
Member
Posts: 33
Joined: Tue Feb 01, 2011 6:18 pm
Location: Sussex, UK
Contact:

Re: Oak Trail, PICs, APICs, etc

Post by andymc »

gerryg400 wrote:Can you even access the APIC in real mode ? I haven't tried, but it has a 32bit address. How can you do it ?
I wondered the same thing, so I tried with both big real mode, and simple direct linear access (seg 0, linear address in ESI), and they both appear to access the same memory. At least with these Atom processors.

The register values I'm seeing for both the LAPIC and IOAPIC look legit to me.

I remember reading in the docs that these accesses to the APIC don't cause memory bus cycles; I guess the processor - at least in this case - is mapping the memory access directly.
User avatar
andymc
Member
Member
Posts: 33
Joined: Tue Feb 01, 2011 6:18 pm
Location: Sussex, UK
Contact:

Re: Oak Trail, PICs, APICs, etc

Post by andymc »

Update:

Both tablets use Insyde BIOS. As I understand it, it's an EFI BIOS with a legacy compatibility layer.

One of the manufacturers suggested to me that Insyde is probably setting up the PCI interrupts as MSI, which could be why I'm not seeing them on either the PIC or APIC. I dunno, guess I have to go and learn about that now :roll: :grin:

Kinda bogus of the BIOS vendor to put the system into a state like that, but what are you gonna do eh?

Andy
Post Reply