mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-11 23:33:26 +09:00
![Bin Meng](/assets/img/avatar_default.png)
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>
68 lines
1.6 KiB
C
68 lines
1.6 KiB
C
/*
|
|
* Copyright (C) 2013, Intel Corporation
|
|
* Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: Intel
|
|
*/
|
|
|
|
#ifndef __FSP_API_H__
|
|
#define __FSP_API_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.
|
|
* Control will be returned to this callback function after FspInit API call.
|
|
*/
|
|
typedef void (*fsp_continuation_f)(u32 status, void *hob_list);
|
|
|
|
struct fsp_init_params {
|
|
/* Non-volatile storage buffer pointer */
|
|
void *nvs_buf;
|
|
/* Runtime buffer pointer */
|
|
void *rt_buf;
|
|
/* Continuation function address */
|
|
fsp_continuation_f continuation;
|
|
};
|
|
|
|
struct common_buf {
|
|
/*
|
|
* Stack top pointer used by the bootloader. The new stack frame will be
|
|
* set up at this location after FspInit API call.
|
|
*/
|
|
u32 stack_top;
|
|
u32 boot_mode; /* Current system boot mode */
|
|
void *upd_data; /* User platform configuraiton data region */
|
|
u32 reserved[7]; /* Reserved */
|
|
};
|
|
|
|
enum fsp_phase {
|
|
/* Notification code for post PCI enuermation */
|
|
INIT_PHASE_PCI = 0x20,
|
|
/* Notification code before transfering control to the payload */
|
|
INIT_PHASE_BOOT = 0x40
|
|
};
|
|
|
|
struct fsp_notify_params {
|
|
/* Notification phase used for NotifyPhase API */
|
|
enum fsp_phase phase;
|
|
};
|
|
|
|
/* FspInit API function prototype */
|
|
typedef asmlinkage u32 (*fsp_init_f)(struct fsp_init_params *params);
|
|
|
|
/* FspNotify API function prototype */
|
|
typedef asmlinkage u32 (*fsp_notify_f)(struct fsp_notify_params *params);
|
|
|
|
#endif
|