Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: Intel */ |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2013, Intel Corporation |
| 4 | * Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com> |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 5 | */ |
| 6 | |
Simon Glass | 2cf3a5a | 2019-12-06 21:42:22 -0700 | [diff] [blame] | 7 | #ifndef __FSP1_API_H__ |
| 8 | #define __FSP1_API_H__ |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 9 | |
Simon Glass | 457191e | 2015-01-27 22:13:37 -0700 | [diff] [blame] | 10 | #include <linux/linkage.h> |
Simon Glass | 2cf3a5a | 2019-12-06 21:42:22 -0700 | [diff] [blame] | 11 | #include <asm/fsp/fsp_api.h> |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 12 | /* |
Bin Meng | a0c94dc | 2015-12-10 22:02:59 -0800 | [diff] [blame] | 13 | * FSP common configuration structure. |
| 14 | * This needs to be included in the platform-specific struct fsp_config_data. |
| 15 | */ |
| 16 | struct fsp_cfg_common { |
| 17 | struct fsp_header *fsp_hdr; |
| 18 | u32 stack_top; |
| 19 | u32 boot_mode; |
| 20 | }; |
| 21 | |
| 22 | /* |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 23 | * FspInit continuation function prototype. |
| 24 | * Control will be returned to this callback function after FspInit API call. |
| 25 | */ |
| 26 | typedef void (*fsp_continuation_f)(u32 status, void *hob_list); |
| 27 | |
Bin Meng | db60d86 | 2014-12-17 15:50:49 +0800 | [diff] [blame] | 28 | struct fsp_init_params { |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 29 | /* 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 Meng | db60d86 | 2014-12-17 15:50:49 +0800 | [diff] [blame] | 37 | struct common_buf { |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 38 | /* |
| 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 Meng | 40745a0 | 2015-12-10 22:02:57 -0800 | [diff] [blame] | 42 | u32 stack_top; |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 43 | u32 boot_mode; /* Current system boot mode */ |
| 44 | void *upd_data; /* User platform configuraiton data region */ |
Bin Meng | f3c0632 | 2017-08-15 22:41:51 -0700 | [diff] [blame] | 45 | u32 tolum_size; /* Top of low usable memory size (FSP 1.1) */ |
| 46 | u32 reserved[6]; /* Reserved */ |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 47 | }; |
| 48 | |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 49 | /* FspInit API function prototype */ |
Simon Glass | 457191e | 2015-01-27 22:13:37 -0700 | [diff] [blame] | 50 | typedef asmlinkage u32 (*fsp_init_f)(struct fsp_init_params *params); |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 51 | |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 52 | #endif |