Sergii Dmytruk 89e056bdf1 util/smmstoretool: support processing ROMs
Input file is parsed for FMAP and SMMSTORE region which is used if
found.  Otherwise, the whole file is assumed to be the region.  Passing
an image with FMAP that lacks SMMSTORER is an error.

Change-Id: Ieab555d7bbcfa4dadf6a5070d1297acd737440fb
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80903
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-03-09 23:26:41 +00:00

24 lines
514 B
C

/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef SMMSTORETOOL__STORAGE_H__
#define SMMSTORETOOL__STORAGE_H__
#include "vs.h"
#include "utils.h"
struct storage_t {
bool rw;
struct mem_range_t file;
struct mem_range_t region;
struct mem_range_t store_area;
struct var_store_t vs;
};
bool storage_open(const char store_file[], struct storage_t *storage, bool rw);
bool storage_write_back(struct storage_t *storage);
void storage_drop(struct storage_t *storage);
#endif // SMMSTORETOOL__STORAGE_H__