util: add smmstoretool for editing SMMSTORE

Offline SMMSTORE variable modification tool.  Can be used to
pre-configure ROM image or debug EFI state stored in a dump.

Change-Id: I6c1c06f1d0c39c13b5be76a3070f09b715aca6e0
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79080
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
Sergii Dmytruk
2023-11-17 19:31:20 +02:00
committed by Martin L Roth
parent 7a51acfbe9
commit 04bd965143
21 changed files with 1730 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
/* 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 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__