aboutsummaryrefslogtreecommitdiff
path: root/util/ifdtool/ifdtool.h
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@google.com>2019-06-06 13:39:26 -0700
committerDuncan Laurie <dlaurie@chromium.org>2019-06-07 20:51:27 +0000
commit7775d67218579b268d0966ba2f0f0adb252b381c (patch)
tree01d1662af5d177ec23932bcbd96231ad5b111e9e /util/ifdtool/ifdtool.h
parentc145e54f695480ac02f752a6d01e98cb37248a07 (diff)
ifdtool: Enable GbE/PDR/EC region access only if they exist
Instead of assuming GbE/PDR/EC regions may exist or not, check if there is a valid region defined in the descriptor and set the region access permissions based on that. The net effect change is to enable the use of the PDR region on the sarien platform, which also uses the GbE and EC regions. This results in the following example changes: mb/google/sarien (GbE, PDR, EC) . DESC BIOS ME GbE PDR EC -BIOS r rw rw r ------------------------------- +BIOS r rw rw rw r mb/google/eve: (no GbE, no PDR, no EC) . DESC BIOS ME GbE PDR EC -BIOS r rw rw r -ME r rw r -GbE r rw -EC r rw ------------------------------- +BIOS r rw +ME r rw +GbE +EC BUG=b:134703987 Change-Id: I7aeffc8f8194638c6012340b43aea8f8460d268a Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33273 Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util/ifdtool/ifdtool.h')
-rw-r--r--util/ifdtool/ifdtool.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/util/ifdtool/ifdtool.h b/util/ifdtool/ifdtool.h
index 49463b91bf..f3b9a53e06 100644
--- a/util/ifdtool/ifdtool.h
+++ b/util/ifdtool/ifdtool.h
@@ -94,6 +94,15 @@ typedef struct {
#define MAX_REGIONS 9
#define MAX_REGIONS_OLD 5
+enum flash_regions {
+ REGION_DESC,
+ REGION_BIOS,
+ REGION_ME,
+ REGION_GBE,
+ REGION_PDR,
+ REGION_EC = 8,
+};
+
typedef struct {
uint32_t flreg[MAX_REGIONS];
} __attribute__((packed)) frba_t;