|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCHv2 6/7] plat/common: Add a platform API to get IRQ from device tree
(+ Marc Z.)
Hi,
On 28/06/2019 03:39, Jianyong Wu (Arm Technology China) wrote:
>>> +
>>> +int gic_get_irq_from_dtb(const void *fdt, int nodeoffset, int index)
>>> +{
>>> + fdt32_t *prop;
>>> + int type, hwirq, size;
>>> + int ret;
>>> +
>>> + ret = fdt_get_interrupt(fdt, nodeoffset, index, &size, &prop);
>>> + if (ret < 0)
>>> + return -EINVAL;
>>> +
>>> + type = fdt32_to_cpu(prop[0]);
>>> + hwirq = fdt32_to_cpu(prop[1]);
>>> +
>>> + return gic_irq_translate(type, hwirq); }
>>>
>>
>> How do you plan to handle prop[3] (i.e level-sensitive, edge-triggered)?
>
> Er, as far as I know, we can get irq number just by interrupt type and its
> hardware number in dt
> And no need to care about its trigger type. So we neglect the prop[3] here.
Why don't you need to care about trigger type? Per the spec, the initial
value of GICD_ICFGRn is IMPLEMENTATION DEFINED. I am actually not
convinced the register will contain the correct value at boot.
At least in Xen (and Linux?) we are setting the type when setting the
IRQ up. Maybe Marc can confirm here?
Cheers,
--
Julien Grall
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |