mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-23 22:14:54 +00:00
x86: fsp: Rename shared_data to fsp_config_data
FSP has several config data like UPD, HDA verb table which can be overridden or provided by bootloader. Currently in U-Boot only UPD is handled via struct shared_data. To accommodate any platform, we rename shared_data to fsp_config_data and move the definition from common place fsp_support.h to platform-specific place fsp_configs.h. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
57ac74ff04
commit
cb379a34c4
5 changed files with 46 additions and 12 deletions
15
arch/x86/include/asm/arch-baytrail/fsp/fsp_configs.h
Normal file
15
arch/x86/include/asm/arch-baytrail/fsp/fsp_configs.h
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Intel
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __FSP_CONFIGS_H__
|
||||||
|
#define __FSP_CONFIGS_H__
|
||||||
|
|
||||||
|
struct fsp_config_data {
|
||||||
|
struct fsp_cfg_common common;
|
||||||
|
struct upd_region fsp_upd;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* __FSP_CONFIGS_H__ */
|
15
arch/x86/include/asm/arch-queensbay/fsp/fsp_configs.h
Normal file
15
arch/x86/include/asm/arch-queensbay/fsp/fsp_configs.h
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Intel
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __FSP_CONFIGS_H__
|
||||||
|
#define __FSP_CONFIGS_H__
|
||||||
|
|
||||||
|
struct fsp_config_data {
|
||||||
|
struct fsp_cfg_common common;
|
||||||
|
struct upd_region fsp_upd;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* __FSP_CONFIGS_H__ */
|
|
@ -10,6 +10,16 @@
|
||||||
|
|
||||||
#include <linux/linkage.h>
|
#include <linux/linkage.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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;
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FspInit continuation function prototype.
|
* FspInit continuation function prototype.
|
||||||
* Control will be returned to this callback function after FspInit API call.
|
* Control will be returned to this callback function after FspInit API call.
|
||||||
|
|
|
@ -17,13 +17,7 @@
|
||||||
#include "fsp_infoheader.h"
|
#include "fsp_infoheader.h"
|
||||||
#include "fsp_bootmode.h"
|
#include "fsp_bootmode.h"
|
||||||
#include <asm/arch/fsp/fsp_vpd.h>
|
#include <asm/arch/fsp/fsp_vpd.h>
|
||||||
|
#include <asm/arch/fsp/fsp_configs.h>
|
||||||
struct shared_data {
|
|
||||||
struct fsp_header *fsp_hdr;
|
|
||||||
u32 stack_top;
|
|
||||||
u32 boot_mode;
|
|
||||||
struct upd_region fsp_upd;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define FSP_LOWMEM_BASE 0x100000UL
|
#define FSP_LOWMEM_BASE 0x100000UL
|
||||||
#define FSP_HIGHMEM_BASE 0x100000000ULL
|
#define FSP_HIGHMEM_BASE 0x100000000ULL
|
||||||
|
|
|
@ -99,7 +99,7 @@ void fsp_continue(u32 status, void *hob_list)
|
||||||
|
|
||||||
void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf)
|
void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf)
|
||||||
{
|
{
|
||||||
struct shared_data shared_data;
|
struct fsp_config_data config_data;
|
||||||
fsp_init_f init;
|
fsp_init_f init;
|
||||||
struct fsp_init_params params;
|
struct fsp_init_params params;
|
||||||
struct fspinit_rtbuf rt_buf;
|
struct fspinit_rtbuf rt_buf;
|
||||||
|
@ -118,7 +118,7 @@ void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf)
|
||||||
panic("Invalid FSP header");
|
panic("Invalid FSP header");
|
||||||
}
|
}
|
||||||
|
|
||||||
fsp_upd = &shared_data.fsp_upd;
|
fsp_upd = &config_data.fsp_upd;
|
||||||
memset(&rt_buf, 0, sizeof(struct fspinit_rtbuf));
|
memset(&rt_buf, 0, sizeof(struct fspinit_rtbuf));
|
||||||
|
|
||||||
/* Reserve a gap in stack top */
|
/* Reserve a gap in stack top */
|
||||||
|
@ -151,9 +151,9 @@ void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf)
|
||||||
init = (fsp_init_f)(fsp_hdr->img_base + fsp_hdr->fsp_init);
|
init = (fsp_init_f)(fsp_hdr->img_base + fsp_hdr->fsp_init);
|
||||||
params_ptr = ¶ms;
|
params_ptr = ¶ms;
|
||||||
|
|
||||||
shared_data.fsp_hdr = fsp_hdr;
|
config_data.common.fsp_hdr = fsp_hdr;
|
||||||
shared_data.stack_top = stack_top;
|
config_data.common.stack_top = stack_top;
|
||||||
shared_data.boot_mode = boot_mode;
|
config_data.common.boot_mode = boot_mode;
|
||||||
|
|
||||||
post_code(POST_PRE_MRC);
|
post_code(POST_PRE_MRC);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue