- 11 May, 2018 1 commit
-
-
Antonio Nino Diaz authored
Normally, BL33 needs to contain a boot loader like U-Boot or UEFI that eventually gives control to the OS. However, in some cases, this boot sequence may be too slow. For example, when doing tests in a cycle-accurate emulator, the user may only be interested in the interaction between the Trusted Firmware and the OS, not in the boot process itself. The new option ARM_LINUX_KERNEL_AS_BL33 allows BL33 to contain the Linux kernel image by changing the value of registers x0-x3 to the values expected by the kernel. This option requires the device tree blob (DTB) to be present in memory. Its address must be specified in the newly introduced ARM_PRELOADED_DTB_BASE build option. For now, it only supports AArch64 kernels. This option is only available when RESET_TO_BL31=1. For this reason the BL33 binary must be preloaded in memory and PRELOADED_BL33_BASE must be used. For example, if the kernel is loaded at 0x80080000 and the DTB is loaded at address 0x82000000, the firmware could be built like this: CROSS_COMPILE=aarch64-linux-gnu- \ make PLAT=fvp DEBUG=1 \ RESET_TO_BL31=1 \ ARM_LINUX_KERNEL_AS_BL33=1 \ PRELOADED_BL33_BASE=0x80080000 \ ARM_PRELOADED_DTB_BASE=0x82000000 \ all fip Change-Id: If9dc847c65ae2d0c27b51f0fd44fc06b28497db9 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
-
- 09 May, 2018 3 commits
-
-
Dimitris Papastamos authored
Compiler warnings
-
Roberto Vargas authored
When TF is compiled for aarch32 MAX_VIRT_ADDR_SPACE_SIZE is 2^32 in some cases, which makes the test (size) <= MAX_VIRT_ADDR_SPACE_SIZE a tautology because uintptr_t is a 32 bit value. The cast remove the warning for clang. Change-Id: I1345f3400f8fbbe4ffd3caa990a90e7ba593dba5 Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
-
Roberto Vargas authored
Using variables as format strings can generate security problems when the user can control those strings. Some compilers generate warnings in that cases, even when the variables are constants and are not controlled by the user. Change-Id: I65dee1d1b66feab38cbf298290a86fa56e6cca40 Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
-
- 08 May, 2018 2 commits
- 03 May, 2018 8 commits
-
-
danh-arm authored
Fix memory leaks in fiptool
-
danh-arm authored
xlat: Have all values of PARange for 8.x architectures
-
danh-arm authored
Remove the unused macro NDEBUG
-
danh-arm authored
checkpatch: Ignore SPDX_LICENSE_TAG
-
danh-arm authored
Fix the makefile to remove the cert_create executable on 'make realclean'
-
danh-arm authored
BL2_AT_EL3: do not try to disable MMU twice on AARCH32
-
danh-arm authored
smccc: Fix checkpatch error in header file
-
Jonathan Wright authored
Free desc->image->buffer before freeing desc->image. We make sure that the desc->image is non-null before attempting this. Change-Id: I35c5674629a41d7cf1a78b7b41ca4b930d0fb688 Signed-off-by: Jonathan Wright <jonathan.wright@arm.com>
-
- 02 May, 2018 2 commits
-
-
Antonio Nino Diaz authored
In AArch64, the field ID_AA64MMFR0_EL1.PARange has a different set of allowed values depending on the architecture version. Previously, we only compiled the Trusted Firmware with the values that were allowed by the architecture. However, given that this field is read-only, it is easier to compile the code with all values regardless of the target architecture. Change-Id: I57597ed103dd0189b1fb738a9ec5497391c10dd1 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
-
Antonio Nino Diaz authored
Change-Id: Ice141dcc17f504025f922acace94d98f84acba9e Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
-
- 01 May, 2018 8 commits
-
-
Evan Lloyd authored
The .editorconfig file provides an editor agnostic definition of a project's file format requirements. Details can be found at http://editorconfig.org/ This change should have little impact on users, but, it is hoped, will help those who move across projects avoid making mistakes because of foreign project editor configuration settings. Change-Id: I8776526b5ab96b543d3d3e445c60e06b62049e68 Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
-
danh-arm authored
Remove dtc warnings
-
danh-arm authored
poplar: rename FIP_ADD_IMG to TOOL_ADD_IMG
-
Roberto Vargas authored
The C standards specify that this macro is used to disable asserts but, in our code, the assert macro is controlled with ENABLE_ASSERTIONS. Having this macro here creates confusion about the behaviour of assert. Change-Id: Iab8689a14dc2b8790729857d56585ce43c0c4f51 Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
-
danh-arm authored
xlat: Set AP[1] to 1 when it is RES1
-
danh-arm authored
Add support for the SMC Calling Convention 2.0
-
Roberto Vargas authored
Previously mem_protect used to be only supported from BL2. This is not helpful in the case when ARM TF-A BL2 is not used. This patch demonstrates mem_protect from el3_runtime firmware on ARM Platforms specifically when RESET_TO_BL31 or RESET_TO_SP_MIN flag is set as BL2 may be absent in these cases. The Non secure DRAM is dynamically mapped into EL3 mmap tables temporarily and then the protected regions are then cleared. This avoids the need to map the non secure DRAM permanently to BL31/sp_min. The stack size is also increased, because DYNAMIC_XLAT_TABLES require a bigger stack. Change-Id: Ia44c594192ed5c5adc596c0cff2c7cc18c001fde Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
-
danh-arm authored
Use consistent int-ll64 typedefs for aarch32 and aarch64
-
- 30 Apr, 2018 1 commit
-
-
Jonathan Wright authored
Spurious whitespace existed in the BINARY shell variable which meant the cert_tool executable was not being removed on 'make realclean'. Change-Id: Ibfd2fd17889514f6613e33c6df58d53b9232ec14 Signed-off-by: Jonathan Wright <jonathan.wright@arm.com>
-
- 27 Apr, 2018 4 commits
-
-
Antonio Nino Diaz authored
The Linux kernel expects the SPDX license tag in the first line of each source code file in a comment. In the context of the Linux kernel repository this makes sense because they have many different license headers across their codebase. Moving the tag to the first line of the source code files makes it easier for analyzers to see the license of each file. In the Trusted Firmware, we control all headers and make sure that they follow the same pattern, so this is not needed. Change-Id: Ie19802c7b65b1bdd63da9ece64311aec1f8ad7fe Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
-
Masahiro Yamada authored
Since commit 031dbb12 ("AArch32: Add essential Arch helpers"), it is difficult to use consistent format strings for printf() family between aarch32 and aarch64. For example, uint64_t is defined as 'unsigned long long' for aarch32 and as 'unsigned long' for aarch64. Likewise, uintptr_t is defined as 'unsigned int' for aarch32, and as 'unsigned long' for aarch64. A problem typically arises when you use printf() in common code. One solution could be, to cast the arguments to a type long enough for both architectures. For example, if 'val' is uint64_t type, like this: printf("val = %llx\n", (unsigned long long)val); Or, somebody may suggest to use a macro provided by <inttypes.h>, like this: printf("val = %" PRIx64 "\n", val); But, both would make the code ugly. The solution adopted in Linux kernel is to use the same typedefs for all architectures. The fixed integer types in the kernel-space have been unified into int-ll64, like follows: typedef signed char int8_t; typedef unsigned char uint8_t; typedef signed short int16_t; typedef unsigned short uint16_t; typedef signed int int32_t; typedef unsigned int uint32_t; typedef signed long long int64_t; typedef unsigned long long uint64_t; [ Linux commit: 0c79a8e29b5fcbcbfd611daf9d500cfad8370fcf ] This gets along with the codebase shared between 32 bit and 64 bit, with the data model called ILP32, LP64, respectively. The width for primitive types is defined as follows: ILP32 LP64 int 32 32 long 32 64 long long 64 64 pointer 32 64 'long long' is 64 bit for both, so it is used for defining uint64_t. 'long' has the same width as pointer, so for uintptr_t. We still need an ifdef conditional for (s)size_t. All 64 bit architectures use "unsigned long" size_t, and most 32 bit architectures use "unsigned int" size_t. H8/300, S/390 are known as exceptions; they use "unsigned long" size_t despite their architecture is 32 bit. One idea for simplification might be to define size_t as 'unsigned long' across architectures, then forbid the use of "%z" string format. However, this would cause a distortion between size_t and sizeof() operator. We have unknowledge about the native type of sizeof(), so we need a guess of it anyway. I want the following formula to always return 1: __builtin_types_compatible_p(size_t, typeof(sizeof(int))) Fortunately, ARM is probably a majority case. As far as I know, all 32 bit ARM compilers use "unsigned int" size_t. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-
Masahiro Yamada authored
u_register_t is preferred rather than uint64_t. This is more consistent with the aarch32 implementation. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-
Masahiro Yamada authored
Commit 4c0d0390 ("Rework type usage in Trusted Firmware") changed the type usage in struct declarations, but did not touch the definition side. Fix the type mismatch. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-
- 26 Apr, 2018 3 commits
-
-
Yann Gautier authored
If BL2_AT_EL3 is enabled, bl2_run_next_image is called at the end of BL2. This function calls disable_mmu_icache_secure. It is then useless to call it in bl2_main in that case. fixes arm-software/tf-issues#582 Signed-off-by: Yann Gautier <yann.gautier@st.com>
-
Dimitris Papastamos authored
rockchip/rk3399: Fix sram_udelay
-
Antonio Nino Diaz authored
According to the ARMv8 ARM issue C.a: AP[1] is valid only for stage 1 of a translation regime that can support two VA ranges. It is RES 1 when stage 1 translations can support only one VA range. This means that, even though this bit is ignored, it should be set to 1 in the EL3 and EL2 translation regimes. For translation regimes consisting on EL0 and a higher regime this bit selects between control at EL0 or at the higher Exception level. The regimes that support two VA ranges are EL1&0 and EL2&0 (the later one is only available since ARMv8.1). This fix has to be applied to both versions of the translation tables library. Change-Id: If19aaf588551bac7aeb6e9a686cf0c2068e7c181 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
-
- 24 Apr, 2018 2 commits
-
-
Roberto Vargas authored
DTC generates warnings when unit names begin with 0, or when a node containing a reg or range property doesn't have a unit name in the node name. This patch fixes those cases. Change-Id: If24ec68ef3034fb3fcefb96c5625c47a0bbd8474 Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
-
Victor Chong authored
Fixes: f3d522be ("poplar: Support Trusted OS extra image (OP-TEE header) parsing") Signed-off-by: Victor Chong <victor.chong@linaro.org>
-
- 23 Apr, 2018 1 commit
-
-
Antonio Nino Diaz authored
Due to differences in the bitfields of the SMC IDs, it is not possible to support SMCCC 1.X and 2.0 at the same time. The behaviour of `SMCCC_MAJOR_VERSION` has changed. Now, it is a build option that specifies the major version of the SMCCC that the Trusted Firmware supports. The only two allowed values are 1 and 2, and it defaults to 1. The value of `SMCCC_MINOR_VERSION` is derived from it. Note: Support for SMCCC v2.0 is an experimental feature to enable prototyping of secure partition specifications. Support for this convention is disabled by default and could be removed without notice. Change-Id: I88abf9ccf08e9c66a13ce55c890edea54d9f16a7 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
-
- 21 Apr, 2018 1 commit
-
-
Masahiro Yamada authored
These are used locally in a file. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-
- 18 Apr, 2018 3 commits
-
-
Dimitris Papastamos authored
css/sgi575: enable ARM_PLAT_MT flag
-
Dimitris Papastamos authored
Fix some MISRA defects in SPM code
-
Sudipto Paul authored
SGI-575 platform is based on Cortex-A75 processor which has its MT bit in the MPIDR register set to '1'. So the Arm platform layer code has to be made aware of this. Signed-off-by: Sudipto Paul <sudipto.paul@arm.com>
-
- 17 Apr, 2018 1 commit
-
-
Antonio Nino Diaz authored
Change-Id: I989c1f4aef8e3cb20d5d19e6347575e6449bb60b Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
-