summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/smmstore/Kconfig17
-rw-r--r--src/drivers/smmstore/store.c28
2 files changed, 7 insertions, 38 deletions
diff --git a/src/drivers/smmstore/Kconfig b/src/drivers/smmstore/Kconfig
index 13b7312242..3e20e3e66d 100644
--- a/src/drivers/smmstore/Kconfig
+++ b/src/drivers/smmstore/Kconfig
@@ -19,27 +19,10 @@ config SMMSTORE_V2
By using version 2 you cannot make use of software that expects
a version 1 SMMSTORE.
-config SMMSTORE_IN_CBFS
- bool
- default n
- help
- Select this if you want to add an SMMSTORE region to a
- cbfsfile in a cbfs FMAP region
-
if SMMSTORE
-config SMMSTORE_REGION
- string "fmap region in which SMM store file is kept" if SMMSTORE_IN_CBFS
- default "RW_LEGACY" if CHROMEOS && SMMSTORE_IN_CBFS
- default "COREBOOT" if SMMSTORE_IN_CBFS
- default "SMMSTORE"
-
-config SMMSTORE_FILENAME
- string "SMM store file name" if SMMSTORE_IN_CBFS
- default "smm_store"
config SMMSTORE_SIZE
hex "size of the SMMSTORE FMAP region"
- depends on !SMMSTORE_IN_CBFS
default 0x40000
help
Sets the size of the default SMMSTORE FMAP region.
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;