drivers/intel/fsp2_0: Add utility to recover MRC NV Storage data

Change-Id: I08d3ba8b64459b1f84a5f1318e37c31010d7ae0f
Signed-off-by: Hannah Williams <hannah.williams@intel.com>
Reviewed-on: https://review.coreboot.org/14251
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
This commit is contained in:
Hannah Williams 2016-03-04 12:14:52 -08:00 committed by Aaron Durbin
parent a6dd535354
commit 3503b3f730
2 changed files with 13 additions and 0 deletions

View File

@ -86,6 +86,11 @@ static const uint8_t uuid_owner_tseg[16] = {
0xb3, 0x19, 0x49, 0x01, 0x99, 0xa4, 0x7d, 0x55 0xb3, 0x19, 0x49, 0x01, 0x99, 0xa4, 0x7d, 0x55
}; };
static const uint8_t uuid_fsp_nv_storage[16] = {
0x02, 0xcf, 0x1a, 0x72, 0x77, 0x4d, 0x2a, 0x4c,
0xb3, 0xdc, 0x27, 0x0b, 0x7b, 0xa9, 0xe4, 0xb0
};
static const uint8_t empty_uuid[16] = { static const uint8_t empty_uuid[16] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}; };
@ -97,6 +102,7 @@ static const struct uuid_name_map {
{ uuid_owner_bootloader_tolum, "BOOTLOADER_TOLUM" }, { uuid_owner_bootloader_tolum, "BOOTLOADER_TOLUM" },
{ uuid_owner_fsp, "FSP_RESERVED_MEMORY" }, { uuid_owner_fsp, "FSP_RESERVED_MEMORY" },
{ uuid_owner_tseg, "TSEG" }, { uuid_owner_tseg, "TSEG" },
{ uuid_fsp_nv_storage, "FSP_NV_STORAGE" },
}; };
static const char *resource_name(enum resource_type type) static const char *resource_name(enum resource_type type)
@ -291,3 +297,9 @@ const void *fsp_find_extension_hob_by_uuid(const uint8_t *uuid, size_t *size)
return NULL; return NULL;
} }
const void *fsp_find_nv_storage_data(size_t *size)
{
return fsp_find_extension_hob_by_uuid(uuid_fsp_nv_storage, size);
}

View File

@ -24,6 +24,7 @@
void fsp_save_hob_list(void *hob_list_ptr); void fsp_save_hob_list(void *hob_list_ptr);
const void *fsp_get_hob_list(void); const void *fsp_get_hob_list(void);
const void *fsp_find_extension_hob_by_uuid(const uint8_t *uuid, size_t *size); const void *fsp_find_extension_hob_by_uuid(const uint8_t *uuid, size_t *size);
const void *fsp_find_nv_storage_data(size_t *size);
enum cb_err fsp_fill_lb_framebuffer(struct lb_framebuffer *framebuffer); enum cb_err fsp_fill_lb_framebuffer(struct lb_framebuffer *framebuffer);
/* /*
* Hand-off-block utilities which do not depend on CBMEM, but need to be passed * Hand-off-block utilities which do not depend on CBMEM, but need to be passed