qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Coldfire 5282 Support


From: William Mahoney
Subject: Re: [Qemu-discuss] Coldfire 5282 Support
Date: Tue, 31 Oct 2017 22:10:03 +0000

>> 
>>> Related question. Where can I go look to get a better understanding of how 
>>> the interrupts work? The supported 5208 has one PIC but the 5282 has two. 
>>> In the 5208 code it uses sys bus_connect_irq() which references irqs[i]. 
>>> (Spell correcting made that array called “irks”!) Just general questions 
>>> like is the array big enough, what’s SYS_BUS_DEVICE do, ...
>> 
>> There's not particularly any documentation here. SYS_BUS_DEVICE
>> is our general abstraction for 'this is a device object with
>> one or more of: memory mapped registers, outbound "irq" lines,
>> outbound "gpio" lines, inbound "gpio" lines'. Pretty much
>> all devices in an embedded system are SYS_BUS_DEVICE, including
>> the interrupt controller. An interrupt controller is just
>> a device with inbound gpio lines (corresponding to the interrupt
>> lines from the various devices) and usually an outbound irq
>> line (to tell the CPU about things). The board code is then
>> responsible for wiring interrupt/gpio lines up from one thing
>> to another. (Sysbus "irq" lines and gpio lines are really
>> exactly the same thing under the hood, it's just convention
>> to use the sysbus irq APIs for device IRQ lines.)

OK so I have completed splitting out the one huge mother-of-all memory mapped 
I/O into separate blocks. so I have one for timers, one for clock control, one 
for chip selects, … Maybe seven or eight of them, and I have a bit of the logic 
in the devices, enough to get a bit farther each time. Still a lot of things on 
the 5282 that need to be implemented. Some are simple like GPIO, I can just 
pretend that nothing external is ever on. Some are “done” like the FEC. 

But of course the code writes to the interrupt controller mask registers to 
enable and disable things. How does this get “wired in” to qemu? I will need to 
tell it “yes you can generate interrupt 27 now”?

Just aim me at a good example if you know of one. 


> 
> Got it (I think). Is there a place to check the size of the IRQ table? The 
> 5282 has two controllers and I confess I have not read that chapter in the 
> PDF but I bet that is a ton of potential requests.
> 
>> 
>> thanks
>> -- PMM
> 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]