blob: 524da5feb75071d12e48295f8132249ceb032b6b [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: Intel */
Bin Meng2922b3e2014-12-12 21:05:28 +08002/*
3 * Copyright (C) 2013, Intel Corporation
4 * Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com>
Bin Meng2922b3e2014-12-12 21:05:28 +08005 */
6
Simon Glass2cf3a5a2019-12-06 21:42:22 -07007#ifndef __FSP1_API_H__
8#define __FSP1_API_H__
Bin Meng2922b3e2014-12-12 21:05:28 +08009
Simon Glass457191e2015-01-27 22:13:37 -070010#include <linux/linkage.h>
Simon Glass2cf3a5a2019-12-06 21:42:22 -070011#include <asm/fsp/fsp_api.h>
Bin Meng2922b3e2014-12-12 21:05:28 +080012/*
Bin Menga0c94dc2015-12-10 22:02:59 -080013 * FSP common configuration structure.
14 * This needs to be included in the platform-specific struct fsp_config_data.
15 */
16struct fsp_cfg_common {
17 struct fsp_header *fsp_hdr;
18 u32 stack_top;
19 u32 boot_mode;
20};
21
22/*
Bin Meng2922b3e2014-12-12 21:05:28 +080023 * FspInit continuation function prototype.
24 * Control will be returned to this callback function after FspInit API call.
25 */
26typedef void (*fsp_continuation_f)(u32 status, void *hob_list);
27
Bin Mengdb60d862014-12-17 15:50:49 +080028struct fsp_init_params {
Bin Meng2922b3e2014-12-12 21:05:28 +080029 /* Non-volatile storage buffer pointer */
30 void *nvs_buf;
31 /* Runtime buffer pointer */
32 void *rt_buf;
33 /* Continuation function address */
34 fsp_continuation_f continuation;
35};
36
Bin Mengdb60d862014-12-17 15:50:49 +080037struct common_buf {
Bin Meng2922b3e2014-12-12 21:05:28 +080038 /*
39 * Stack top pointer used by the bootloader. The new stack frame will be
40 * set up at this location after FspInit API call.
41 */
Bin Meng40745a02015-12-10 22:02:57 -080042 u32 stack_top;
Bin Meng2922b3e2014-12-12 21:05:28 +080043 u32 boot_mode; /* Current system boot mode */
44 void *upd_data; /* User platform configuraiton data region */
Bin Mengf3c06322017-08-15 22:41:51 -070045 u32 tolum_size; /* Top of low usable memory size (FSP 1.1) */
46 u32 reserved[6]; /* Reserved */
Bin Meng2922b3e2014-12-12 21:05:28 +080047};
48
Bin Meng2922b3e2014-12-12 21:05:28 +080049/* FspInit API function prototype */
Simon Glass457191e2015-01-27 22:13:37 -070050typedef asmlinkage u32 (*fsp_init_f)(struct fsp_init_params *params);
Bin Meng2922b3e2014-12-12 21:05:28 +080051
Bin Meng2922b3e2014-12-12 21:05:28 +080052#endif