## SPDX-License-Identifier: GPL-2.0-only

config SMMSTORE
	bool "Support for flash based, SMM mediated data store"
	depends on BOOT_DEVICE_SUPPORTS_WRITES && HAVE_SMI_HANDLER
	default y if PAYLOAD_EDK2
	select SPI_FLASH_SMM if BOOT_DEVICE_SPI_FLASH_RW_NOMMAP

config SMMSTORE_V2
	bool "Use version 2 of SMMSTORE API"
	depends on SMMSTORE
	default y if PAYLOAD_EDK2
	default n
	help
	  Version 2 of SMMSTORE allows secure communication with SMM and
	  makes no assumptions on the structure of the data stored within.
	  It splits the store into chunks to allows fault tolerant writes.

	  By using version 2 you cannot make use of software that expects
	  a version 1 SMMSTORE.

if SMMSTORE

config SMMSTORE_SIZE
	hex "size of the SMMSTORE FMAP region"
	default 0x40000
	help
	  Sets the size of the default SMMSTORE FMAP region.
	  If using an UEFI payload, note that UEFI specifies at least 64K.
	  The current implementation of SMMSTORE is append only, so until
	  garbage collection is implemented it is better to set this to
	  a rather large value.

endif