1. Aug 24, 2023
    • Atish Patra's avatar
      Add DT for 1G config · b80a3586
      Atish Patra authored
      
      
      Signed-off-by: default avatarAtish Patra <atishp@rivosinc.com>
      b80a3586
    • Atish Patra's avatar
      fw: rivos: Add Rivos specific changes under FW_RIVOS · 99612b7b
      Atish Patra authored
      
      
      Rivos specific firmware need requires the following setup before
      opensbi firmware execution starts.
      
      1. R-code setup
      2. MCRR/MDRR setup from LRAM
      3. PMARR setup
      
      Currently, fw_rivos does all 3 operations if FW_RIVOS=y is provided
      at runtime. Eventually, #1 should be done by separate R-code stage
      code as we need to perform more than jump to LRAM.
      
      Ideally, #2 & #3 should be done stage prior to OpenSBI. In upstream
      boot flow U-BOOT SPL can be used to support that. However, Rivos
      firmware has already multiple stages boot flow defined. Eventually,
      we should be able to drop the code under FW_RIVOS and just load
      opensbi as last stage resident M-mode firmware (fw4-m).
      
      Signed-off-by: default avatarAtish Patra <atishp@rivosinc.com>
      99612b7b
    • Atish Patra's avatar
      lib/sbi: Increase IMSIC & ROOM max region count · aa7be763
      Atish Patra authored
      
      
      Each imsic region is added to the root domain. Increase the max count
      to allow booting more harts where M-mode imsic regions are in a separate
      region per hart.
      
      Signed-off-by: default avatarAtish Patra <atishp@rivosinc.com>
      aa7be763
  2. Jun 24, 2023
  3. Jun 23, 2023
  4. Jun 21, 2023
  5. Jun 15, 2023
  6. Jun 14, 2023
  7. Jun 06, 2023
  8. Jun 05, 2023
  9. Jun 04, 2023
    • Andrew Jones's avatar
      lib: sbi: Align system suspend errors with spec · bdde2ecd
      Andrew Jones authored
      
      
      The spec says sbi_system_suspend() will return SBI_ERR_INVALID_PARAM
      when "sleep_type is reserved or is platform-specific and unimplemented"
      and SBI_ERR_NOT_SUPPORTED when sleep_type "is not reserved and is
      implemented, but the platform does not support it due to one or more
      missing dependencies." Ensure SBI_ERR_INVALID_PARAM is returned for
      reserved sleep types and that the system suspend driver can choose
      which of the two error types to return itself by returning an error
      from its check function rather than a boolean.
      
      Signed-off-by: default avatarAndrew Jones <ajones@ventanamicro.com>
      Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
      bdde2ecd
    • Heinrich Schuchardt's avatar
      lib: utils/ipi: buffer overrun aclint_mswi_cold_init · df75e099
      Heinrich Schuchardt authored
      The parameter checks in aclint_mswi_cold_init() don't guard against a
      buffer overrun.
      
      mswi_hartid2data is defined as an array of SBI_HARTMASK_MAX_BITS entries.
      The current check allows
      
          mswi->hart_count = ACLINT_MSWI_MAX_HARTS
          mswi->first_hartid = SBI_HARTMASK_MAX_BITS - 1.
      
      With these values mswi_hartid2data will be accessed at index
      
          SBI_HARTMASK_MAX_BITS + SBI_HARTMASK_MAX_BITS - 2.
      
      We have to check the sum of mswi->first_hartid and mswi->hart_count.
      
      Furthermore mswi->hart_count = 0 would not make much sense.
      
      Addresses-Coverity-ID: 1529705 ("Out-of-bounds write")
      Fixes: 5a049fe1
      
       ("lib: utils/ipi: Add ACLINT MSWI library")
      Signed-off-by: default avatarHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
      Reviewed-by: default avatarXiang W <wxjstz@126.com>
      Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
      df75e099
  10. May 26, 2023
  11. May 23, 2023
  12. May 22, 2023
    • Filip Filmar's avatar
      Makefile: Dereference symlinks on install · d4c46e0f
      Filip Filmar authored
      
      
      Adds the `-L` flag (follow symlinks) to the `cp` commands used to
      install `libsbi.a` and `include/sbi/*`.
      
      This should make no difference in regular compilation. However,
      it does make a difference when compiling with bazel.  Namely,
      bazel's sandboxing will turn all the source files into symlinks.
      After installation with `cp` the destination files will be
      symlinks pointing to the sandbox symlinks. As the sandbox files
      are removed when compilation ends, the just-copied symlinks
      become dangling symlinks.
      
      The resulting include files will be
      unusable due to the dangling symlink issues. Adding `-L` when
      copying ensures that the files obtained by executing the `install`
      targets are always dereferenced to files, rather than symlinks,
      eliminating this issue.
      
      Signed-off-by: default avatarFilip Filmar <fmil@google.com>
      Reviewed-by: default avatarXiang W <wxjstz@126.com>
      Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
      d4c46e0f
  13. May 21, 2023