diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2023-04-21 08:55:44 +0200 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-05-04 14:26:58 +0000 |
commit | 92da8a154fc0a1b0f42ab0ec4aee7dd2933f1a0a (patch) | |
tree | 797e6302d85642bb3c75330eff1b4c74c5405a59 /OvmfPkg/Library/NvVarsFileLib | |
parent | a818a873e5381726c16470fa452d76fbbd5b200e (diff) | |
download | edk2-92da8a154fc0a1b0f42ab0ec4aee7dd2933f1a0a.tar.gz |
OvmfPkg: replace SECURE_BOOT_FEATURE_ENABLED with PcdSecureBootSupported
Drop the '-D SECURE_BOOT_FEATURE_ENABLED' compile time option,
use a new FeaturePcd instead.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'OvmfPkg/Library/NvVarsFileLib')
-rw-r--r-- | OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.c | 11 | ||||
-rw-r--r-- | OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.c b/OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.c index 72289da358..d4139b9115 100644 --- a/OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.c +++ b/OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.c @@ -28,14 +28,12 @@ ConnectNvVarsToFileSystem ( IN EFI_HANDLE FsHandle
)
{
- #ifdef SECURE_BOOT_FEATURE_ENABLED
-
- return EFI_UNSUPPORTED;
-
- #else
-
EFI_STATUS Status;
+ if (FeaturePcdGet (PcdSecureBootSupported)) {
+ return EFI_UNSUPPORTED;
+ }
+
//
// We might fail to load the variable, since the file system initially
// will not have the NvVars file.
@@ -52,7 +50,6 @@ ConnectNvVarsToFileSystem ( }
return Status;
- #endif
}
/**
diff --git a/OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf b/OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf index 8cda78d0d0..f152c55046 100644 --- a/OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf +++ b/OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf @@ -47,6 +47,8 @@ [Protocols]
gEfiSimpleFileSystemProtocolGuid ## CONSUMES
+[Pcd]
+ gUefiOvmfPkgTokenSpaceGuid.PcdSecureBootSupported
[Guids]
gEfiFileInfoGuid
|