This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

PL390 GIC priority setting

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

Parents
  • 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.

Reply
  • 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.

Children