Hi Amit,
Sorry for the late reply, I had being on holidays -- Mid-Autumn festival :)
On 2013-9-18 18:16, amit daniel kachhap wrote:
Hi,
On Wed, Sep 18, 2013 at 3:20 PM, Hanjun Guo hanjun.guo@linaro.org wrote:
On 2013-9-18 12:56, amit daniel kachhap wrote:
Hi Hanjun,
Thanks for the comment.
You are welcome :)
:)
On Tue, Sep 17, 2013 at 5:17 PM, Hanjun Guo hanjun.guo@linaro.org wrote:
Hi Amit,
Thanks for your patch, I'm working on the converting GIC to ACPI too, please refer to the comment below.
Yes right I saw many of your patches in ACPI linaro tree and learned lot of ACPI stuffs.
On 2013-9-17 14:05, Amit Daniel Kachhap wrote:
hi,
The patches in the series are just in work in progress and intended to clear some doubts as pointed below. Any comment/direction is helpful from the linaro acpi group.
- Basic controllers like GIC and timer need to be initialised before platform drivers
are ready so question is how to invoke the __init of these devices. Is there any function to raw parse the ACPI tables similar to existing DT API's?
For interrupt controller, it is described in MADT and parsed in the early phase of boot, you can refer to acpi_parse_madt_ioapic_entries() in drivers/acpi/plat/arm/boot.c.
GIC description in MADT is not sufficient because GIC distributor/cpu interface memory size and percpu_offset is missing in MADT. this should be necessary for GIC initialization.
Yes correct. I guess memory size should be added in DIST structure and also in IO_APIC structure.
DIST, do you mean DSDT?
Sorry my acpi nomenclature is not good. I meant to add the entry MADT and then fill the dist or IO_apic data structures with this values.
Ok, I got it. yes, should add such information into GIC Distributor Structure.
For IO_APIC interrupt count should also be added as a member(may be optional) as exynos-combiner(for arndale) irq controller needs that information.
What the specific mean of interrupt count mentioned here?
In MADT, irq start is provided but irq count is not present and is supposed to be read from the controller.
do you mean interrupt input supported by this irq controller? if yes, why not read it from the registers in the irq controller?
Actually some interrupt controller cannot provide the supported the interrupt count like exynos-combiner so it is better to pass them from MADT/DSDT.
This will be ARM only. x86 and IA64 only provide the GSI (Global System Interrupt) base, and irq count is read from registers.
- Some important elements like clock frequency is missing from the GTDT table.
how to get them?
For timer, I had notice that the clock frequency is missing in GTDT too. I think we have two solutions:
a) modify the ACPI spec and add the clock frequency to GTDT.
Is it easy?
I don't think so :)
right i also thought so :)
b) we can do it in another way which describe the timer in DSDT, but as you said, timer needs to be initialized before platform drivers, if it is described in DSDT, the initialization time of timer may after platform drivers (I'm not sure of it).
I think this should be good short term solution. But again this needs parsing the raw ACPI blob like text based binary search. I checked in kernel if any one uses such kind of thing that but could not find anything relevant.
DSDT and its namespace will be initialized in acpi_early_init() and in the rest_init() (acpi_init()).
These API looks interesting. I will look into them. Thanks
I'm not familiar with timers, so I have some questions (may be very basic):
- what's the purpose of arch timer? which components of the kernel will
use this timer?
This timers are per cpu timers and are responsible for per cpu ticks, scheduling, timekeeping etc
Ok, that will be the problem. I review the code for start_kernel(), the boot sequence is something like this: ... early_irq_init(); init_IRQ(); tick_init(); *init_timers();* hrtimers_init(); softirq_init(); timekeeping_init(); *time_init();* // I think arch timer is initialized here, right? sched_clock_postinit(); .... .... acpi_early_init(); .... rest_init(); acpi_init(); // DSDT is available here.
if we use DSDT to convert arch timer, other components of the kernel will not able to use the timer when they are initialized.
Thanks Hanjun
- Is this arch timer described in FDT?
timer { compatible = "arm,armv8-timer"; interrupts = <1 13 0xff01>, <1 14 0xff01>, <1 11 0xff01>, <1 10 0xff01>; clock-frequency = <100000000>; };
Yes these FDT nodes are for timers.
Thanks, Amit Daniel
Thanks Hanjun
Thanks, Amit
Linaro-acpi mailing list Linaro-acpi@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-acpi