GIC-600: Fix include ordering according to the coding styleChange-Id: Ia120bcaacea3a462ab78db13f84ed23493033601Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com>
GIC-600: Fix power up sequenceArm's GIC-600 features a Power Register (GICR_PWRR),which needs to be programmed to enable redistributoroperation. Section 3.6.1 in the GIC-600 TRM describesthe pow
GIC-600: Fix power up sequenceArm's GIC-600 features a Power Register (GICR_PWRR),which needs to be programmed to enable redistributoroperation. Section 3.6.1 in the GIC-600 TRM describesthe power-up and power-down sequence in pseudo code,which deviates from the current TF-A implementationin drivers/arm/gic/v3/gic600.c.For powering on a redistributor, the pseudo code suggeststo loop over the whole sequence (check for transition,write request bit) instead of just looping over theready bit read as TF-A does in gic600_pwr_on().This patch fixes GIC-600 power up sequence accordingto the TRM.Change-Id: I445c480e96ba356b69a2d8e5308ffe6c0a97f45bSigned-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
show more ...
gic/gic600: add support for multichip configurationAdd support to configure GIC-600's multichip routing table registers.Introduce a new gic600 multichip structure in order to support platformsto
gic/gic600: add support for multichip configurationAdd support to configure GIC-600's multichip routing table registers.Introduce a new gic600 multichip structure in order to support platformsto pass their GIC-600 multichip information such as routing table owner,SPI blocks ownership.This driver is currently experimental and the driver api may change inthe future.Change-Id: Id409d0bc07843e271ead3fc2f6e3cb38b317878dSigned-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
Merge "GICv3 driver: Fix support for full SPI range" into integration
GICv3: Enable multi socket GIC redistributor frame discoveryThis patch provides declaration and definition of new GICv3 driverAPI: gicv3_rdistif_probe().This function delegates the responsibility
GICv3: Enable multi socket GIC redistributor frame discoveryThis patch provides declaration and definition of new GICv3 driverAPI: gicv3_rdistif_probe().This function delegates the responsibilityof discovering the corresponding Redistributor base frame to each CPUitself. It is a modified version of gicv3_rdistif_base_addrs_probe()and is executed by each CPU in the platform unlike the previousapproach in which only the Primary CPU did the discovery of all theRedistributor frames for every CPU.The flush operations as part of gicv3_driver_init() function aremade necessary even for platforms with WARMBOOT_ENABLE_DCACHE_EARLYbecause the GICv3 driver data structure contents are accessed by CPUwith D-Cache turned off during power down operations.Change-Id: I1833e81d3974b32a3e4a3df4766a33d070982268Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
GICv3 driver: Fix support for full SPI rangeThis patch fixes GICv3 driver bug which causes assertionwhen full range of SPI INTIDs 32-1019 is supported inGICv3 implementation.Change-Id: Ib6da4b6
GICv3 driver: Fix support for full SPI rangeThis patch fixes GICv3 driver bug which causes assertionwhen full range of SPI INTIDs 32-1019 is supported inGICv3 implementation.Change-Id: Ib6da4b6eea868cff271cb32c7c7570bf5547ab47Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Switch AARCH32/AARCH64 to __aarch64__NOTE: AARCH32/AARCH64 macros are now deprecated in favor of __aarch64__.All common C compilers pre-define the same macros to signal whicharchitecture the cod
Switch AARCH32/AARCH64 to __aarch64__NOTE: AARCH32/AARCH64 macros are now deprecated in favor of __aarch64__.All common C compilers pre-define the same macros to signal whicharchitecture the code is being compiled for: __arm__ for AArch32 (orearlier versions) and __aarch64__ for AArch64. There's no need for TF-Ato define its own custom macros for this. In order to unify code withthe export headers (which use __aarch64__ to avoid another dependency),let's deprecate the AARCH32 and AARCH64 macros and switch the code baseover to the pre-defined standard macro. (Since it is somewhatunintuitive that __arm__ only means AArch32, let's standardize on onlyusing __aarch64__.)Change-Id: Ic77de4b052297d77f38fc95f95f65a8ee70cf200Signed-off-by: Julius Werner <jwerner@chromium.org>
Prevent pending G1S interrupt become G0 interruptAccording to Arm GIC spec(IHI0069E, section 4.6.1),when GICD_CTLR.DS == 0, Secure Group 1 interruptsare treated as Group 0 by a CPU interface if:
Prevent pending G1S interrupt become G0 interruptAccording to Arm GIC spec(IHI0069E, section 4.6.1),when GICD_CTLR.DS == 0, Secure Group 1 interruptsare treated as Group 0 by a CPU interface if:- The PE does not implement EL3.- ICC_SRE_EL1(S).SRE == 0When a cpu enter suspend or deep idle, it might bepowered off. When the cpu resume, according tothe GIC spec(IHI0069E, section 9.2.15, 9.2.16 and9.2.22) the ICC_SRE_EL1.SRE reset value is 0 (ifwrite is allowed) and G0/G1S/G1NS interrupt of theGIC cpu interface are all disabled.If a G1S SPI interrupt occurred and the target cpuof the SPI is assigned to a specific cpu which isin suspend and is powered off, when the cpu resumeand start to initial the GIC cpu interface, theinitial sequence might affect the interrupt grouptype of the pending interrupt on the cpu interface.Current initial sequence on the cpu interface is:1. Enable G0 interrupt2. Enable G1S interrupt3. Enable ICC_SRE_EL1(S).SREIt is possible to treat the pending G1S interruptas G0 interrupt on the cpu interface if the G1SSPI interrupt occurred between step2 and step3.To prevent the above situation happend, the initialsequence should be changed as follows:1. Enable ICC_SRE_EL1(S).SRE2. Enable G0 interrupt3. Enable G1S interruptChange-Id: Ie34f6e0b32eb9a1677ff72571fd4bfdb5cae25b0Signed-off-by: James Kung <kong1191@gmail.com>
GICv3: Allow probe for fewer GICR interfaces than exposed by the framePreviously the GICv3 redistributor probe function(gicv3_rdistif_base_addrs_probe()) asserted that the number ofper-CPU redist
GICv3: Allow probe for fewer GICR interfaces than exposed by the framePreviously the GICv3 redistributor probe function(gicv3_rdistif_base_addrs_probe()) asserted that the number ofper-CPU redistributor interfaces expected to be probed by theplatform is equal to the number exported by the redistributorframe. This is a problem in case the number of CPUs in theplatform is less than the number of redistributor interfacesin the frame. Hence this patch removes the assertion checkand allows probe for fewer redistributor interfaces as requiredby the platform.Change-Id: I3449763a3ad70817224442cbe184d001030c9874Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Sanitise includes across codebaseEnforce full include path for includes. Deprecate old paths.The following folders inside include/lib have been left unchanged:- include/lib/cpus/${ARCH}- inclu
Sanitise includes across codebaseEnforce full include path for includes. Deprecate old paths.The following folders inside include/lib have been left unchanged:- include/lib/cpus/${ARCH}- include/lib/el3_runtime/${ARCH}The reason for this change is that having a global namespace forincludes isn't a good idea. It defeats one of the advantages of havingfolders and it introduces problems that are sometimes subtle (becauseyou may not know the header you are actually including if there are twoof them).For example, this patch had to be created because two headers werecalled the same way: e0ea0928d5b7 ("Fix gpio includes of mt8173 platformto avoid collision."). More recently, this patch has had similarproblems: 46f9b2c3a282 ("drivers: add tzc380 support").This problem was introduced in commit 4ecca33988b9 ("Move include andsource files to logical locations"). At that time, there weren't toomany headers so it wasn't a real issue. However, time has shown thatthis creates problems.Platforms that want to preserve the way they include headers may add theremoved paths to PLAT_INCLUDES, but this is discouraged.Change-Id: I39dc53ed98f9e297a5966e723d1936d6ccf2fc8fSigned-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Standardise header guards across codebaseAll identifiers, regardless of use, that start with two underscores arereserved. This means they can't be used in header guards.The style that this proje
Standardise header guards across codebaseAll identifiers, regardless of use, that start with two underscores arereserved. This means they can't be used in header guards.The style that this project is now to use the full name of the file incapital letters followed by 'H'. For example, for a file called"uart_example.h", the header guard is UART_EXAMPLE_H.The exceptions are files that are imported from other projects:- CryptoCell driver- dt-bindings folders- zlib headersChange-Id: I50561bf6c88b491ec440d0c8385c74650f3c106eSigned-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Mark GICV3, CCI and CCN boot time code as initMark the GICv3, CCI and CCN code only used in Bl31 initializationwith __init to be reclaimed once no longer needed.Change-Id: I3d77f36758450d9d1d87e
Mark GICV3, CCI and CCN boot time code as initMark the GICv3, CCI and CCN code only used in Bl31 initializationwith __init to be reclaimed once no longer needed.Change-Id: I3d77f36758450d9d1d87ecc60bc1c63fe4082667Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
gic: Remove deprecated driver and interfacesChange-Id: I567a406edb090ae9d109382f6874846a79dd7473Co-authored-by: Roberto Vargas <roberto.vargas@arm.com>Signed-off-by: Antonio Nino Diaz <antonio.ni
gic: Remove deprecated driver and interfacesChange-Id: I567a406edb090ae9d109382f6874846a79dd7473Co-authored-by: Roberto Vargas <roberto.vargas@arm.com>Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
GIC: Fix build errorPointers should be comparied to NULL.Fixes: 3fea9c8b8e8e ("gic: Fix types")Signed-off-by: Andrew F. Davis <afd@ti.com>
gic v3: Fix width of types of helper functionsChange-Id: I08447b44fffb6e54f9fab957eee369ccbda4247aSigned-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
gic: Fix typesChange-Id: I6a2adef87c20f9279446a54b7e69618fba3d2a25Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
gic: Fix definitionsChange-Id: I945029ca26ea2e63f0d92c5f33019b882f23bd72Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
gic v3: Turn macros into static inline functionsChange-Id: Ib587f12f36810fc7d4f4b8f575195554299b8ed4Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
GIC: Do not flush cache when unneededWhen a platform enables its caches before it initializes theGICC/GICR interface then explicit cache maintenance is notneeded. Remove these here.Signed-off-b
GIC: Do not flush cache when unneededWhen a platform enables its caches before it initializes theGICC/GICR interface then explicit cache maintenance is notneeded. Remove these here.Signed-off-by: Andrew F. Davis <afd@ti.com>
Fix MISRA Rule 5.3 Part 2Use a _ prefix for Macro arguments to prevent that argument fromhiding variables of the same name in the outer scopeRule 5.3: An identifier declared in an inner scope sh
Fix MISRA Rule 5.3 Part 2Use a _ prefix for Macro arguments to prevent that argument fromhiding variables of the same name in the outer scopeRule 5.3: An identifier declared in an inner scope shall not hide an identifier declared in an outer scopeFixed For: make LOG_LEVEL=50 PLAT=fvpChange-Id: I67b6b05cbad4aeca65ce52981b4679b340604708Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
Fix MISRA Rule 5.1Rule 5.1: External identifiers shall be distinctSome of the identifier names in the GICv3 driver were so long that thefirst 31 characters were identical. This patch shortens th
Fix MISRA Rule 5.1Rule 5.1: External identifiers shall be distinctSome of the identifier names in the GICv3 driver were so long that thefirst 31 characters were identical. This patch shortens these names tomake sure they are different.Fixed for: LOG_LEVEL=50 PLAT=fvpChange-Id: Iecd551e3a015d144716b87b42c83dd3ab8c34d90Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
gicv3: Fix support for systems without secure interruptsAccessing the interrupt_props array only happens inside a loop overinterrupt_props_num, so the GICv3 driver can cope with no secureinterrup
gicv3: Fix support for systems without secure interruptsAccessing the interrupt_props array only happens inside a loop overinterrupt_props_num, so the GICv3 driver can cope with no secureinterrupts. This allows us to relax the asserts that insists ona non-NULL interrupt_props pointer and at least one secure interrupt.This enables GICv3 platforms which have no need for a secure interrupt.This only covers the non-deprecated code paths.Change-Id: I49db291906512f56af065772f69acb281dfbdcfbSigned-off-by: Andre Przywara <andre.przywara@arm.com>
Merge pull request #1313 from jonathanwright-ARM/jw/MISRA-switch-statementsFix switch statements to comply with MISRA rules
drivers: fix switch statements to comply with MISRA rulesEnsure (where possible) that switch statements in drivers comply withMISRA rules 16.1 - 16.7.Change-Id: I7a91e04b02af80fbc4673a52293386c0
drivers: fix switch statements to comply with MISRA rulesEnsure (where possible) that switch statements in drivers comply withMISRA rules 16.1 - 16.7.Change-Id: I7a91e04b02af80fbc4673a52293386c0f81a0f7aSigned-off-by: Jonathan Wright <jonathan.wright@arm.com>
GIC: Fix setting interrupt configuration - Interrupt configuration is a 2-bit field, so the field shift has to be double that of the bit number. - Interrupt configuration (level- or edge-tr
GIC: Fix setting interrupt configuration - Interrupt configuration is a 2-bit field, so the field shift has to be double that of the bit number. - Interrupt configuration (level- or edge-trigger) is specified in the MSB of the field, not LSB.Fixes applied to both GICv2 and GICv3 drivers.Fixes ARM-software/tf-issues#570Change-Id: Ia6ae6ed9ba9fb0e3eb0f921a833af48e365ba359Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
123456