util/cse_serger: Replace cse_layout_regions with array of regions
This change replaces `struct cse_layout_regions` with an array of `struct region` and introduces enums for DP and BP[1-4]. This makes it easier to loop over the different regions in following changes. BUG=b:189177186 Change-Id: If3cced4506d26dc534047cb9c385aaa9418d8522 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/58214 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
This commit is contained in:
@ -27,12 +27,13 @@ enum subpart_entry_version {
|
||||
SUBPART_ENTRY_VERSION_1 = 1,
|
||||
};
|
||||
|
||||
struct cse_layout_regions {
|
||||
struct region data_partition;
|
||||
struct region bp1;
|
||||
struct region bp2;
|
||||
struct region bp3;
|
||||
struct region bp4;
|
||||
enum {
|
||||
DP,
|
||||
BP1,
|
||||
BP2,
|
||||
BP3,
|
||||
BP4,
|
||||
BP_TOTAL,
|
||||
};
|
||||
|
||||
typedef void *cse_layout_ptr;
|
||||
@ -56,7 +57,7 @@ struct bpdt_ops {
|
||||
size_t (*get_entry_count)(const bpdt_hdr_ptr ptr);
|
||||
void (*inc_entry_count)(bpdt_hdr_ptr ptr);
|
||||
|
||||
cse_layout_ptr (*create_layout)(const struct cse_layout_regions *regions);
|
||||
cse_layout_ptr (*create_layout)(const struct region *regions);
|
||||
void (*print_layout)(const cse_layout_ptr ptr);
|
||||
cse_layout_ptr (*read_layout)(struct buffer *buff);
|
||||
int (*write_layout)(struct buffer *buff, const cse_layout_ptr ptr);
|
||||
|
Reference in New Issue
Block a user