2014-12-12 22:05:28 +09:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2013, Intel Corporation
|
|
|
|
* Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Intel
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __FSP_API_H__
|
|
|
|
#define __FSP_API_H__
|
|
|
|
|
2015-01-28 14:13:37 +09:00
|
|
|
#include <linux/linkage.h>
|
|
|
|
|
2014-12-12 22:05:28 +09:00
|
|
|
/*
|
|
|
|
* FspInit continuation function prototype.
|
|
|
|
* Control will be returned to this callback function after FspInit API call.
|
|
|
|
*/
|
|
|
|
typedef void (*fsp_continuation_f)(u32 status, void *hob_list);
|
|
|
|
|
2014-12-17 16:50:49 +09:00
|
|
|
struct fsp_init_params {
|
2014-12-12 22:05:28 +09:00
|
|
|
/* Non-volatile storage buffer pointer */
|
|
|
|
void *nvs_buf;
|
|
|
|
/* Runtime buffer pointer */
|
|
|
|
void *rt_buf;
|
|
|
|
/* Continuation function address */
|
|
|
|
fsp_continuation_f continuation;
|
|
|
|
};
|
|
|
|
|
2014-12-17 16:50:49 +09:00
|
|
|
struct common_buf {
|
2014-12-12 22:05:28 +09:00
|
|
|
/*
|
|
|
|
* Stack top pointer used by the bootloader. The new stack frame will be
|
|
|
|
* set up at this location after FspInit API call.
|
|
|
|
*/
|
2015-12-11 15:02:57 +09:00
|
|
|
u32 stack_top;
|
2014-12-12 22:05:28 +09:00
|
|
|
u32 boot_mode; /* Current system boot mode */
|
|
|
|
void *upd_data; /* User platform configuraiton data region */
|
|
|
|
u32 reserved[7]; /* Reserved */
|
|
|
|
};
|
|
|
|
|
2014-12-17 16:50:49 +09:00
|
|
|
enum fsp_phase {
|
2014-12-12 22:05:28 +09:00
|
|
|
/* Notification code for post PCI enuermation */
|
|
|
|
INIT_PHASE_PCI = 0x20,
|
|
|
|
/* Notification code before transfering control to the payload */
|
|
|
|
INIT_PHASE_BOOT = 0x40
|
|
|
|
};
|
|
|
|
|
2014-12-17 16:50:49 +09:00
|
|
|
struct fsp_notify_params {
|
2014-12-12 22:05:28 +09:00
|
|
|
/* Notification phase used for NotifyPhase API */
|
2014-12-17 16:50:49 +09:00
|
|
|
enum fsp_phase phase;
|
2014-12-12 22:05:28 +09:00
|
|
|
};
|
|
|
|
|
|
|
|
/* FspInit API function prototype */
|
2015-01-28 14:13:37 +09:00
|
|
|
typedef asmlinkage u32 (*fsp_init_f)(struct fsp_init_params *params);
|
2014-12-12 22:05:28 +09:00
|
|
|
|
|
|
|
/* FspNotify API function prototype */
|
2015-01-28 14:13:37 +09:00
|
|
|
typedef asmlinkage u32 (*fsp_notify_f)(struct fsp_notify_params *params);
|
2014-12-12 22:05:28 +09:00
|
|
|
|
|
|
|
#endif
|