diff options
Diffstat (limited to 'src/vendorcode')
-rw-r--r-- | src/vendorcode/google/chromeos/vboot2/vboot_handoff.c | 14 | ||||
-rw-r--r-- | src/vendorcode/google/chromeos/vboot2/verstub.c | 20 | ||||
-rw-r--r-- | src/vendorcode/google/chromeos/vboot_common.c | 3 |
3 files changed, 26 insertions, 11 deletions
diff --git a/src/vendorcode/google/chromeos/vboot2/vboot_handoff.c b/src/vendorcode/google/chromeos/vboot2/vboot_handoff.c index a5c7de617c..b84e47ef16 100644 --- a/src/vendorcode/google/chromeos/vboot2/vboot_handoff.c +++ b/src/vendorcode/google/chromeos/vboot2/vboot_handoff.c @@ -176,9 +176,13 @@ void *vboot2_load_ramstage(void) /* we're on recovery path. continue to ro-ramstage. */ return NULL; - printk(BIOS_INFO, - "loading ramstage from Slot %c\n", sd->fw_slot ? 'B' : 'A'); - vb2_get_selected_region(wd, &fw_main); - - return load_ramstage(vh, &fw_main); + if (IS_ENABLED(CONFIG_MULTIPLE_CBFS_INSTANCES)) { + return cbfs_load_stage(CBFS_DEFAULT_MEDIA, + CONFIG_CBFS_PREFIX "/ramstage"); + } else { + printk(BIOS_INFO, "loading ramstage from Slot %c\n", + sd->fw_slot ? 'B' : 'A'); + vb2_get_selected_region(wd, &fw_main); + return load_ramstage(vh, &fw_main); + } } diff --git a/src/vendorcode/google/chromeos/vboot2/verstub.c b/src/vendorcode/google/chromeos/vboot2/verstub.c index 5630defc28..86c6e1ce2a 100644 --- a/src/vendorcode/google/chromeos/vboot2/verstub.c +++ b/src/vendorcode/google/chromeos/vboot2/verstub.c @@ -78,13 +78,21 @@ void *vboot2_verify_firmware(void) if (vboot_is_slot_selected(wd)) { /* RW A or B */ struct vboot_region fw_main; - struct vboot_components *fw_info; + vb2_get_selected_region(wd, &fw_main); - fw_info = vboot_locate_components(&fw_main); - if (fw_info == NULL) - die("failed to locate firmware components\n"); - entry = vboot_load_stage(CONFIG_VBOOT_ROMSTAGE_INDEX, - &fw_main, fw_info); + + if (IS_ENABLED(CONFIG_MULTIPLE_CBFS_INSTANCES)) { + cbfs_set_header_offset(fw_main.offset_addr); + entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA, + CONFIG_CBFS_PREFIX "/romstage"); + } else { + struct vboot_components *fw_info; + fw_info = vboot_locate_components(&fw_main); + if (fw_info == NULL) + die("failed to locate firmware components\n"); + entry = vboot_load_stage(CONFIG_VBOOT_ROMSTAGE_INDEX, + &fw_main, fw_info); + } } else if (vboot_is_readonly_path(wd)) { /* RO */ entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA, diff --git a/src/vendorcode/google/chromeos/vboot_common.c b/src/vendorcode/google/chromeos/vboot_common.c index ef47fc8a56..95bab367ed 100644 --- a/src/vendorcode/google/chromeos/vboot_common.c +++ b/src/vendorcode/google/chromeos/vboot_common.c @@ -95,6 +95,9 @@ void *vboot_get_payload(int *len) struct vboot_handoff *vboot_handoff; struct firmware_component *fwc; + if (IS_ENABLED(CONFIG_MULTIPLE_CBFS_INSTANCES)) + return NULL; /* Let CBFS figure it out. */ + vboot_handoff = cbmem_find(CBMEM_ID_VBOOT_HANDOFF); if (vboot_handoff == NULL) |