In this patch, we extend commit d92eaabefbe0 ("OvmfPkg: simplify VARIABLE_STORE_HEADER generation", 2016-02-05) to EmuVariableFvbRuntimeDxe. This is the difference between FvAndVarTemplate and FvAndAuthenticatedVarTemplate: > --- non-auth 2017-05-05 22:32:06.001512283 +0200 > +++ auth 2017-05-05 22:32:18.841364882 +0200 > @@ -1,7 +1,7 @@ > // > - // Templates for standard (non-authenticated) variable FV header > + // Templates for authenticated variable FV header > // > - STATIC FVB_FV_HDR_AND_VARS_TEMPLATE FvAndVarTemplate = { > + STATIC FVB_FV_HDR_AND_VARS_TEMPLATE FvAndAuthenticatedVarTemplate = { > { // EFI_FIRMWARE_VOLUME_HEADER FvHdr; > // UINT8 ZeroVector[16]; > { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, > @@ -34,7 +34,7 @@ > EFI_FVH_REVISION, > > // EFI_FV_BLOCK_MAP_ENTRY BlockMap[1]; > - { > + { > { > 2, // UINT32 NumBlocks; > EMU_FVB_BLOCK_SIZE // UINT32 Length; > @@ -44,8 +44,8 @@ > // EFI_FV_BLOCK_MAP_ENTRY EndBlockMap; > { 0, 0 }, // End of block map > { // VARIABLE_STORE_HEADER VarHdr; > - // EFI_GUID Signature; > - EFI_VARIABLE_GUID, > + // EFI_GUID Signature; // need authenticated variables for secure boot > + EFI_AUTHENTICATED_VARIABLE_GUID, > > // UINT32 Size; > ( After this change, using "-bios", the variable driver logs: - with the SB feature enabled: > Variable driver will work with auth variable format! > Variable driver will work with auth variable support! - with the SB feature disabled: > Variable driver will work with auth variable format! > Variable driver will continue to work without auth variable support! Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
74 lines
2.3 KiB
INI
74 lines
2.3 KiB
INI
## @file
|
|
# Firmware Block Services to support emulating non-volatile variables
|
|
# by pretending that a memory buffer is storage for the NV variables.
|
|
#
|
|
# Copyright (c) 2008 - 2011, Intel Corporation. All rights reserved.<BR>
|
|
#
|
|
# This program and the accompanying materials
|
|
# are licensed and made available under the terms and conditions of the BSD License
|
|
# which accompanies this distribution. The full text of the license may be found at
|
|
# http://opensource.org/licenses/bsd-license.php
|
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
#
|
|
##
|
|
|
|
[Defines]
|
|
INF_VERSION = 0x00010005
|
|
BASE_NAME = EmuVariableFvbRuntimeDxe
|
|
FILE_GUID = 22dc2b60-fe40-42ac-b01f-3ab1fad9aad8
|
|
MODULE_TYPE = DXE_RUNTIME_DRIVER
|
|
VERSION_STRING = 1.0
|
|
ENTRY_POINT = FvbInitialize
|
|
|
|
#
|
|
# The following information is for reference only and not required by the build tools.
|
|
#
|
|
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
|
#
|
|
|
|
[Sources]
|
|
Fvb.c
|
|
|
|
[Packages]
|
|
MdePkg/MdePkg.dec
|
|
MdeModulePkg/MdeModulePkg.dec
|
|
OvmfPkg/OvmfPkg.dec
|
|
|
|
[LibraryClasses]
|
|
BaseLib
|
|
BaseMemoryLib
|
|
DebugLib
|
|
DxeServicesTableLib
|
|
HobLib
|
|
MemoryAllocationLib
|
|
PcdLib
|
|
PlatformFvbLib
|
|
UefiBootServicesTableLib
|
|
UefiDriverEntryPoint
|
|
UefiLib
|
|
UefiRuntimeLib
|
|
|
|
[Guids]
|
|
gEfiEventVirtualAddressChangeGuid # ALWAYS_CONSUMED Create Event: EVENT_GROUP_GUID
|
|
|
|
[Protocols]
|
|
gEfiFirmwareVolumeBlock2ProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
|
gEfiDevicePathProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
|
|
|
[FixedPcd]
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
|
|
|
|
[Pcd]
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved
|
|
|
|
[Depex]
|
|
TRUE
|
|
|