| 01301b11 | 16-Sep-2020 |
Andre Przywara <andre.przywara@arm.com> |
arm_fpga: Add post-build linker script
For the Arm Ltd. FPGAs to run, we need to load several payloads into the FPGA's memory: - Some trampoline code at address 0x0, to jump to BL31's entry point. -
arm_fpga: Add post-build linker script
For the Arm Ltd. FPGAs to run, we need to load several payloads into the FPGA's memory: - Some trampoline code at address 0x0, to jump to BL31's entry point. - The actual BL31 binary at the beginning of DRAM. - The (generic) DTB image to describe the hardware. - The actual non-secure payloads (kernel, ramdisks, ...)
The latter is application specific, but the first three blobs are rather generic. Since the uploader tool supports ELF binaries, it seems helpful to combine these three images into one .axf file, as this also simplifies the command line.
Add a post-build linker script, that combines those three bits into one ELF file, together with their specific load addresses. Include a call to "ld" with this linker script in the platform Makefile, so it will be build automatically. The result will be called "bl31.axf".
Change-Id: I4a90da16fa1e0e83b51d19e5b1daf61f5a0bbfca Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| f45c6d86 | 03-Aug-2020 |
Andre Przywara <andre.przywara@arm.com> |
arm_fpga: Add ROM trampoline
The application cores of the FPGAs used in Arm Ltd. start execution at address 0x0. This is the location of some (emulated) ROM area (which can be written to by the uplo
arm_fpga: Add ROM trampoline
The application cores of the FPGAs used in Arm Ltd. start execution at address 0x0. This is the location of some (emulated) ROM area (which can be written to by the uploading tool). Since the arm_fpga port is configured to run from DRAM, we load BL31 to the beginning of DRAM (mapped at 2GB). This requires some small trampoline code in the "ROM" to jump to the BL31 entry point.
To avoid some extra magic binary, add a tiny assembly file with that trivial jump instruction to the tree, so this binary can be created alongside BL31.
Change-Id: I9e4439fc0f093fa24dd49a8377c9edb030fbb477 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| b48883c7 | 03-Aug-2020 |
Andre Przywara <andre.przywara@arm.com> |
arm_fpga: Add devicetree file
The FPGA images used in Arm Ltd. focus on CPU cores, so they share a common platform, with a minimal set of peripherals (interconnect, GIC, UART). This allows to suppor
arm_fpga: Add devicetree file
The FPGA images used in Arm Ltd. focus on CPU cores, so they share a common platform, with a minimal set of peripherals (interconnect, GIC, UART). This allows to support most platforms with a single devicetree file. The topology and number of CPU cores differ, but those will added at runtime, in BL31. Other adjustments (GICR size, SPE node, command line) are also done at this point.
Add the common devicetree file to TF-A's build system, so it can be build together with BL31. At runtime, the resulting .dtb file should be uploaded to the address given with FPGA_PRELOADED_DTB_BASE at build time.
Change-Id: I3206d6131059502ec96896e95329865452c9d83e Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 40a0de19 | 03-Aug-2020 |
Andre Przywara <andre.przywara@arm.com> |
arm_fpga: Remove SPE PMU DT node if SPE is not available
The Statistical Profiling Extension (SPE) is an architectural feature we can safely detect at runtime. However it still relies on one piece o
arm_fpga: Remove SPE PMU DT node if SPE is not available
The Statistical Profiling Extension (SPE) is an architectural feature we can safely detect at runtime. However it still relies on one piece of platform-specific information: the interrupt line it is connected to. This requires SPE to be described in a devicetree node.
Since SPE support varies with the CPU cores found on an FPGA image, we should detect the presence of SPE at runtime, and remove a potentially existing SPE PMU node from the DT.
This allows to always have the SPE node in a generic devicetree file, without risking exposing it on a CPU without this feature.
Change-Id: I73d83ea8509b03fe7bba20b9cce8d1335035fa31 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| fa30f73b | 07-Jul-2020 |
Andre Przywara <andre.przywara@arm.com> |
arm_fpga: Support uploading a custom command line
The command line for BL33 payloads is typically taken from the DTB. On "normal" systems the bootloader will put the right version in there, but we t
arm_fpga: Support uploading a custom command line
The command line for BL33 payloads is typically taken from the DTB. On "normal" systems the bootloader will put the right version in there, but we typically don't use one on the FPGAs. To avoid editing (and possibly re-packaging) the DTB for every change in the command line, try to read it from some "magic" memory location instead. It can be easily placed there by the tool that uploads the other payloads to the FPGA's memory. BL31 will then replace the existing command line in the DTB with that new string.
To avoid reading garbage, check the memory location for containing a magic value. This is conveniently chosen to be a simple ASCII string, so it can just preceed the actual command line in a text file: -------------------------------- CMD:console=ttyAMA0,38400n8 debug loglevel=8 --------------------------------
Change-Id: I5923a80332c9fac3b4afd1a6aaa321233d0f60da Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| c5346ed5 | 08-Jul-2020 |
Andre Przywara <andre.przywara@arm.com> |
arm_fpga: Predefine DTB and BL33 load addresses
The memory layout for the FPGA is fairly uniform for most of the FPGA images, and we already assume that DRAM starts at 2GB by default.
Prepopulate P
arm_fpga: Predefine DTB and BL33 load addresses
The memory layout for the FPGA is fairly uniform for most of the FPGA images, and we already assume that DRAM starts at 2GB by default.
Prepopulate PRELOADED_BL33_BASE and FPGA_PRELOADED_DTB_BASE to some sane default values, to simplify building some stock image. If people want to deviate from that, they can always override those addresses on the make command line.
Change-Id: I2238fafb3f8253a01ad2d88d45827c141d9b29dd Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 2c13ef90 | 25-Jun-2020 |
Andre Przywara <andre.przywara@arm.com> |
arm_fpga: Add Klein and Matterhorn support
To support FPGAs with those cores as well, as the respective cpulib files to the Makefile.
Change-Id: I1a60867d5937be88b32b210c7817be4274554a76 Signed-off
arm_fpga: Add Klein and Matterhorn support
To support FPGAs with those cores as well, as the respective cpulib files to the Makefile.
Change-Id: I1a60867d5937be88b32b210c7817be4274554a76 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| dee3042c | 09-Apr-2020 |
Andre Przywara <andre.przywara@arm.com> |
arm_fpga: Read UART address from DT
The arm_fpga port requires a DTB, to launch a BL33 payload. To make this port more flexible, we can also use the information in the DT to configure the console dr
arm_fpga: Read UART address from DT
The arm_fpga port requires a DTB, to launch a BL33 payload. To make this port more flexible, we can also use the information in the DT to configure the console driver. For a start, find the DT node pointed to by the stdout-path property, and read the base address from there. This assumes for now that the stdout-path points to a PL011 UART.
This allows to remove platform specific addresses from the image. We keep the original base address for the crash console.
Change-Id: I46a990de2315f81cae4d7913ae99a07b0bec5cb1 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 1a0f9366 | 24-Jan-2020 |
Andre Przywara <andre.przywara@arm.com> |
arm_fpga: Read GICD and GICR base addresses from DT
Since we use a DTB with all platform information to pass this on to a kernel loaded as BL33, we can as well make use of it for our own purposes.
arm_fpga: Read GICD and GICR base addresses from DT
Since we use a DTB with all platform information to pass this on to a kernel loaded as BL33, we can as well make use of it for our own purposes.
Every DT would contain a node for the GIC(v3) interrupt controller, so we can read the base address for the distributor and redistributors from there.
This avoids hard coding this information in the code and allows for a more flexible binary.
Change-Id: Ic530e223a21a45bc30a07a21048116d5af69e972 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 670c66af | 24-Jan-2020 |
Andre Przywara <andre.przywara@arm.com> |
arm_fpga: Read generic timer counter frequency from DT
The ARM Generic Timer DT binding describes an (optional) property to declare the counter frequency. Its usage is normally discouraged, as the v
arm_fpga: Read generic timer counter frequency from DT
The ARM Generic Timer DT binding describes an (optional) property to declare the counter frequency. Its usage is normally discouraged, as the value should be read from the CNTFRQ_EL0 system register.
However in our case we can use it to program this register in the first place, which avoids us to hard code a counter frequency into the code. We keep some default value in, if the DT lacks that property for whatever reason.
Change-Id: I5b71176db413f904f21eb16f3302fbb799cb0305 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 4b5793c9 | 15-Jan-2020 |
Oliver Swede <oli.swede@arm.com> |
plat/arm/board/arm_fpga: Compile with additional CPU libraries
This change is part of the goal of enabling the port to be compatible with multiple FPGA images.
BL31 behaves differently depending on
plat/arm/board/arm_fpga: Compile with additional CPU libraries
This change is part of the goal of enabling the port to be compatible with multiple FPGA images.
BL31 behaves differently depending on whether or not the CPUs in the system use cache coherency, and as a result any CPU libraries that are compiled together must serve processors that are consistent in this regard.
This compiles a different set of CPU libraries depending on whether or not the HW_ASSISTED_COHERENCY is enabled at build-time to indicate the CPUs support hardware-level support for cache coherency. This build flag is used in the makefile in the same way as the Arm FVP port.
Signed-off-by: Oliver Swede <oli.swede@arm.com> Change-Id: I18300b4443176b89767015e3688c0f315a91c27e
show more ...
|
| 62056e4e | 07-Jan-2020 |
Oliver Swede <oli.swede@arm.com> |
plat/arm/board/arm_fpga: Enable position-independent execution
This allows the BL31 port to run with position-independent execution enabled so that it can be ran from any address in the system. This
plat/arm/board/arm_fpga: Enable position-independent execution
This allows the BL31 port to run with position-independent execution enabled so that it can be ran from any address in the system. This increases the flexibility of the image, allowing it to be ran from other locations rather than only its hardcoded absolute address (currently set to the typical DRAM base of 2GB). This may be useful for future images that describe system configurations with other memory layouts (e.g. where SRAM is included).
It does this by setting ENABLE_PIE=1 and changing the absolute address to 0. The load address of bl31.bin can then be specified by the -l [load address] argument in the fpga-run command (additionally, this address is required by any preceding payloads that specify the start address. For ELF payloads this is usually extracted automatically by reading the entrypoint address in the header, however bl31.bin is a different file format so has this additional dependency).
Signed-off-by: Oliver Swede <oli.swede@arm.com> Change-Id: Idd74787796ab0cf605fe2701163d9c4b3223a143
show more ...
|