2018-05-06 17:58:06 -04:00
|
|
|
/* SPDX-License-Identifier: Intel */
|
2014-12-12 21:05:28 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2013, Intel Corporation
|
|
|
|
* Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com>
|
|
|
|
*/
|
|
|
|
|
2019-08-24 14:19:05 -06:00
|
|
|
#ifndef __FSP1_SUPPORT_H__
|
|
|
|
#define __FSP1_SUPPORT_H__
|
2014-12-12 21:05:28 +08:00
|
|
|
|
2019-08-24 14:19:05 -06:00
|
|
|
#include <asm/fsp/fsp_support.h>
|
2014-12-12 21:05:28 +08:00
|
|
|
#include "fsp_ffs.h"
|
2015-01-27 22:13:37 -07:00
|
|
|
|
2014-12-17 15:50:49 +08:00
|
|
|
/**
|
2019-08-25 10:10:59 -06:00
|
|
|
* fsp_asm_continuation() - FSP Continuation assembly helper routine
|
2014-12-17 15:50:49 +08:00
|
|
|
*
|
|
|
|
* This routine jumps to the C version of FSP continuation function
|
|
|
|
*/
|
2019-09-25 08:11:25 -06:00
|
|
|
void fsp_asm_continuation(void);
|
2014-12-12 21:05:28 +08:00
|
|
|
|
2014-12-17 15:50:49 +08:00
|
|
|
/**
|
2019-08-25 10:10:59 -06:00
|
|
|
* fsp_init_done() - FSP initialization complete
|
2014-12-17 15:50:49 +08:00
|
|
|
*
|
|
|
|
* This is the function that indicates FSP initialization is complete and jumps
|
|
|
|
* back to the bootloader with HOB list pointer as the parameter.
|
|
|
|
*
|
|
|
|
* @hob_list: HOB list pointer
|
|
|
|
*/
|
2014-12-12 21:05:29 +08:00
|
|
|
void fsp_init_done(void *hob_list);
|
2014-12-12 21:05:28 +08:00
|
|
|
|
|
|
|
/**
|
2019-08-25 10:10:59 -06:00
|
|
|
* fsp_continue() - FSP Continuation function
|
2014-12-12 21:05:28 +08:00
|
|
|
*
|
|
|
|
* @status: Always 0
|
|
|
|
* @hob_list: HOB list pointer
|
|
|
|
*
|
2019-08-25 10:10:59 -06:00
|
|
|
* @return Never returns
|
2014-12-12 21:05:28 +08:00
|
|
|
*/
|
2015-12-10 22:02:56 -08:00
|
|
|
void fsp_continue(u32 status, void *hob_list);
|
2014-12-12 21:05:28 +08:00
|
|
|
|
|
|
|
/**
|
2019-08-25 10:10:59 -06:00
|
|
|
* fsp_init() - FSP initialization wrapper function
|
2014-12-12 21:05:28 +08:00
|
|
|
*
|
|
|
|
* @stack_top: bootloader stack top address
|
|
|
|
* @boot_mode: boot mode defined in fsp_bootmode.h
|
|
|
|
* @nvs_buf: Non-volatile memory buffer pointer
|
|
|
|
*/
|
|
|
|
void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf);
|
|
|
|
|
2019-08-25 10:10:59 -06:00
|
|
|
/**
|
|
|
|
* fsp_get_bootloader_tmp_mem() - retrieves temporary stack buffer and size
|
2014-12-12 21:05:28 +08:00
|
|
|
*
|
|
|
|
* @hob_list: A HOB list pointer.
|
|
|
|
* @len: A pointer to the bootloader temporary stack length.
|
|
|
|
* If the HOB is located, the length will be updated.
|
|
|
|
*
|
2019-08-25 10:10:59 -06:00
|
|
|
* @return NULL: Failed to find the bootloader temporary stack HOB.
|
|
|
|
* @return others: Bootloader temporary stackbuffer pointer.
|
2014-12-12 21:05:28 +08:00
|
|
|
*/
|
2014-12-17 15:50:49 +08:00
|
|
|
void *fsp_get_bootloader_tmp_mem(const void *hob_list, u32 *len);
|
2014-12-12 21:05:28 +08:00
|
|
|
|
|
|
|
/**
|
2019-08-25 10:10:59 -06:00
|
|
|
* fsp_update_configs() - overrides the default configurations of FSP
|
2014-12-12 21:05:28 +08:00
|
|
|
*
|
2015-12-10 22:03:00 -08:00
|
|
|
* @config: A pointer to the FSP configuration data structure
|
2015-12-10 22:03:04 -08:00
|
|
|
* @rt_buf: A pointer to the FSP runtime buffer data structure
|
2014-12-12 21:05:28 +08:00
|
|
|
*
|
2019-08-25 10:10:59 -06:00
|
|
|
* @return None
|
2014-12-12 21:05:28 +08:00
|
|
|
*/
|
2019-09-25 08:11:25 -06:00
|
|
|
void fsp_update_configs(struct fsp_config_data *config,
|
2015-12-10 22:03:04 -08:00
|
|
|
struct fspinit_rtbuf *rt_buf);
|
2014-12-12 21:05:28 +08:00
|
|
|
|
|
|
|
#endif
|