1. 27 Mar, 2020 1 commit
    • Zelalem's avatar
      Flush dcache when storing timestamp · f27b6924
      Zelalem authored
      
      
      On DynamIQ CPU FVPs, stats test cases are failing when
      hardware-assisted coherency is enabled due to a corrupt
      timestamp value. Investigation of the issue indicates that
      on these models the timestamp value is stored in cache
      instead of memory. This patch flushes the dcache when the
      timestamp is stored to make sure it is stored in memory.
      
      Change-Id: I05cd54ba5991a5a96dd07f1e08b5212273201411
      Signed-off-by: default avatarZelalem <zelalem.aweke@arm.com>
      f27b6924
  2. 18 Mar, 2020 3 commits
  3. 17 Mar, 2020 9 commits
    • Manish Pandey's avatar
    • Madhukar Pappireddy's avatar
      FVP: In BL31/SP_MIN, map only the needed DRAM region statically · 493545b3
      Madhukar Pappireddy authored
      
      
      Rather than creating entry in plat_arm_mmap array to map the
      entire DRAM region in BL31/SP_MIN, only map a smaller region holding
      HW_CONFIG DTB. Consequently, an increase in number of sub-translation
      tables(level-2 and level-3) i.e., MAX_XLAT_TABLES is necessary to map
      the new region in memory.
      
      In order to accommodate the increased code size in BL31 i.e.,
      PROGBITS, the max size of BL31 image is increased by 0x1000(4K).
      
      Change-Id: I540b8ee550588e22a3a9fb218183d2ab8061c851
      Signed-off-by: default avatarMadhukar Pappireddy <madhukar.pappireddy@arm.com>
      493545b3
    • Andre Przywara's avatar
      rpi: docs: Update maintainers file to new RPi directory scheme · 9aaae8e6
      Andre Przywara authored
      
      
      With the addition of the Raspberry Pi 4 port the directory structure
      changed a bit, also the new port didn't have a separate entry.
      
      Add a new entry for the RPi4 port and adjust the path names.
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      Change-Id: I04b60e729a19bb0cc3dd6ce6899ec6480356b1f1
      9aaae8e6
    • Andre Przywara's avatar
      rpi: console: Autodetect Mini-UART vs. PL011 configuration · 9cc3fa1b
      Andre Przywara authored
      
      
      The Raspberry Pi has two different UART devices pin-muxed to GPIO 14&15:
      One ARM PL011 one and the 8250 compatible "Mini-UART".
      A dtoverlay parameter in config.txt will tell the firmware to switch
      between the two: it will setup the right clocks and will configure the
      pinmuxes accordingly.
      
      To autodetect the user's choice, we read the pinmux register and check
      its setting: ALT5 (0x2) means the Mini-UART is used, ALT0 (0x4) points
      to the PL011.
      Based on that we select the UART driver to initialise.
      
      This will allow console output in any case.
      
      Change-Id: I620d3ce68de6c6576599f2a405636020e1fd1376
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      9cc3fa1b
    • 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
    • Andre Przywara's avatar
      rpi3: console: Use same "clock-less" setup scheme as RPi4 · 795aefe5
      Andre Przywara authored
      
      
      In the wake of the upcoming unification of the console setup code
      between RPi3 and RPi4, extend the "clock-less" setup scheme to the
      RPi3. This avoid programming any clocks or baud rate registers,
      which makes the port more robust against GPU firmware changes.
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      Change-Id: Ida83a963bb18a878997e9cbd55f8ceac6a2e1c1f
      795aefe5
    • Andre Przywara's avatar
      rpi3: gpio: Simplify GPIO setup · 0d92745e
      Andre Przywara authored
      
      
      There is really no reason to use and pass around a struct when its only
      member is the (fixed) base address.
      
      Remove the struct and just use the base address on its own inside the
      GPIO driver. Then set the base address automatically.
      
      This simplifies GPIO setup for users, which now don't need to deal with
      zeroing a struct and setting the base address anymore.
      
      Change-Id: I3060f7859e3f8ef9a24cc8fb38307b5da943f127
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      0d92745e
    • Manish V Badarkhe's avatar
      Implement SMCCC_ARCH_SOC_ID SMC call · 0e753437
      Manish V Badarkhe authored
      Implemented SMCCC_ARCH_SOC_ID call in order to get below
      SOC information:
      
      1. SOC revision
      2. SOC version
      
      Implementation done using below SMCCC specification document:
      https://developer.arm.com/docs/den0028/c
      
      Signed-off-by: default avatarManish V Badarkhe <Manish.Badarkhe@arm.com>
      Change-Id: Ie0595f1c345a6429a6fb4a7f05534a0ca9c9a48b
      0e753437
  4. 16 Mar, 2020 1 commit
  5. 13 Mar, 2020 3 commits
  6. 12 Mar, 2020 14 commits
  7. 11 Mar, 2020 9 commits
    • Kalyani Chidambaram's avatar
      Tegra210: Remove "unsupported func ID" error msg · b8dbf073
      Kalyani Chidambaram authored
      
      
      The platform sip is reporting a "unsupported function ID" if the
      smc function id is not pmc command. When actually the smc function id
      could be specific to the tegra sip handler.
      This patch removes the error reported.
      
      Change-Id: Ia3c8545d345746c5eea6d75b9e6957ca23ae9ca3
      Signed-off-by: default avatarKalyani Chidambaram <kalyanic@nvidia.com>
      b8dbf073
    • Varun Wadekar's avatar
      Tegra210: support for secure physical timer · f8827c60
      Varun Wadekar authored
      
      
      This patch enables on-chip timer1 interrupts for Tegra210 platforms.
      
      Change-Id: Ic7417dc0e69264d7c28aa012fe2322cd30838f3e
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      f8827c60
    • Varun Wadekar's avatar
      spd: tlkd: secure timer interrupt handler · d205cda6
      Varun Wadekar authored
      
      
      This patch adds an interrupt handler for TLK. On receiving an
      interrupt, the source of the interrupt is determined and the
      interrupt is marked complete. The IRQ number is passed to
      TLK along with a special SMC function ID. TLK issues an SMC
      to notify completion of the interrupt handler in the S-EL1
      world.
      
      Change-Id: I76f28cee6537245c5e448d2078f86312219cea1a
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      d205cda6
    • Varun Wadekar's avatar
      Tegra: smmu: export handlers to read/write SMMU registers · 91dd7edd
      Varun Wadekar authored
      
      
      This patch exports the SMMU register read/write handlers for platforms.
      
      Change-Id: If92f0d3ce820e4997c090b48be7614407bb582da
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      91dd7edd
    • Pritesh Raithatha's avatar
      Tegra: smmu: remove context save sequence · a391d494
      Pritesh Raithatha authored
      
      
      SMMU and MC registers are saved as part of the System Suspend sequence.
      The register list includes some NS world SMMU registers that need to be
      saved by NS world software instead. All that remains as a result are
      the MC registers.
      
      This patch moves code to MC file as a result and renames all the
      variables and defines to use the MC prefix instead of SMMU. The
      Tegra186 and Tegra194 platform ports are updated to provide the MC
      context register list to the parent driver. The memory required for
      context save is reduced due to removal of the SMMU registers.
      
      Change-Id: I83a05079039f52f9ce91c938ada6cd6dfd9c843f
      Signed-off-by: default avatarPritesh Raithatha <praithatha@nvidia.com>
      a391d494
    • Varun Wadekar's avatar
      Tegra: bpmp: fixup TEGRA_CLK_SE values for Tegra186/Tegra194 · e9044480
      Varun Wadekar authored
      
      
      This patch fixes the SE clock ID being used for Tegra186 and Tegra194
      SoCs. Previous assumption, that both SoCs use the same clock ID, was
      incorrect.
      
      Change-Id: I1ef0da5547ff2e14151b53968cad9cc78fee63bd
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      e9044480
    • Pritesh Raithatha's avatar
      Tegra194: memctrl: lock some more MC SID security configs · de3fd9b3
      Pritesh Raithatha authored
      
      
      The platform code already contains the initial set of MC SID
      security configs to be locked during boot. This patch adds some
      more configs to the list. Since the reset value of these registers
      is already as per expectations, there is no need to change it.
      
      MC SID security configs
      - PTCR,
      - MIU6R, MIU6W, MIU7R, MIU7W,
      - MPCORER, MPCOREW,
      - NVDEC1SRD, NVDEC1SRD1, NVDEC1SWR.
      
      Change-Id: Ia9a1f6a6b6d34fb2787298651f7a4792a40b88ab
      Signed-off-by: default avatarPritesh Raithatha <praithatha@nvidia.com>
      de3fd9b3
    • Jeetesh Burman's avatar
      Tegra194: add SE support to generate SHA256 of TZRAM · 029dd14e
      Jeetesh Burman authored
      
      
      The BL3-1 firmware code is stored in TZSRAM on Tegra194 platforms. This
      memory loses power when we enter System Suspend and so its contents are
      stored to TZDRAM, before entry. This opens up an attack vector where the
      TZDRAM contents might be tampered with when we are in the System Suspend
      mode. To mitigate this attack the SE engine calculates the hash of entire
      TZSRAM and stores it in PMC scratch, before we copy data to TZDRAM. The
      WB0 code will validate the TZDRAM and match the hash with the one in PMC
      scratch.
      
      This patch adds driver for the SE engine, with APIs to calculate the hash
      and store to PMC scratch registers.
      
      Change-Id: I04cc0eb7f54c69d64b6c34fc2ff62e4cfbdd43b2
      Signed-off-by: default avatarJeetesh Burman <jburman@nvidia.com>
      029dd14e
    • Jeetesh Burman's avatar
      Tegra194: store TZDRAM base/size to scratch registers · 2ac7b223
      Jeetesh Burman authored
      
      
      This patch saves the TZDRAM base and size values to secure scratch
      registers, for the WB0. The WB0 reads these values and uses them to
      verify integrity of the TZDRAM aperture.
      
      Change-Id: I2f5fd11c87804d20e2698de33be977991c9f6f33
      Signed-off-by: default avatarJeetesh Burman <jburman@nvidia.com>
      2ac7b223