| 3279f625 | 04-Aug-2014 |
Dan Handley <dan.handley@arm.com> |
Simplify interface to TZC-400 driver
The TZC-400 driver previously allowed the possibility of multiple controller instances to be present in the same executable. This was unnecessary since there wil
Simplify interface to TZC-400 driver
The TZC-400 driver previously allowed the possibility of multiple controller instances to be present in the same executable. This was unnecessary since there will only ever be one instance.
This change simplifies the tzc_init() function to only take the base address argument needed by implementation, conforming to the driver initialization model of other drivers. It also hides some of the implementation details that were previously exposed by the API.
The FVP port has been updated accordingly.
THIS CHANGE REQUIRES ALL PLATFORM PORTS THAT USE THE TZC-400 DRIVER TO BE UPDATED
Fixes ARM-software/tf-issues#181
Change-Id: I7b721edf947064989958d8f457d6462d92e742c8
show more ...
|
| cae3ef99 | 04-Aug-2014 |
Dan Handley <dan.handley@arm.com> |
Remove platform dependency in CCI-400 driver
* Create cci_init() function in CCI-400 driver to allow platform to provide arguments needed by the driver (i.e. base address and cluster indices for
Remove platform dependency in CCI-400 driver
* Create cci_init() function in CCI-400 driver to allow platform to provide arguments needed by the driver (i.e. base address and cluster indices for the ACE slave interfaces).
* Rename cci_(en|dis)able_coherency to cci_(en|dis)able_cluster_coherency to make it clear that the driver only enables/disables the coherency of CPU clusters and not other devices connected to the CCI-400.
* Update FVP port to use new cci_init() function and remove unnecessary CCI defintions from platform_def.h. Also rename fvp_cci_setup() to fvp_cci_enable() to more clearly differentiate between CCI initialization and enabling.
THIS CHANGE REQUIRES PLATFORM PORTS THAT USE THE CCI-400 DRIVER TO BE UPDATED
Fixes ARM-software/tf-issues#168
Change-Id: I1946a51409b91217b92285b6375082619f607fec
show more ...
|
| dd2bdee6 | 28-Jul-2014 |
danh-arm <dan.handley@arm.com> |
Merge pull request #177 from jcastillo-arm/jc/tf-issues/096
Rework incorrect use of assert() and panic() in codebase |
| d3280beb | 05-Jun-2014 |
Juan Castillo <juan.castillo@arm.com> |
Rework incorrect use of assert() and panic() in codebase
Assert a valid security state using the macro sec_state_is_valid(). Replace assert() with panic() in those cases that might arise because of
Rework incorrect use of assert() and panic() in codebase
Assert a valid security state using the macro sec_state_is_valid(). Replace assert() with panic() in those cases that might arise because of runtime errors and not programming errors. Replace panic() with assert() in those cases that might arise because of programming errors.
Fixes ARM-software/tf-issues#96
Change-Id: I51e9ef0439fd5ff5e0edfef49050b69804bf14d5
show more ...
|
| 462c8350 | 14-Jul-2014 |
Soby Mathew <soby.mathew@arm.com> |
Parametrize baudrate and UART clock during console_init()
This patch adds baud rate and UART clock frequency as parameters to the pl011 driver api console_init(). This allows each platform to specif
Parametrize baudrate and UART clock during console_init()
This patch adds baud rate and UART clock frequency as parameters to the pl011 driver api console_init(). This allows each platform to specify UART clock and baud rate according to their specific hardware implementation.
Fixes ARM-software/tf-issues#215
Change-Id: Id13eef70a1c530e709b34dd1e6eb84db0797ced2
show more ...
|
| fce5f750 | 24-Jun-2014 |
Soby Mathew <soby.mathew@arm.com> |
Introduce asm console functions in TF
This patch replaces the pl011 console family of functions with their equivalents defined in assembly. The baud rate is defined by the PL011_BAUDRATE macro and I
Introduce asm console functions in TF
This patch replaces the pl011 console family of functions with their equivalents defined in assembly. The baud rate is defined by the PL011_BAUDRATE macro and IBRD and FBRD values for pl011 are computed statically. This patch will enable us to invoke the console functions without the C Runtime Stack.
Change-Id: Ic3f7b7370ded38bf9020bf746b362081b76642c7
show more ...
|
| 1e8c5c4f | 20-Jun-2014 |
Dan Handley <dan.handley@arm.com> |
Refactor fvp gic code to be a generic driver
Refactor the FVP gic code in plat/fvp/fvp_gic.c to be a generic ARM GIC driver in drivers/arm/gic/arm_gic.c. Provide the platform specific inputs in the
Refactor fvp gic code to be a generic driver
Refactor the FVP gic code in plat/fvp/fvp_gic.c to be a generic ARM GIC driver in drivers/arm/gic/arm_gic.c. Provide the platform specific inputs in the arm_gic_setup() function so that the driver has no explicit dependency on platform code.
Provide weak implementations of the platform interrupt controller API in a new file, plat/common/plat_gic.c. These simply call through to the ARM GIC driver.
Move the only remaining FVP GIC function, fvp_gic_init() to plat/fvp/aarch64/fvp_common.c and remove plat/fvp/fvp_gic.c
Fixes ARM-software/tf-issues#182
Change-Id: Iea82fe095fad62dd33ba9efbddd48c57717edd21
show more ...
|
| 0695dc49 | 20-Jun-2014 |
Andrew Thoelke <andrew.thoelke@arm.com> |
Remove broken assertion in console_putc()
The assertion in console_putc() would trigger a recursion that exhausts the stack and eventually aborts.
This patch replaces the assertion with an error re
Remove broken assertion in console_putc()
The assertion in console_putc() would trigger a recursion that exhausts the stack and eventually aborts.
This patch replaces the assertion with an error return if the console has not been initialized yet.
Fixes ARM-software/tf-issues#208
Change-Id: I95f736ff215d69655eb5ba7ceac70dc1409d986a
show more ...
|
| 5c633bdf | 16-Jun-2014 |
danh-arm <dan.handley@arm.com> |
Merge pull request #130 from athoelke/at/inline-asm-sysreg-v2
Make system register functions inline assembly v2 |
| 5c3272a7 | 02-Jun-2014 |
Andrew Thoelke <andrew.thoelke@arm.com> |
Make system register functions inline assembly
Replace the current out-of-line assembler implementations of the system register and system instruction operations with inline assembler.
This enables
Make system register functions inline assembly
Replace the current out-of-line assembler implementations of the system register and system instruction operations with inline assembler.
This enables better compiler optimisation and code generation when accessing system registers.
Fixes ARM-software/tf-issues#91
Change-Id: I149af3a94e1e5e5140a3e44b9abfc37ba2324476
show more ...
|
| d831af90 | 02-Jun-2014 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
PL011: Fix a bug in the UART FIFO polling
Before attempting to write a character, the PL011 driver polls the PL011_UARTFR_TXFF bit to know whether the UART FIFO is full. However, the comparison with
PL011: Fix a bug in the UART FIFO polling
Before attempting to write a character, the PL011 driver polls the PL011_UARTFR_TXFF bit to know whether the UART FIFO is full. However, the comparison with 1 was incorrect because PL011_UARTFR_TXFF is not at bit 0. This patch fixes it.
Change-Id: If78892345bbdc8a5e4ae4a1b7159753c609681b0
show more ...
|
| 5f0cdb05 | 14-May-2014 |
Dan Handley <dan.handley@arm.com> |
Split platform.h into separate headers
Previously, platform.h contained many declarations and definitions used for different purposes. This file has been split so that:
* Platform definitions used
Split platform.h into separate headers
Previously, platform.h contained many declarations and definitions used for different purposes. This file has been split so that:
* Platform definitions used by common code that must be defined by the platform are now in platform_def.h. The exact include path is exported through $PLAT_INCLUDES in the platform makefile.
* Platform definitions specific to the FVP platform are now in /plat/fvp/fvp_def.h.
* Platform API declarations specific to the FVP platform are now in /plat/fvp/fvp_private.h.
* The remaining platform API declarations that must be ported by each platform are still in platform.h but this file has been moved to /include/plat/common since this can be shared by all platforms.
Change-Id: Ieb3bb22fbab3ee8027413c6b39a783534aee474a
show more ...
|
| e1333f75 | 09-May-2014 |
Achin Gupta <achin.gupta@arm.com> |
Introduce interrupt registration framework in BL3-1
This patch introduces a framework for registering interrupts routed to EL3. The interrupt routing model is governed by the SCR_EL3.IRQ and FIQ bit
Introduce interrupt registration framework in BL3-1
This patch introduces a framework for registering interrupts routed to EL3. The interrupt routing model is governed by the SCR_EL3.IRQ and FIQ bits and the security state an interrupt is generated in. The framework recognizes three type of interrupts depending upon which exception level and security state they should be handled in i.e. Secure EL1 interrupts, Non-secure interrupts and EL3 interrupts. It provides an API and macros that allow a runtime service to register an handler for a type of interrupt and specify the routing model. The framework validates the routing model and uses the context management framework to ensure that it is applied to the SCR_EL3 prior to entry into the target security state. It saves the handler in internal data structures. An API is provided to retrieve the handler when an interrupt of a particular type is asserted. Registration is expected to be done once by the primary CPU. The same handler and routing model is used for all CPUs.
Support for EL3 interrupts will be added to the framework in the future. A makefile flag has been added to allow the FVP port choose between ARM GIC v2 and v3 support in EL3. The latter version is currently unsupported.
A framework for handling interrupts in BL3-1 will be introduced in subsequent patches. The default routing model in the absence of any handlers expects no interrupts to be routed to EL3.
Change-Id: Idf7c023b34fcd4800a5980f2bef85e4b5c29e649
show more ...
|
| a43d431b | 07-Apr-2014 |
Soby Mathew <soby.mathew@arm.com> |
Rework BL3-1 unhandled exception handling and reporting
This patch implements the register reporting when unhandled exceptions are taken in BL3-1. Unhandled exceptions will result in a dump of regis
Rework BL3-1 unhandled exception handling and reporting
This patch implements the register reporting when unhandled exceptions are taken in BL3-1. Unhandled exceptions will result in a dump of registers to the console, before halting execution by that CPU. The Crash Stack, previously called the Exception Stack, is used for this activity. This stack is used to preserve the CPU context and runtime stack contents for debugging and analysis.
This also introduces the per_cpu_ptr_cache, referenced by tpidr_el3, to provide easy access to some of BL3-1 per-cpu data structures. Initially, this is used to provide a pointer to the Crash stack.
panic() now prints the the error file and line number in Debug mode and prints the PC value in release mode.
The Exception Stack is renamed to Crash Stack with this patch. The original intention of exception stack is no longer valid since we intend to support several valid exceptions like IRQ and FIQ in the trusted firmware context. This stack is now utilized for dumping and reporting the system state when a crash happens and hence the rename.
Fixes ARM-software/tf-issues#79 Improve reporting of unhandled exception
Change-Id: I260791dc05536b78547412d147193cdccae7811a
show more ...
|
| 42a52d89 | 28-Apr-2014 |
Juan Castillo <juan.castillo@arm.com> |
Fix C accessors to GIC distributor registers with set/clear semantics
This patch fixes C accessors to GIC registers that follow a set/clear semantic to change the state of an interrupt, instead of r
Fix C accessors to GIC distributor registers with set/clear semantics
This patch fixes C accessors to GIC registers that follow a set/clear semantic to change the state of an interrupt, instead of read/write/modify. These registers are: Set-Enable Clear-Enable Set-Pending Clear-Pending Set-Active Clear-Active For instance, to enable an interrupt we write a one to the corresponding bit in the Set-Enable register, whereas to disable it we write a one to the corresponding bit in the Clear-Enable register.
Fixes ARM-software/tf-issues#137
Change-Id: I3b66bad94d0b28e0fe08c9042bac0bf5ffa07944
show more ...
|
| 8cec598b | 28-Apr-2014 |
Andrew Thoelke <andrew.thoelke@arm.com> |
Correct usage of data and instruction barriers
The current code does not always use data and instruction barriers as required by the architecture and frequently uses barriers excessively due to thei
Correct usage of data and instruction barriers
The current code does not always use data and instruction barriers as required by the architecture and frequently uses barriers excessively due to their inclusion in all of the write_*() helper functions.
Barriers should be used explicitly in assembler or C code when modifying processor state that requires the barriers in order to enable review of correctness of the code.
This patch removes the barriers from the helper functions and introduces them as necessary elsewhere in the code.
PORTING NOTE: check any port of Trusted Firmware for use of system register helper functions for reliance on the previous barrier behaviour and add explicit barriers as necessary.
Fixes ARM-software/tf-issues#92
Change-Id: Ie63e187404ff10e0bdcb39292dd9066cb84c53bf
show more ...
|
| 97043ac9 | 09-Apr-2014 |
Dan Handley <dan.handley@arm.com> |
Reduce deep nesting of header files
Reduce the number of header files included from other header files as much as possible without splitting the files. Use forward declarations where possible. This
Reduce deep nesting of header files
Reduce the number of header files included from other header files as much as possible without splitting the files. Use forward declarations where possible. This allows removal of some unnecessary "#ifndef __ASSEMBLY__" statements.
Also, review the .c and .S files for which header files really need including and reorder the #include statements alphabetically.
Fixes ARM-software/tf-issues#31
Change-Id: Iec92fb976334c77453e010b60bcf56f3be72bd3e
show more ...
|
| fb037bfb | 10-Apr-2014 |
Dan Handley <dan.handley@arm.com> |
Always use named structs in header files
Add tag names to all unnamed structs in header files. This allows forward declaration of structs, which is necessary to reduce header file nesting (to be imp
Always use named structs in header files
Add tag names to all unnamed structs in header files. This allows forward declaration of structs, which is necessary to reduce header file nesting (to be implemented in a subsequent commit).
Also change the typedef names across the codebase to use the _t suffix to be more conformant with the Linux coding style. The coding style actually prefers us not to use typedefs at all but this is considered a step too far for Trusted Firmware.
Also change the IO framework structs defintions to use typedef'd structs to be consistent with the rest of the codebase.
Change-Id: I722b2c86fc0d92e4da3b15e5cab20373dd26786f
show more ...
|
| 8a4fb6f6 | 17-Apr-2014 |
Dan Handley <dan.handley@arm.com> |
Refactor GIC header files
Move the function prototypes from gic.h into either gic_v2.h or gic_v3.h as appropriate. Update the source files to include the correct headers.
Change-Id: I368cfda175cdcb
Refactor GIC header files
Move the function prototypes from gic.h into either gic_v2.h or gic_v3.h as appropriate. Update the source files to include the correct headers.
Change-Id: I368cfda175cdcbd3a68f46e2332738ec49048e19
show more ...
|
| 35e98e55 | 09-Apr-2014 |
Dan Handley <dan.handley@arm.com> |
Make use of user/system includes more consistent
Make codebase consistent in its use of #include "" syntax for user includes and #include <> syntax for system includes.
Fixes ARM-software/tf-issues
Make use of user/system includes more consistent
Make codebase consistent in its use of #include "" syntax for user includes and #include <> syntax for system includes.
Fixes ARM-software/tf-issues#65
Change-Id: If2f7c4885173b1fd05ac2cde5f1c8a07000c7a33
show more ...
|
| 4ecca339 | 09-Apr-2014 |
Dan Handley <dan.handley@arm.com> |
Move include and source files to logical locations
Move almost all system include files to a logical sub-directory under ./include. The only remaining system include directories not under ./include
Move include and source files to logical locations
Move almost all system include files to a logical sub-directory under ./include. The only remaining system include directories not under ./include are specific to the platform. Move the corresponding source files to match the include directory structure.
Also remove pm.h as it is no longer used.
Change-Id: Ie5ea6368ec5fad459f3e8a802ad129135527f0b3
show more ...
|
| cd116d17 | 01-Apr-2014 |
Harry Liebel <Harry.Liebel@arm.com> |
Add TrustZone (TZC-400) driver
The TZC-400 performs security checks on transactions to memory or peripherals. Separate regions can be created in the address space each with individual security setti
Add TrustZone (TZC-400) driver
The TZC-400 performs security checks on transactions to memory or peripherals. Separate regions can be created in the address space each with individual security settings.
Limitations: This driver does not currently support raising an interrupt on access violation.
Change-Id: Idf8ed64b4d8d218fc9b6f9d75acdb2cd441d2449
show more ...
|
| d72f6e31 | 14-Apr-2014 |
Dan Handley <dan.handley@arm.com> |
Move console.c to pl011 specific driver location
Rename drivers/console/console.c to drivers/arm/peripherals/pl011/pl011_console.c. This makes it clear that this is a pl011 specific console implemen
Move console.c to pl011 specific driver location
Rename drivers/console/console.c to drivers/arm/peripherals/pl011/pl011_console.c. This makes it clear that this is a pl011 specific console implementation.
Fixes ARM-software/tf-issues#129
Change-Id: Ie2f8109602134c5b86993e32452c70734c45a3ed
show more ...
|
| c1df3be7 | 12-Mar-2014 |
Soby Mathew <soby.mathew@arm.com> |
Move console functions out of pl011.c
This commit isolates the accessor functions in pl011.c and builds a wrapper layer for console functions.
This also modifies the console driver to use the pl011
Move console functions out of pl011.c
This commit isolates the accessor functions in pl011.c and builds a wrapper layer for console functions.
This also modifies the console driver to use the pl011 FIFO.
Fixes ARM-software/tf-issues#63
Change-Id: I3b402171cd14a927831bf5e5d4bb310b6da0e9a8
show more ...
|
| 8aa0cd43 | 09-Feb-2014 |
Achin Gupta <achin.gupta@arm.com> |
Specify address of UART device to use as a console
This patch adds the ability to specify the base address of a UART device for initialising the console. This allows a boot loader stage to use a dif
Specify address of UART device to use as a console
This patch adds the ability to specify the base address of a UART device for initialising the console. This allows a boot loader stage to use a different UART device from UART0 (default) for the console.
Change-Id: Ie60b927389ae26085cfc90d22a564ff83ba62955
show more ...
|