From c1b98b909c1d3bbd4eb74140769b118c98a9eb70 Mon Sep 17 00:00:00 2001 From: George Trudeau Date: Mon, 4 Apr 2016 00:19:02 -0400 Subject: ensure correct byte ordering for cbfs segment list Decode each cbfs_payload_segment into native byte order during segments iteration. Note : List ordering has been changed, segments are now always inserted at the end. cbfs_serialized.h PAYLOAD_SEGMENT definitions have been changed to their standard order (big-endian). Change-Id: Icb3c6a7da2d253685a3bc157bc7f5a51183c9652 Signed-off-by: George Trudeau Reviewed-on: https://review.coreboot.org/14294 Tested-by: build bot (Jenkins) Tested-by: Raptor Engineering Automated Test Stand Reviewed-by: Aaron Durbin --- src/commonlib/include/commonlib/cbfs_serialized.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/commonlib') diff --git a/src/commonlib/include/commonlib/cbfs_serialized.h b/src/commonlib/include/commonlib/cbfs_serialized.h index c1a1c3b542..c01ba1a020 100644 --- a/src/commonlib/include/commonlib/cbfs_serialized.h +++ b/src/commonlib/include/commonlib/cbfs_serialized.h @@ -175,11 +175,11 @@ struct cbfs_payload { struct cbfs_payload_segment segments; }; -#define PAYLOAD_SEGMENT_CODE 0x45444F43 -#define PAYLOAD_SEGMENT_DATA 0x41544144 -#define PAYLOAD_SEGMENT_BSS 0x20535342 -#define PAYLOAD_SEGMENT_PARAMS 0x41524150 -#define PAYLOAD_SEGMENT_ENTRY 0x52544E45 +#define PAYLOAD_SEGMENT_CODE 0x434F4445 +#define PAYLOAD_SEGMENT_DATA 0x44415441 +#define PAYLOAD_SEGMENT_BSS 0x42535320 +#define PAYLOAD_SEGMENT_PARAMS 0x50415241 +#define PAYLOAD_SEGMENT_ENTRY 0x454E5452 struct cbfs_optionrom { uint32_t compression; -- cgit v1.2.3