1. 05 Sep, 2018 1 commit
  2. 04 Sep, 2018 2 commits
  3. 03 Sep, 2018 2 commits
  4. 30 Aug, 2018 5 commits
  5. 22 Aug, 2018 1 commit
  6. 20 Aug, 2018 1 commit
  7. 10 Aug, 2018 3 commits
  8. 30 Jul, 2018 2 commits
  9. 24 Jul, 2018 5 commits
  10. 18 Jul, 2018 6 commits
  11. 03 Jul, 2018 1 commit
    • Yann Gautier's avatar
      Add MMC framework · ad71d45e
      Yann Gautier authored
      
      
      This change is largely based on existing eMMC framework by Haojian Zhuang
      (@hzhuang1).
      
      The MMC framework supports both eMMC and SD card devices. It was
      written as a new framework since breaking few eMMC framework APIs.
      
      At card probe and after the reset to idle command (CMD0), a Send
      Interface Condition Command is sent (CMD8) to distinguish between
      eMMC and SD card devices. eMMC devices go through the same
      sequence as in the former eMMC framework. Else the framework
      uses commands dedicated to SD-cards for init or frequency switch.
      
      A structure is created to share info with the driver. It stores:
      - the MMC type (eMMC, SD or SD HC)
      - the device size
      - the max frequency supported by the device
      - the block size: 512 for eMMC and SD-HC and read from CSD
       structure for older SD-cards
      
      Restriction to align buffers on block size has been removed.
      Cache maintenance was removed and is expected to be done in the platform
      or device driver.
      
      The MMC framework includes some MISRA compliance coding style
      maybe not yet ported in the existing eMMC framework.
      
      Fixes ARM-software/tf-issues#597
      Signed-off-by: default avatarYann Gautier <yann.gautier@st.com>
      ad71d45e
  12. 19 Jun, 2018 1 commit
    • Antonio Nino Diaz's avatar
      plat/arm: Migrate AArch64 port to the multi console driver · 88a0523e
      Antonio Nino Diaz authored
      
      
      The old API is deprecated and will eventually be removed.
      
      Arm platforms now use the multi console driver for boot and runtime
      consoles. However, the crash console uses the direct console API because
      it doesn't need any memory access to work. This makes it more robust
      during crashes.
      
      The AArch32 port of the Trusted Firmware doesn't support this new API
      yet, so it is only enabled in AArch64 builds. Because of this, the
      common code must maintain compatibility with both systems. SP_MIN
      doesn't have to be updated because it's only used in AArch32 builds.
      The TSP is only used in AArch64, so it only needs to support the new
      API without keeping support for the old one.
      
      Special care must be taken because of PSCI_SYSTEM_SUSPEND. In Juno, this
      causes the UARTs to reset (except for the one used by the TSP). This
      means that they must be unregistered when suspending and re-registered
      when resuming. This wasn't a problem with the old driver because it just
      restarted the UART, and there were no problems associated with
      registering and unregistering consoles.
      
      The size reserved for BL2 has been increased.
      
      Change-Id: Icefd117dd1eb9c498921181a21318c2d2435c441
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      88a0523e
  13. 11 Jun, 2018 1 commit
  14. 17 May, 2018 1 commit
    • Daniel Boulby's avatar
      Ensure read and write of flags are 32 bit · 8abcdf92
      Daniel Boulby authored
      
      
      In 'console_set_scope' and when registering a console, field 'flags' of
      'console_t' is assigned a 32-bit value. However, when it is actually
      used, the functions perform 64-bit reads to access its value. This patch
      changes all 64-bit reads to 32-bit reads.
      
      Change-Id: I181349371409e60065335f078857946fa3c32dc1
      Signed-off-by: default avatarDaniel Boulby <daniel.boulby@arm.com>
      8abcdf92
  15. 15 May, 2018 1 commit
  16. 11 May, 2018 2 commits
    • Antonio Nino Diaz's avatar
      plat/arm: Migrate AArch64 port to the multi console driver · 2f18aa1f
      Antonio Nino Diaz authored
      
      
      The old API is deprecated and will eventually be removed.
      
      Arm platforms now use the multi console driver for boot and runtime
      consoles. However, the crash console uses the direct console API because
      it doesn't need any memory access to work. This makes it more robust
      during crashes.
      
      The AArch32 port of the Trusted Firmware doesn't support this new API
      yet, so it is only enabled in AArch64 builds. Because of this, the
      common code must maintain compatibility with both systems. SP_MIN
      doesn't have to be updated because it's only used in AArch32 builds.
      The TSP is only used in AArch64, so it only needs to support the new
      API without keeping support for the old one.
      
      Special care must be taken because of PSCI_SYSTEM_SUSPEND. In Juno, this
      causes the UARTs to reset (except for the one used by the TSP). This
      means that they must be unregistered when suspending and re-registered
      when resuming. This wasn't a problem with the old driver because it just
      restarted the UART, and there were no problems associated with
      registering and unregistering consoles.
      
      The size of BL31 has been increased in builds with SPM.
      
      Change-Id: Icefd117dd1eb9c498921181a21318c2d2435c441
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      2f18aa1f
    • Antonio Nino Diaz's avatar
      multi console: Assert that consoles aren't registered twice · c2e05bb7
      Antonio Nino Diaz authored
      
      
      In the multi console driver, allowing to register the same console more
      than once may result in an infinte loop when putc is called.
      
      If, for example, a boot message is trying to be printed, but the
      consoles in the loop in the linked list are runtime consoles, putc will
      iterate forever looking for a console that can print boot messages (or
      a NULL pointer that will never come).
      
      This loop in the linked list can occur after restoring the system from a
      system suspend. The boot console is registered during the cold boot in
      BL31, but the runtime console is registered even in the warm boot path.
      Consoles are always added to the start of the linked list when they are
      registered, so this it what should happen if they were actually
      different structures:
      
         console_list -> NULL
         console_list -> BOOT -> NULL
         console_list -> RUNTIME -> BOOT -> NULL
         console_list -> RUNTIME -> RUNTIME -> BOOT -> NULL
      
      In practice, the two runtime consoles are the same one, so they create
      this loop:
      
         console_list -> RUNTIME -.    X -> BOOT -> NULL
                             ^    |
                             `----'
      
      This patch adds an assertion to detect this problem. The assertion will
      fail whenever the same structure tries to be registered while being on
      the list.
      
      In order to assert this, console_is_registered() has been implemented.
      It returns 1 if the specified console is registered, 0 if not.
      
      Change-Id: I922485e743775ca9bd1af9cbd491ddd360526a6d
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      c2e05bb7
  17. 13 Apr, 2018 2 commits
    • Roberto Vargas's avatar
      Fix MISRA rule 8.4 Part 4 · 3b94189a
      Roberto Vargas authored
      
      
      Rule 8.4: A compatible declaration shall be visible when
                an object or function with external linkage is defined
      
      Fixed for:
      	make DEBUG=1 PLAT=fvp SPD=tspd TRUSTED_BOARD_BOOT=1 \
      	     GENERATE_COT=1 ARM_ROTPK_LOCATION=devel_rsa \
      	     ROT_KEY=arm_rotprivk_rsa.pem MBEDTLS_DIR=mbedtls all
      
      Change-Id: Ie4cd6011b3e4fdcdd94ccb97a7e941f3b5b7aeb8
      Signed-off-by: default avatarRoberto Vargas <roberto.vargas@arm.com>
      3b94189a
    • Roberto Vargas's avatar
      Fix MISRA rule 8.3 Part 4 · 735181b6
      Roberto Vargas authored
      
      
      Rule 8.3: All declarations of an object or function shall
                use the same names and type qualifiers
      
      Fixed for:
      	make DEBUG=1 PLAT=fvp SPD=tspd TRUSTED_BOARD_BOOT=1 \
      	     GENERATE_COT=1 ARM_ROTPK_LOCATION=devel_rsa \
      	     ROT_KEY=arm_rotprivk_rsa.pem MBEDTLS_DIR=mbedtls all
      
      Change-Id: Ia34fe1ae1f142e89c9a6c19831e3daf4d28f5831
      Signed-off-by: default avatarRoberto Vargas <roberto.vargas@arm.com>
      735181b6
  18. 09 Apr, 2018 1 commit
  19. 31 Mar, 2018 1 commit
    • Michalis Pappas's avatar
      qemu: don't use C functions for the crash console callbacks · 0e24ea81
      Michalis Pappas authored
      
      
      Use the console_pl011_core_* functions directly in the crash console
      callbacks.
      
      This bypasses the MULTI_CONSOLE_API for the crash console (UART1), but
      allows using the crash console before the C runtime has been initialized
      (eg to call ASM_ASSERT). This retains backwards compatibility with respect
      to functionality when the old API is used.
      
      Use the MULTI_CONSOLE_API to register UART0 as the boot and runtime
      console.
      
      Fixes ARM-software/tf-issues#572
      Signed-off-by: default avatarMichalis Pappas <mpappas@fastmail.fm>
      0e24ea81
  20. 26 Mar, 2018 1 commit