[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



Hi julien,

> -----Original Message-----
> From: Julien Grall <Julien.Grall@xxxxxxx>
> Sent: Friday, June 28, 2019 1:27 PM
> To: Jianyong Wu (Arm Technology China) <Jianyong.Wu@xxxxxxx>; Justin
> He (Arm Technology China) <Justin.He@xxxxxxx>; minios-
> devel@xxxxxxxxxxxxxxxxxxxx; Simon Kuenzer <simon.kuenzer@xxxxxxxxx>;
> Sharan.Santhanam@xxxxxxxxx
> Cc: nd <nd@xxxxxxx>; Florian Schmidt <florian.schmidt@xxxxxxxxx>; Felipe
> Huici <felipe.huici@xxxxxxxxx>; yuri.volchkov@xxxxxxxxx; Kaly Xin (Arm
> Technology China) <Kaly.Xin@xxxxxxx>; Wei Chen (Arm Technology China)
> <Wei.Chen@xxxxxxx>; Marc Zyngier <Marc.Zyngier@xxxxxxx>
> Subject: Re: [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?
> 


Ok, I will fix it by getting the trigger type from prop[3].

Thanks
Jianyong wu

> Cheers,
> 
> --
> Julien Grall
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.