mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-17 10:18:38 +00:00
255fd5caa5
This is the follow-on patch to clean up the FSP support codes: - Remove the _t suffix on the structures defines - Use __packed for structure defines - Use U-Boot's assert() - Use standard bool true/false - Remove read_unaligned64() - Use memcmp() in the compare_guid() - Remove the cast in the memset() call - Replace some magic numbers with macros - Use panic() when no valid FSP image header is found - Change some FSP utility routines to use an fsp_ prefix - Add comment blocks for asm_continuation and fsp_init_done - Remove some casts in find_fsp_header() - Change HOB access macros to static inline routines - Add comments to mention find_fsp_header() may be called in a stackless environment - Add comments to mention init(¶ms) in fsp_init() cannot be removed Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
32 lines
886 B
C
32 lines
886 B
C
/*
|
|
* Copyright (C) 2013, Intel Corporation
|
|
* Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: Intel
|
|
*/
|
|
|
|
#ifndef _FSP_HEADER_H_
|
|
#define _FSP_HEADER_H_
|
|
|
|
#define FSP_HEADER_OFF 0x94 /* Fixed FSP header offset in the FSP image */
|
|
|
|
struct __packed fsp_header {
|
|
u32 sign; /* 'FSPH' */
|
|
u32 hdr_len; /* header length */
|
|
u8 reserved1[3];
|
|
u8 hdr_rev; /* header rev */
|
|
u32 img_rev; /* image rev */
|
|
char img_id[8]; /* signature string */
|
|
u32 img_size; /* image size */
|
|
u32 img_base; /* image base */
|
|
u32 img_attr; /* image attribute */
|
|
u32 cfg_region_off; /* configuration region offset */
|
|
u32 cfg_region_size; /* configuration region size */
|
|
u32 api_num; /* number of API entries */
|
|
u32 fsp_tempram_init; /* tempram_init offset */
|
|
u32 fsp_init; /* fsp_init offset */
|
|
u32 fsp_notify; /* fsp_notify offset */
|
|
u32 reserved2;
|
|
};
|
|
|
|
#endif
|