| 609ebce4 | 20-Oct-2015 |
Vikram Kanigiri <vikram.kanigiri@arm.com> |
Fix TZC-400 peripheral detection
The TZC-400 driver implementation incorrectly uses the component ID registers to detect the TZC-400 peripheral. As all ARM peripherals share the same component ID, i
Fix TZC-400 peripheral detection
The TZC-400 driver implementation incorrectly uses the component ID registers to detect the TZC-400 peripheral. As all ARM peripherals share the same component ID, it doesn't allow to uniquely identify the TZC-400 peripheral. This patch fixes the TZC-400 driver by relying on the `part_number_0` and `part_number_1` fields in the `PID` registers instead. The `tzc_read_component_id` function has been replaced by `tzc_read_peripheral_id`, which reads the 'part_number' values and compares them with the TZC-400 peripheral ID.
Also, it adds a debug assertion to detect when the TZC driver initialisation function is called multiple times.
Change-Id: I35949f6501a51c0a794144cd1c3a6db62440dce6
show more ...
|
| 38041973 | 08-Jul-2014 |
Juan Castillo <juan.castillo@arm.com> |
Add a simple ARM SP805 watchdog driver
Based on SP805 Programmer's model (ARM DDI 0270B). This driver provides three public APIs:
void sp805_start(uintptr_t base, unsigned long ticks); void
Add a simple ARM SP805 watchdog driver
Based on SP805 Programmer's model (ARM DDI 0270B). This driver provides three public APIs:
void sp805_start(uintptr_t base, unsigned long ticks); void sp805_stop(uintptr_t base); void sp805_refresh(uintptr_t base, unsigned long ticks);
Upon start, the watchdog starts counting down from the number of ticks specified. When the count reaches 0 an interrupt is triggered. The watchdog restarts counting down from the number of ticks specified. If the count reaches 0 again, the system is reset. A mechanism to handle the interrupt has not been implemented. Instead, the API to refresh the watchdog should be used instead to prevent a system reset.
Change-Id: I799d53f8d1213b10b341a4a67fde6486e89a3dab
show more ...
|
| 464ce2bb | 07-Oct-2015 |
Soby Mathew <soby.mathew@arm.com> |
Add ARM GICv2 driver
This patch adds a driver for ARM GICv2 systems, example GIC-400. Unlike the existing GIC driver in `include/drivers/arm/arm_gic.h`, this driver is optimised for GICv2 and does n
Add ARM GICv2 driver
This patch adds a driver for ARM GICv2 systems, example GIC-400. Unlike the existing GIC driver in `include/drivers/arm/arm_gic.h`, this driver is optimised for GICv2 and does not support GICv3 systems in GICv2 compatibility mode. The driver interface has been implemented in `drivers/arm/gic/v2/gicv2_main.c`. The corresponding header is in `include/drivers/arm/gicv2.h`. Helper functions are implemented in `drivers/arm/gic/v2/gicv2_helpers.c` and are accessible through the `drivers/arm/gic/v2/gicv2_private.h` header.
Change-Id: I09fffa4e621fb99ba3c01204839894816cd89a2a
show more ...
|
| df373737 | 03-Sep-2015 |
Achin Gupta <achin.gupta@arm.com> |
Add ARM GICv3 driver without support for legacy operation
This patch adds a driver for ARM GICv3 systems that need to run software stacks where affinity routing is enabled across all privileged exce
Add ARM GICv3 driver without support for legacy operation
This patch adds a driver for ARM GICv3 systems that need to run software stacks where affinity routing is enabled across all privileged exception levels for both security states. This driver is a partial implementation of the ARM Generic Interrupt Controller Architecture Specification, GIC architecture version 3.0 and version 4.0 (ARM IHI 0069A). The driver does not cater for legacy support of interrupts and asymmetric configurations.
The existing GIC driver has been preserved unchanged. The common code for GICv2 and GICv3 systems has been refactored into a new file, `drivers/arm/gic/common/gic_common.c`. The corresponding header is in `include/drivers/arm/gic_common.h`.
The driver interface is implemented in `drivers/arm/gic/v3/gicv3_main.c`. The corresponding header is in `include/drivers/arm/gicv3.h`. Helper functions are implemented in `drivers/arm/gic/v3/arm_gicv3_helpers.c` and are accessible through the `drivers/arm/gic/v3/gicv3_private.h` header.
Change-Id: I8c3c834a1d049d05b776b4dcb76b18ccb927444a
show more ...
|
| e098e244 | 02-Nov-2015 |
Juan Castillo <juan.castillo@arm.com> |
Remove deprecated IO return definitions
Patch 7e26fe1f deprecates IO specific return definitions in favour of standard errno codes. This patch removes those definitions and its usage from the IO fra
Remove deprecated IO return definitions
Patch 7e26fe1f deprecates IO specific return definitions in favour of standard errno codes. This patch removes those definitions and its usage from the IO framework, IO drivers and IO platform layer. Following this patch, standard errno codes must be used when checking the return value of an IO function.
Change-Id: Id6e0e9d0a7daf15a81ec598cf74de83d5768650f
show more ...
|
| 22b0eda5 | 02-Oct-2015 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Fix debug assertion in deprecated CCI-400 driver
This patch fixes a copy and paste issue that resulted in the cluster indexes not being checked as intended. Note that this fix applies to the depreca
Fix debug assertion in deprecated CCI-400 driver
This patch fixes a copy and paste issue that resulted in the cluster indexes not being checked as intended. Note that this fix applies to the deprecated CCI-400 driver, not the unified one.
Change-Id: I497132a91c236690e5eaff908f2db5c8c65e85ab
show more ...
|
| fd6007de | 20-Jul-2015 |
Achin Gupta <achin.gupta@arm.com> |
Add a generic driver for ARM CCN IP
This patch adds a device driver which can be used to program the following aspects of ARM CCN IP:
1. Specify the mapping between ACE/ACELite/ACELite+DVM/CHI mast
Add a generic driver for ARM CCN IP
This patch adds a device driver which can be used to program the following aspects of ARM CCN IP:
1. Specify the mapping between ACE/ACELite/ACELite+DVM/CHI master interfaces and Request nodes. 2. Add and remove master interfaces from the snoop and dvm domains. 3. Place the L3 cache in a given power state. 4. Configuring system adress map and enabling 3 SN striping mode of memory controller operation.
Change-Id: I0f665c6a306938e5b66f6a92f8549b529aa8f325
show more ...
|
| 889fce42 | 26-Jun-2015 |
Vikram Kanigiri <vikram.kanigiri@arm.com> |
Remove EL2/EL1 GICv3 register updates
From Linux 3.17 onwards, the mainline kernel has support for GICv3 systems and if EL3 exists, it only needs to initialise ICC_SRE_EL3.SRE and ICC_SRE_EL3.Enable
Remove EL2/EL1 GICv3 register updates
From Linux 3.17 onwards, the mainline kernel has support for GICv3 systems and if EL3 exists, it only needs to initialise ICC_SRE_EL3.SRE and ICC_SRE_EL3.Enable to 1. Hence, this patch removes the redundant updates of ICC_SRE_EL2 and ICC_PMR_EL1.
NOTE: For partner software's which enter kernel in EL1, ICC_SRE_EL2.Enable and ICC_SRE_EL2.SRE bit needs to be set to 1 in EL2 before jumping to linux.
Change-Id: I09ed47869351b08a3b034735f532bc677eaa6917
show more ...
|
| 6058ee6a | 17-Jul-2015 |
danh-arm <dan.handley@arm.com> |
Merge pull request #335 from jcastillo-arm/jc/sh_write
Fix bug in semihosting write function |
| 31833aff | 07-Jul-2015 |
Juan Castillo <juan.castillo@arm.com> |
Fix bug in semihosting write function
The return value from the SYS_WRITE semihosting operation is 0 if the call is successful or the number of bytes not written, if there is an error. The implement
Fix bug in semihosting write function
The return value from the SYS_WRITE semihosting operation is 0 if the call is successful or the number of bytes not written, if there is an error. The implementation of the write function in the semihosting driver treats the return value as the number of bytes written, which is wrong. This patch fixes it.
Change-Id: Id39dac3d17b5eac557408b8995abe90924c85b85
show more ...
|
| 02462972 | 09-Sep-2014 |
Juan Castillo <juan.castillo@arm.com> |
Use uintptr_t as base address type in ARM driver APIs
This patch changes the type of the base address parameter in the ARM device driver APIs to uintptr_t (GIC, CCI, TZC400, PL011). The uintptr_t ty
Use uintptr_t as base address type in ARM driver APIs
This patch changes the type of the base address parameter in the ARM device driver APIs to uintptr_t (GIC, CCI, TZC400, PL011). The uintptr_t type allows coverage of the whole memory space and to perform arithmetic operations on the addresses. ARM platform code has also been updated to use uintptr_t as GIC base address in the configuration.
Fixes ARM-software/tf-issues#214
Change-Id: I1b87daedadcc8b63e8f113477979675e07d788f1
show more ...
|
| dff93c86 | 07-May-2015 |
Juan Castillo <juan.castillo@arm.com> |
TBB: add TBBR Chain of Trust
This patch adds a CoT based on the Trusted Board Boot Requirements document*. The CoT consists of an array of authentication image descriptors indexed by the image ident
TBB: add TBBR Chain of Trust
This patch adds a CoT based on the Trusted Board Boot Requirements document*. The CoT consists of an array of authentication image descriptors indexed by the image identifiers.
A new header file with TBBR image identifiers has been added. Platforms that use the TBBR (i.e. ARM platforms) may reuse these definitions as part of their platform porting.
PLATFORM PORT - IMPORTANT:
Default image IDs have been removed from the platform common definitions file (common_def.h). As a consequence, platforms that used those common definitons must now either include the IDs provided by the TBBR header file or define their own IDs.
*The NVCounter authentication method has not been implemented yet.
Change-Id: I7c4d591863ef53bb0cd4ce6c52a60b06fa0102d5
show more ...
|
| 7d37aa17 | 02-Apr-2015 |
Juan Castillo <juan.castillo@arm.com> |
TBB: add mbedTLS authentication related libraries
This patch adds the following mbedTLS based libraries:
* Cryptographic library
It is used by the crypto module to verify a digital signature and a
TBB: add mbedTLS authentication related libraries
This patch adds the following mbedTLS based libraries:
* Cryptographic library
It is used by the crypto module to verify a digital signature and a hash. This library relies on mbedTLS to perform the cryptographic operations. mbedTLS sources must be obtained separately.
Two key algorithms are currently supported:
* RSA-2048 * ECDSA-SECP256R1
The platform is responsible for picking up the required algorithm by defining the 'MBEDTLS_KEY_ALG' variable in the platform makefile. Available options are:
* 'rsa' (for RSA-2048) (default option) * 'ecdsa' (for ECDSA-SECP256R1)
Hash algorithm currently supported is SHA-256.
* Image parser library
Used by the image parser module to extract the authentication parameters stored in X509v3 certificates.
Change-Id: I597c4be3d29287f2f18b82846973afc142ee0bf0
show more ...
|
| 05799ae0 | 02-Apr-2015 |
Juan Castillo <juan.castillo@arm.com> |
TBB: add authentication framework
This patch adds the authentication framework that will be used as the base to implement Trusted Board Boot in the Trusted Firmware. The framework comprises the foll
TBB: add authentication framework
This patch adds the authentication framework that will be used as the base to implement Trusted Board Boot in the Trusted Firmware. The framework comprises the following modules:
- Image Parser Module (IPM)
This module is responsible for interpreting images, check their integrity and extract authentication information from them during Trusted Board Boot.
The module currently supports three types of images i.e. raw binaries, X509v3 certificates and any type specific to a platform. An image parser library must be registered for each image type (the only exception is the raw image parser, which is included in the main module by default).
Each parser library (if used) must export a structure in a specific linker section which contains function pointers to:
1. Initialize the library 2. Check the integrity of the image type supported by the library 3. Extract authentication information from the image
- Cryptographic Module (CM)
This module is responsible for verifying digital signatures and hashes. It relies on an external cryptographic library to perform the cryptographic operations.
To register a cryptographic library, the library must use the REGISTER_CRYPTO_LIB macro, passing function pointers to:
1. Initialize the library 2. Verify a digital signature 3. Verify a hash
Failing to register a cryptographic library will generate a build time error.
- Authentication Module (AM)
This module provides methods to authenticate an image, like hash comparison or digital signatures. It uses the image parser module to extract authentication parameters, the crypto module to perform cryptographic operations and the Chain of Trust to authenticate the images.
The Chain of Trust (CoT) is a data structure that defines the dependencies between images and the authentication methods that must be followed to authenticate an image.
The Chain of Trust, when added, must provide a header file named cot_def.h with the following definitions:
- COT_MAX_VERIFIED_PARAMS
Integer value indicating the maximum number of authentication parameters an image can present. This value will be used by the authentication module to allocate the memory required to load the parameters in the image descriptor.
Change-Id: Ied11bd5cd410e1df8767a1df23bb720ce7e58178
show more ...
|
| 16948ae1 | 13-Apr-2015 |
Juan Castillo <juan.castillo@arm.com> |
Use numbers to identify images instead of names
The Trusted firmware code identifies BL images by name. The platform port defines a name for each image e.g. the IO framework uses this mechanism in t
Use numbers to identify images instead of names
The Trusted firmware code identifies BL images by name. The platform port defines a name for each image e.g. the IO framework uses this mechanism in the platform function plat_get_image_source(). For a given image name, it returns the handle to the image file which involves comparing images names. In addition, if the image is packaged in a FIP, a name comparison is required to find the UUID for the image. This method is not optimal.
This patch changes the interface between the generic and platform code with regard to identifying images. The platform port must now allocate a unique number (ID) for every image. The generic code will use the image ID instead of the name to access its attributes.
As a result, the plat_get_image_source() function now takes an image ID as an input parameter. The organisation of data structures within the IO framework has been rationalised to use an image ID as an index into an array which contains attributes of the image such as UUID and name. This prevents the name comparisons.
A new type 'io_uuid_spec_t' has been introduced in the IO framework to specify images identified by UUID (i.e. when the image is contained in a FIP file). There is no longer need to maintain a look-up table [iname_name --> uuid] in the io_fip driver code.
Because image names are no longer mandatory in the platform port, the debug messages in the generic code will show the image identifier instead of the file name. The platforms that support semihosting to load images (i.e. FVP) must provide the file names as definitions private to the platform.
The ARM platform ports and documentation have been updated accordingly. All ARM platforms reuse the image IDs defined in the platform common code. These IDs will be used to access other attributes of an image in subsequent patches.
IMPORTANT: applying this patch breaks compatibility for platforms that use TF BL1 or BL2 images or the image loading code. The platform port must be updated to match the new interface.
Change-Id: I9c1b04cb1a0684c6ee65dee66146dd6731751ea5
show more ...
|
| cc58b2d0 | 17-Mar-2015 |
Ryan Harkin <ryan.harkin@linaro.org> |
Add SP804 delay timer driver
Add a delay timer driver for the ARM SP804 dual timer.
This driver only uses the first timer, called timer 1 in the SP804 Technical Reference Manual (ARM DDI 0271D).
T
Add SP804 delay timer driver
Add a delay timer driver for the ARM SP804 dual timer.
This driver only uses the first timer, called timer 1 in the SP804 Technical Reference Manual (ARM DDI 0271D).
To use this driver, the BSP must provide three constants:
* The base address of the SP804 dual timer * The clock multiplier * The clock divider
The BSP is responsible for calling sp804_timer_init(). The SP804 driver instantiates a constant timer_ops_t and calls the generic timer_init().
Change-Id: I49ba0a52bdf6072f403d1d0a20e305151d4bc086 Co-authored-by: Dan Handley <dan.handley@arm.com>
show more ...
|
| 9055c7d1 | 17-Mar-2015 |
Ryan Harkin <ryan.harkin@linaro.org> |
Add a simple delay timer driver API
The API is simple. The BSP or specific timer driver creates an instance of timer_ops_t, fills in the timer specific data, then calls timer_init(). The timer speci
Add a simple delay timer driver API
The API is simple. The BSP or specific timer driver creates an instance of timer_ops_t, fills in the timer specific data, then calls timer_init(). The timer specific data includes a function pointer to return the timer value and a clock multiplier/divider. The ratio of the multiplier and the divider is the clock frequency in MHz.
After that, mdelay() or udelay() can be called to delay execution for the specified time (milliseconds or microseconds, respectively).
Change-Id: Icf8a295e1d25874f789bf28b7412156329dc975c Co-authored-by: Dan Handley <dan.handley@arm.com>
show more ...
|
| de975e85 | 02-Jun-2015 |
Achin Gupta <achin.gupta@arm.com> |
Merge pull request #305 from achingupta/ag/tf-issues#306
Ag/tf issues#306 |
| c13b2e32 | 19-May-2015 |
Varun Wadekar <vwadekar@nvidia.com> |
Driver for 16550 UART interface
This patch adds driver for the 16550 UART interface. The driver is exposed as a console, which platforms can use to dump their boot/crash logs.
Signed-off-by: Varun
Driver for 16550 UART interface
This patch adds driver for the 16550 UART interface. The driver is exposed as a console, which platforms can use to dump their boot/crash logs.
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
show more ...
|
| ca0225a5 | 18-May-2015 |
Achin Gupta <achin.gupta@arm.com> |
Fix reporting of interrupt ID in ARM GIC driver
The ARM GIC driver treats the entire contents of the GICC_HPPIR as the interrupt ID instead of just bits[9:0]. This could result in an SGI being treat
Fix reporting of interrupt ID in ARM GIC driver
The ARM GIC driver treats the entire contents of the GICC_HPPIR as the interrupt ID instead of just bits[9:0]. This could result in an SGI being treated as a Group 1 interrupt on a GICv2 system.
This patch introduces a mask to retrieve only the ID from a read of GICC_HPPIR, GICC_IAR and similar registers. The value read from these registers is masked with this constant prior to use as an interrupt ID.
Fixes ARM-software/tf-issues#306
Change-Id: Ie3885157de33b71df9781a41f6ef015a30c4608d
show more ...
|
| d3b638cb | 01-Apr-2015 |
Dan Handley <dan.handley@arm.com> |
Separate out common console functionality
Separate out the common console functionality in `drivers/arm/pl011/pl011_console.S` into a new source file `drivers/console/console.S`. The former includes
Separate out common console functionality
Separate out the common console functionality in `drivers/arm/pl011/pl011_console.S` into a new source file `drivers/console/console.S`. The former includes the latter to provide backwards compatibility for platform make files.
Also add a skeleton console implementation for platforms that do not want to use PL011.
Change-Id: I1ff963b2b54a872fbcf1eb0700797b9e9afa2538
show more ...
|
| 71a84445 | 19-Mar-2015 |
Dan Handley <dan.handley@arm.com> |
Add TZC function to configure region 0
Region 0 is special in TZC-400. It is possible to set the access permissions for this but not the address range or filters to which the permissions apply. Add
Add TZC function to configure region 0
Region 0 is special in TZC-400. It is possible to set the access permissions for this but not the address range or filters to which the permissions apply. Add a function for setting the region 0 access permissions.
Also add some VERBOSE logging and allow assembly files to include the TZC header.
Change-Id: I4389261ba10a6e5e2e43ee93d55318dc507b6648
show more ...
|
| 8b779620 | 24-Mar-2015 |
Kévin Petit <kevin.petit@arm.com> |
Add support to indicate size and end of assembly functions
In order for the symbol table in the ELF file to contain the size of functions written in assembly, it is necessary to report it to the ass
Add support to indicate size and end of assembly functions
In order for the symbol table in the ELF file to contain the size of functions written in assembly, it is necessary to report it to the assembler using the .size directive.
To fulfil the above requirements, this patch introduces an 'endfunc' macro which contains the .endfunc and .size directives. It also adds a .func directive to the 'func' assembler macro.
The .func/.endfunc have been used so the assembler can fail if endfunc is omitted.
Fixes ARM-Software/tf-issues#295
Change-Id: If8cb331b03d7f38fe7e3694d4de26f1075b278fc Signed-off-by: Kévin Petit <kevin.petit@arm.com>
show more ...
|
| 8cfc3fd2 | 09-Mar-2015 |
Achin Gupta <achin.gupta@arm.com> |
Set group status of PPIs and SGIs correctly on GICv3 systems
On a GICv2 system, the group status of PPIs and SGIs is set in the GICD_IGROUPR0 register. On a GICv3 system, if affinity routing is enab
Set group status of PPIs and SGIs correctly on GICv3 systems
On a GICv2 system, the group status of PPIs and SGIs is set in the GICD_IGROUPR0 register. On a GICv3 system, if affinity routing is enabled for the non-secure state, then the group status of PPIs and SGIs should be set in the GICR_IGROUPR0 register. ARM Trusted firmware sets the group status using the GICv2 sequence. On a GICv3 system, if the group status of an interrupt is set to Group 1 through a write to the GICD_IGROUPR0, then the GICR_IGROUPR0 is updated as well.
The current sequence is incorrect since it first marks all PPIs and SGIs as Group 1. It then clears the bits in GICD_IGROUPR0 corresponding to secure interrupts to set their group status to Group 0. This operation is a no-op. It leaves the secure generic timer interrupt (#29) used by the TSP marked as Group 1. This causes the interrupt to interfere with the execution of non-secure software. Once an interrupt has been marked as Group 1, the GICR_IGROUPR0 should be programmed to change its group status.
This patch rectifies this issue by setting the group status of only the non-secure PPI and SGIs to Group 1 in the first place. GICD_IGROUPR0 resets to 0. So secure interrupts are marked as Group 0 by default.
Change-Id: I958b4b15f3e2b2444ce4c17764def36216498d00
show more ...
|
| 23e47ede | 23-Dec-2014 |
Vikram Kanigiri <vikram.kanigiri@arm.com> |
Common driver for ARM Cache Coherent Interconnects
Even though both CCI-400 and CCI-500 IPs have different configurations with respect to the number and types of supported interfaces, their register
Common driver for ARM Cache Coherent Interconnects
Even though both CCI-400 and CCI-500 IPs have different configurations with respect to the number and types of supported interfaces, their register offsets and programming sequences are similar. This patch creates a common driver for enabling and disabling snoop transactions and DVMs with both the IPs.
New platform ports which implement one of these IPs should use this common driver. Existing platform ports which implement CCI-400 should migrate to the common driver as the standalone CCI-400 will be deprecated in the future.
Change-Id: I3ccd0eb7b062922d2e4a374ff8c21e79fa357556
show more ...
|