summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>2015-08-29 18:53:43 -0700
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>2015-09-08 02:25:18 +0000
commit5c261229aebe4a8bdc67c80be06e17795fc34c1b (patch)
tree939e9938c3e5c2b0a1661f32683da3d93c9f6f8b /src/drivers
parentf55e6680b94a12bdbe8bf4860b3323dac41a9a11 (diff)
drivers/intel/fsp1_1: Take platform ID as a string, not integers
The platform ID is an 8 character ASCII string, so our config should take it in as a string, rather than a set of two 32-bit integers. Change-Id: I76da85fab59fe4891fbc3b5edf430f2791b70ffb Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-on: http://review.coreboot.org/11465 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@gmail.com>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/intel/fsp1_1/Kconfig14
-rw-r--r--src/drivers/intel/fsp1_1/fsp_util.c11
2 files changed, 13 insertions, 12 deletions
diff --git a/src/drivers/intel/fsp1_1/Kconfig b/src/drivers/intel/fsp1_1/Kconfig
index 42c42c05e9..2ffa323253 100644
--- a/src/drivers/intel/fsp1_1/Kconfig
+++ b/src/drivers/intel/fsp1_1/Kconfig
@@ -63,17 +63,11 @@ config FSP_FILE
help
The path and filename of the Intel FSP binary for this platform.
-config FSP_IMAGE_ID_DWORD0
- hex "First 4 bytes of 8 byte platform string"
+config FSP_IMAGE_ID_STRING
+ string "8 byte platform string identifying the FSP platform"
help
- The first four bytes of the eight byte platform specific string
- used to identify the FSP binary that should be used.
-
-config FSP_IMAGE_ID_DWORD1
- hex "Second 4 bytes of 8 byte platform string"
- help
- The second four bytes of the eight byte platform specific string
- used to identify the FSP binary that should be used.
+ 8 ASCII character byte signature string that will help match the FSP
+ binary to a supported hardware configuration.
config FSP_INCLUDE_PATH
string "Path for FSP specific include files"
diff --git a/src/drivers/intel/fsp1_1/fsp_util.c b/src/drivers/intel/fsp1_1/fsp_util.c
index bce43371c4..1d67e78d07 100644
--- a/src/drivers/intel/fsp1_1/fsp_util.c
+++ b/src/drivers/intel/fsp1_1/fsp_util.c
@@ -36,6 +36,13 @@ FSP_INFO_HEADER *find_fsp(void)
u8 *u8;
u32 u32;
} fsp_ptr;
+ static const union {
+ char str_id[8];
+ u32 int_id[2];
+ } fsp_id = {
+ .str_id = CONFIG_FSP_IMAGE_ID_STRING
+ };
+
u32 *image_id;
for (;;) {
@@ -87,8 +94,8 @@ FSP_INFO_HEADER *find_fsp(void)
/* Verify the FSP ID */
image_id = (u32 *)&fsp_ptr.fih->ImageId[0];
- if ((image_id[0] != CONFIG_FSP_IMAGE_ID_DWORD0)
- || (image_id[1] != CONFIG_FSP_IMAGE_ID_DWORD1))
+ if ((image_id[0] != fsp_id.int_id[0])
+ || (image_id[1] != fsp_id.int_id[1]))
fsp_ptr.u8 = (u8 *)ERROR_FSP_SIG_MISMATCH;
break;
}