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:
committed by
Martin L Roth
parent
7a51acfbe9
commit
04bd965143
29
util/smmstoretool/utils.h
Normal file
29
util/smmstoretool/utils.h
Normal file
@ -0,0 +1,29 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
#ifndef SMMSTORETOOL__UTILS_H__
|
||||
#define SMMSTORETOOL__UTILS_H__
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "udk2017.h"
|
||||
|
||||
struct mem_range_t {
|
||||
uint8_t *start;
|
||||
size_t length;
|
||||
};
|
||||
|
||||
void *xmalloc(size_t size);
|
||||
|
||||
char *to_chars(const CHAR16 uchars[], size_t size);
|
||||
|
||||
CHAR16 *to_uchars(const char chars[], size_t *size);
|
||||
|
||||
bool str_eq(const char lhs[], const char rhs[]);
|
||||
|
||||
struct mem_range_t map_file(const char path[], bool rw);
|
||||
|
||||
void unmap_file(struct mem_range_t store);
|
||||
|
||||
#endif // SMMSTORETOOL__UTILS_H__
|
Reference in New Issue
Block a user