1. Sep 05, 2019
  2. Aug 31, 2019
  3. Aug 23, 2019
  4. Aug 19, 2019
  5. Aug 16, 2019
    • Atish Patra's avatar
      platform: Remove the ipi_sync method from all platforms. · 75229705
      Atish Patra authored
      
      
      OpenSBI manages outstanding TLB flush requests by queueing
      them in a fifo synchronously. An ipi sync which uses an
      atomic operation on MMIO address is no longer required.
      
      Remove the ipi sync method from platform header and all usage.
      
      Signed-off-by: default avatarAtish Patra <atish.patra@wdc.com>
      Reviewed-by: default avatarAnup Patel <anup.patel@wdc.com>
      75229705
    • Atish Patra's avatar
      lib: Fix race conditions in tlb fifo access. · 897a97a6
      Atish Patra authored
      
      
      Linux kernel expects tlb flush SBI call to be completely synchronous i.e.
      the SBI call should only return once corresponding *fence* instruction is
      executed.
      
      OpenSBI manages the outstanding TLB flush requests by keeping them in a
      per hart based fifo. However, there are few corner cases that may lead to
      race conditions while updating the fifo.
      
      Currently, the caller hart waits for IPI acknowledgement via clint
      address which is not a very good method as synchronization on MMIO may not
      be supported in every platform. Moreover, the waiter doesn't have any way of
      identifying if the IPI is received for specific tlb flush request or any
      other IPI. This may lead to unpredictable behavior in supervisor/user space.
      
      Fix this by waiting on individual fifo entries rather than MMIO address.
      Currently, a relaxed loop is being used because wfi again involves MMIO write
      which would be slower compared to relaxed loop. To avoid deadlock, fifo
      is processed every time a hart loops for fifo enqueue or fifo sync to consume
      the tlb flush requests sent by other harts.
      
      Signed-off-by: default avatarAnup Patel <anup.patel@wdc.com>
      Signed-off-by: default avatarAtish Patra <atish.patra@wdc.com>
      897a97a6
    • Atish Patra's avatar
      f6e13e0d
  6. Aug 13, 2019
    • Anup Patel's avatar
      lib: Handle traps when doing unpriv load/store in get_insn() · a88e424f
      Anup Patel authored
      
      
      We can get a page/access trap when doing unpriv load/store in
      get_insn() function because on a SMP system Linux swapper running
      on HART A can unmap pages from page table used by HART B.
      
      To tackle this we extend get_insn() implementation so that if
      we get trap in get_insn() then we redirect it to S-mode as fetch
      page/access fault.
      
      Signed-off-by: default avatarAnup Patel <anup.patel@wdc.com>
      a88e424f
    • Lukas Auer's avatar
      firmware: do not use relocated _boot_status before it is valid · 2e0f3ac7
      Lukas Auer authored
      
      
      When OpenSBI is started from an address not equal to the link address,
      it is first relocated to the link address. Hart 0 performs the
      relocation and notifies the other harts of its completion with the
      _boot_status variable. It uses the copy of the variable relative to the
      link address. This copy contains valid data only after relocation has
      finished. The waiting harts will therefore read invalid data until
      relocation has finished. This can cause them to continue execution too
      early.
      
      Fix this by using the _boot_status variable relative to the load address
      while OpenSBI has not finished relocation.
      
      Signed-off-by: default avatarLukas Auer <lukas.auer@aisec.fraunhofer.de>
      Reviewed-by: default avatarAnup Patel <anup.patel@wdc.com>
      2e0f3ac7
  7. Aug 12, 2019
  8. Aug 09, 2019
  9. Aug 07, 2019
  10. Jul 26, 2019
    • Anup Patel's avatar
      lib: Allow compiling without FP support · 0f18b3fe
      Anup Patel authored
      
      
      Currently, we mandate 'F' and 'D' extension in riscv_fp.h so that
      misaligned load/store emulation has access to FP registers.
      
      The above is too restrictive and we should certainly allow compilation
      for soft-FP toolchains and explicit PLATFORM_RISCV_ISA not having 'F'
      and 'D' extensions.
      
      This patch extends riscv_fp.h and misaligned load/store emulation to
      allow compiling OpenSBI without FP support.
      
      Signed-off-by: default avatarAnup Patel <anup.patel@wdc.com>
      Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
      0f18b3fe
  11. Jul 25, 2019
  12. Jul 24, 2019
  13. Jul 22, 2019
  14. Jul 02, 2019
  15. Jul 01, 2019
  16. Jun 30, 2019
  17. Jun 29, 2019