platform_override.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * SPDX-License-Identifier: BSD-2-Clause
  3. *
  4. * Copyright (c) 2020 Western Digital Corporation or its affiliates.
  5. *
  6. * Authors:
  7. * Anup Patel <anup.patel@wdc.com>
  8. */
  9. #ifndef __PLATFORM_OVERRIDE_H__
  10. #define __PLATFORM_OVERRIDE_H__
  11. #include <sbi/sbi_hart.h>
  12. #include <sbi/sbi_types.h>
  13. #include <sbi/sbi_trap.h>
  14. struct platform_override {
  15. const struct fdt_match *match_table;
  16. u64 (*features)(const struct fdt_match *match);
  17. u64 (*tlbr_flush_limit)(const struct fdt_match *match);
  18. bool (*cold_boot_allowed)(u32 hartid, const struct fdt_match *match);
  19. int (*early_init)(bool cold_boot, const struct fdt_match *match);
  20. int (*final_init)(bool cold_boot, const struct fdt_match *match);
  21. void (*early_exit)(const struct fdt_match *match);
  22. void (*final_exit)(const struct fdt_match *match);
  23. int (*fdt_fixup)(void *fdt, const struct fdt_match *match);
  24. int (*extensions_init)(const struct fdt_match *match,
  25. struct sbi_hart_features *hfeatures);
  26. void (*fw_init)(void *fdt, const struct fdt_match *match);
  27. int (*vendor_ext_provider)(long extid, long funcid,
  28. const struct sbi_trap_regs *regs,
  29. unsigned long *out_value,
  30. struct sbi_trap_info *out_trap,
  31. const struct fdt_match *match);
  32. };
  33. #endif