On 01/21/2014 03:53 PM, Hanjun Guo wrote:
On 2014年01月21日 19:41, Tomasz Nowicki wrote:
GIC ID is unique for GIC instance (not for CPU) and reflect number of GIC instances system has.
Signed-off-by: Tomasz Nowicki tomasz.nowicki@linaro.org
platforms/rtsm_ve-aemv8a.acpi/apic.asl | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/platforms/rtsm_ve-aemv8a.acpi/apic.asl b/platforms/rtsm_ve-aemv8a.acpi/apic.asl index 81351c3..41e869f 100644 --- a/platforms/rtsm_ve-aemv8a.acpi/apic.asl +++ b/platforms/rtsm_ve-aemv8a.acpi/apic.asl @@ -36,7 +36,7 @@ [0004] Signature : "APIC" [0004] Table Length : 000000F6 -[0001] Revision : 03 +[0001] Revision : 04 [0001] Checksum : B0 [0006] Oem ID : "LINARO" [0008] Oem Table ID : "RTSMVEV8" @@ -51,8 +51,8 @@ [0001] Subtable Type : 0B [Generic Interrupt Controller] [0001] Length : 28 [0002] Reserved : 0000 -[0004] Local GIC Hardware ID : 00000000 /* Should be equal to FDT provided or CPU hardware ID */ -[0004] Processor UID : 00000000 +[0004] Local GIC Hardware ID : 00000000
The GIC ID is the same always, I think they should be unique in the system.
This patch follows up two assumption: 1. "Local GIC Hardware ID" means controller(GIC) ID, so each GIC's instances will have unique number. We have one GIC so all should be the same. 2. We could use "Processor UID" to map logical id to MPIDR according to Sudeep suggestion.
First assumption may be false as spec is not clear for me, correct me if I am wrong.
how about matching the bit index of the associated processor in the distributor’s GICD_ITARGETSR register?
That would be architectural specific matching, using MADT sounds more generic to me.
Regards Tomasz
Thanks Hanjun
+[0004] Processor UID : 00000000 /* Should be equal to FDT provided or CPU hardware ID */ [0004] Flags (decoded below) : 00000001 Processor Enabled : 1 [0004] Parking Protocol Version : 00000000 @@ -63,7 +63,7 @@ [0001] Subtable Type : 0B [Generic Interrupt Controller] [0001] Length : 28 [0002] Reserved : 0000 -[0004] Local GIC Hardware ID : 00000001 +[0004] Local GIC Hardware ID : 00000000 [0004] Processor UID : 00000001 [0004] Flags (decoded below) : 00000001 Processor Enabled : 1 @@ -75,7 +75,7 @@ [0001] Subtable Type : 0B [Generic Interrupt Controller] [0001] Length : 28 [0002] Reserved : 0000 -[0004] Local GIC Hardware ID : 00000002 +[0004] Local GIC Hardware ID : 00000000 [0004] Processor UID : 00000002 [0004] Flags (decoded below) : 00000001 Processor Enabled : 1 @@ -87,7 +87,7 @@ [0001] Subtable Type : 0B [Generic Interrupt Controller] [0001] Length : 28 [0002] Reserved : 0000 -[0004] Local GIC Hardware ID : 00000003 +[0004] Local GIC Hardware ID : 00000000 [0004] Processor UID : 00000003 [0004] Flags (decoded below) : 00000001 Processor Enabled : 1 @@ -99,7 +99,7 @@ [0001] Subtable Type : 0B [Generic Interrupt Controller] [0001] Length : 28 [0002] Reserved : 0000 -[0004] Local GIC Hardware ID : 00000004 +[0004] Local GIC Hardware ID : 00000000 [0004] Processor UID : 00000004 [0004] Flags (decoded below) : 00000000 Processor Enabled : 0 @@ -111,7 +111,7 @@ [0001] Subtable Type : 0B [Generic Interrupt Controller] [0001] Length : 28 [0002] Reserved : 0000 -[0004] Local GIC Hardware ID : 00000005 +[0004] Local GIC Hardware ID : 00000000 [0004] Processor UID : 00000005 [0004] Flags (decoded below) : 00000000 Processor Enabled : 0 @@ -123,7 +123,7 @@ [0001] Subtable Type : 0B [Generic Interrupt Controller] [0001] Length : 28 [0002] Reserved : 0000 -[0004] Local GIC Hardware ID : 00000006 +[0004] Local GIC Hardware ID : 00000000 [0004] Processor UID : 00000006 [0004] Flags (decoded below) : 00000000 Processor Enabled : 0 @@ -135,7 +135,7 @@ [0001] Subtable Type : 0B [Generic Interrupt Controller] [0001] Length : 28 [0002] Reserved : 0000 -[0004] Local GIC Hardware ID : 00000007 +[0004] Local GIC Hardware ID : 00000000 [0004] Processor UID : 00000007 [0004] Flags (decoded below) : 00000000 Processor Enabled : 0