chore: update to use Arm word across TF-AAlign entire TF-A to use Arm in copyright header.Change-Id: Ief9992169efdab61d0da6bd8c5180de7a4bc2244Signed-off-by: Govindraj Raja <govindraj.raja@arm.co
chore: update to use Arm word across TF-AAlign entire TF-A to use Arm in copyright header.Change-Id: Ief9992169efdab61d0da6bd8c5180de7a4bc2244Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
MISRA cleanup in mem_region and semihosting filesMISRA defect cleanup and general code cleanup in mem_region.c andsemihosting.c. This task also called for cleanup of the ARM NOR flashdriver but
MISRA cleanup in mem_region and semihosting filesMISRA defect cleanup and general code cleanup in mem_region.c andsemihosting.c. This task also called for cleanup of the ARM NOR flashdriver but that was removed at some point since the Jira task wascreated. This patch fixes all MISRA defects in these files except for afew "Calling function "console_flush()" which returns error informationwithout testing the error information." errors which can't really beavoided.Defects FixedFile Line Rulelib/semihosting/semihosting.c 70 MISRA C-2012 Rule 14.4 (required)lib/semihosting/semihosting.c 197 MISRA C-2012 Rule 14.3 (required)lib/semihosting/semihosting.c 210 MISRA C-2012 Rule 14.4 (required)lib/utils/mem_region.c 128 MISRA C-2012 Rule 12.1 (advisory)Signed-off-by: John Powell <john.powell@arm.com>Change-Id: I21a039d1cfccd6aa4301da09daec15e373305a80
coverity: Fix MISRA null pointer violationsFix code that violates the MISRA rule:MISRA C-2012 Rule 11.9: Literal "0" shall not be used asnull pointer constant.The fix explicitly checks whether
coverity: Fix MISRA null pointer violationsFix code that violates the MISRA rule:MISRA C-2012 Rule 11.9: Literal "0" shall not be used asnull pointer constant.The fix explicitly checks whether a pointer is NULL.Change-Id: Ibc318dc0f464982be9a34783f24ccd1d44800551Signed-off-by: Zelalem <zelalem.aweke@arm.com>
plat/arm: Sanitise includesUse full include paths like it is done for common includes.This cleanup was started in commit d40e0e08283a ("Sanitise includesacross codebase"), but it only cleaned co
plat/arm: Sanitise includesUse full include paths like it is done for common includes.This cleanup was started in commit d40e0e08283a ("Sanitise includesacross codebase"), but it only cleaned common files and drivers. Thispatch does the same to Arm platforms.Change-Id: If982e6450bbe84dceb56d464e282bcf5d6d9ab9bSigned-off-by: Antonio Nino Diaz <antonio.ninodiaz@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>
Fix MISRA rule 8.3Rule 8.3: All declarations of an object or function shall use the same names and type qualifiers.Fixed for: make DEBUG=1 PLAT=juno ARCH=aarch32 AARCH32_SP=sp_min
Fix MISRA rule 8.3Rule 8.3: All declarations of an object or function shall use the same names and type qualifiers.Fixed for: make DEBUG=1 PLAT=juno ARCH=aarch32 AARCH32_SP=sp_min RESET_TO_SP_MIN=1 JUNO_AARCH32_EL3_RUNTIME=1 bl32Change-Id: Ia34f5155e1cdb67161191f69e8d1248cbaa39e1aSigned-off-by: Roberto Vargas <roberto.vargas@arm.com>
xlat: Remove mmap_attr_t enum typeThe values defined in this type are used in logical operations, whichgoes against MISRA Rule 10.1: "Operands shall not be of an inappropriateessential type".No
xlat: Remove mmap_attr_t enum typeThe values defined in this type are used in logical operations, whichgoes against MISRA Rule 10.1: "Operands shall not be of an inappropriateessential type".Now, `unsigned int` is used instead. This also allows us to move thedynamic mapping bit from 30 to 31. It was an undefined behaviour in thepast because an enum is signed by default, and bit 31 corresponds to thesign bit. It is undefined behaviour to modify the sign bit. Now, bit 31is free to use as it was originally meant to be.mmap_attr_t is now defined as an `unsigned int` for backwardscompatibility.Change-Id: I6b31218c14b9c7fdabebe432de7fae6e90a97f34Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
ARM platforms: Demonstrate mem_protect from el3_runtimePreviously mem_protect used to be only supported from BL2. This is nothelpful in the case when ARM TF-A BL2 is not used. This patch demonstra
ARM platforms: Demonstrate mem_protect from el3_runtimePreviously mem_protect used to be only supported from BL2. This is nothelpful in the case when ARM TF-A BL2 is not used. This patch demonstratesmem_protect from el3_runtime firmware on ARM Platforms specificallywhen RESET_TO_BL31 or RESET_TO_SP_MIN flag is set as BL2 may be absentin these cases. The Non secure DRAM is dynamically mapped into EL3 mmaptables temporarily and then the protected regions are then cleared. Thisavoids the need to map the non secure DRAM permanently to BL31/sp_min.The stack size is also increased, because DYNAMIC_XLAT_TABLES requirea bigger stack.Change-Id: Ia44c594192ed5c5adc596c0cff2c7cc18c001fdeSigned-off-by: Roberto Vargas <roberto.vargas@arm.com>
Add mem_region utility functionsThis commit introduces a new type (mem_region_t) used to describememory regions and it adds two utility functions: - clear_mem_regions: This function clears (writ
Add mem_region utility functionsThis commit introduces a new type (mem_region_t) used to describememory regions and it adds two utility functions: - clear_mem_regions: This function clears (write 0) to a set of regions described with an array of mem_region_t. - mem_region_in_array_chk This function checks if a region is covered by some of the regions described with an array of mem_region_t.Change-Id: I12ce549f5e81dd15ac0981645f6e08ee7c120811Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>