| 858f40e3 | 18-May-2021 |
Andre Przywara <andre.przywara@arm.com> |
feat(gicv3): detect GICv4 feature at runtime
At the moment we have a GIC_ENABLE_V4_EXTN build time variable to determine whether the GIC interrupt controller is compliant to version 4.0 of the spec
feat(gicv3): detect GICv4 feature at runtime
At the moment we have a GIC_ENABLE_V4_EXTN build time variable to determine whether the GIC interrupt controller is compliant to version 4.0 of the spec or not. This just changes the number of 64K MMIO pages we expect per redistributor.
To support firmware builds which run on variable systems (emulators, fast model or FPGAs), let's make this decision at runtime. The GIC specification provides several architected flags to learn the size of the MMIO frame per redistributor, we use GICR_TYPER[VLPI] here.
Provide a (static inline) function to return the size of each redistributor. We keep the GIC_ENABLE_V4_EXTN build time variable around, but change its meaning to enable this autodetection code. Systems not defining this rely on a "pure" GICv3 (as before), but platforms setting it to "1" can now deal with both configurations.
Change-Id: I9ede4acf058846157a0a9e2ef6103bf07c7655d9 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| feb70818 | 18-May-2021 |
Andre Przywara <andre.przywara@arm.com> |
feat(gicv3): multichip: detect GIC-700 at runtime
At the moment we have a GIC_ENABLE_V4_EXTN build time variable to determine whether the GIC interrupt controller is compliant to version 4.0 of the
feat(gicv3): multichip: detect GIC-700 at runtime
At the moment we have a GIC_ENABLE_V4_EXTN build time variable to determine whether the GIC interrupt controller is compliant to version 4.0 of the GIC spec or not. In case of the GIC-600 multichip support we were somewhat abusing that flag to differentiate between a GIC-700 and GIC-600 implementation being used in the system.
To avoid a build time dependency on this flag, look at the GICD_IIDR register and check if the hardware is a GIC-600 or not, to make this decision at runtime. We then use the values for either GIC-700 or the GIC-600, respectively.
Change-Id: I8c09ec1cd6fd60d28da879ed55ffef5506f9869d Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 1fe27d71 | 24-Aug-2021 |
Andre Przywara <andre.przywara@arm.com> |
refactor(gic): move GIC IIDR numbers
For the GIC power management we need to identify certain GIC implementations, so we have the IIDR values for some Arm Ltd. GIC models defined. We will need those
refactor(gic): move GIC IIDR numbers
For the GIC power management we need to identify certain GIC implementations, so we have the IIDR values for some Arm Ltd. GIC models defined. We will need those number elsewhere very soon, so export them to a shared header file, to avoid defining them again.
Change-Id: I1b8e2d93d6cea0d066866143c89eef736231134f Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| ce2b49b8 | 20-Jan-2021 |
Heyi Guo <guoheyi@linux.alibaba.com> |
refactor(gicv3): use helper functions to get SPI/ESPI INTID limit
Use helper functions to get SPI and ESPI INTID limit, to remove several pieces of similar code in gicv3 driver.
Signed-off-by: Heyi
refactor(gicv3): use helper functions to get SPI/ESPI INTID limit
Use helper functions to get SPI and ESPI INTID limit, to remove several pieces of similar code in gicv3 driver.
Signed-off-by: Heyi Guo <guoheyi@linux.alibaba.com> Change-Id: Iaf441fe5e333c4260e7f6d98df6fdd931591976d
show more ...
|
| 612b4a3f | 19-May-2020 |
Heyi Guo <guoheyi@linux.alibaba.com> |
drivers/gicv3: also shift eSPI register offset in GICD_OFFSET_64()
ESPI register offset should also be shifted right by REG##R_SHIFT to keep consistent.
It is not a functional issue, for GICD_OFFSE
drivers/gicv3: also shift eSPI register offset in GICD_OFFSET_64()
ESPI register offset should also be shifted right by REG##R_SHIFT to keep consistent.
It is not a functional issue, for GICD_OFFSET_64() is only used for GICD_IROUTER<E>, and IROUTER_SHIFT is 0.
Signed-off-by: Heyi Guo <guoheyi@linux.alibaba.com> Change-Id: I76eee5c50e4300890e78e80bddde135ce88daa2d
show more ...
|
| 705032de | 21-Jan-2021 |
Heyi Guo <guoheyi@linux.alibaba.com> |
drivers/gicv3: add debug log for maximum INTID of SPI and eSPI
Add debug log for the maximum supported INTID of SPI and eSPI on the current GIC implementation.
Signed-off-by: Heyi Guo <guoheyi@linu
drivers/gicv3: add debug log for maximum INTID of SPI and eSPI
Add debug log for the maximum supported INTID of SPI and eSPI on the current GIC implementation.
Signed-off-by: Heyi Guo <guoheyi@linux.alibaba.com> Change-Id: Ie45ab1d85b39658c4ca4bc54ee433ac44e41d03f
show more ...
|
| 4e42c227 | 19-May-2020 |
Heyi Guo <guoheyi@linux.alibaba.com> |
drivers/gicv3: limit SPI ID to avoid misjudgement in GICD_OFFSET()
The GICv3 architecture allows GICD_TYPER.ITLinesNumber to be 31, so the maximum possible value for num_ints is 1024. The value must
drivers/gicv3: limit SPI ID to avoid misjudgement in GICD_OFFSET()
The GICv3 architecture allows GICD_TYPER.ITLinesNumber to be 31, so the maximum possible value for num_ints is 1024. The value must be limited to (MAX_SPI_ID + 1), or GICD_OFFSET() will consider it as ESPI INTID and return wrong register address.
Signed-off-by: Heyi Guo <guoheyi@linux.alibaba.com> Change-Id: Iddcb83d3e5d241b39f4176c19c2bceaa2c3dd653
show more ...
|
| 69ae4427 | 19-May-2020 |
Heyi Guo <guoheyi@linux.alibaba.com> |
drivers/gicv3: fix logical issue for num_eints
In function gicv3_spis_config_defaults(), the variable num_ints is set to (maximum SPI INTID + 1), while num_eints is set to (maximum ESPI INTID). It i
drivers/gicv3: fix logical issue for num_eints
In function gicv3_spis_config_defaults(), the variable num_ints is set to (maximum SPI INTID + 1), while num_eints is set to (maximum ESPI INTID). It introduces not only inconsistency to the code, but also logical bug in the "for" loops, for the INTID of num_eints is also valid and the check should be inclusive.
Fix this by setting num_eints to (maximum ESPI INTID + 1) as well.
Fix similar issues in gicv3_distif_save() and gicv3_distif_init_restore().
Signed-off-by: Heyi Guo <guoheyi@linux.alibaba.com> Change-Id: I4425777d17e84e85f38853603340bd348640154f
show more ...
|
| deb18901 | 14-Jan-2021 |
Heyi Guo <guoheyi@linux.alibaba.com> |
drivers/gicv3: fix potential GICD context override with ESPI enabled
RESTORE/SAVE_GICD_EREGS uses (int_id - (MIN_ESPI_ID - MIN_SPI_ID)) to get the context array index for ESPI, which will override t
drivers/gicv3: fix potential GICD context override with ESPI enabled
RESTORE/SAVE_GICD_EREGS uses (int_id - (MIN_ESPI_ID - MIN_SPI_ID)) to get the context array index for ESPI, which will override the space of standard SPI starting from (MIN_SPI_ID + MIN_SPI_ID).
However, using TOTAL_SPI_INTR_NUM to replace the above MIN_SPI_ID cannot totally fix the issue, for TOTAL_SPI_INTR_NUM is not well aligned and the array index will be rounded down by the shifting operation if being shifted more than 2 bits. It will cause buffer override again when the existing maximum SPI reaches 1019.
So round up TOTAL_SPI_INTR_NUM with (1 << REG##R_SHIFT) for GICD context arrays.
Signed-off-by: Heyi Guo <guoheyi@linux.alibaba.com> Change-Id: I5be2837c42f381a62f8d46a4ecd778009b1fe059
show more ...
|