1. 07 Sep, 2020 1 commit
    • Manish V Badarkhe's avatar
      plat: Fix build issue for qemu and rpi3 platforms · dad2934c
      Manish V Badarkhe authored
      
      
      Coverity build periodically throws below errors(non-consistently)
      for 'QEMU' and 'RPI3' platforms.
      
      /bin/sh: 1: cannot create build/qemu/debug/rot_key.pem: Directory
      nonexistent
      plat/qemu/qemu/platform.mk:86: recipe for target 'build/qemu/debug/
      rot_key.pem' failed
      make: *** [build/qemu/debug/rot_key.pem] Error 2
      
      /bin/sh: 1: cannot create /work/workspace/workspace/tf-coverity/build
      /rpi3/debug/rot_key.pem: Directory nonexistent
      plat/rpi/rpi3/platform.mk:214: recipe for target '/work/workspace/
      workspace/tf-coverity/build/rpi3/debug/rot_key.pem' failed
      make: *** [/work/workspace/workspace/tf-coverity/build/rpi3/debug/
      rot_key.pem] Error 2
      
      Issue seems to be occurred when 'ROT key' is generated before creating
      the platform build folder(for e.g.build/qemu/debug).
      
      Changes are made to fix this issue by adding orderly dependancy of
      the platform folder for the 'ROT key' creation which ensures that
      platform folder is created before generating 'ROT key'.
      Signed-off-by: default avatarManish V Badarkhe <Manish.Badarkhe@arm.com>
      Change-Id: I20c82172dde84e4c7f2373c0bd095d353f845d38
      dad2934c
  2. 19 May, 2020 1 commit
  3. 01 Apr, 2020 1 commit
    • Andre Przywara's avatar
      rpi: move plat_helpers.S to common · 07aa0c7e
      Andre Przywara authored
      
      
      The plat_helpers.S file was almost identical between its RPi3 and RPi4
      versions. Unify the two files, moving it into the common/ directory.
      
      This adds a plat_rpi_get_model() function, which can be used to trigger
      RPi4 specific action, detected at runtime. We use that to do the RPi4
      specific L2 cache initialisation.
      
      Change-Id: I2295704fd6dde7c76fe83b6d98c7bf998d4bf074
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      07aa0c7e
  4. 17 Mar, 2020 2 commits
    • Andre Przywara's avatar
      rpi3: build: Include GPIO driver in all BL stages · 29e8c460
      Andre Przywara authored
      
      
      So far the Raspberry Pi 3 build needs the GPIO driver just for BL2.
      Upcoming changes will require some GPIO code in BL1 and BL31 also, so
      move those driver files into the common source section.
      
      This does not affect BL31 code size at all, and bl1.bin just increases
      by 144 bytes, but doesn't affect the padded binary size at all.
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      Change-Id: I7639746dc241c1e69099d85d2671c65fa0108555
      29e8c460
    • Andre Przywara's avatar
      rpi: Allow using PL011 UART for RPi3/RPi4 · 5e6d821c
      Andre Przywara authored
      
      
      The Broadcom 283x SoCs feature multiple UARTs: the mostly used
      "Mini-UART", which is an 8250 compatible IP, and at least one PL011.
      While the 8250 is usually used for serial console purposes, it suffers
      from a design flaw, where its clock depends on the VPU clock, which can
      change at runtime. This will reliably mess up the baud rate.
      To avoid this problem, people might choose to use the PL011 UART for
      the serial console, which is pin-mux'ed to the very same GPIO pins.
      This can be done by adding "miniuart-bt" to the "dtoverlay=" line in
      config.txt.
      
      To prepare for this situation, use the newly gained freedom of sharing
      one console_t pointer across different UART drivers, to introduce the
      option of choosing the PL011 for the console.
      
      This is for now hard-coded to choose the Mini-UART by default.
      A follow-up patch will introduce automatic detection.
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      Change-Id: I8cf2522151e09ff4ff94a6d396aec6fc4b091a05
      5e6d821c
  5. 13 Sep, 2019 2 commits
  6. 28 Jun, 2019 1 commit
  7. 31 Jan, 2019 1 commit
  8. 25 Jan, 2019 1 commit
  9. 16 Jan, 2019 1 commit
    • Igor Opaniuk's avatar
      rpi3: fix RPI3_PRELOADED_DTB_BASE usage · eabbdafe
      Igor Opaniuk authored
      
      
      In case if `RPI3_PRELOADED_DTB_BASE` isn't defined explicitly with
      proper pre-loaded DTB address, `add_define` macro defined in
      `make_helpers/build_macros.mk` still supplies this definition to the
      compiler like `-DRPI3_PRELOADED_DTB_BASE`, and it's obviously is set to
      default value 1.
      
      This simply leads to the wrong `MAP_NS_DTB` region definition (base_va
      is set `0x1` instead of `0x00010000`) in `plat/rpi3/rpi3_common.c`:
      
      Which causes aligment check to fail in `mmap_add_region_check()`:
      VERBOSE: base_pa: 0x00000001, base_va: 0x00000001, size: 0x00010000
      ...
      ERROR:   mmap_add_region_check() failed. error -22
      Signed-off-by: default avatarIgor Opaniuk <igor.opaniuk@linaro.org>
      eabbdafe
  10. 04 Jan, 2019 1 commit
  11. 07 Dec, 2018 1 commit
    • Julius Werner's avatar
      drivers/console: Link console framework code by default · 985ee0b7
      Julius Werner authored
      
      
      This patch makes the build system link the console framework code by
      default, like it already does with other common libraries (e.g. cache
      helpers). This should not make a difference in practice since TF is
      linked with --gc-sections, so the linker will garbage collect all
      functions and data that are not referenced by any other code. Thus, if a
      platform doesn't want to include console code for size reasons and
      doesn't make any references to console functions, the code will not be
      included in the final binary.
      
      To avoid compatibility issues with older platform ports, only make this
      change for the MULTI_CONSOLE_API.
      
      Change-Id: I153a9dbe680d57aadb860d1c829759ba701130d3
      Signed-off-by: default avatarJulius Werner <jwerner@chromium.org>
      985ee0b7
  12. 19 Nov, 2018 1 commit
    • Pete Batard's avatar
      rpi3: add RPI3_USE_UEFI_MAP build option · 4dcf1fad
      Pete Batard authored
      
      
      The default Raspberry Pi 3 memory mapping for ATF is geared towards
      the use of uboot + Linux. This creates issues when trying to use
      ATF with an UEFI payload and Windows on ARM64.
      
      We therefore introduce new build option RPI3_USE_UEFI_MAP, that
      enables the build process to use an alternate memory mapping that
      is compatible with UEFI + Windows (as well as UEFI + Linux).
      
      Fixes ARM-software/tf-issues#649
      Signed-off-by: default avatarPete Batard <pete@akeo.ie>
      4dcf1fad
  13. 13 Nov, 2018 1 commit
    • Pete Batard's avatar
      rpi3: add RPI3_RUNTIME_UART build option · 6d5c61de
      Pete Batard authored
      
      
      Some OSes (e.g. Ubuntu 18.04 LTS on Raspberry Pi 3) may disable the
      runtime UART in a manner that prevents the system from rebooting if
      ATF tries to send runtime messages there.
      
      Also, we don't want the firmware to share the UART with normal
      world, as this can be a DoS attack vector into the secure world.
      
      This patch fixes these 2 issues by introducing new build option
      RPI3_RUNTIME_UART, that disables the runtime UART by default.
      
      Fixes ARM-software/tf-issues#647
      Signed-off-by: default avatarPete Batard <pete@akeo.ie>
      6d5c61de
  14. 24 Oct, 2018 1 commit
    • Antonio Nino Diaz's avatar
      rpi3: Add mem reserve region to DTB if present · 5341b42e
      Antonio Nino Diaz authored
      
      
      When a device tree blob is present at a known address, instead of, for
      example, relying on the user modifying the Linux command line to warn
      about the memory reserved for the Trusted Firmware, pass it on the DTB.
      
      The current code deletes the memory reserved for the default bootstrap
      of the Raspberry Pi and adds the region used by the Trusted Firmware.
      
      This system replaces the previous one consisting on adding
      ``memmap=16M$256M`` to the Linux command line. It's also meant to be
      used by U-Boot and any other bootloader that understands DTB files.
      
      Change-Id: I13ee528475fb043d6e8d9e9f24228e37ac3ac436
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      5341b42e
  15. 28 Sep, 2018 1 commit
  16. 17 Aug, 2018 1 commit
  17. 15 Aug, 2018 1 commit
  18. 16 Jul, 2018 3 commits
  19. 14 Jul, 2018 1 commit
  20. 13 Jul, 2018 1 commit
  21. 05 Jul, 2018 1 commit
  22. 19 Jun, 2018 1 commit
  23. 27 Mar, 2018 1 commit
    • Antonio Nino Diaz's avatar
      rpi3: Use new console APIs · e0f21f62
      Antonio Nino Diaz authored
      
      
      Switch to the new console APIs enabled by setting MULTI_CONSOLE_API=1.
      
      The crash console doesn't use this API, it uses internally the core
      functions of the 16550 console.
      
      `bl31_plat_runtime_setup` is no longer needed. When this platform port
      was introduced, that function used to disable the console. It was needed
      to override that behaviour. The new behaviour is to switch to the
      runtime console. The console is registered for all scopes (boot, crash
      and runtime) in `rpi3_console_init` so it is not needed to override the
      default behaviour anymore.
      
      Update documentation.
      
      Change-Id: If2ee8f91044216183b7ef142e5c05ad6220ae92f
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      e0f21f62
  24. 29 Jan, 2018 1 commit
  25. 01 Dec, 2017 1 commit