VirtualBox

Ignore:
Timestamp:
Sep 11, 2019 8:46:37 AM (5 years ago)
Author:
vboxsync
Message:

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), 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/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c

    r77662 r80721  
    22Utility functions for UI presentation.
    33
    4 Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
     4Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
    55(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
    6 This program and the accompanying materials
    7 are licensed and made available under the terms and conditions of the BSD License
    8 which accompanies this distribution.  The full text of the license may be found at
    9 http://opensource.org/licenses/bsd-license.php
    10 
    11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
    12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     6SPDX-License-Identifier: BSD-2-Clause-Patent
    137
    148**/
     
    2620FORM_DISPLAY_ENGINE_FORM gDisplayFormData;
    2721BOOLEAN            mFinishRetrieveCall = FALSE;
     22
     23/**
     24  Check whether the ConfigAccess protocol is available.
     25
     26  @param FormSet           FormSet of which the ConfigAcces protocol need to be checked.
     27
     28  @retval EFI_SUCCESS     The function executed successfully.
     29
     30**/
     31EFI_STATUS
     32CheckConfigAccess(
     33  IN FORM_BROWSER_FORMSET  *FormSet
     34  )
     35{
     36  EFI_STATUS                      Status;
     37
     38  Status = gBS->HandleProtocol (
     39                  FormSet->DriverHandle,
     40                  &gEfiHiiConfigAccessProtocolGuid,
     41                  (VOID **) &FormSet->ConfigAccess
     42                  );
     43  if (EFI_ERROR (Status)) {
     44    //
     45    // Configuration Driver don't attach ConfigAccess protocol to its HII package
     46    // list, then there will be no configuration action required.
     47    // Or the ConfigAccess protocol has been uninstalled.
     48    //
     49    FormSet->ConfigAccess = NULL;
     50  }
     51
     52  return EFI_SUCCESS;
     53}
    2854
    2955/**
     
    16931719  }
    16941720
     1721  CheckConfigAccess(gCurrentSelection->FormSet);
     1722
    16951723  Status = ProcessUserInput (&UserInput);
    16961724  FreeDisplayFormData();
     
    20052033    if (Action == EFI_BROWSER_ACTION_CHANGING) {
    20062034      if (HiiValue->Type == EFI_IFR_TYPE_BUFFER) {
    2007         BackUpBuffer = AllocateCopyPool(Statement->StorageWidth + sizeof(CHAR16), Statement->BufferValue);
     2035        BackUpBuffer = AllocateCopyPool(Statement->StorageWidth, Statement->BufferValue);
    20082036        ASSERT (BackUpBuffer != NULL);
    20092037      } else {
     
    21312159      if (Action  == EFI_BROWSER_ACTION_CHANGING && Status == EFI_UNSUPPORTED) {
    21322160        if (HiiValue->Type == EFI_IFR_TYPE_BUFFER) {
    2133           CopyMem (Statement->BufferValue, BackUpBuffer, Statement->StorageWidth + sizeof(CHAR16));
     2161          CopyMem (Statement->BufferValue, BackUpBuffer, Statement->StorageWidth);
    21342162        } else {
    21352163          CopyMem (&HiiValue->Value, &BackUpValue, sizeof (EFI_IFR_TYPE_VALUE));
Note: See TracChangeset for help on using the changeset viewer.

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