1. Oct 20, 2020
  2. Oct 18, 2020
  3. Oct 10, 2020
  4. Oct 02, 2020
  5. Sep 25, 2020
  6. Sep 16, 2020
  7. Sep 09, 2020
  8. Sep 01, 2020
  9. Aug 21, 2020
  10. Aug 20, 2020
  11. Aug 17, 2020
  12. Aug 14, 2020
    • Anup Patel's avatar
      firmware: fw_base: Improve exception stack setup in trap handler · 4b18a2ac
      Anup Patel authored
      
      
      Currently, the low-level trap handler (i.e. _trap_handler()) uses
      branch instructions to conditionally setup exception stack based
      on which mode trap occured.
      
      This patch implements exception stack setup using xor instructions
      which is faster with same number of instructions due to lack of
      branch instructions.
      
      The new exception stack setup approach can be best described by the
      following pseudocode:
      
       Came_From_M_Mode = ((MSTATUS.MPP < PRV_M) ? 1 : 0) - 1;
       Exception_Stack = TP ^ (Came_From_M_Mode & (SP ^ TP))
      
       Came_From_M_Mode = 0    ==>    Exception_Stack = TP
       Came_From_M_Mode = -1   ==>    Exception_Stack = SP
      
      Signed-off-by: default avatarAnup Patel <anup.patel@wdc.com>
      Reviewed-by: default avatarAtish Patra <atish.patra@wdc.com>
      4b18a2ac
  13. Aug 04, 2020
  14. Jul 29, 2020
  15. Jul 14, 2020
  16. Jul 06, 2020
  17. Jul 04, 2020
  18. Jun 29, 2020
  19. Jun 20, 2020
    • Anup Patel's avatar
      include: Bump-up version to 0.8 · a98258d0
      Anup Patel authored
      
      
      This patch updates OpenSBI version to 0.8 as part of
      release preparation.
      
      Signed-off-by: default avatarAnup Patel <anup.patel@wdc.com>
      a98258d0
    • Anup Patel's avatar
      lib: Don't return any invalid error from SBI ecall · 23141019
      Anup Patel authored
      
      
      We should only return valid error codes from SBI ecalls as
      defined by the RISC-V SBI spec.
      
      To achieve this:
      1. We use SBI_Exxxx defines for OpenSBI internal errors with
         error values starting from -1000
      2. We use SBI_ERR_xxxx defines for errors defined by SBI spec
      3. We map some of the SBI_Exxxx defines to SBI_ERR_xxxx defines
         which are semantically same
      4. We throw a error print and force return error code to
         SBI_ERR_FAILED in sbi_ecall_handler() if we see an invalid
         error code being returned to S-mode
      
      Signed-off-by: default avatarAnup Patel <anup.patel@wdc.com>
      Reviewed-by: default avatarAtish Patra <atish.patra@wdc.com>
      23141019
    • Liush's avatar
      lib: sbi: Fix 32/64 bits variable compatibility · 9bd5f8f1
      Liush authored
      
      
      On RV64,"unsigned long" is 64bit and "unsigned int" is 32bit. So in
      function "pmp_get" and "pmp_set", if "pmpcfg_shift >= 32", "0xff << pmpcfg_shift"
      will go beyond "unsigned int" width. This patch tries to fix this issue.
      
      In function 'pmp_get':
      	cfgmask = (0xff << pmpcfg_shift);
      			-->
      	cfgmask = (0xffUL << pmpcfg_shift);
      In function 'pmp_set':
      	cfgmask = ~(0xff << pmpcfg_shift);
      			-->
      	cfgmask = ~(0xffUL << pmpcfg_shift);
      
      Signed-off-by: default avatarLiush <liush.damon@gmail.com>
      Reviewed-by: default avatarAnup Patel <anup.patel@wdc.com>
      9bd5f8f1