The current implementation of QemuFwCfgLib is: - stateful - implicitly initialized in the library constructor. OVMF's SEC runs from read-only memory/flash. When the library is linked into a SEC binary (which currently never happens), the "mQemuFwCfgSupported" global variable becomes read-only, making the library non-functional. Extract the stateful, implicitly initialized library implementation into a separate file, making room for a stateless, explicitly queried implementation that's usable in SEC. Restrict the stateful implementation to the current, non-SEC clients. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15045 6f19259b-4bc3-4df7-8a09-765794883524
57 lines
1.5 KiB
INI
57 lines
1.5 KiB
INI
## @file
|
|
#
|
|
# Stateful, implicitly initialized fw_cfg library.
|
|
#
|
|
# Copyright (C) 2013, Red Hat, Inc.
|
|
# Copyright (c) 2008 - 2012, 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 = QemuFwCfgLib
|
|
FILE_GUID = fdd53716-31e1-4acc-9007-8bd5d877c96f
|
|
MODULE_TYPE = BASE
|
|
VERSION_STRING = 1.0
|
|
LIBRARY_CLASS = QemuFwCfgLib|PEIM DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER
|
|
|
|
CONSTRUCTOR = QemuFwCfgInitialize
|
|
|
|
#
|
|
# The following information is for reference only and not required by the build tools.
|
|
#
|
|
# VALID_ARCHITECTURES = IA32 X64
|
|
#
|
|
|
|
[Sources]
|
|
QemuFwCfgLib.c
|
|
QemuFwCfgPeiDxe.c
|
|
|
|
[Sources.IA32]
|
|
Ia32/IoLibExAsm.asm
|
|
Ia32/IoLibExAsm.S
|
|
|
|
[Sources.X64]
|
|
X64/IoLibExAsm.asm
|
|
X64/IoLibExAsm.S
|
|
|
|
[Packages]
|
|
MdePkg/MdePkg.dec
|
|
OvmfPkg/OvmfPkg.dec
|
|
|
|
[LibraryClasses]
|
|
BaseLib
|
|
BaseMemoryLib
|
|
DebugLib
|
|
IoLib
|
|
MemoryAllocationLib
|
|
|