cbfs: Remove broken remnants of PAYLOAD_INFO feature
PAYLOAD_INFO is a very old feature that can add a key/value information section to a payload file. It seems to have only ever been generated by coreinfo and never really read by anything. Since CB:1721 in 2012, the feature has been inadvertently broken in practice since the `.note.pinfo` sections that contain the information get discarded from the payload before cbfstool gets to see them. Since CB:28647 in 2018, support for the section in the SELF loader was (inadvertently?) dropped, so if someone actually fed cbfstool a payload ELF that did have a `.note.pinfo` section, modern coreboot would refuse to boot the payload entirely (which is probably not a good state to leave things in). This patch removes the code to generate PAYLOAD_INFO entries entirely, but leaves the support to parse and extract those sections from old payloads in place in cbfstool. Change-Id: I40d8e9b76a171ebcdaa2eae02d54a1ca5e592c85 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81087 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
@@ -864,7 +864,7 @@ static int cbfs_payload_decompress(struct cbfs_payload_segment *segments,
|
||||
if (segments[i].type == PAYLOAD_SEGMENT_BSS ||
|
||||
segments[i].type == PAYLOAD_SEGMENT_ENTRY) {
|
||||
continue;
|
||||
} else if (segments[i].type == PAYLOAD_SEGMENT_PARAMS) {
|
||||
} else if (segments[i].type == PAYLOAD_SEGMENT_DEPRECATED_PARAMS) {
|
||||
memcpy(out_ptr, in_ptr, segments[i].len);
|
||||
segments[i].offset = new_offset;
|
||||
new_offset += segments[i].len;
|
||||
@@ -1090,7 +1090,7 @@ static int cbfs_payload_make_elf(struct buffer *buff, uint32_t arch,
|
||||
segments++;
|
||||
} else if (payload_type == PAYLOAD_SEGMENT_BSS) {
|
||||
segments++;
|
||||
} else if (payload_type == PAYLOAD_SEGMENT_PARAMS) {
|
||||
} else if (payload_type == PAYLOAD_SEGMENT_DEPRECATED_PARAMS) {
|
||||
segments++;
|
||||
} else if (payload_type == PAYLOAD_SEGMENT_ENTRY) {
|
||||
/* The last segment in a payload is always ENTRY as
|
||||
@@ -1162,7 +1162,7 @@ static int cbfs_payload_make_elf(struct buffer *buff, uint32_t arch,
|
||||
shdr.sh_size = segs[i].len;
|
||||
name = strdup(".bss");
|
||||
buffer_splice(&tbuff, buff, 0, 0);
|
||||
} else if (segs[i].type == PAYLOAD_SEGMENT_PARAMS) {
|
||||
} else if (segs[i].type == PAYLOAD_SEGMENT_DEPRECATED_PARAMS) {
|
||||
shdr.sh_type = SHT_NOTE;
|
||||
shdr.sh_flags = 0;
|
||||
shdr.sh_size = segs[i].len;
|
||||
@@ -1398,8 +1398,8 @@ static int cbfs_print_decoded_payload_segment_info(
|
||||
seg->load_addr, seg->len);
|
||||
break;
|
||||
|
||||
case PAYLOAD_SEGMENT_PARAMS:
|
||||
fprintf(fp, " parameters\n");
|
||||
case PAYLOAD_SEGMENT_DEPRECATED_PARAMS:
|
||||
fprintf(fp, " parameters (deprecated)\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Reference in New Issue
Block a user