1. Jan 15, 2021
  2. Jan 12, 2021
    • Anup Patel's avatar
      lib: sbi: Allow platforms to provide root domain memory regions · db56341d
      Anup Patel authored
      
      
      Currently, the root domain memory regions are fixed in generic
      code but some of the platforms may want to explicitly define
      memory regions for the root domain.
      
      This patch adds optional domains_root_regions() platform callback
      which platforms can use to provide platform specific root domain
      memory regions. Due to this changes, the root domain should also
      undergo all sanity checks (just like regular domain) so we use
      sbi_domain_register() to register root domain.
      
      Signed-off-by: default avatarAnup Patel <anup.patel@wdc.com>
      Reviewed-by: default avatarAtish Patra <atish.patra@wdc.com>
      db56341d
  3. Jan 07, 2021
    • Vijai Kumar K's avatar
      lib: utils: Fix shakti uart implementation · 0d49c3bc
      Vijai Kumar K authored
      
      
      Fix uart_putc implementation.
      Due to a bug in the IP, this went unnoticed.
      Use macros instead of magic numbers to make the code
      more readable.
      
      Signed-off-by: default avatarVijai Kumar K <vijai@behindbytes.com>
      Reviewed-by: default avatarAnup Patel <anup.patel@wdc.com>
      0d49c3bc
    • Anup Patel's avatar
      lib: sbi: Allow custom local TLB flush function · 12394a26
      Anup Patel authored
      
      
      Currently, we have fixed TLB flush types supported by the
      remote TLB library. This approach is not flexible and does
      not allow custom local TLB flush function. For example,
      after updating PMP entries on a set of HARTs at runtime,
      we have to flush TLB on these HARTs as well.
      
      To support custom local TLB flush function, we replace the
      "type" field of "struct sbi_tlb_info" with a local TLB flush
      function pointer. We also provide definitions of standard TLB
      flush operations (such as fence_i, sfence.vma, hfence.vvma,
      hfence.gvma, etc).
      
      Signed-off-by: default avatarAnup Patel <anup.patel@wdc.com>
      Reviewed-by: default avatarAtish Patra <atish.patra@wdc.com>
      12394a26
    • Anup Patel's avatar
      lib: sbi: Introduce sbi_trap_exit() API · b7df5e43
      Anup Patel authored
      
      
      We introduce sbi_trap_exit() API which can help non-firmware
      (i.e. generic or platform) code to force exit trap/interrupt
      handling and resume execution at context pointed by parameter
      "const struct sbi_trap_regs *regs".
      
      This new sbi_trap_exit() API will help Keystone Enclave project
      to resume execution of enclave from custom SBI call handler.
      
      Signed-off-by: default avatarAnup Patel <anup.patel@wdc.com>
      Reviewed-by: default avatarAtish Patra <atish.patra@wdc.com>
      b7df5e43
    • Anup Patel's avatar
      lib: sbi: Replace args with trap registers in ecall handler · 80bc5065
      Anup Patel authored
      
      
      We had added args pointer in ecall handler to ensure that ecall
      handler only implements functionality and does not deal with
      SBI calling convention. This also helped us to keep SBI calling
      convention related code in one place at sbi_ecall_handler().
      
      The Keystone Enclavce project needs access to the trap regsiters
      in their ecall handler so that they can context switch enclaves
      in custom SBI calls. To help the Keystone Enclave project, we
      replace the args pointer in ecall handler parameter with a const
      pointer to trap registers.
      
      Signed-off-by: default avatarAnup Patel <anup.patel@wdc.com>
      Reviewed-by: default avatarAtish Patra <atish.patra@wdc.com>
      80bc5065
  4. Dec 24, 2020
  5. Dec 16, 2020
  6. Dec 13, 2020
  7. Dec 04, 2020
  8. Dec 01, 2020
  9. Nov 27, 2020
  10. Nov 10, 2020
    • Anup Patel's avatar
      lib: sbi: Improve boot prints in cold boot sequence · 48616b3d
      Anup Patel authored
      
      
      Currently, we have all boot prints at the end of cold boot sequence
      which means if there is any failure in cold boot sequence before
      boot prints then we don't get any print.
      
      This patch improves boot prints in cold boot sequence as follows:
      1. We divide the boot prints into multiple parts and print it
         from different locations after sbi_console_init()
      2. We throw an error print if there is any failure in cold boot
         sequence after sbi_console_init()
      
      Signed-off-by: default avatarAnup Patel <anup.patel@wdc.com>
      Reviewed-by: default avatarAtish Patra <atish.patra@wdc.com>
      48616b3d
  11. Nov 02, 2020
  12. Oct 27, 2020
  13. Oct 23, 2020
  14. Oct 21, 2020
  15. Oct 20, 2020