libpayload: Add CBMEM_IMD_ENTRY support to coreboot tables parser
coreboot stores much information in the CBMEM IMD. Until now it was ignored. This patch makes use of these coreboot tables entries. It also removes get_cbmem_addr() function as it is no longer needed. Moreover, the coreboot tables entry CB_TAG_MRC_CACHE does not exist anymore, as it is not created by the code. It was replaced by CBMEM_ID_MRCDATA entry, so MRCDATA should now be accessible through sysinfo structure field. Change-Id: I5bd02a98ba2631f34014bc0f8e7ebd5a5ddd2321 Signed-off-by: Jakub Czapiga <jacz@semihalf.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/59491 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
This commit is contained in:
committed by
Felix Held
parent
c627b0edeb
commit
2f236c232d
@ -321,6 +321,16 @@ struct cb_boot_media_params {
|
||||
uint64_t boot_media_size;
|
||||
};
|
||||
|
||||
|
||||
struct cb_cbmem_entry {
|
||||
uint32_t tag;
|
||||
uint32_t size;
|
||||
|
||||
uint64_t address;
|
||||
uint32_t entry_size;
|
||||
uint32_t id;
|
||||
};
|
||||
|
||||
struct cb_tsc_info {
|
||||
uint32_t tag;
|
||||
uint32_t size;
|
||||
@ -443,6 +453,4 @@ static inline const char *cb_mb_part_string(const struct cb_mainboard *cbm)
|
||||
(void *)(((u8 *) (_rec)) + sizeof(*(_rec)) \
|
||||
+ (sizeof((_rec)->map[0]) * (_idx)))
|
||||
|
||||
/* Helper functions */
|
||||
uintptr_t get_cbmem_addr(const void *cbmem_tab_entry);
|
||||
#endif
|
||||
|
@ -150,6 +150,12 @@ struct sysinfo_t {
|
||||
#endif
|
||||
/* USB Type-C Port Configuration Info */
|
||||
uintptr_t type_c_info;
|
||||
|
||||
/* CBFS RW/RO Metadata Cache */
|
||||
uintptr_t cbfs_ro_mcache_offset;
|
||||
uint32_t cbfs_ro_mcache_size;
|
||||
uintptr_t cbfs_rw_mcache_offset;
|
||||
uint32_t cbfs_rw_mcache_size;
|
||||
};
|
||||
|
||||
extern struct sysinfo_t lib_sysinfo;
|
||||
|
Reference in New Issue
Block a user