Change-Id: I66e535f77e513dbfa5fc906ecf288193af78ae62
Signed-off-by: Florian Zumbiehl <florz@florz.de>
Reviewed-on: http://review.coreboot.org/369
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
data = (void*)phys_to_virt(romstart()) + ntohl(header->offset);
dataend = (void*)phys_to_virt(romstart()) + ntohl(header->romsize);
}
data = (void*)phys_to_virt(romstart()) + ntohl(header->offset);
dataend = (void*)phys_to_virt(romstart()) + ntohl(header->romsize);
}
+ dataend -= ntohl(header->bootblocksize);
int align = ntohl(header->align);
int align = ntohl(header->align);
if (memcmp(CBFS_FILE_MAGIC, file->magic, strlen(CBFS_FILE_MAGIC)) != 0) {
// no file header found. corruption?
// proceed in aligned steps to resynchronize
if (memcmp(CBFS_FILE_MAGIC, file->magic, strlen(CBFS_FILE_MAGIC)) != 0) {
// no file header found. corruption?
// proceed in aligned steps to resynchronize
- LOG("No file header found at %p, searching for header\n", data);
+ LOG("ERROR: No file header found at %p, attempting to recover by searching for header\n", data);
data = phys_to_virt(CBFS_ALIGN_UP(virt_to_phys(data), align));
continue;
}
data = phys_to_virt(CBFS_ALIGN_UP(virt_to_phys(data), align));
continue;
}
data = (void*)phys_to_virt(romstart()) + ntohl(header->offset);
dataend = (void*)phys_to_virt(romstart()) + ntohl(header->romsize);
}
data = (void*)phys_to_virt(romstart()) + ntohl(header->offset);
dataend = (void*)phys_to_virt(romstart()) + ntohl(header->romsize);
}
+ dataend -= ntohl(header->bootblocksize);
int align = ntohl(header->align);
int align = ntohl(header->align);
if (memcmp(CBFS_FILE_MAGIC, file->magic, strlen(CBFS_FILE_MAGIC)) != 0) {
// no file header found. corruption?
// proceed in aligned steps to resynchronize
if (memcmp(CBFS_FILE_MAGIC, file->magic, strlen(CBFS_FILE_MAGIC)) != 0) {
// no file header found. corruption?
// proceed in aligned steps to resynchronize
- LOG("No file header found at %p, searching for header\n", data);
+ LOG("ERROR: No file header found at %p, attempting to recover by searching for header\n", data);
data = phys_to_virt(CBFS_ALIGN_UP(virt_to_phys(data), align));
continue;
}
data = phys_to_virt(CBFS_ALIGN_UP(virt_to_phys(data), align));
continue;
}