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
26
util/smmstoretool/data.h
Normal file
26
util/smmstoretool/data.h
Normal file
@ -0,0 +1,26 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
#ifndef SMMSTORETOOL__DATA_H__
|
||||
#define SMMSTORETOOL__DATA_H__
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
enum data_type {
|
||||
DATA_TYPE_BOOL,
|
||||
DATA_TYPE_UINT8,
|
||||
DATA_TYPE_UINT16,
|
||||
DATA_TYPE_UINT32,
|
||||
DATA_TYPE_ASCII,
|
||||
DATA_TYPE_UNICODE,
|
||||
DATA_TYPE_RAW,
|
||||
};
|
||||
|
||||
void print_data(const uint8_t data[], size_t data_size, enum data_type type);
|
||||
|
||||
void *make_data(const char source[], size_t *data_size, enum data_type type);
|
||||
|
||||
bool parse_data_type(const char str[], enum data_type *type);
|
||||
|
||||
#endif // SMMSTORETOOL__DATA_H__
|
Reference in New Issue
Block a user