diff options
author | Sergii Dmytruk <sergii.dmytruk@3mdeb.com> | 2023-11-17 19:31:20 +0200 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2024-03-09 23:22:55 +0000 |
commit | 04bd9651435843ce4b03c9717f2965fe344fe5cc (patch) | |
tree | 0193502b26818c738206a60862c689485d533a50 /util/smmstoretool/udk2017.h | |
parent | 7a51acfbe91c7f9d01837103341526abb6ea46f4 (diff) |
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>
Diffstat (limited to 'util/smmstoretool/udk2017.h')
-rw-r--r-- | util/smmstoretool/udk2017.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/util/smmstoretool/udk2017.h b/util/smmstoretool/udk2017.h new file mode 100644 index 0000000000..5a4286a634 --- /dev/null +++ b/util/smmstoretool/udk2017.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#ifndef SMMSTORETOOL__UDK2017_H__ +#define SMMSTORETOOL__UDK2017_H__ + +#include <UDK2017/MdePkg/Include/Uefi/UefiBaseType.h> +#include <UDK2017/MdePkg/Include/Uefi/UefiMultiPhase.h> +#include <UDK2017/MdePkg/Include/Pi/PiFirmwareVolume.h> +#include <UDK2017/MdeModulePkg/Include/Guid/VariableFormat.h> + +/* + * ProcessorBind.h contains `#pragma GCC visibility push(hidden)` guarded by an + * identical condition, but there is no corresponding `pop` pragma. This can + * cause trouble for code following headers above including libc headers because + * linker suddenly considers declarations from them (e.g., `strcmp()`) to be + * hidden. + * + * In order to address this situation all UDK2017 headers used by this tool + * must be listed above and included indirectly through this header which + * restores default visibility. + * + * Mind that this issue appears only if the following conditions are satisfied + * and not all toolchains are configured to build position-independent code by + * default (as if -fpic or -fpie appears on compilation command-line). + */ +#if defined(__GNUC__) && defined(__pic__) && !defined(USING_LTO) +#pragma GCC visibility pop +#endif + +#endif // SMMSTORETOOL__UDK2017_H__ |