mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-29 08:01:08 +00:00
x86: Adjust the FSP types slightly
To avoid casts, find_fsp_header() should return a pointer. Add asmlinkage to two API functions which use that convention. UPD_TERMINATOR is common so move it into a common file. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
1021af4ded
commit
82196cf34f
4 changed files with 9 additions and 7 deletions
|
@ -10,8 +10,6 @@
|
|||
#ifndef __VPDHEADER_H__
|
||||
#define __VPDHEADER_H__
|
||||
|
||||
#define UPD_TERMINATOR 0x55AA
|
||||
|
||||
struct __packed upd_region {
|
||||
u64 sign; /* Offset 0x0000 */
|
||||
u64 reserved; /* Offset 0x0008 */
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#ifndef __FSP_API_H__
|
||||
#define __FSP_API_H__
|
||||
|
||||
#include <linux/linkage.h>
|
||||
|
||||
/*
|
||||
* FspInit continuation function prototype.
|
||||
* Control will be returned to this callback function after FspInit API call.
|
||||
|
@ -47,9 +49,9 @@ struct fsp_notify_params {
|
|||
};
|
||||
|
||||
/* FspInit API function prototype */
|
||||
typedef u32 (*fsp_init_f)(struct fsp_init_params *params);
|
||||
typedef asmlinkage u32 (*fsp_init_f)(struct fsp_init_params *params);
|
||||
|
||||
/* FspNotify API function prototype */
|
||||
typedef u32 (*fsp_notify_f)(struct fsp_notify_params *params);
|
||||
typedef asmlinkage u32 (*fsp_notify_f)(struct fsp_notify_params *params);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -26,6 +26,8 @@ struct shared_data {
|
|||
|
||||
#define FSP_LOWMEM_BASE 0x100000UL
|
||||
#define FSP_HIGHMEM_BASE 0x100000000ULL
|
||||
#define UPD_TERMINATOR 0x55AA
|
||||
|
||||
|
||||
/**
|
||||
* FSP Continuation assembly helper routine
|
||||
|
@ -61,7 +63,7 @@ void fsp_continue(struct shared_data *shared_data, u32 status,
|
|||
*
|
||||
* @retval: the offset of FSP header. If signature is invalid, returns 0.
|
||||
*/
|
||||
u32 find_fsp_header(void);
|
||||
struct fsp_header *find_fsp_header(void);
|
||||
|
||||
/**
|
||||
* FSP initialization wrapper function.
|
||||
|
|
|
@ -30,7 +30,7 @@ static bool compare_guid(const struct efi_guid *guid1,
|
|||
return false;
|
||||
}
|
||||
|
||||
u32 __attribute__((optimize("O0"))) find_fsp_header(void)
|
||||
struct fsp_header *__attribute__((optimize("O0"))) find_fsp_header(void)
|
||||
{
|
||||
/*
|
||||
* This function may be called before the a stack is established,
|
||||
|
@ -84,7 +84,7 @@ u32 __attribute__((optimize("O0"))) find_fsp_header(void)
|
|||
fsp = 0;
|
||||
}
|
||||
|
||||
return (u32)fsp;
|
||||
return (struct fsp_header *)fsp;
|
||||
}
|
||||
|
||||
void fsp_continue(struct shared_data *shared_data, u32 status, void *hob_list)
|
||||
|
|
Loading…
Reference in a new issue