Hi there,
Im a little confused by the PL390 GIC settings.
I set the ICCBPR (binary point of the priority) to 4 so a 8-bit priority to 4-bit group priority and a 4-bit sub one.
The less the number of the group priority, the more important the priority is.
But in sub one, the larger the number, the more important the priority is.
Is that true?
Thank you
Best Regurads
That's not how I think about it, you might find the explanation on this page useful (the link is for GICv3, but the concepts are similar in GICv1)
The Binary Point registers split the "full" priority into the Group priority and Subgroup priority.
When deciding whether interrupt A is higher or lower priority than interrupt B, you need to consider the "full" priority. The lowest numerical value is the highest priority, the highest numerical value is the lowest priority.
Group and Subgroup are only relevant when you're thinking about pre-emption. If a CPU has already taken and is handling interrupt A, then interrupt B arrives, should B pre-empt A? Or, should B wait until A has been handled? (this assuming both interrupts go to the same CPU)
The GIC answer is that for there to be pre-emption, B must be higher priority. A lower priority interrupt can never (in GIC terms) pre-empt a higher priority interrupt. What the Binary Point register does is to control "how much" higher priority the second interrupt needs to be in order to pre-empt. The GIC ignores the bottom N bits of the priority (the Subgroup) when it does the pre-emption check, only looking at the upper bits (Group priority). Meaning that in a absolute sense, B might be higher priority than A, but for pre-emption it could still not be high enough to pre-empt.
Hi
thank you for reply
Please correct me if im right:
The GIC will judge the priority of IRQ by their full priority reg first.
Then if two IRQ came together it will compare their group priority.
which means no matter which part of priority it is , the less the higher priority it will be.
So if there are two signals with 0x0001_FFFF and 0x000F_0000 priority(consider BP = 4), GIC will respond 0x0001FFFF first.
And then campare 0x000F with 0x0001.
As a result 0x000F_0000 can not be first responsed and it can not pre-empt the 0x0001_FFFF one.
Reguards.