aboutsummaryrefslogtreecommitdiff
path: root/util/ifdtool/ifdtool.h
diff options
context:
space:
mode:
authorBill XIE <persmule@gmail.com>2017-09-12 11:54:48 +0800
committerNico Huber <nico.h@gmx.de>2017-09-17 21:29:57 +0000
commit4651d4501c87cabaa2e098aca960edd76600acf4 (patch)
tree016a69b6414c8cc10271fa2f0e74d50dfd2eb2b7 /util/ifdtool/ifdtool.h
parent1bf6506e974b7b67c7dbb2634cbcf6509fdda353 (diff)
ifdtool: redesign some structures
Redesign some array-like structures as true arrays, and rewrite functions to dump them as loops. This commit is one separated from the original I6d05418c. Change-Id: I161c9a2ae83d26e658d67d0804e943fff95fe076 Signed-off-by: Bill XIE <persmule@gmail.com> Reviewed-on: https://review.coreboot.org/21510 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'util/ifdtool/ifdtool.h')
-rw-r--r--util/ifdtool/ifdtool.h32
1 files changed, 5 insertions, 27 deletions
diff --git a/util/ifdtool/ifdtool.h b/util/ifdtool/ifdtool.h
index f50f6be3a3..cd5af79a0f 100644
--- a/util/ifdtool/ifdtool.h
+++ b/util/ifdtool/ifdtool.h
@@ -60,16 +60,9 @@ typedef struct {
// regions
#define MAX_REGIONS 9
#define MAX_REGIONS_OLD 5
+
typedef struct {
- uint32_t flreg0;
- uint32_t flreg1;
- uint32_t flreg2;
- uint32_t flreg3;
- uint32_t flreg4;
- uint32_t flreg5;
- uint32_t flreg6;
- uint32_t flreg7;
- uint32_t flreg8;
+ uint32_t flreg[MAX_REGIONS];
} __attribute__((packed)) frba_t;
// component section
@@ -80,25 +73,10 @@ typedef struct {
} __attribute__((packed)) fcba_t;
// pch strap
+#define MAX_PCHSTRP 18
+
typedef struct {
- uint32_t pchstrp0;
- uint32_t pchstrp1;
- uint32_t pchstrp2;
- uint32_t pchstrp3;
- uint32_t pchstrp4;
- uint32_t pchstrp5;
- uint32_t pchstrp6;
- uint32_t pchstrp7;
- uint32_t pchstrp8;
- uint32_t pchstrp9;
- uint32_t pchstrp10;
- uint32_t pchstrp11;
- uint32_t pchstrp12;
- uint32_t pchstrp13;
- uint32_t pchstrp14;
- uint32_t pchstrp15;
- uint32_t pchstrp16;
- uint32_t pchstrp17;
+ uint32_t pchstrp[MAX_PCHSTRP];
} __attribute__((packed)) fpsba_t;
/*