2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: Intel */
|
2014-12-12 13:05:28 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2013, Intel Corporation
|
|
|
|
* Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __FSP_API_H__
|
|
|
|
#define __FSP_API_H__
|
|
|
|
|
2015-01-28 05:13:37 +00:00
|
|
|
#include <linux/linkage.h>
|
|
|
|
|
2015-12-11 06:02:59 +00:00
|
|
|
/*
|
|
|
|
* FSP common configuration structure.
|
|
|
|
* This needs to be included in the platform-specific struct fsp_config_data.
|
|
|
|
*/
|
|
|
|
struct fsp_cfg_common {
|
|
|
|
struct fsp_header *fsp_hdr;
|
|
|
|
u32 stack_top;
|
|
|
|
u32 boot_mode;
|
|
|
|
};
|
|
|
|
|
2014-12-12 13:05:28 +00: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 07:50:49 +00:00
|
|
|
struct fsp_init_params {
|
2014-12-12 13:05:28 +00: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 07:50:49 +00:00
|
|
|
struct common_buf {
|
2014-12-12 13:05:28 +00: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 06:02:57 +00:00
|
|
|
u32 stack_top;
|
2014-12-12 13:05:28 +00:00
|
|
|
u32 boot_mode; /* Current system boot mode */
|
|
|
|
void *upd_data; /* User platform configuraiton data region */
|
2017-08-16 05:41:51 +00:00
|
|
|
u32 tolum_size; /* Top of low usable memory size (FSP 1.1) */
|
|
|
|
u32 reserved[6]; /* Reserved */
|
2014-12-12 13:05:28 +00:00
|
|
|
};
|
|
|
|
|
2014-12-17 07:50:49 +00:00
|
|
|
enum fsp_phase {
|
2014-12-12 13:05:28 +00: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 07:50:49 +00:00
|
|
|
struct fsp_notify_params {
|
2014-12-12 13:05:28 +00:00
|
|
|
/* Notification phase used for NotifyPhase API */
|
2014-12-17 07:50:49 +00:00
|
|
|
enum fsp_phase phase;
|
2014-12-12 13:05:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* FspInit API function prototype */
|
2015-01-28 05:13:37 +00:00
|
|
|
typedef asmlinkage u32 (*fsp_init_f)(struct fsp_init_params *params);
|
2014-12-12 13:05:28 +00:00
|
|
|
|
|
|
|
/* FspNotify API function prototype */
|
2015-01-28 05:13:37 +00:00
|
|
|
typedef asmlinkage u32 (*fsp_notify_f)(struct fsp_notify_params *params);
|
2014-12-12 13:05:28 +00:00
|
|
|
|
|
|
|
#endif
|