]> git.proxmox.com Git - mirror_edk2.git/blame - RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.h
MpInitLib: Move the Above1Mb vector allocation to MpInitLibInitialize
[mirror_edk2.git] / RedfishPkg / RedfishConfigHandler / RedfishConfigHandlerCommon.h
CommitLineData
2072c22a
AC
1/** @file\r
2 Common Header file for Redfish Configuration Handler UEFI driver\r
3 and DXE driver.\r
4\r
5 (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>\r
6\r
7 SPDX-License-Identifier: BSD-2-Clause-Patent\r
8\r
9**/\r
10\r
11#ifndef EFI_REDFISH_CONFIG_HANDLER_COMMON_H_\r
12#define EFI_REDFISH_CONFIG_HANDLER_COMMON_H_\r
13\r
14#include <Uefi.h>\r
15\r
16//\r
17// Libraries\r
18//\r
19#include <Library/BaseLib.h>\r
20#include <Library/BaseMemoryLib.h>\r
21#include <Library/DebugLib.h>\r
22#include <Library/MemoryAllocationLib.h>\r
23#include <Library/NetLib.h>\r
24#include <Library/UefiBootServicesTableLib.h>\r
25#include <Library/UefiDriverEntryPoint.h>\r
26#include <Library/UefiLib.h>\r
27\r
28//\r
29// Consumed Protocols\r
30//\r
31#include <Protocol/EdkIIRedfishCredential.h>\r
32#include <Protocol/EdkIIRedfishConfigHandler.h>\r
33\r
34//\r
35// Driver Version\r
36//\r
37#define REDFISH_CONFIG_VERSION 0x00000001\r
38\r
39///\r
40/// Internal structure used by Redfish Config DXE driver.\r
41///\r
42typedef struct {\r
39de741e
MK
43 UINT32 CallerId; ///< Caller ID used to indicate Redfish Config Handler\r
44 ///< has been initiated\r
45 EFI_HANDLE Image; ///< Image handle of Redfish Config Driver\r
46 EFI_EVENT Event; ///< Event for the notification of EFI_REDFISH_CONFIG_HANDLER_PROTOCOL\r
47 REDFISH_CONFIG_SERVICE_INFORMATION RedfishServiceInfo; /// Redfish Service information discovered\r
2072c22a
AC
48} REDFISH_CONFIG_DRIVER_DATA;\r
49\r
50/**\r
51 Common code of unloading image for both UEFI/DXE Redfish Configuration drivers.\r
52\r
53 @param[in] ImageHandle Handle that identifies the image to be unloaded.\r
54\r
55 @retval EFI_SUCCESS The image has been unloaded.\r
56\r
57**/\r
58EFI_STATUS\r
59RedfishConfigDriverCommonUnload (\r
60 IN EFI_HANDLE ImageHandle\r
61 );\r
62\r
63/**\r
64 This is the common code for Redfish configuration UEFI and DXE driver\r
65 initialization.\r
66\r
67 @param[in] ImageHandle The firmware allocated handle for the UEFI image.\r
68 @param[in] SystemTable A pointer to the EFI System Table.\r
69\r
70 @retval EFI_SUCCESS The operation completed successfully.\r
71 @retval Others An unexpected error occurred.\r
72**/\r
73EFI_STATUS\r
74RedfishConfigCommonInit (\r
75 IN EFI_HANDLE ImageHandle,\r
76 IN EFI_SYSTEM_TABLE *SystemTable\r
77 );\r
78\r
79/**\r
80 This is the common code to stop EDK2 Redfish feature driver.\r
81\r
82 @retval EFI_SUCCESS All EDK2 Redfish feature drivers are\r
83 stopped.\r
84 @retval Others An unexpected error occurred.\r
85**/\r
86EFI_STATUS\r
87RedfishConfigCommonStop (\r
88 VOID\r
39de741e 89 );\r
2072c22a
AC
90\r
91/**\r
92 Callback function executed when a Redfish Config Handler Protocol is installed\r
93 by EDK2 Redfish Feature Drivers.\r
94\r
95**/\r
96VOID\r
97RedfishConfigHandlerInitialization (\r
98 VOID\r
99 );\r
100\r
101#endif\r