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 8 #ifndef __FSP_API_H__ 9 #define __FSP_API_H__ 10 11 /* 12 * FspInit continuation function prototype. 13 * Control will be returned to this callback function after FspInit API call. 14 */ 15 typedef void (*fsp_continuation_f)(u32 status, void *hob_list); 16 17 struct fsp_init_params { 18 /* Non-volatile storage buffer pointer */ 19 void *nvs_buf; 20 /* Runtime buffer pointer */ 21 void *rt_buf; 22 /* Continuation function address */ 23 fsp_continuation_f continuation; 24 }; 25 26 struct common_buf { 27 /* 28 * Stack top pointer used by the bootloader. The new stack frame will be 29 * set up at this location after FspInit API call. 30 */ 31 u32 *stack_top; 32 u32 boot_mode; /* Current system boot mode */ 33 void *upd_data; /* User platform configuraiton data region */ 34 u32 reserved[7]; /* Reserved */ 35 }; 36 37 enum fsp_phase { 38 /* Notification code for post PCI enuermation */ 39 INIT_PHASE_PCI = 0x20, 40 /* Notification code before transfering control to the payload */ 41 INIT_PHASE_BOOT = 0x40 42 }; 43 44 struct fsp_notify_params { 45 /* Notification phase used for NotifyPhase API */ 46 enum fsp_phase phase; 47 }; 48 49 /* FspInit API function prototype */ 50 typedef u32 (*fsp_init_f)(struct fsp_init_params *params); 51 52 /* FspNotify API function prototype */ 53 typedef u32 (*fsp_notify_f)(struct fsp_notify_params *params); 54 55 #endif 56