mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
RedfishPkg/RedfishExDxe: call platform device wanted lib
In supported() function, add the call to platform device wanted lib to see if platform wants to support this device or not. If platform does not support this device, Redfish Ex protocol won't be available on this controller handle and the reset of Redfish service is not available either. Signed-off-by: Nickle Wang <nicklew@nvidia.com>
This commit is contained in:
parent
b2c4294c49
commit
225bf1277c
3 changed files with 18 additions and 10 deletions
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
|
||||
Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
Copyright (c) 2023-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.<BR>
|
||||
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
|
@ -375,14 +375,19 @@ RedfishRestExDriverBindingSupported (
|
|||
//
|
||||
// Test for the HttpServiceBinding Protocol.
|
||||
//
|
||||
return gBS->OpenProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiHttpServiceBindingProtocolGuid,
|
||||
NULL,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
|
||||
);
|
||||
Status = gBS->OpenProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiHttpServiceBindingProtocolGuid,
|
||||
NULL,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
return IsPlatformWantedDevice (ControllerHandle, RemainingDevicePath);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
(C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
|
||||
Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
|
||||
Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.<BR>
|
||||
Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
|
|
@ -23,6 +24,7 @@
|
|||
#include <Library/HttpIoLib.h>
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
#include <Library/NetLib.h>
|
||||
#include <Library/RedfishPlatformWantedDeviceLib.h>
|
||||
#include <Library/UefiLib.h>
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
#include <Library/UefiDriverEntryPoint.h>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
|
||||
# (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
|
||||
# Copyright (c) 2023, American Megatrends International LLC.
|
||||
# Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
# Copyright (c) 2023-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.<BR>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
|
@ -47,6 +47,7 @@
|
|||
MemoryAllocationLib
|
||||
NetLib
|
||||
RedfishDebugLib
|
||||
RedfishPlatformWantedDeviceLib
|
||||
UefiLib
|
||||
UefiBootServicesTableLib
|
||||
UefiDriverEntryPoint
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue