| 1ffecc24 | 27-Jan-2016 |
Haojian Zhuang <haojian.zhuang@linaro.org> |
gpio: add gpio framework
Define the gpio ops in gpio driver.
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> |
| 4a966306 | 11-Feb-2016 |
danh-arm <dan.handley@arm.com> |
Merge pull request #517 from soby-mathew/sm/gic_set_prio_fix
Fix IPRIORITY and ITARGET accessors in GIC drivers |
| e9ec3cec | 01-Feb-2016 |
Soby Mathew <soby.mathew@arm.com> |
Move private APIs in gic_common.h to a private header
This patch moves the private GIC common accessors from `gic_common.h` to a new private header file `gic_common_private.h`. This patch also adds
Move private APIs in gic_common.h to a private header
This patch moves the private GIC common accessors from `gic_common.h` to a new private header file `gic_common_private.h`. This patch also adds additional comments to GIC register accessors to highlight the fact that some of them access register values that correspond to multiple interrupt IDs. The convention used is that the `set`, `get` and `clr` accessors access and modify the values corresponding to a single interrupt ID whereas the `read` and `write` GIC register accessors access the raw GIC registers and it could correspond to multiple interrupt IDs depending on the register accessed.
Change-Id: I2643ecb2533f01e3d3219fcedfb5f80c120622f9
show more ...
|
| 38a78614 | 15-Jan-2016 |
Soby Mathew <soby.mathew@arm.com> |
Fix GIC_IPRIORITYR setting in new drivers
The code to set the interrupt priority for secure interrupts in the new GICv2 and GICv3 drivers is incorrect. The setup code to configure interrupt prioriti
Fix GIC_IPRIORITYR setting in new drivers
The code to set the interrupt priority for secure interrupts in the new GICv2 and GICv3 drivers is incorrect. The setup code to configure interrupt priorities of secure interrupts, one interrupt at a time, used gicd_write_ipriorityr()/gicr_write_ipriority() function affecting 4 interrupts at a time. This bug did not manifest itself because all the secure interrupts were configured to the highest secure priority(0) during cold boot and the adjacent non secure interrupt priority would be configured later by the normal world. This patch introduces new accessors, gicd_set_ipriorityr() and gicr_set_ipriorityr(), for configuring priority one interrupt at a time and fixes the the setup code to use the new accessors.
Fixes ARM-software/tf-issues#344
Change-Id: I470fd74d2b7fce7058b55d83f604be05a27e1341
show more ...
|
| a91e12fb | 15-Jan-2016 |
Soby Mathew <soby.mathew@arm.com> |
Fix race in GIC IPRIORITY and ITARGET accessors
GICD_IPRIORITYR and GICD_ITARGETSR specifically support byte addressing so that individual interrupt priorities can be atomically updated by issuing a
Fix race in GIC IPRIORITY and ITARGET accessors
GICD_IPRIORITYR and GICD_ITARGETSR specifically support byte addressing so that individual interrupt priorities can be atomically updated by issuing a single byte write. The previous implementation of gicd_set_ipriority() and gicd_set_itargetsr() used 32-bit register accesses, modifying values for 4 interrupts at a time, using a read-modify-write approach. This potentially may cause concurrent changes by other CPUs to the adjacent interrupts to be corrupted. This patch fixes the issue by modifying these accessors to use byte addressing.
Fixes ARM-software/tf-issues#343
Change-Id: Iec28b5f5074045b00dfb8d5f5339b685f9425915
show more ...
|
| 3105f7ba | 04-Jan-2016 |
Vikram Kanigiri <vikram.kanigiri@arm.com> |
Bug fix: Rectify logic to enter or exit from DVM domain
Currently, `ccn_snoop_dvm_domain_common()` is responsible for providing a bitmap of HN-F and HN-I nodes in the interconnect. There is a reques
Bug fix: Rectify logic to enter or exit from DVM domain
Currently, `ccn_snoop_dvm_domain_common()` is responsible for providing a bitmap of HN-F and HN-I nodes in the interconnect. There is a request node (RN) corresponding to the master interface (e.g. cluster) that needs to be added or removed from the snoop/DVM domain. This request node is removed from or added to each HN-F or HN-I node present in the bitmap depending upon the type of domain.
The above logic is incorrect when participation of a master interface in the DVM domain has to be managed. The request node should be removed from or added to the single Miscellaneous Node (MN) in the system instead of each HN-I node.
This patch fixes this by removing the intermediate `ccn_snoop_dvm_domain_common()` and instead reads the MN registers to get the needed node Id bitmap for snoop(HN-F bitmap) and DVM(MN bitmap) domains.
Additionally, it renames `MN_DDC_SET_OFF` to `MN_DDC_SET_OFFSET` to be inline with other macros.
Change-Id: Id896046dd0ccc5092419e74f8ac85e31b104f7a4
show more ...
|
| 51b57481 | 01-Feb-2016 |
danh-arm <dan.handley@arm.com> |
Merge pull request #501 from jcastillo-arm/jc/tf-issues/300
Disable PL011 UART before configuring it |
| 9400b40e | 26-Nov-2015 |
Juan Castillo <juan.castillo@arm.com> |
Disable PL011 UART before configuring it
The PL011 TRM (ARM DDI 0183G) specifies that the UART must be disabled before any of the control registers are programmed. The PL011 driver included in TF do
Disable PL011 UART before configuring it
The PL011 TRM (ARM DDI 0183G) specifies that the UART must be disabled before any of the control registers are programmed. The PL011 driver included in TF does not disable the UART, so the initialization in BL2 and BL31 is violating this requirement (and potentially in BL1 if the UART is enabled after reset).
This patch modifies the initialization function in the PL011 console driver to disable the UART before programming the control registers.
Register clobber list and documentation updated.
Fixes ARM-software/tf-issues#300
Change-Id: I839b2d681d48b03f821ac53663a6a78e8b30a1a1
show more ...
|
| 65cd299f | 14-Jan-2016 |
Soren Brinkmann <soren.brinkmann@xilinx.com> |
Remove direct usage of __attribute__((foo))
Migrate all direct usage of __attribute__ to usage of their corresponding macros from cdefs.h. e.g.: - __attribute__((unused)) -> __unused
Signed-off-by
Remove direct usage of __attribute__((foo))
Migrate all direct usage of __attribute__ to usage of their corresponding macros from cdefs.h. e.g.: - __attribute__((unused)) -> __unused
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
show more ...
|
| d37b2098 | 06-Jan-2016 |
danh-arm <dan.handley@arm.com> |
Merge pull request #478 from sandrine-bailleux/sb/mbed-tls-pedantic
Always build with '-pedantic' |
| aa856917 | 04-Jan-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Always build with '-pedantic'
By default ARM TF is built with the '-pedantic' compiler flag, which helps detecting violations of the C standard. However, the mbed TLS library and its associated auth
Always build with '-pedantic'
By default ARM TF is built with the '-pedantic' compiler flag, which helps detecting violations of the C standard. However, the mbed TLS library and its associated authentication module in TF used to fail building with this compiler flag. As a workaround, the mbed TLS authentication module makefile used to set the 'DISABLE_PEDANTIC' TF build flag.
The compiler errors flagged by '-pedantic' in the mbed TLS library have been fixed between versions 1.3.9 and 2.2.0 and the library now properly builds with this compiler flag.
This patch fixes the remaining compiler errors in the mbed TLS authentication module in TF and unsets the 'DISABLE_PEDANTIC' TF build flag. This means that TF is now always built with '-pedantic'.
In particular, this patch:
* Removes the final semi-colon in REGISTER_COT() macro.
This semi-colon was causing the following error message:
drivers/auth/tbbr/tbbr_cot.c:544:23: error: ISO C does not allow extra ';' outside of a function [-Werror=pedantic]
This has been fixed both in the mbed TLS authentication module as well as in the certificate generation tool. Note that the latter code didn't need fixing since it is not built with '-pedantic' but the change has been propagated for consistency.
Also fixed the REGISTER_KEYS() and REGISTER_EXTENSIONS() macros, which were suffering from the same issue.
* Fixes a pointer type.
It was causing the following error message:
drivers/auth/mbedtls/mbedtls_crypto.c: In function 'verify_hash': drivers/auth/mbedtls/mbedtls_crypto.c:177:42: error: pointer of type 'void *' used in arithmetic [-Werror=pointer-arith]
Change-Id: I7b7a04ef711efd65e17b5be26990d1a0d940257d
show more ...
|
| c85a15fc | 31-Dec-2015 |
Jimmy Huang <jimmy.huang@mediatek.com> |
Add ret to return from console_uninit() function
The 'ret' was missing in console_uninit() implementation, so the program doesn't return from console_uninit(). Instead, it keeps executing the follow
Add ret to return from console_uninit() function
The 'ret' was missing in console_uninit() implementation, so the program doesn't return from console_uninit(). Instead, it keeps executing the following instructions which is not expected.
Change-Id: I810684f37f61c41c6f95a3bb36914d0765da8571 Signed-off-by: Jimmy Huang <jimmy.huang@mediatek.com>
show more ...
|
| f59821d5 | 10-Dec-2015 |
Juan Castillo <juan.castillo@arm.com> |
Replace all SCP FW (BL0, BL3-0) references
This patch replaces all references to the SCP Firmware (BL0, BL30, BL3-0, bl30) with the image terminology detailed in the TF wiki (https://github.com/ARM-
Replace all SCP FW (BL0, BL3-0) references
This patch replaces all references to the SCP Firmware (BL0, BL30, BL3-0, bl30) with the image terminology detailed in the TF wiki (https://github.com/ARM-software/arm-trusted-firmware/wiki):
BL0 --> SCP_BL1 BL30, BL3-0 --> SCP_BL2 bl30 --> scp_bl2
This change affects code, documentation, build system, tools and platform ports that load SCP firmware. ARM plaforms have been updated to the new porting API.
IMPORTANT: build option to specify the SCP FW image has changed:
BL30 --> SCP_BL2
IMPORTANT: This patch breaks compatibility for platforms that use BL2 to load SCP firmware. Affected platforms must be updated as follows:
BL30_IMAGE_ID --> SCP_BL2_IMAGE_ID BL30_BASE --> SCP_BL2_BASE bl2_plat_get_bl30_meminfo() --> bl2_plat_get_scp_bl2_meminfo() bl2_plat_handle_bl30() --> bl2_plat_handle_scp_bl2()
Change-Id: I24c4c1a4f0e4b9f17c9e4929da815c4069549e58
show more ...
|
| 516beb58 | 03-Dec-2015 |
Juan Castillo <juan.castillo@arm.com> |
TBB: apply TBBR naming convention to certificates and extensions
This patch applies the TBBR naming convention to the certificates and the corresponding extensions defined by the CoT:
* Certifi
TBB: apply TBBR naming convention to certificates and extensions
This patch applies the TBBR naming convention to the certificates and the corresponding extensions defined by the CoT:
* Certificate UUID names * Certificate identifier names * OID names
Changes apply to:
* Generic code (variables and defines) * The default certificate identifiers provided in the generic code * Build system * ARM platforms port * cert_create tool internal definitions * fip_create and cert_create tools command line options * Documentation
IMPORTANT: this change breaks the compatibility with platforms that use TBBR. The platform will need to adapt the identifiers and OIDs to the TBBR naming convention introduced by this patch:
Certificate UUIDs:
UUID_TRUSTED_BOOT_FIRMWARE_BL2_CERT --> UUID_TRUSTED_BOOT_FW_CERT UUID_SCP_FIRMWARE_BL30_KEY_CERT --> UUID_SCP_FW_KEY_CERT UUID_SCP_FIRMWARE_BL30_CERT --> UUID_SCP_FW_CONTENT_CERT UUID_EL3_RUNTIME_FIRMWARE_BL31_KEY_CERT --> UUID_SOC_FW_KEY_CERT UUID_EL3_RUNTIME_FIRMWARE_BL31_CERT --> UUID_SOC_FW_CONTENT_CERT UUID_SECURE_PAYLOAD_BL32_KEY_CERT --> UUID_TRUSTED_OS_FW_KEY_CERT UUID_SECURE_PAYLOAD_BL32_CERT --> UUID_TRUSTED_OS_FW_CONTENT_CERT UUID_NON_TRUSTED_FIRMWARE_BL33_KEY_CERT --> UUID_NON_TRUSTED_FW_KEY_CERT UUID_NON_TRUSTED_FIRMWARE_BL33_CERT --> UUID_NON_TRUSTED_FW_CONTENT_CERT
Certificate identifiers:
BL2_CERT_ID --> TRUSTED_BOOT_FW_CERT_ID BL30_KEY_CERT_ID --> SCP_FW_KEY_CERT_ID BL30_CERT_ID --> SCP_FW_CONTENT_CERT_ID BL31_KEY_CERT_ID --> SOC_FW_KEY_CERT_ID BL31_CERT_ID --> SOC_FW_CONTENT_CERT_ID BL32_KEY_CERT_ID --> TRUSTED_OS_FW_KEY_CERT_ID BL32_CERT_ID --> TRUSTED_OS_FW_CONTENT_CERT_ID BL33_KEY_CERT_ID --> NON_TRUSTED_FW_KEY_CERT_ID BL33_CERT_ID --> NON_TRUSTED_FW_CONTENT_CERT_ID
OIDs:
TZ_FW_NVCOUNTER_OID --> TRUSTED_FW_NVCOUNTER_OID NTZ_FW_NVCOUNTER_OID --> NON_TRUSTED_FW_NVCOUNTER_OID BL2_HASH_OID --> TRUSTED_BOOT_FW_HASH_OID TZ_WORLD_PK_OID --> TRUSTED_WORLD_PK_OID NTZ_WORLD_PK_OID --> NON_TRUSTED_WORLD_PK_OID BL30_CONTENT_CERT_PK_OID --> SCP_FW_CONTENT_CERT_PK_OID BL30_HASH_OID --> SCP_FW_HASH_OID BL31_CONTENT_CERT_PK_OID --> SOC_FW_CONTENT_CERT_PK_OID BL31_HASH_OID --> SOC_AP_FW_HASH_OID BL32_CONTENT_CERT_PK_OID --> TRUSTED_OS_FW_CONTENT_CERT_PK_OID BL32_HASH_OID --> TRUSTED_OS_FW_HASH_OID BL33_CONTENT_CERT_PK_OID --> NON_TRUSTED_FW_CONTENT_CERT_PK_OID BL33_HASH_OID --> NON_TRUSTED_WORLD_BOOTLOADER_HASH_OID BL2U_HASH_OID --> AP_FWU_CFG_HASH_OID SCP_BL2U_HASH_OID --> SCP_FWU_CFG_HASH_OID NS_BL2U_HASH_OID --> FWU_HASH_OID
Change-Id: I1e047ae046299ca913911c39ac3a6e123bd41079
show more ...
|
| a84deb9c | 10-Dec-2015 |
danh-arm <dan.handley@arm.com> |
Merge pull request #465 from jcastillo-arm/jc/tbb_mbedtls_2_x
Move up to mbed TLS 2.x |
| 649dbf6f | 05-Nov-2015 |
Juan Castillo <juan.castillo@arm.com> |
Move up to mbed TLS 2.x
The mbed TLS library has introduced some changes in the API from the 1.3.x to the 2.x releases. Using the 2.x releases requires some changes to the crypto and transport modul
Move up to mbed TLS 2.x
The mbed TLS library has introduced some changes in the API from the 1.3.x to the 2.x releases. Using the 2.x releases requires some changes to the crypto and transport modules.
This patch updates both modules to the mbed TLS 2.x API.
All references to the mbed TLS library in the code or documentation have been updated to 'mbed TLS'. Old references to PolarSSL have been updated to 'mbed TLS'.
User guide updated to use mbed TLS 2.2.0.
NOTE: moving up to mbed TLS 2.x from 1.3.x is not backward compatible. Applying this patch will require an mbed TLS 2.x release to be used. Also note that the mbed TLS license changed to Apache version 2.0.
Change-Id: Iba4584408653cf153091f2ca2ee23bc9add7fda4
show more ...
|
| 0c3a0b91 | 10-Dec-2015 |
danh-arm <dan.handley@arm.com> |
Merge pull request #463 from jcastillo-arm/jc/tf-issues/216
De-feature PL011 UART driver to match generic UART spec |
| 12f654b6 | 16-Nov-2015 |
Juan Castillo <juan.castillo@arm.com> |
De-feature PL011 UART driver to match generic UART spec
The Server Base System Architecture document (ARM-DEN-0029) specifies a generic UART device. The programmer's view of this generic UART is a s
De-feature PL011 UART driver to match generic UART spec
The Server Base System Architecture document (ARM-DEN-0029) specifies a generic UART device. The programmer's view of this generic UART is a subset of the ARM PL011 UART. However, the current PL011 driver in Trusted Firmware uses some features that are outside the generic UART specification.
This patch modifies the PL011 driver to exclude features outside the SBSA generic UART specification by setting the boolean build option 'PL011_GENERIC_UART=1'. Default value is 0 (use full PL011 features).
User guide updated.
Fixes ARM-software/tf-issues#216
Change-Id: I6e0eb86f9d69569bc3980fb57e70d6da5d91a737
show more ...
|
| 7ee2b8b3 | 09-Dec-2015 |
danh-arm <dan.handley@arm.com> |
Merge pull request #462 from soby-mathew/sm/runtime_console
Enable BL31 to configure a runtime console |
| 48bfb88e | 10-Oct-2015 |
Yatharth Kochar <yatharth.kochar@arm.com> |
FWU: Add Generic Firmware Update framework support in BL1
Firmware update(a.k.a FWU) feature is part of the TBB architecture. BL1 is responsible for carrying out the FWU process if platform specific
FWU: Add Generic Firmware Update framework support in BL1
Firmware update(a.k.a FWU) feature is part of the TBB architecture. BL1 is responsible for carrying out the FWU process if platform specific code detects that it is needed.
This patch adds support for FWU feature support in BL1 which is included by enabling `TRUSTED_BOARD_BOOT` compile time flag.
This patch adds bl1_fwu.c which contains all the core operations of FWU, which are; SMC handler, image copy, authentication, execution and resumption. It also adds bl1.h introducing #defines for all BL1 SMCs.
Following platform porting functions are introduced:
int bl1_plat_mem_check(uintptr_t mem_base, unsigned int mem_size, unsigned int flags); This function can be used to add platform specific memory checks for the provided base/size for the given security state. The weak definition will invoke `assert()` and return -ENOMEM.
__dead2 void bl1_plat_fwu_done(void *cookie, void *reserved); This function can be used to initiate platform specific procedure to mark completion of the FWU process. The weak definition waits forever calling `wfi()`.
plat_bl1_common.c contains weak definitions for above functions.
FWU process starts when platform detects it and return the image_id other than BL2_IMAGE_ID by using `bl1_plat_get_next_image_id()` in `bl1_main()`.
NOTE: User MUST provide platform specific real definition for bl1_plat_mem_check() in order to use it for Firmware update.
Change-Id: Ice189a0885d9722d9e1dd03f76cac1aceb0e25ed
show more ...
|
| 487461cb | 28-Oct-2015 |
Soby Mathew <soby.mathew@arm.com> |
Introduce console_uninit() API in ARM Trusted Firmware
Allowing console base address to be set to NULL conveniently allows console driver to ignore further invocations to console_putc() and console_
Introduce console_uninit() API in ARM Trusted Firmware
Allowing console base address to be set to NULL conveniently allows console driver to ignore further invocations to console_putc() and console_getc(). This patch adds `console_uninit()` API to the console driver which sets console base address as NULL. The BL images can invoke this API to finish the use of console and ignore any further invocations to print to the console.
Change-Id: I00a1762b3e0b7c55f2be2f9c4c9bee3967189dde
show more ...
|
| 7e473eae | 09-Dec-2015 |
danh-arm <dan.handley@arm.com> |
Merge pull request #458 from soby-mathew/sm/rem_tzc_base_assert
Remove the assert for TZC base during initialization |
| b07b1ff5 | 07-Dec-2015 |
Soby Mathew <soby.mathew@arm.com> |
Remove the assert for TZC base during initialization
When resuming from system suspend the TZC needs to be re-initialized. Hence the assertion for TZC base address to detect re-initialization is rem
Remove the assert for TZC base during initialization
When resuming from system suspend the TZC needs to be re-initialized. Hence the assertion for TZC base address to detect re-initialization is removed.
Change-Id: I53d64146f6c919e95526441bb997f7b309c68141
show more ...
|
| 03ffb6bd | 03-Dec-2015 |
Soby Mathew <soby.mathew@arm.com> |
Rename GICv3 interrupt group macros
This patch renames the GICv3 interrupt group macros from INT_TYPE_G0, INT_TYPE_G1S and INT_TYPE_G1NS to INTR_GROUP0, INTR_GROUP1S and INTR_GROUP1NS respectively.
Rename GICv3 interrupt group macros
This patch renames the GICv3 interrupt group macros from INT_TYPE_G0, INT_TYPE_G1S and INT_TYPE_G1NS to INTR_GROUP0, INTR_GROUP1S and INTR_GROUP1NS respectively.
Change-Id: I40c66f589ce6234fa42205adcd91f7d6ad8f33d4
show more ...
|
| f3974ea5 | 02-Dec-2015 |
danh-arm <dan.handley@arm.com> |
Merge pull request #446 from vikramkanigiri/vk/tzc-400
Fix TZC-400 peripheral detection |