VirtualBox

Ignore:
Timestamp:
Aug 12, 2020 4:09:12 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
139865
Message:

Devices/EFI: Merge edk-stable202005 and make it build, 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/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c

    r80721 r85718  
    22  ACPI table parser
    33
    4   Copyright (c) 2016 - 2019, ARM Limited. All rights reserved.
     4  Copyright (c) 2016 - 2020, ARM Limited. All rights reserved.
    55  SPDX-License-Identifier: BSD-2-Clause-Patent
     6
     7  @par Glossary:
     8    - Sbbr or SBBR   - Server Base Boot Requirements
     9
     10  @par Reference(s):
     11    - Arm Server Base Boot Requirements 1.2, September 2019
    612**/
    713
     
    1319#include "AcpiView.h"
    1420
     21#if defined(MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)
     22#include "Arm/SbbrValidator.h"
     23#endif
     24
    1525/**
    1626  A list of registered ACPI table parsers.
     
    177187  CONST UINT32* AcpiTableLength;
    178188  CONST UINT8*  AcpiTableRevision;
     189  CONST UINT8*  SignaturePtr;
    179190  PARSE_ACPI_TABLE_PROC ParserProc;
    180191
     
    194205  if (Trace) {
    195206    DumpRaw (Ptr, *AcpiTableLength);
     207
     208    // Do not process the ACPI table any further if the table length read
     209    // is invalid. The ACPI table should at least contain the table header.
     210    if (*AcpiTableLength < sizeof (EFI_ACPI_DESCRIPTION_HEADER)) {
     211      SignaturePtr = (CONST UINT8*)AcpiTableSignature;
     212      IncrementErrorCount ();
     213      Print (
     214        L"ERROR: Invalid %c%c%c%c table length. Length = %d\n",
     215        SignaturePtr[0],
     216        SignaturePtr[1],
     217        SignaturePtr[2],
     218        SignaturePtr[3],
     219        *AcpiTableLength
     220        );
     221      return;
     222    }
     223
    196224    if (GetConsistencyChecking ()) {
    197225      VerifyChecksum (TRUE, Ptr, *AcpiTableLength);
    198226    }
    199227  }
     228
     229#if defined(MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)
     230  if (GetMandatoryTableValidate ()) {
     231    ArmSbbrIncrementTableCount (*AcpiTableSignature);
     232  }
     233#endif
    200234
    201235  Status = GetParser (*AcpiTableSignature, &ParserProc);
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