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?
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? do you mean interrupt input supported by this irq controller? if yes, why not read it from the registers in the irq controller?
- 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 :)
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()).
I'm not familiar with timers, so I have some questions (may be very basic):
1) what's the purpose of arch timer? which components of the kernel will use this timer?
2) 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>; };
Thanks Hanjun
Thanks, Amit