OvmfPkg: QemuFwCfgLib: extract stateful implementation
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
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
## @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
|
||||
@@ -18,7 +21,7 @@
|
||||
FILE_GUID = fdd53716-31e1-4acc-9007-8bd5d877c96f
|
||||
MODULE_TYPE = BASE
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = QemuFwCfgLib
|
||||
LIBRARY_CLASS = QemuFwCfgLib|PEIM DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER
|
||||
|
||||
CONSTRUCTOR = QemuFwCfgInitialize
|
||||
|
||||
@@ -30,6 +33,7 @@
|
||||
|
||||
[Sources]
|
||||
QemuFwCfgLib.c
|
||||
QemuFwCfgPeiDxe.c
|
||||
|
||||
[Sources.IA32]
|
||||
Ia32/IoLibExAsm.asm
|
||||
|
Reference in New Issue
Block a user