sbi_hsm.h 897 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * SPDX-License-Identifier: BSD-2-Clause
  3. *
  4. * Copyright (c) 2020 Western Digital Corporation or its affiliates.
  5. *
  6. * Authors:
  7. * Atish Patra <atish.patra@wdc.com>
  8. */
  9. #ifndef __SBI_HSM_H__
  10. #define __SBI_HSM_H__
  11. #include <sbi/sbi_types.h>
  12. struct sbi_domain;
  13. struct sbi_scratch;
  14. int sbi_hsm_init(struct sbi_scratch *scratch, u32 hartid, bool cold_boot);
  15. void __noreturn sbi_hsm_exit(struct sbi_scratch *scratch);
  16. int sbi_hsm_hart_start(struct sbi_scratch *scratch,
  17. const struct sbi_domain *dom,
  18. u32 hartid, ulong saddr, ulong smode, ulong priv);
  19. int sbi_hsm_hart_stop(struct sbi_scratch *scratch, bool exitnow);
  20. int sbi_hsm_hart_get_state(const struct sbi_domain *dom, u32 hartid);
  21. int sbi_hsm_hart_interruptible_mask(const struct sbi_domain *dom,
  22. ulong hbase, ulong *out_hmask);
  23. void sbi_hsm_prepare_next_jump(struct sbi_scratch *scratch, u32 hartid);
  24. #endif