aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/smmstore/store.c
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2021-08-10 16:38:43 -0700
committerPatrick Georgi <patrick@coreboot.org>2021-11-27 19:23:14 +0000
commit6eeba88050b8aa8dbd87e94c707e7779b01e38b7 (patch)
treeb9ddee92798d32c51bede4171898ec80ba028335 /src/drivers/smmstore/store.c
parent8ddbc7dcbec19e466b568906bbf7e58c2b5c92f3 (diff)
drivers/smmstore: Remove SMMSTORE_IN_CBFS
The SMMSTORE_IN_CBFS option was just meant as a workaround for an attempt to backport SMMSTORE into older Chromebooks that never actually happened. All current and future users of coreboot should be using SMMSTORE in an FMAP region. The APIs needed for SMMSTORE_IN_CBFS clash with the CBFS rdev isolation needed for CBFS_VERIFICATION, so let's just get rid of it. Signed-off-by: Julius Werner <jwerner@chromium.org> Change-Id: Ia0604a4ffd20b46774631d585925311b65d5a0e9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/59680 Reviewed-by: Patrick Georgi <patrick@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/smmstore/store.c')
-rw-r--r--src/drivers/smmstore/store.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/src/drivers/smmstore/store.c b/src/drivers/smmstore/store.c
index a12cd58e10..24e8a88edd 100644
--- a/src/drivers/smmstore/store.c
+++ b/src/drivers/smmstore/store.c
@@ -1,7 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <boot_device.h>
-#include <cbfs.h>
#include <fmap.h>
#include <commonlib/helpers.h>
#include <commonlib/region.h>
@@ -9,6 +8,8 @@
#include <smmstore.h>
#include <types.h>
+#define SMMSTORE_REGION "SMMSTORE"
+
/*
* The region format is still not finalized, but so far it looks like this:
* (
@@ -33,26 +34,11 @@
static enum cb_err lookup_store_region(struct region *region)
{
- if (CONFIG(SMMSTORE_IN_CBFS)) {
- struct cbfsf file;
- if (cbfs_locate_file_in_region(&file,
- CONFIG_SMMSTORE_REGION,
- CONFIG_SMMSTORE_FILENAME, NULL) < 0) {
- printk(BIOS_WARNING,
- "smm store: Unable to find SMM store file in region '%s'\n",
- CONFIG_SMMSTORE_REGION);
- return CB_ERR;
- }
- struct region_device rdev;
- cbfs_file_data(&rdev, &file);
- *region = *region_device_region(&rdev);
- } else {
- if (fmap_locate_area(CONFIG_SMMSTORE_REGION, region)) {
- printk(BIOS_WARNING,
- "smm store: Unable to find SMM store FMAP region '%s'\n",
- CONFIG_SMMSTORE_REGION);
- return CB_ERR;
- }
+ if (fmap_locate_area(SMMSTORE_REGION, region)) {
+ printk(BIOS_WARNING,
+ "smm store: Unable to find SMM store FMAP region '%s'\n",
+ SMMSTORE_REGION);
+ return CB_ERR;
}
return CB_SUCCESS;