TianoCore EDK2 master
Loading...
Searching...
No Matches
QemuFwCfgSec.c
Go to the documentation of this file.
1
14#include <Library/BaseLib.h>
15#include <Library/DebugLib.h>
17
19
30BOOLEAN
31EFIAPI
33 VOID
34 )
35{
36 UINT32 Signature;
37 UINT32 Revision;
38
39 QemuFwCfgSelectItem (QemuFwCfgItemSignature);
40 Signature = QemuFwCfgRead32 ();
41 DEBUG ((DEBUG_INFO, "FW CFG Signature: 0x%x\n", Signature));
42 QemuFwCfgSelectItem (QemuFwCfgItemInterfaceVersion);
43 Revision = QemuFwCfgRead32 ();
44 DEBUG ((DEBUG_INFO, "FW CFG Revision: 0x%x\n", Revision));
45 if ((Signature != SIGNATURE_32 ('Q', 'E', 'M', 'U')) ||
46 (Revision < 1)
47 )
48 {
49 DEBUG ((DEBUG_INFO, "QemuFwCfg interface not supported.\n"));
50 return FALSE;
51 }
52
53 DEBUG ((DEBUG_INFO, "QemuFwCfg interface is supported.\n"));
54 return TRUE;
55}
56
66BOOLEAN
68 VOID
69 )
70{
71 //
72 // We always return TRUE, because the consumer of this library ought to have
73 // called QemuFwCfgIsAvailable before making other calls which would hit this
74 // path.
75 //
76 return TRUE;
77}
78
86BOOLEAN
88 VOID
89 )
90{
91 return FALSE;
92}
93
109VOID
111 IN UINT32 Size,
112 IN OUT VOID *Buffer OPTIONAL,
113 IN UINT32 Control
114 )
115{
116 //
117 // We should never reach here
118 //
119 ASSERT (FALSE);
120 CpuDeadLoop ();
121}
VOID EFIAPI CpuDeadLoop(VOID)
Definition: CpuDeadLoop.c:25
#define TRUE
Definition: Base.h:301
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
#define SIGNATURE_32(A, B, C, D)
Definition: Base.h:1310
#define OUT
Definition: Base.h:284
#define DEBUG(Expression)
Definition: DebugLib.h:434
UINT32 EFIAPI QemuFwCfgRead32(VOID)
Definition: QemuFwCfgLib.c:205
VOID EFIAPI QemuFwCfgSelectItem(IN FIRMWARE_CONFIG_ITEM QemuFwCfgItem)
Definition: QemuFwCfgLib.c:33
BOOLEAN InternalQemuFwCfgIsAvailable(VOID)
Definition: QemuFwCfgSec.c:67
VOID InternalQemuFwCfgDmaBytes(IN UINT32 Size, IN OUT VOID *Buffer OPTIONAL, IN UINT32 Control)
Definition: QemuFwCfgSec.c:110
BOOLEAN InternalQemuFwCfgDmaIsAvailable(VOID)
Definition: QemuFwCfgSec.c:87
BOOLEAN EFIAPI QemuFwCfgIsAvailable(VOID)
Definition: QemuFwCfgSec.c:32