fsp_api.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Copyright (C) 2013, Intel Corporation
  3. * Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com>
  4. *
  5. * SPDX-License-Identifier: Intel
  6. */
  7. #ifndef __FSP_API_H__
  8. #define __FSP_API_H__
  9. #include <linux/linkage.h>
  10. /*
  11. * FspInit continuation function prototype.
  12. * Control will be returned to this callback function after FspInit API call.
  13. */
  14. typedef void (*fsp_continuation_f)(u32 status, void *hob_list);
  15. struct fsp_init_params {
  16. /* Non-volatile storage buffer pointer */
  17. void *nvs_buf;
  18. /* Runtime buffer pointer */
  19. void *rt_buf;
  20. /* Continuation function address */
  21. fsp_continuation_f continuation;
  22. };
  23. struct common_buf {
  24. /*
  25. * Stack top pointer used by the bootloader. The new stack frame will be
  26. * set up at this location after FspInit API call.
  27. */
  28. u32 *stack_top;
  29. u32 boot_mode; /* Current system boot mode */
  30. void *upd_data; /* User platform configuraiton data region */
  31. u32 reserved[7]; /* Reserved */
  32. };
  33. enum fsp_phase {
  34. /* Notification code for post PCI enuermation */
  35. INIT_PHASE_PCI = 0x20,
  36. /* Notification code before transfering control to the payload */
  37. INIT_PHASE_BOOT = 0x40
  38. };
  39. struct fsp_notify_params {
  40. /* Notification phase used for NotifyPhase API */
  41. enum fsp_phase phase;
  42. };
  43. /* FspInit API function prototype */
  44. typedef asmlinkage u32 (*fsp_init_f)(struct fsp_init_params *params);
  45. /* FspNotify API function prototype */
  46. typedef asmlinkage u32 (*fsp_notify_f)(struct fsp_notify_params *params);
  47. #endif