Sergii Dmytruk 04bd965143 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>
2024-03-09 23:22:55 +00:00

27 lines
576 B
C

/* 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__