25 0x5a6cf42b, 0x8bb4, 0x472c, { 0xa2, 0x33, 0x5c, 0x4d, 0xc4, 0x03, 0x3d, 0xc7 }
30 0xe1466081, 0x7562, 0x430f, { 0x89, 0x6b, 0xb0, 0xe5, 0x23, 0xdc, 0x33, 0x5a }
47 if (StaticDataBuffer ==
NULL) {
48 return EFI_INVALID_PARAMETER;
58 StaticDataBuffer->Policy1Enabled =
TRUE;
59 StaticDataBuffer->Policy2Enabled =
FALSE;
60 SetMem (StaticDataBuffer->SomeValueArray,
ARRAY_SIZE (StaticDataBuffer->SomeValueArray),
'D');
82 UINTN DataBufferLength;
84 if (StaticDataBuffer ==
NULL) {
85 return EFI_INVALID_PARAMETER;
88 *StaticDataBuffer =
NULL;
96 if (DataBuffer ==
NULL) {
97 return EFI_OUT_OF_RESOURCES;
109 *StaticDataBuffer = DataBuffer;
134 PrmContextBuffer =
NULL;
135 StaticDataBuffer =
NULL;
136 PrmConfigProtocol =
NULL;
152 if (EFI_ERROR (Status) || (StaticDataBuffer ==
NULL)) {
169 ASSERT (PrmContextBuffer !=
NULL);
170 if (PrmContextBuffer ==
NULL) {
171 Status = EFI_OUT_OF_RESOURCES;
176 PrmContextBuffer->
Signature = PRM_CONTEXT_BUFFER_SIGNATURE;
177 PrmContextBuffer->
Version = PRM_CONTEXT_BUFFER_INTERFACE_VERSION;
181 ASSERT (PrmConfigProtocol !=
NULL);
182 if (PrmConfigProtocol ==
NULL) {
183 Status = EFI_OUT_OF_RESOURCES;
188 PrmConfigProtocol->ModuleContextBuffers.
BufferCount = 1;
189 PrmConfigProtocol->ModuleContextBuffers.
Buffer = PrmContextBuffer;
195 Status =
gBS->InstallProtocolInterface (
196 &mPrmConfigProtocolHandle,
197 &gPrmConfigProtocolGuid,
199 (VOID *)PrmConfigProtocol
203 if (EFI_ERROR (Status)) {
204 if (StaticDataBuffer !=
NULL) {
208 if (PrmContextBuffer !=
NULL) {
212 if (PrmConfigProtocol !=
NULL) {
VOID *EFIAPI SetMem(OUT VOID *Buffer, IN UINTN Length, IN UINT8 Value)
GUID *EFIAPI CopyGuid(OUT GUID *DestinationGuid, IN CONST GUID *SourceGuid)
EFI_STATUS GetStaticDataBuffer(OUT PRM_DATA_BUFFER **StaticDataBuffer)
EFI_STATUS EFIAPI ContextBufferModuleConfigLibConstructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS PopulateStaticDataBuffer(OUT STATIC_DATA_SAMPLE_CONTEXT_BUFFER_MODULE *StaticDataBuffer)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID *EFIAPI AllocateRuntimeZeroPool(IN UINTN AllocationSize)
#define ARRAY_SIZE(Array)
#define ASSERT_EFI_ERROR(StatusParameter)
PRM_DATA_BUFFER * StaticDataBuffer
PRM_DATA_BUFFER_HEADER Header
PRM_CONTEXT_BUFFER * Buffer