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>
|
|
|
|
*/
|
|
|
|
|
2019-12-07 04:42:22 +00:00
|
|
|
#ifndef __FSP1_API_H__
|
|
|
|
#define __FSP1_API_H__
|
2014-12-12 13:05:28 +00:00
|
|
|
|
2015-01-28 05:13:37 +00:00
|
|
|
#include <linux/linkage.h>
|
2019-12-07 04:42:22 +00:00
|
|
|
#include <asm/fsp/fsp_api.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
|
|
|
};
|
|
|
|
|
|
|
|
/* 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
|
|
|
|
|
|
|
#endif
|