TianoCore EDK2
master
Loading...
Searching...
No Matches
PrmSampleContextBufferModule.c
Go to the documentation of this file.
1
11
#include <
PrmModule.h
>
12
13
#include <
Library/BaseLib.h
>
14
#include <
Library/PrintLib.h
>
15
#include <
Library/UefiLib.h
>
16
17
#include <
Samples/PrmSampleContextBufferModule/Include/StaticData.h
>
18
19
//
20
// PRM Handler GUIDs
21
//
22
23
// {e1466081-7562-430f-896b-b0e523dc335a}
24
#define CHECK_STATIC_DATA_BUFFER_PRM_HANDLER_GUID {0xe1466081, 0x7562, 0x430f, {0x89, 0x6b, 0xb0, 0xe5, 0x23, 0xdc, 0x33, 0x5a}}
25
38
PRM_HANDLER_EXPORT
(CheckStaticDataBufferPrmHandler) {
39
if
(ContextBuffer ==
NULL
) {
40
return
EFI_INVALID_PARAMETER;
41
}
42
43
if
(ContextBuffer->StaticDataBuffer ==
NULL
) {
44
return
EFI_INVALID_PARAMETER;
45
}
46
47
//
48
// Verify PRM data buffer signature is valid
49
//
50
if
(
51
(ContextBuffer->Signature != PRM_CONTEXT_BUFFER_SIGNATURE) ||
52
(ContextBuffer->StaticDataBuffer->Header.Signature != PRM_DATA_BUFFER_HEADER_SIGNATURE))
53
{
54
return
EFI_NOT_FOUND;
55
}
56
57
return
EFI_SUCCESS
;
58
}
59
60
//
61
// Register the PRM export information for this PRM Module
62
//
63
PRM_MODULE_EXPORT
(
64
PRM_HANDLER_EXPORT_ENTRY
(CHECK_STATIC_DATA_BUFFER_PRM_HANDLER_GUID, CheckStaticDataBufferPrmHandler)
65
);
66
76
EFI_STATUS
77
EFIAPI
78
PrmSampleContextBufferModuleInit
(
79
IN
EFI_HANDLE
ImageHandle,
80
IN
EFI_SYSTEM_TABLE
*SystemTable
81
)
82
{
83
return
EFI_SUCCESS
;
84
}
BaseLib.h
NULL
#define NULL
Definition:
Base.h:319
IN
#define IN
Definition:
Base.h:279
PrintLib.h
PRM_MODULE_EXPORT
#define PRM_MODULE_EXPORT(...)
Definition:
PrmExportDescriptor.h:90
PRM_HANDLER_EXPORT_ENTRY
#define PRM_HANDLER_EXPORT_ENTRY(Guid, Name)
Definition:
PrmExportDescriptor.h:64
PrmModule.h
PRM_HANDLER_EXPORT
#define PRM_HANDLER_EXPORT(Name)
Definition:
PrmModule.h:26
PrmSampleContextBufferModuleInit
EFI_STATUS EFIAPI PrmSampleContextBufferModuleInit(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
Definition:
PrmSampleContextBufferModule.c:78
StaticData.h
EFI_STATUS
RETURN_STATUS EFI_STATUS
Definition:
UefiBaseType.h:29
EFI_HANDLE
VOID * EFI_HANDLE
Definition:
UefiBaseType.h:33
EFI_SUCCESS
#define EFI_SUCCESS
Definition:
UefiBaseType.h:112
UefiLib.h
EFI_SYSTEM_TABLE
Definition:
UefiSpec.h:2028
PrmPkg
Samples
PrmSampleContextBufferModule
PrmSampleContextBufferModule.c
Generated on Fri Nov 15 2024 18:01:22 for TianoCore EDK2 by
1.9.6