VirtualBox

Ignore:
Timestamp:
Mar 31, 2025 11:31:09 AM (2 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
168237
Message:

Devices/EFI/FirmwareNew: Merge edk2-stable202502 from the vendor branch and make it build for the important platforms, bugref:4643

Location:
trunk/src/VBox/Devices/EFI/FirmwareNew
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/FirmwareNew

  • trunk/src/VBox/Devices/EFI/FirmwareNew/RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.h

    r99404 r108794  
    33
    44  (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
     5  (C) Copyright 2024 American Megatrends International LLC<BR>
     6  Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
    57
    68  SPDX-License-Identifier: BSD-2-Clause-Patent
     
    1113#define EDKII_REDFISH_CREDENTIAL_DXE_H_
    1214
    13 #include <Protocol/EdkIIRedfishCredential.h>
     15#include <RedfishCommon.h>
     16#include <Protocol/EdkIIRedfishCredential2.h>
    1417
    1518#include <Library/BaseLib.h>
     
    1922#include <Library/UefiLib.h>
    2023#include <Library/UefiBootServicesTableLib.h>
     24#include <Library/RedfishHttpLib.h>
     25#include <Library/BaseLib.h>
     26#include <Library/BaseMemoryLib.h>
     27#include <Library/MemoryAllocationLib.h>
     28#include <Library/RedfishDebugLib.h>
    2129
    22 /**
    23   Retrieve platform's Redfish authentication information.
     30#define REDFISH_CREDENTIAL_DEBUG                DEBUG_VERBOSE
     31#define REDFISH_MANAGER_ACCOUNT_COLLECTION_URI  L"AccountService/Accounts"
     32#define REDFISH_URI_LENGTH                      128
    2433
    25   This functions returns the Redfish authentication method together with the user Id and
    26   password.
    27   - For AuthMethodNone, the UserId and Password could be used for HTTP header authentication
    28     as defined by RFC7235.
    29   - For AuthMethodRedfishSession, the UserId and Password could be used for Redfish
    30     session login as defined by  Redfish API specification (DSP0266).
     34///
     35/// Definition of REDFISH_SERVICE_LIST
     36///
     37typedef struct {
     38  LIST_ENTRY         NextInstance;
     39  REDFISH_SERVICE    RedfishService;
     40} REDFISH_SERVICE_LIST;
    3141
    32   Callers are responsible for and freeing the returned string storage.
    33 
    34   @param[in]   This                Pointer to EDKII_REDFISH_CREDENTIAL_PROTOCOL instance.
    35   @param[out]  AuthMethod          Type of Redfish authentication method.
    36   @param[out]  UserId              The pointer to store the returned UserId string.
    37   @param[out]  Password            The pointer to store the returned Password string.
    38 
    39   @retval EFI_SUCCESS              Get the authentication information successfully.
    40   @retval EFI_ACCESS_DENIED        SecureBoot is disabled after EndOfDxe.
    41   @retval EFI_INVALID_PARAMETER    This or AuthMethod or UserId or Password is NULL.
    42   @retval EFI_OUT_OF_RESOURCES     There are not enough memory resources.
    43   @retval EFI_UNSUPPORTED          Unsupported authentication method is found.
    44 
    45 **/
    46 EFI_STATUS
    47 EFIAPI
    48 RedfishCredentialGetAuthInfo (
    49   IN  EDKII_REDFISH_CREDENTIAL_PROTOCOL  *This,
    50   OUT EDKII_REDFISH_AUTH_METHOD          *AuthMethod,
    51   OUT CHAR8                              **UserId,
    52   OUT CHAR8                              **Password
    53   );
    54 
    55 /**
    56   Notify the Redfish service provide to stop provide configuration service to this platform.
    57 
    58   This function should be called when the platfrom is about to leave the safe environment.
    59   It will notify the Redfish service provider to abort all logined session, and prohibit
    60   further login with original auth info. GetAuthInfo() will return EFI_UNSUPPORTED once this
    61   function is returned.
    62 
    63   @param[in]   This                Pointer to EDKII_REDFISH_CREDENTIAL_PROTOCOL instance.
    64 
    65   @retval EFI_SUCCESS              Service has been stoped successfully.
    66   @retval EFI_INVALID_PARAMETER    This is NULL.
    67   @retval Others                   Some error happened.
    68 
    69 **/
    70 EFI_STATUS
    71 EFIAPI
    72 RedfishCredentialStopService (
    73   IN     EDKII_REDFISH_CREDENTIAL_PROTOCOL           *This,
    74   IN     EDKII_REDFISH_CREDENTIAL_STOP_SERVICE_TYPE  ServiceStopType
    75   );
     42//
     43// Definitions of REDFISH_BOOTSTRAP_ACCOUNT_PRIVATE
     44//
     45typedef struct {
     46  EFI_HANDLE                            Handle;
     47  EFI_EVENT                             EndOfDxeEvent;
     48  EFI_EVENT                             ExitBootServiceEvent;
     49  EDKII_REDFISH_AUTH_METHOD             AuthMethod;
     50  CHAR8                                 *AccountName;
     51  EDKII_REDFISH_CREDENTIAL_PROTOCOL     RedfishCredentialProtocol;
     52  EDKII_REDFISH_CREDENTIAL2_PROTOCOL    RedfishCredential2Protocol;
     53  LIST_ENTRY                            RedfishServiceList;
     54} REDFISH_CREDENTIAL_PRIVATE;
    7655
    7756#endif
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette