TianoCore EDK2 master
Loading...
Searching...
No Matches
PrmSampleAcpiParameterBufferModule.c
Go to the documentation of this file.
1
10#include <PrmModule.h>
11
12#include <Library/BaseLib.h>
13#include <Library/UefiLib.h>
14
15// TEMP
16#include <Library/DebugLib.h>
17
18#define PARAM_BUFFER_TEST_SIGNATURE SIGNATURE_32('T','E','S','T')
19
20//
21// PRM Handler GUIDs
22//
23
24// {2e4f2d13-6240-4ed0-a401-c723fbdc34e8}
25#define CHECK_PARAM_BUFFER_PRM_HANDLER_GUID {0x2e4f2d13, 0x6240, 0x4ed0, {0xa4, 0x01, 0xc7, 0x23, 0xfb, 0xdc, 0x34, 0xe8}}
26
42PRM_HANDLER_EXPORT (CheckParamBufferPrmHandler) {
43 if (ParameterBuffer == NULL) {
44 return EFI_INVALID_PARAMETER;
45 }
46
47 if (*((UINT32 *)ParameterBuffer) == PARAM_BUFFER_TEST_SIGNATURE) {
48 return EFI_SUCCESS;
49 }
50
51 return EFI_NOT_FOUND;
52}
53
54//
55// Register the PRM export information for this PRM Module
56//
58 PRM_HANDLER_EXPORT_ENTRY (CHECK_PARAM_BUFFER_PRM_HANDLER_GUID, CheckParamBufferPrmHandler)
59 );
60
71EFIAPI
73 IN EFI_HANDLE ImageHandle,
74 IN EFI_SYSTEM_TABLE *SystemTable
75 )
76{
77 return EFI_SUCCESS;
78}
#define NULL
Definition: Base.h:319
#define IN
Definition: Base.h:279
#define PRM_MODULE_EXPORT(...)
#define PRM_HANDLER_EXPORT_ENTRY(Guid, Name)
#define PRM_HANDLER_EXPORT(Name)
Definition: PrmModule.h:26
EFI_STATUS EFIAPI PrmSampleAcpiParameterBufferModuleInit(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
#define EFI_SUCCESS
Definition: UefiBaseType.h:112