1. Mar 28, 2020
    • Anup Patel's avatar
      lib: Optimize unpriv load/store implementation · 1de66d17
      Anup Patel authored
      
      
      This patch optimize unpriv load/store implementation by having
      dedicated unpriv trap handler (just like KVM RISC-V).
      
      As a result of this optimization:
      1. We have reduced roughly 13+ instruction in all unpriv load/store
         functions. The reduced instruction also include two function calls.
      2. Per-HART trap info pointer in scratch space is now redundant
         hence removed.
      3. The sbi_trap_handler() is now much cleaner because we don't have
         to handle unpriv load/store traps.
      
      Signed-off-by: default avatarAnup Patel <anup.patel@wdc.com>
      Reviewed-by: default avatarAtish Patra <atish.patra@wdc.com>
      1de66d17
    • Anup Patel's avatar
      lib: utils: Improve fdt_cpu_fixup() implementation · 160c8853
      Anup Patel authored
      
      
      Currently, the fdt_cpu_fixup() implementation assumes:
      1. We have one CPU DT for each HART under /cpus DT node
      2. The CPU DT nodes are named sequentially (i.e cpu@0,
         cpu@1, ...) which is not true for discontinuous and
         sparse HART ids (i.e. cpu@0, cpu@4, cpu@5). Generally,
         CPU DT node are named based on HART id and not HART
         index
      
      If any of the above assumptions are violated then the
      fdt_cpu_fixup() will not work.
      
      This improves fdt_cpu_fixup() implementation and makes
      it independent of above assumptions.
      
      Signed-off-by: default avatarAnup Patel <anup.patel@wdc.com>
      Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
      Reviewed-by: default avatarAtish Patra <atish.patra@wdc.com>
      160c8853
    • Anup Patel's avatar
      scripts: Extend create-binary-archive.sh for unified binary tar ball · 550ba88d
      Anup Patel authored
      
      
      This patch extends/revamps create-binary-archive.sh to allow creating
      unified binary tar ball containing both RV32 and RV64 images. Users
      can also create "RV32 only" or "RV64 only" tar balls as well.
      
      Few example commands are as follows:
      ./scripts/create-binary-archive.sh (Build both RV32 & RV64 images)
      ./scripts/create-binary-archive.sh -x 32 (Build RV32 only images)
      ./scripts/create-binary-archive.sh -x 64 (Build RV64 only images)
      
      Signed-off-by: default avatarAnup Patel <anup.patel@wdc.com>
      550ba88d
  2. Mar 26, 2020
  3. Mar 24, 2020
  4. Mar 21, 2020
    • Atish Patra's avatar
      lib: Check MSIP bit after returning from WFI · 9a74a64a
      Atish Patra authored
      Commit 71d2b837 (lib: Move all coldboot wait APIs to sbi_init.c)
      caused a regression while moving the code from sbi_hart.c to sbi_init.c.
      
      As per original commit text, WFI can be implemented as a NOP according
      to the RISC-V privilege specification. Software should ensure that
      relevant interrupt pending bits are set. Otherwise, loop back to WFI.
      Fix the regression by applying the original patch to sbi_init.c.
      
      Fixes: 71d2b837
      
       ("lib: Move all coldboot wait APIs to sbi_init.c")
      
      Signed-off-by: default avatarAtish Patra <atish.patra@wdc.com>
      Reviewed-by: default avatarAnup Patel <anup.patel@wdc.com>
      9a74a64a
  5. Mar 19, 2020
  6. Mar 18, 2020
  7. Mar 17, 2020