| 1 |
|
| 2 |
|
| 3 |
#ifndef FSP1_1_UTIL_H |
| 4 |
#define FSP1_1_UTIL_H |
| 5 |
|
| 6 |
#include <cpu/cpu.h> |
| 7 |
#include <fsp/api.h> |
| 8 |
|
| 9 |
#include <fsp/soc_binding.h> |
| 10 |
#include <program_loading.h> |
| 11 |
#include <commonlib/region.h> |
| 12 |
|
| 13 |
|
| 14 |
FSP_INFO_HEADER *find_fsp(uintptr_t fsp_base_address); |
| 15 |
|
| 16 |
void fsp_set_runtime(FSP_INFO_HEADER *fih, void *hob_list); |
| 17 |
|
| 18 |
void fsp_update_fih(FSP_INFO_HEADER *fih); |
| 19 |
|
| 20 |
FSP_INFO_HEADER *fsp_get_fih(void); |
| 21 |
|
| 22 |
void *fsp_get_hob_list(void); |
| 23 |
void fsp_early_init(FSP_INFO_HEADER *fsp_info); |
| 24 |
void fsp_notify(u32 phase); |
| 25 |
void print_hob_type_structure(u16 hob_type, void *hob_list_ptr); |
| 26 |
void print_fsp_info(FSP_INFO_HEADER *fsp_header); |
| 27 |
void *get_resource_hob(const EFI_GUID *guid, const void *hob_start); |
| 28 |
void fsp_display_upd_value(const char *name, uint32_t size, uint64_t old, |
| 29 |
uint64_t new); |
| 30 |
void report_fsp_output(void); |
| 31 |
|
| 32 |
|
| 33 |
static inline uint32_t fsp_version(FSP_INFO_HEADER *fih) |
| 34 |
{ |
| 35 |
return fih->ImageRevision; |
| 36 |
} |
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
int fsp_relocate(struct prog *fsp_relocd); |
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
#define EFI_HOB_TYPE_HANDOFF 0x0001 |
| 58 |
#define EFI_HOB_TYPE_MEMORY_POOL 0x0007 |
| 59 |
|
| 60 |
|
| 61 |
#define FSP_IMAGE_SIG_LOC 0 |
| 62 |
#define FSP_IMAGE_ID_LOC 16 |
| 63 |
#define FSP_IMAGE_BASE_LOC 28 |
| 64 |
#define FSP_IMAGE_ATTRIBUTE_LOC 32 |
| 65 |
#define GRAPHICS_SUPPORT_BIT (1 << 0) |
| 66 |
|
| 67 |
#define ERROR_NO_FV_SIG 1 |
| 68 |
#define ERROR_NO_FFS_GUID 2 |
| 69 |
#define ERROR_NO_INFO_HEADER 3 |
| 70 |
#define ERROR_IMAGEBASE_MISMATCH 4 |
| 71 |
#define ERROR_INFO_HEAD_SIG_MISMATCH 5 |
| 72 |
#define ERROR_FSP_SIG_MISMATCH 6 |
| 73 |
#define ERROR_FSP_REV_MISMATCH 7 |
| 74 |
|
| 75 |
#if ENV_RAMSTAGE |
| 76 |
extern void *FspHobListPtr; |
| 77 |
#endif |
| 78 |
|
| 79 |
void *get_hob_list(void); |
| 80 |
void *get_guid_hob(const EFI_GUID *guid, const void *hob_start); |
| 81 |
|
| 82 |
asmlinkage void chipset_teardown_car_main(void); |
| 83 |
|
| 84 |
#endif |