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:
Nickle Wang 2025-04-24 10:43:18 +08:00 committed by mergify[bot]
parent b2c4294c49
commit 225bf1277c
3 changed files with 18 additions and 10 deletions

View File

@ -3,7 +3,7 @@
Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2020 Hewlett Packard Enterprise Development LP<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> Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
@ -375,14 +375,19 @@ RedfishRestExDriverBindingSupported (
// //
// Test for the HttpServiceBinding Protocol. // Test for the HttpServiceBinding Protocol.
// //
return gBS->OpenProtocol ( Status = gBS->OpenProtocol (
ControllerHandle, ControllerHandle,
&gEfiHttpServiceBindingProtocolGuid, &gEfiHttpServiceBindingProtocolGuid,
NULL, NULL,
This->DriverBindingHandle, This->DriverBindingHandle,
ControllerHandle, ControllerHandle,
EFI_OPEN_PROTOCOL_TEST_PROTOCOL EFI_OPEN_PROTOCOL_TEST_PROTOCOL
); );
if (EFI_ERROR (Status)) {
return Status;
}
return IsPlatformWantedDevice (ControllerHandle, RemainingDevicePath);
} }
/** /**

View File

@ -5,6 +5,7 @@
(C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR> (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR> Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
Copyright (C) 2024 Advanced Micro Devices, Inc. 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 SPDX-License-Identifier: BSD-2-Clause-Patent
@ -23,6 +24,7 @@
#include <Library/HttpIoLib.h> #include <Library/HttpIoLib.h>
#include <Library/MemoryAllocationLib.h> #include <Library/MemoryAllocationLib.h>
#include <Library/NetLib.h> #include <Library/NetLib.h>
#include <Library/RedfishPlatformWantedDeviceLib.h>
#include <Library/UefiLib.h> #include <Library/UefiLib.h>
#include <Library/UefiBootServicesTableLib.h> #include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiDriverEntryPoint.h> #include <Library/UefiDriverEntryPoint.h>

View File

@ -4,7 +4,7 @@
# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> # Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
# (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR> # (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
# Copyright (c) 2023, American Megatrends International LLC. # 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> # Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.<BR>
# #
# SPDX-License-Identifier: BSD-2-Clause-Patent # SPDX-License-Identifier: BSD-2-Clause-Patent
@ -47,6 +47,7 @@
MemoryAllocationLib MemoryAllocationLib
NetLib NetLib
RedfishDebugLib RedfishDebugLib
RedfishPlatformWantedDeviceLib
UefiLib UefiLib
UefiBootServicesTableLib UefiBootServicesTableLib
UefiDriverEntryPoint UefiDriverEntryPoint