mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
UEFI driver shouldn't have the [Depex] section in INF file. Remove Redfish Credential Protocol in dependency section and locate it when the UEFI driver is connected to execute. Signed-off-by: Abner Chang <abner.chang@amd.com>
95 lines
2.5 KiB
C
95 lines
2.5 KiB
C
/** @file
|
|
Common Header file for Redfish Configuration Handler UEFI driver
|
|
and DXE driver.
|
|
|
|
(C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
|
|
Copyright (c) 2026, Advanced Micro Devices, Inc. All rights reserved.<BR>
|
|
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
|
**/
|
|
|
|
#pragma once
|
|
|
|
#include <Uefi.h>
|
|
|
|
//
|
|
// Libraries
|
|
//
|
|
#include <Library/BaseLib.h>
|
|
#include <Library/BaseMemoryLib.h>
|
|
#include <Library/DebugLib.h>
|
|
#include <Library/MemoryAllocationLib.h>
|
|
#include <Library/NetLib.h>
|
|
#include <Library/UefiBootServicesTableLib.h>
|
|
#include <Library/UefiDriverEntryPoint.h>
|
|
#include <Library/UefiLib.h>
|
|
|
|
//
|
|
// Consumed Protocols
|
|
//
|
|
#include <Protocol/EdkIIRedfishCredential.h>
|
|
#include <Protocol/EdkIIRedfishConfigHandler.h>
|
|
|
|
//
|
|
// Driver Version
|
|
//
|
|
#define REDFISH_CONFIG_VERSION 0x00000001
|
|
|
|
///
|
|
/// Internal structure used by Redfish Config DXE driver.
|
|
///
|
|
typedef struct {
|
|
UINT32 CallerId; ///< Caller ID used to indicate Redfish Config Handler
|
|
///< has been initiated
|
|
EFI_HANDLE Image; ///< Image handle of Redfish Config Driver
|
|
EFI_EVENT Event; ///< Event for the notification of EFI_REDFISH_CONFIG_HANDLER_PROTOCOL
|
|
REDFISH_CONFIG_SERVICE_INFORMATION RedfishServiceInfo; /// Redfish Service information discovered
|
|
} REDFISH_CONFIG_DRIVER_DATA;
|
|
|
|
/**
|
|
Common code of unloading image for both UEFI/DXE Redfish Configuration drivers.
|
|
|
|
@param[in] ImageHandle Handle that identifies the image to be unloaded.
|
|
|
|
@retval EFI_SUCCESS The image has been unloaded.
|
|
|
|
**/
|
|
EFI_STATUS
|
|
RedfishConfigDriverCommonUnload (
|
|
IN EFI_HANDLE ImageHandle
|
|
);
|
|
|
|
/**
|
|
This is the common code for Redfish configuration UEFI and DXE driver
|
|
initialization.
|
|
|
|
@retval EFI_SUCCESS The operation completed successfully.
|
|
@retval Others An unexpected error occurred.
|
|
**/
|
|
EFI_STATUS
|
|
RedfishConfigCommonInit (
|
|
VOID
|
|
);
|
|
|
|
/**
|
|
This is the common code to stop EDK2 Redfish feature driver.
|
|
|
|
@retval EFI_SUCCESS All EDK2 Redfish feature drivers are
|
|
stopped.
|
|
@retval Others An unexpected error occurred.
|
|
**/
|
|
EFI_STATUS
|
|
RedfishConfigCommonStop (
|
|
VOID
|
|
);
|
|
|
|
/**
|
|
Callback function executed when a Redfish Config Handler Protocol is installed
|
|
by EDK2 Redfish Feature Drivers.
|
|
|
|
**/
|
|
VOID
|
|
RedfishConfigHandlerInitialization (
|
|
VOID
|
|
);
|