aboutsummaryrefslogtreecommitdiff
path: root/lib/romlib
AgeCommit message (Collapse)Author
2019-01-04Sanitise includes across codebaseAntonio Nino Diaz
Enforce 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 for includes isn't a good idea. It defeats one of the advantages of having folders and it introduces problems that are sometimes subtle (because you may not know the header you are actually including if there are two of them). For example, this patch had to be created because two headers were called the same way: e0ea0928d5b7 ("Fix gpio includes of mt8173 platform to avoid collision."). More recently, this patch has had similar problems: 46f9b2c3a282 ("drivers: add tzc380 support"). This problem was introduced in commit 4ecca33988b9 ("Move include and source files to logical locations"). At that time, there weren't too many headers so it wasn't a real issue. However, time has shown that this creates problems. Platforms that want to preserve the way they include headers may add the removed paths to PLAT_INCLUDES, but this is discouraged. Change-Id: I39dc53ed98f9e297a5966e723d1936d6ccf2fc8f Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-12-18romlib: Add platform specific jump table listSathees Balya
This patch allows platforms to define their own jump table list for library at ROM. The file has the list of functions to be used from library at ROM. It can also include other list files. Change-Id: I721c35d7dad3dcadbb3a7f3277bfd5d3e1f6e00a Signed-off-by: Sathees Balya <sathees.balya@arm.com>
2018-11-27Merge pull request #1696 from satheesbalya-arm/sb1/sb1_2406_romlib_junoAntonio Niño Díaz
romlib: Add juno support for romlib
2018-11-23juno: Add romlib supportSathees Balya
This patch adds support to build a combined BL1 and ROMLIB binary file with the right page alignment in Juno. When USE_ROMLIB=1 is set for Juno, it generates the combined file bl1_romlib.bin which needs to be used instead of bl1.bin Change-Id: I407efbe48d3e522fa6ef855538a9587193cb1919 Signed-off-by: Sathees Balya <sathees.balya@arm.com>
2018-11-22romlib: Add map file generationSathees Balya
Change-Id: I1f377d2d94c0fe8d2d9e62614f4a8e2dfcd9e745 Signed-off-by: Sathees Balya <sathees.balya@arm.com>
2018-11-22romlib: Add calloc_free register functionSathees Balya
Register functions have to be added to the jump table to allow patching in the future Change-Id: I57a885f7fc6290ea74a6096aea5b1867b2098eb7 Signed-off-by: Sathees Balya <sathees.balya@arm.com>
2018-11-22romlib: Allow patching of romlib functionsSathees Balya
This change allows patching of functions in the romlib. This can be done by adding "patch" at the end of the jump table entry for the function that needs to be patched in the file jmptbl.i. Functions patched in the jump table list will be built as part of the BL image and the romlib version will not be used Change-Id: Iefb200cb86e2a4b61ad3ee6180d3ecc39bad537f Signed-off-by: Sathees Balya <sathees.balya@arm.com>
2018-10-29PIE: Use PC relative adrp/adr for symbol referenceSoby Mathew
This patch fixes up the AArch64 assembly code to use adrp/adr instructions instead of ldr instruction for reference to symbols. This allows these assembly sequences to be Position Independant. Note that the the reference to sizes have been replaced with calculation of size at runtime. This is because size is a constant value and does not depend on execution address and using PC relative instructions for loading them makes them relative to execution address. Also we cannot use `ldr` instruction to load size as it generates a dynamic relocation entry which must *not* be fixed up and it is difficult for a dynamic loader to differentiate which entries need to be skipped. Change-Id: I8bf4ed5c58a9703629e5498a27624500ef40a836 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2018-08-03Add support for romlib in the build systemRoberto Vargas
Romlib is a new image that is stored in ROM and contains the code of several libraries that can be shared between different images. All the functions within in the library are accessed using a jump table which allows to update the romlib image whithout changing the binary compatibility. This jump table can be also stored in RAM and it can allow to patch a romlib with potential bugs fixes.. Change-Id: If980ccdaca24b7aaca900e32acc68baf6f94ab35 Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>