1/* SPDX-License-Identifier: Intel */
2/*
3 * Copyright (C) 2013, Intel Corporation
4 * Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com>
5 */
6
7#ifndef __FSP1_SUPPORT_H__
8#define __FSP1_SUPPORT_H__
9
10#include <asm/fsp/fsp_support.h>
11#include "fsp_ffs.h"
12
13/**
14 * fsp_asm_continuation() - FSP Continuation assembly helper routine
15 *
16 * This routine jumps to the C version of FSP continuation function
17 */
18void fsp_asm_continuation(void);
19
20/**
21 * fsp_init_done() - FSP initialization complete
22 *
23 * This is the function that indicates FSP initialization is complete and jumps
24 * back to the bootloader with HOB list pointer as the parameter.
25 *
26 * @hob_list:    HOB list pointer
27 */
28void fsp_init_done(void *hob_list);
29
30/**
31 * fsp_continue() - FSP Continuation function
32 *
33 * @status:      Always 0
34 * @hob_list:    HOB list pointer
35 *
36 * Return: Never returns
37 */
38void fsp_continue(u32 status, void *hob_list);
39
40/**
41 * fsp_init() - FSP initialization wrapper function
42 *
43 * @stack_top: bootloader stack top address
44 * @boot_mode: boot mode defined in fsp_bootmode.h
45 * @nvs_buf:   Non-volatile memory buffer pointer
46 */
47void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf);
48
49/**
50 * fsp_get_bootloader_tmp_mem() - retrieves temporary stack buffer and size
51 *
52 * @hob_list:      A HOB list pointer.
53 * @len:           A pointer to the bootloader temporary stack length.
54 *                 If the HOB is located, the length will be updated.
55 *
56 * Return: NULL:   Failed to find the bootloader temporary stack HOB.
57 * Return: others: Bootloader temporary stackbuffer pointer.
58 */
59void *fsp_get_bootloader_tmp_mem(const void *hob_list, u32 *len);
60
61/**
62 * fsp_update_configs() - overrides the default configurations of FSP
63 *
64 * @config:  A pointer to the FSP configuration data structure
65 * @rt_buf:  A pointer to the FSP runtime buffer data structure
66 *
67 * Return: None
68 */
69void fsp_update_configs(struct fsp_config_data *config,
70			struct fspinit_rtbuf *rt_buf);
71
72#endif
73