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:
53 added
2 deleted
139 edited

Legend:

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

  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Base.h

    r80721 r85718  
    2929#endif
    3030
    31 /**
    32   Verifies the storage size of a given data type.
    33 
    34   This macro generates a divide by zero error or a zero size array declaration in
    35   the preprocessor if the size is incorrect.  These are declared as "extern" so
    36   the space for these arrays will not be in the modules.
    37 
    38   @param  TYPE  The date type to determine the size of.
    39   @param  Size  The expected size for the TYPE.
    40 
    41 **/
    42 #define VERIFY_SIZE_OF(TYPE, Size) extern UINT8 _VerifySizeof##TYPE[(sizeof(TYPE) == (Size)) / (sizeof(TYPE) == (Size))]
    43 
    44 //
    45 // Verify that ProcessorBind.h produced UEFI Data Types that are compliant with
    46 // Section 2.3.1 of the UEFI 2.3 Specification.
    47 //
    48 VERIFY_SIZE_OF (BOOLEAN, 1);
    49 VERIFY_SIZE_OF (INT8, 1);
    50 VERIFY_SIZE_OF (UINT8, 1);
    51 VERIFY_SIZE_OF (INT16, 2);
    52 VERIFY_SIZE_OF (UINT16, 2);
    53 VERIFY_SIZE_OF (INT32, 4);
    54 VERIFY_SIZE_OF (UINT32, 4);
    55 VERIFY_SIZE_OF (INT64, 8);
    56 VERIFY_SIZE_OF (UINT64, 8);
    57 VERIFY_SIZE_OF (CHAR8, 1);
    58 VERIFY_SIZE_OF (CHAR16, 2);
    59 
    60 //
    61 // The following three enum types are used to verify that the compiler
    62 // configuration for enum types is compliant with Section 2.3.1 of the
    63 // UEFI 2.3 Specification. These enum types and enum values are not
    64 // intended to be used. A prefix of '__' is used avoid conflicts with
    65 // other types.
    66 //
    67 typedef enum {
    68   __VerifyUint8EnumValue = 0xff
    69 } __VERIFY_UINT8_ENUM_SIZE;
    70 
    71 typedef enum {
    72   __VerifyUint16EnumValue = 0xffff
    73 } __VERIFY_UINT16_ENUM_SIZE;
    74 
    75 typedef enum {
    76   __VerifyUint32EnumValue = 0xffffffff
    77 } __VERIFY_UINT32_ENUM_SIZE;
    78 
    79 VERIFY_SIZE_OF (__VERIFY_UINT8_ENUM_SIZE, 4);
    80 VERIFY_SIZE_OF (__VERIFY_UINT16_ENUM_SIZE, 4);
    81 VERIFY_SIZE_OF (__VERIFY_UINT32_ENUM_SIZE, 4);
    82 
    8331//
    8432// The Microsoft* C compiler can removed references to unreferenced data items
     
    8634//  a non standard extension
    8735//
    88 #if defined(_MSC_EXTENSIONS) && _MSC_VER < 1800 && !defined (MDE_CPU_EBC)
     36#if defined(_MSC_VER) && _MSC_VER < 1800 && !defined (MDE_CPU_EBC)
    8937  ///
    9038  /// Remove global variable from the linked image if there are no references to
     
    248196#define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name)
    249197
    250 #if __APPLE__
     198#ifdef __APPLE__
    251199  //
    252200  // Apple extension that is used by the linker to optimize code size
     
    674622#define VA_COPY(Dest, Start)            ((void)((Dest) = (Start)))
    675623
    676 #elif defined(__GNUC__)
     624#elif defined(__GNUC__) || defined(__clang__)
    677625
    678626#if defined(MDE_CPU_X64) && !defined(NO_MSABI_VA_FUNCS)
     
    834782
    835783**/
    836 #ifdef __GNUC__
    837 #if __GNUC__ >= 4
     784#if (defined(__GNUC__) && __GNUC__ >= 4) || defined(__clang__)
    838785#define OFFSET_OF(TYPE, Field) ((UINTN) __builtin_offsetof(TYPE, Field))
    839 #endif
    840786#endif
    841787
     
    843789#define OFFSET_OF(TYPE, Field) ((UINTN) &(((TYPE *)0)->Field))
    844790#endif
     791
     792/**
     793  Portable definition for compile time assertions.
     794  Equivalent to C11 static_assert macro from assert.h.
     795
     796  @param  Expression  Boolean expression.
     797  @param  Message     Raised compiler diagnostic message when expression is false.
     798
     799**/
     800#ifdef MDE_CPU_EBC
     801  #define STATIC_ASSERT(Expression, Message)
     802#elif defined(_MSC_EXTENSIONS)
     803  #define STATIC_ASSERT static_assert
     804#else
     805  #define STATIC_ASSERT _Static_assert
     806#endif
     807
     808//
     809// Verify that ProcessorBind.h produced UEFI Data Types that are compliant with
     810// Section 2.3.1 of the UEFI 2.3 Specification.
     811//
     812
     813STATIC_ASSERT (sizeof (BOOLEAN) == 1, "sizeof (BOOLEAN) does not meet UEFI Specification Data Type requirements");
     814STATIC_ASSERT (sizeof (INT8)    == 1, "sizeof (INT8) does not meet UEFI Specification Data Type requirements");
     815STATIC_ASSERT (sizeof (UINT8)   == 1, "sizeof (UINT8) does not meet UEFI Specification Data Type requirements");
     816STATIC_ASSERT (sizeof (INT16)   == 2, "sizeof (INT16) does not meet UEFI Specification Data Type requirements");
     817STATIC_ASSERT (sizeof (UINT16)  == 2, "sizeof (UINT16) does not meet UEFI Specification Data Type requirements");
     818STATIC_ASSERT (sizeof (INT32)   == 4, "sizeof (INT32) does not meet UEFI Specification Data Type requirements");
     819STATIC_ASSERT (sizeof (UINT32)  == 4, "sizeof (UINT32) does not meet UEFI Specification Data Type requirements");
     820STATIC_ASSERT (sizeof (INT64)   == 8, "sizeof (INT64) does not meet UEFI Specification Data Type requirements");
     821STATIC_ASSERT (sizeof (UINT64)  == 8, "sizeof (UINT64) does not meet UEFI Specification Data Type requirements");
     822STATIC_ASSERT (sizeof (CHAR8)   == 1, "sizeof (CHAR8) does not meet UEFI Specification Data Type requirements");
     823STATIC_ASSERT (sizeof (CHAR16)  == 2, "sizeof (CHAR16) does not meet UEFI Specification Data Type requirements");
     824
     825//
     826// The following three enum types are used to verify that the compiler
     827// configuration for enum types is compliant with Section 2.3.1 of the
     828// UEFI 2.3 Specification. These enum types and enum values are not
     829// intended to be used. A prefix of '__' is used avoid conflicts with
     830// other types.
     831//
     832typedef enum {
     833  __VerifyUint8EnumValue = 0xff
     834} __VERIFY_UINT8_ENUM_SIZE;
     835
     836typedef enum {
     837  __VerifyUint16EnumValue = 0xffff
     838} __VERIFY_UINT16_ENUM_SIZE;
     839
     840typedef enum {
     841  __VerifyUint32EnumValue = 0xffffffff
     842} __VERIFY_UINT32_ENUM_SIZE;
     843
     844STATIC_ASSERT (sizeof (__VERIFY_UINT8_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements");
     845STATIC_ASSERT (sizeof (__VERIFY_UINT16_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements");
     846STATIC_ASSERT (sizeof (__VERIFY_UINT32_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements");
    845847
    846848/**
     
    12711273  **/
    12721274  #define RETURN_ADDRESS(L)     ((L == 0) ? _ReturnAddress() : (VOID *) 0)
    1273 #elif defined(__GNUC__)
     1275#elif defined (__GNUC__) || defined (__clang__)
    12741276  void * __builtin_return_address (unsigned int level);
    12751277  /**
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Guid/CapsuleReport.h

    r80721 r85718  
    9494} EFI_CAPSULE_RESULT_VARIABLE_FMP;
    9595
     96typedef struct {
     97
     98  ///
     99  /// Version of this structure, currently 0x00000001
     100  ///
     101  UINT32    Version;
     102
     103  ///
     104  /// The unique identifier of the capsule whose processing result is recorded in this variable.
     105  /// 0x00000000 - 0xEFFFFFFF - Implementation Reserved
     106  /// 0xF0000000 - 0xFFFFFFFF - Specification Reserved
     107  /// #define REDFISH_DEFINED_JSON_SCHEMA 0xF000000
     108  /// The JSON payload shall conform to a Redfish-defined JSON schema, see DMTF-Redfish
     109  /// Specification.
     110  ///
     111  UINT32 CapsuleId;
     112
     113  ///
     114  /// The length of Resp in bytes.
     115  ///
     116  UINT32 RespLength;
     117
     118  ///
     119  /// Variable length buffer containing the replied JSON payload to the caller who delivered JSON
     120  /// capsule to system. The definition of the JSON schema used in the replied payload is beyond
     121  /// the scope of this specification.
     122  ///
     123  UINT8 Resp[];
     124 } EFI_CAPSULE_RESULT_VARIABLE_JSON;
    96125
    97126extern EFI_GUID gEfiCapsuleReportGuid;
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Guid/Cper.h

    r80721 r85718  
    9595  { \
    9696    0x667DD791, 0xC6B3, 0x4c27, { 0x8A, 0x6B, 0x0F, 0x8E, 0x72, 0x2D, 0xEB, 0x41 } \
     97  }
     98#define EFI_EVENT_NOTIFICATION_TYPE_DMAR_SEA \
     99  { \
     100    0x9A78788A, 0xBBE8, 0x11E4, { 0x80, 0x9E, 0x67, 0x61, 0x1E, 0x5D, 0x46, 0xB0 } \
     101  }
     102#define EFI_EVENT_NOTIFICATION_TYPE_DMAR_SEI \
     103  { \
     104    0x5C284C81, 0xB0AE, 0x4E87, { 0xA3, 0x22, 0xB0, 0x4C, 0x85, 0x62, 0x43, 0x23 } \
     105  }
     106#define EFI_EVENT_NOTIFICATION_TYPE_DMAR_PEI \
     107  { \
     108    0x09A9D5AC, 0x5204, 0x4214, { 0x96, 0xE5, 0x94, 0x99, 0x2E, 0x75, 0x2B, 0xCD } \
    97109  }
    98110///@}
     
    12081220extern EFI_GUID gEfiEventNotificationTypeBootGuid;
    12091221extern EFI_GUID gEfiEventNotificationTypeDmarGuid;
     1222extern EFI_GUID gEfiEventNotificationTypeSeaGuid;
     1223extern EFI_GUID gEfiEventNotificationTypeSeiGuid;
     1224extern EFI_GUID gEfiEventNotificationTypePeiGuid;
    12101225
    12111226extern EFI_GUID gEfiProcessorGenericErrorSectionGuid;
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Guid/FmpCapsule.h

    r80721 r85718  
    8080  ///
    8181  UINT64   UpdateHardwareInstance;
     82
     83  ///
     84  /// A 64-bit bitmask that determines what sections are added to the payload.
     85  /// #define CAPSULE_SUPPORT_AUTHENTICATION 0x0000000000000001
     86  /// #define CAPSULE_SUPPORT_DEPENDENCY 0x0000000000000002
     87  ///
     88  UINT64   ImageCapsuleSupport;
    8289} EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER;
    8390
     
    8693
    8794#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER_INIT_VERSION       0x00000001
    88 #define EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION 0x00000002
     95#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION 0x00000003
     96#define CAPSULE_SUPPORT_AUTHENTICATION    0x0000000000000001
     97#define CAPSULE_SUPPORT_DEPENDENCY        0x0000000000000002
    8998
    9099extern EFI_GUID gEfiFmpCapsuleGuid;
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Guid/HiiPlatformSetupFormset.h

    r80721 r85718  
    2323  { 0x337f4407, 0x5aee, 0x4b83, { 0xb2, 0xa7, 0x4e, 0xad, 0xca, 0x30, 0x88, 0xcd } }
    2424
     25#define EFI_HII_REST_STYLE_FORMSET_GUID \
     26  { 0x790217bd, 0xbecf, 0x485b, { 0x91, 0x70, 0x5f, 0xf7, 0x11, 0x31, 0x8b, 0x27 } }
     27
    2528extern EFI_GUID gEfiHiiPlatformSetupFormsetGuid;
    2629extern EFI_GUID gEfiHiiDriverHealthFormsetGuid;
    2730extern EFI_GUID gEfiHiiUserCredentialFormsetGuid;
     31extern EFI_GUID gEfiHiiRestStyleFormsetGuid;
    2832
    2933#endif
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Guid/SystemResourceTable.h

    r80721 r85718  
    22  Guid & data structure used for EFI System Resource Table (ESRT)
    33
    4   Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
     4  Copyright (c) 2015 - 2020, Intel Corporation. All rights reserved.<BR>
    55  SPDX-License-Identifier: BSD-2-Clause-Patent
    66
     
    3535/// Last Attempt Status Values
    3636///
    37 #define LAST_ATTEMPT_STATUS_SUCCESS                       0x00000000
    38 #define LAST_ATTEMPT_STATUS_ERROR_UNSUCCESSFUL            0x00000001
    39 #define LAST_ATTEMPT_STATUS_ERROR_INSUFFICIENT_RESOURCES  0x00000002
    40 #define LAST_ATTEMPT_STATUS_ERROR_INCORRECT_VERSION       0x00000003
    41 #define LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT          0x00000004
    42 #define LAST_ATTEMPT_STATUS_ERROR_AUTH_ERROR              0x00000005
    43 #define LAST_ATTEMPT_STATUS_ERROR_PWR_EVT_AC              0x00000006
    44 #define LAST_ATTEMPT_STATUS_ERROR_PWR_EVT_BATT            0x00000007
     37#define LAST_ATTEMPT_STATUS_SUCCESS                         0x00000000
     38#define LAST_ATTEMPT_STATUS_ERROR_UNSUCCESSFUL              0x00000001
     39#define LAST_ATTEMPT_STATUS_ERROR_INSUFFICIENT_RESOURCES    0x00000002
     40#define LAST_ATTEMPT_STATUS_ERROR_INCORRECT_VERSION         0x00000003
     41#define LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT            0x00000004
     42#define LAST_ATTEMPT_STATUS_ERROR_AUTH_ERROR                0x00000005
     43#define LAST_ATTEMPT_STATUS_ERROR_PWR_EVT_AC                0x00000006
     44#define LAST_ATTEMPT_STATUS_ERROR_PWR_EVT_BATT              0x00000007
     45#define LAST_ATTEMPT_STATUS_ERROR_UNSATISFIED_DEPENDENCIES  0x00000008
    4546
    4647typedef struct {
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Ia32/ProcessorBind.h

    r80721 r85718  
    8888#pragma warning ( disable : 4206 )
    8989
    90 #if _MSC_VER == 1800 || _MSC_VER == 1900 || _MSC_VER >= 1910
     90#if defined(_MSC_VER) && _MSC_VER >= 1800
    9191
    9292//
     
    282282  ///
    283283  #define EFIAPI __cdecl
    284 #elif defined(__GNUC__)
     284#elif defined(__GNUC__) || defined(__clang__)
    285285  ///
    286286  /// GCC specific method for EFIAPI calling convention.
     
    295295#endif
    296296
    297 #if defined(__GNUC__)
     297#if defined(__GNUC__) || defined(__clang__)
    298298  ///
    299299  /// For GNU assembly code, .global or .globl can declare global symbols.
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/Acpi10.h

    r80721 r85718  
    3838
    3939//
    40 // Define for Desriptor
     40// Define for Descriptor
    4141//
    4242#define ACPI_SMALL_ITEM_FLAG                   0x00
     
    110110
    111111///
    112 /// The commond definition of QWORD, DWORD, and WORD
     112/// The common definition of QWORD, DWORD, and WORD
    113113/// Address Space Descriptors.
    114114///
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/Acpi20.h

    r80721 r85718  
    1212
    1313//
    14 // Define for Desriptor
     14// Define for Descriptor
    1515//
    1616#define ACPI_LARGE_GENERIC_REGISTER_DESCRIPTOR_NAME          0x02
     
    506506
    507507///
    508 /// "SPCR" Serial Port Concole Redirection Table
     508/// "SPCR" Serial Port Console Redirection Table
    509509///
    510510#define EFI_ACPI_2_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE  SIGNATURE_32('S', 'P', 'C', 'R')
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/Acpi30.h

    r80721 r85718  
    1212
    1313//
    14 // Define for Desriptor
     14// Define for Descriptor
    1515//
    1616#define ACPI_LARGE_EXTENDED_ADDRESS_SPACE_DESCRIPTOR_NAME    0x0B
     
    685685
    686686///
    687 /// "SPCR" Serial Port Concole Redirection Table
     687/// "SPCR" Serial Port Console Redirection Table
    688688///
    689689#define EFI_ACPI_3_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE  SIGNATURE_32('S', 'P', 'C', 'R')
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/Acpi40.h

    r80721 r85718  
    12651265
    12661266///
    1267 /// "SPCR" Serial Port Concole Redirection Table
     1267/// "SPCR" Serial Port Console Redirection Table
    12681268///
    12691269#define EFI_ACPI_4_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE  SIGNATURE_32('S', 'P', 'C', 'R')
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/Acpi50.h

    r80721 r85718  
    44  Copyright (c) 2014 Hewlett-Packard Development Company, L.P.<BR>
    55  Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
     6  Copyright (c) 2020, ARM Ltd. All rights reserved.<BR>
    67  SPDX-License-Identifier: BSD-2-Clause-Patent
    78**/
     
    1314
    1415//
    15 // Define for Desriptor
     16// Define for Descriptor
    1617//
    1718#define ACPI_SMALL_FIXED_DMA_DESCRIPTOR_NAME                         0x0A
     
    12021203  UINT64                                          ExitBootServicesEntry;
    12031204  ///
    1204   /// Timer value logged at the point just prior towhen the OS loader gaining
     1205  /// Timer value logged at the point just prior to when the OS loader gaining
    12051206  /// control back from calls the ExitBootServices function for UEFI compatible firmware.
    12061207  /// For non-UEFI compatible boots, this field must be zero.
     
    20592060
    20602061///
     2062/// "PCCT" Platform Communications Channel Table
     2063///
     2064#define EFI_ACPI_5_0_PLATFORM_COMMUNICATIONS_CHANNEL_TABLE_SIGNATURE  SIGNATURE_32('P', 'C', 'C', 'T')
     2065
     2066///
    20612067/// "SLIC" MS Software Licensing Table Specification
    20622068///
     
    20642070
    20652071///
    2066 /// "SPCR" Serial Port Concole Redirection Table
     2072/// "SPCR" Serial Port Console Redirection Table
    20672073///
    20682074#define EFI_ACPI_5_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE  SIGNATURE_32('S', 'P', 'C', 'R')
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/Acpi51.h

    r80721 r85718  
    55  Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>
    66  (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
     7  Copyright (c) 2020, ARM Ltd. All rights reserved.<BR>
    78  SPDX-License-Identifier: BSD-2-Clause-Patent
    89**/
     
    11551156  UINT64                                          ExitBootServicesEntry;
    11561157  ///
    1157   /// Timer value logged at the point just prior towhen the OS loader gaining
     1158  /// Timer value logged at the point just prior to when the OS loader gaining
    11581159  /// control back from calls the ExitBootServices function for UEFI compatible firmware.
    11591160  /// For non-UEFI compatible boots, this field must be zero.
     
    20802081
    20812082///
     2083/// "PCCT" Platform Communications Channel Table
     2084///
     2085#define EFI_ACPI_5_1_PLATFORM_COMMUNICATIONS_CHANNEL_TABLE_SIGNATURE  SIGNATURE_32('P', 'C', 'C', 'T')
     2086
     2087///
    20822088/// "SLIC" MS Software Licensing Table Specification
    20832089///
     
    20852091
    20862092///
    2087 /// "SPCR" Serial Port Concole Redirection Table
     2093/// "SPCR" Serial Port Console Redirection Table
    20882094///
    20892095#define EFI_ACPI_5_1_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE  SIGNATURE_32('S', 'P', 'C', 'R')
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/Acpi60.h

    r80721 r85718  
    44  Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
    55  (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
     6  Copyright (c) 2020, ARM Ltd. All rights reserved.<BR>
    67  SPDX-License-Identifier: BSD-2-Clause-Patent
    78**/
     
    11701171  UINT64                                          ExitBootServicesEntry;
    11711172  ///
    1172   /// Timer value logged at the point just prior towhen the OS loader gaining
     1173  /// Timer value logged at the point just prior to when the OS loader gaining
    11731174  /// control back from calls the ExitBootServices function for UEFI compatible firmware.
    11741175  /// For non-UEFI compatible boots, this field must be zero.
     
    23232324
    23242325///
     2326/// "PCCT" Platform Communications Channel Table
     2327///
     2328#define EFI_ACPI_6_0_PLATFORM_COMMUNICATIONS_CHANNEL_TABLE_SIGNATURE  SIGNATURE_32('P', 'C', 'C', 'T')
     2329
     2330///
    23252331/// "SLIC" MS Software Licensing Table Specification
    23262332///
     
    23282334
    23292335///
    2330 /// "SPCR" Serial Port Concole Redirection Table
     2336/// "SPCR" Serial Port Console Redirection Table
    23312337///
    23322338#define EFI_ACPI_6_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE  SIGNATURE_32('S', 'P', 'C', 'R')
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/Acpi61.h

    r80721 r85718  
    44  Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
    55 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
     6  Copyright (c) 2020, ARM Ltd. All rights reserved.<BR>
    67  SPDX-License-Identifier: BSD-2-Clause-Patent
    78**/
     
    11701171  UINT64                                          ExitBootServicesEntry;
    11711172  ///
    1172   /// Timer value logged at the point just prior towhen the OS loader gaining
     1173  /// Timer value logged at the point just prior to when the OS loader gaining
    11731174  /// control back from calls the ExitBootServices function for UEFI compatible firmware.
    11741175  /// For non-UEFI compatible boots, this field must be zero.
     
    23552356
    23562357///
     2358/// "PCCT" Platform Communications Channel Table
     2359///
     2360#define EFI_ACPI_6_1_PLATFORM_COMMUNICATIONS_CHANNEL_TABLE_SIGNATURE  SIGNATURE_32('P', 'C', 'C', 'T')
     2361
     2362///
    23572363/// "SLIC" MS Software Licensing Table Specification
    23582364///
     
    23602366
    23612367///
    2362 /// "SPCR" Serial Port Concole Redirection Table
     2368/// "SPCR" Serial Port Console Redirection Table
    23632369///
    23642370#define EFI_ACPI_6_1_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE  SIGNATURE_32('S', 'P', 'C', 'R')
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/Acpi62.h

    r80721 r85718  
    33
    44  Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
     5  Copyright (c) 2020, ARM Ltd. All rights reserved.<BR>
    56  SPDX-License-Identifier: BSD-2-Clause-Patent
    67**/
     
    12821283  UINT64                                          ExitBootServicesEntry;
    12831284  ///
    1284   /// Timer value logged at the point just prior towhen the OS loader gaining
     1285  /// Timer value logged at the point just prior to when the OS loader gaining
    12851286  /// control back from calls the ExitBootServices function for UEFI compatible firmware.
    12861287  /// For non-UEFI compatible boots, this field must be zero.
     
    16511652
    16521653///
    1653 /// Secure Devcice types
     1654/// Secure Device types
    16541655///
    16551656#define EFI_ACPI_6_2_SDEV_TYPE_PCIE_ENDPOINT_DEVICE     0x01
     
    16571658
    16581659///
    1659 /// Secure Devcice flags
     1660/// Secure Device flags
    16601661///
    16611662#define EFI_ACPI_6_2_SDEV_FLAG_ALLOW_HANDOFF            BIT0
     
    28812882
    28822883///
     2884/// "PCCT" Platform Communications Channel Table
     2885///
     2886#define EFI_ACPI_6_2_PLATFORM_COMMUNICATIONS_CHANNEL_TABLE_SIGNATURE  SIGNATURE_32('P', 'C', 'C', 'T')
     2887
     2888///
    28832889/// "SDEI" Software Delegated Exceptions Interface Table
    28842890///
     
    28912897
    28922898///
    2893 /// "SPCR" Serial Port Concole Redirection Table
     2899/// "SPCR" Serial Port Console Redirection Table
    28942900///
    28952901#define EFI_ACPI_6_2_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE  SIGNATURE_32('S', 'P', 'C', 'R')
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/Acpi63.h

    r80721 r85718  
    33
    44  Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
    5   Copyright (c) 2019, ARM Ltd. All rights reserved.<BR>
     5  Copyright (c) 2019 - 2020, ARM Ltd. All rights reserved.<BR>
    66
    77  SPDX-License-Identifier: BSD-2-Clause-Patent
     
    28822882
    28832883///
     2884/// "PCCT" Platform Communications Channel Table
     2885///
     2886#define EFI_ACPI_6_3_PLATFORM_COMMUNICATIONS_CHANNEL_TABLE_SIGNATURE  SIGNATURE_32('P', 'C', 'C', 'T')
     2887
     2888///
    28842889/// "SDEI" Software Delegated Exceptions Interface Table
    28852890///
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/AcpiAml.h

    r80721 r85718  
    33
    44  Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
     5  Copyright (c) 2019, ARM Limited. All rights reserved.<BR>
    56  SPDX-License-Identifier: BSD-2-Clause-Patent
    67
     
    3132#define AML_VAR_PACKAGE_OP           0x13
    3233#define AML_METHOD_OP                0x14
     34#define AML_EXTERNAL_OP              0x15
    3335#define AML_DUAL_NAME_PREFIX         0x2e
    3436#define AML_MULTI_NAME_PREFIX        0x2f
     
    167169#define AML_EXT_DATA_REGION_OP       0x88
    168170
     171//
     172// FieldElement OpCode
     173//
     174#define AML_FIELD_RESERVED_OP        0x00
     175#define AML_FIELD_ACCESS_OP          0x01
     176#define AML_FIELD_CONNECTION_OP      0x02
     177#define AML_FIELD_EXT_ACCESS_OP      0x03
     178
    169179#endif
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/Atapi.h

    r80721 r85718  
    485485// ATA Packet Command Code
    486486//
    487 #define ATA_CMD_FORMAT_UNIT                             0x04   ///< defined in ATAPI Removable Rewritable Media Devcies
     487#define ATA_CMD_FORMAT_UNIT                             0x04   ///< defined in ATAPI Removable Rewritable Media Devices
    488488#define ATA_CMD_SOFT_RESET                              0x08   ///< defined from ATA-3
    489489#define ATA_CMD_PACKET                                  0xA0   ///< defined from ATA-3
     
    492492#define ATA_CMD_TEST_UNIT_READY                         0x00   ///< defined from ATA-1
    493493#define ATA_CMD_REQUEST_SENSE                           0x03   ///< defined from ATA-4
    494 #define ATA_CMD_INQUIRY                                 0x12   ///< defined in ATAPI Removable Rewritable Media Devcies
    495 #define ATA_CMD_READ_FORMAT_CAPACITY                    0x23   ///< defined in ATAPI Removable Rewritable Media Devcies
    496 #define ATA_CMD_READ_CAPACITY                           0x25   ///< defined in ATAPI Removable Rewritable Media Devcies
    497 #define ATA_CMD_READ_10                                 0x28   ///< defined in ATAPI Removable Rewritable Media Devcies
    498 #define ATA_CMD_WRITE_10                                0x2A   ///< defined in ATAPI Removable Rewritable Media Devcies
    499 #define ATA_CMD_ATAPI_SEEK                              0x2B   ///< defined in ATAPI Removable Rewritable Media Devcies
    500 #define ATA_CMD_WRITE_AND_VERIFY                        0x2E   ///< defined in ATAPI Removable Rewritable Media Devcies
    501 #define ATA_CMD_VERIFY                                  0x2F   ///< defined in ATAPI Removable Rewritable Media Devcies
    502 #define ATA_CMD_READ_12                                 0xA8   ///< defined in ATAPI Removable Rewritable Media Devcies
    503 #define ATA_CMD_WRITE_12                                0xAA   ///< defined in ATAPI Removable Rewritable Media Devcies
    504 #define ATA_CMD_START_STOP_UNIT                         0x1B   ///< defined in ATAPI Removable Rewritable Media Devcies
    505 #define ATA_CMD_PREVENT_ALLOW_MEDIA_REMOVAL             0x1E   ///< defined in ATAPI Removable Rewritable Media Devcies
    506 #define ATA_CMD_MODE_SELECT                             0x55   ///< defined in ATAPI Removable Rewritable Media Devcies
    507 
    508 #define ATA_CMD_MODE_SENSE                              0x5A   ///< defined in ATAPI Removable Rewritable Media Devcies
    509     #define ATA_PAGE_CODE_READ_WRITE_ERROR                  0x01   ///< defined in ATAPI Removable Rewritable Media Devcies
    510     #define ATA_PAGE_CODE_CACHING_PAGE                      0x08   ///< defined in ATAPI Removable Rewritable Media Devcies
    511     #define ATA_PAGE_CODE_REMOVABLE_BLOCK_CAPABILITIES      0x1B   ///< defined in ATAPI Removable Rewritable Media Devcies
    512     #define ATA_PAGE_CODE_TIMER_PROTECT_PAGE                0x1C   ///< defined in ATAPI Removable Rewritable Media Devcies
    513     #define ATA_PAGE_CODE_RETURN_ALL_PAGES                  0x3F   ///< defined in ATAPI Removable Rewritable Media Devcies
     494#define ATA_CMD_INQUIRY                                 0x12   ///< defined in ATAPI Removable Rewritable Media Devices
     495#define ATA_CMD_READ_FORMAT_CAPACITY                    0x23   ///< defined in ATAPI Removable Rewritable Media Devices
     496#define ATA_CMD_READ_CAPACITY                           0x25   ///< defined in ATAPI Removable Rewritable Media Devices
     497#define ATA_CMD_READ_10                                 0x28   ///< defined in ATAPI Removable Rewritable Media Devices
     498#define ATA_CMD_WRITE_10                                0x2A   ///< defined in ATAPI Removable Rewritable Media Devices
     499#define ATA_CMD_ATAPI_SEEK                              0x2B   ///< defined in ATAPI Removable Rewritable Media Devices
     500#define ATA_CMD_WRITE_AND_VERIFY                        0x2E   ///< defined in ATAPI Removable Rewritable Media Devices
     501#define ATA_CMD_VERIFY                                  0x2F   ///< defined in ATAPI Removable Rewritable Media Devices
     502#define ATA_CMD_READ_12                                 0xA8   ///< defined in ATAPI Removable Rewritable Media Devices
     503#define ATA_CMD_WRITE_12                                0xAA   ///< defined in ATAPI Removable Rewritable Media Devices
     504#define ATA_CMD_START_STOP_UNIT                         0x1B   ///< defined in ATAPI Removable Rewritable Media Devices
     505#define ATA_CMD_PREVENT_ALLOW_MEDIA_REMOVAL             0x1E   ///< defined in ATAPI Removable Rewritable Media Devices
     506#define ATA_CMD_MODE_SELECT                             0x55   ///< defined in ATAPI Removable Rewritable Media Devices
     507
     508#define ATA_CMD_MODE_SENSE                              0x5A   ///< defined in ATAPI Removable Rewritable Media Devices
     509    #define ATA_PAGE_CODE_READ_WRITE_ERROR                  0x01   ///< defined in ATAPI Removable Rewritable Media Devices
     510    #define ATA_PAGE_CODE_CACHING_PAGE                      0x08   ///< defined in ATAPI Removable Rewritable Media Devices
     511    #define ATA_PAGE_CODE_REMOVABLE_BLOCK_CAPABILITIES      0x1B   ///< defined in ATAPI Removable Rewritable Media Devices
     512    #define ATA_PAGE_CODE_TIMER_PROTECT_PAGE                0x1C   ///< defined in ATAPI Removable Rewritable Media Devices
     513    #define ATA_PAGE_CODE_RETURN_ALL_PAGES                  0x3F   ///< defined in ATAPI Removable Rewritable Media Devices
    514514
    515515#define ATA_CMD_GET_CONFIGURATION                       0x46   ///< defined in ATAPI Multimedia Devices
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/Dhcp.h

    r80721 r85718  
    44
    55  Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
     6  Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
    67  SPDX-License-Identifier: BSD-2-Clause-Patent
    78**/
     
    267268#define PXE_CLIENT_ARCH_ARM              0x000A    /// Arm uefi 32 for PXE
    268269#define PXE_CLIENT_ARCH_AARCH64          0x000B    /// Arm uefi 64 for PXE
     270#define PXE_CLIENT_ARCH_RISCV32          0x0019    /// RISC-V uefi 32 for PXE
     271#define PXE_CLIENT_ARCH_RISCV64          0x001B    /// RISC-V uefi 64 for PXE
     272#define PXE_CLIENT_ARCH_RISCV128         0x001D    /// RISC-V uefi 128 for PXE
    269273
    270274#define HTTP_CLIENT_ARCH_IA32            0x000F    /// x86 uefi boot from http
     
    273277#define HTTP_CLIENT_ARCH_ARM             0x0012    /// Arm uefi 32 boot from http
    274278#define HTTP_CLIENT_ARCH_AARCH64         0x0013    /// Arm uefi 64 boot from http
     279#define HTTP_CLIENT_ARCH_RISCV32         0x001A    /// RISC-V uefi 32 boot from http
     280#define HTTP_CLIENT_ARCH_RISCV64         0x001C    /// RISC-V uefi 64 boot from http
     281#define HTTP_CLIENT_ARCH_RISCV128        0x001E    /// RISC-V uefi 128 boot from http
    275282
    276283#endif
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/ElTorito.h

    r80721 r85718  
    11/** @file
    22  ElTorito Partitions Format Definition.
    3   This file includes some defintions from
     3  This file includes some definitions from
    44  1. "El Torito" Bootable CD-ROM Format Specification, Version 1.0.
    55  2. Volume and File Structure of CDROM for Information Interchange,
     
    7676
    7777  ///
    78   /// Primary Volumn Descriptor, defined in ISO 9660.
     78  /// Primary Volume Descriptor, defined in ISO 9660.
    7979  ///
    8080  struct {
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/Emmc.h

    r80721 r85718  
    225225  UINT8   Reserved17;                             // Reserved [211]
    226226  UINT8   SecCount[4];                            // Sector Count [215:212]
    227   UINT8   SleepNotificationTime;                  // Sleep Notification Timout [216]
     227  UINT8   SleepNotificationTime;                  // Sleep Notification Timeout [216]
    228228  UINT8   SATimeout;                              // Sleep/awake timeout [217]
    229229  UINT8   ProductionStateAwarenessTimeout;        // Production state awareness timeout [218]
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/IpmiNetFnBridge.h

    r80721 r85718  
    128128
    129129//
    130 //  Definitions for Prepare for Discoveery command
     130//  Definitions for Prepare for Discovery command
    131131//
    132132#define IPMI_BRIDGE_PREPARE_FOR_DISCOVERY  0x10
    133133
    134134//
    135 //  Constants and Structure definitions for "Prepare for Discoveery" command to follow here
     135//  Constants and Structure definitions for "Prepare for Discovery" command to follow here
    136136//
    137137
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/Nvme.h

    r80721 r85718  
    310310  UINT8  Rrt:5;             /* Relative Read Throughput */
    311311  UINT8  Rsvd3:3;           /* Reserved as of Nvm Express 1.1 Spec */
    312   UINT8  Rrl:5;             /* Relative Read Leatency */
     312  UINT8  Rrl:5;             /* Relative Read Latency */
    313313  UINT8  Rsvd4:3;           /* Reserved as of Nvm Express 1.1 Spec */
    314314  UINT8  Rwt:5;             /* Relative Write Throughput */
    315315  UINT8  Rsvd5:3;           /* Reserved as of Nvm Express 1.1 Spec */
    316   UINT8  Rwl:5;             /* Relative Write Leatency */
     316  UINT8  Rwl:5;             /* Relative Write Latency */
    317317  UINT8  Rsvd6:3;           /* Reserved as of Nvm Express 1.1 Spec */
    318318  UINT8  Rsvd7[16];         /* Reserved as of Nvm Express 1.1 Spec */
     
    330330  UINT8  Sn[20];              /* Product serial number */
    331331
    332   UINT8  Mn[40];              /* Proeduct model number */
     332  UINT8  Mn[40];              /* Product model number */
    333333  UINT8  Fr[8];               /* Firmware Revision */
    334334  UINT8  Rab;                 /* Recommended Arbitration Burst */
     
    658658typedef struct {
    659659  //
    660   // CDW 0, Common to all comnmands
     660  // CDW 0, Common to all commands
    661661  //
    662662  UINT8  Opc;               // Opcode
     
    870870  UINT8  AvailableSpareThreshold;
    871871  //
    872   // Contains a vendor specific estimate of the percentage of NVM subsystem life used based on the actual usage and the manufacturer?s prediction of NVM life. A value of 100 indicates that the estimated endurance of the NVM in the NVM subsystem has been consumed, but may not indicate an NVM subsystem failure. The value is allowed to exceed 100. Percentages greater than 254 shall be represented as 255. This value shall be updated once per power-on hour (when the controller is not in a sleep state).
     872  // Contains a vendor specific estimate of the percentage of NVM subsystem life used based on the actual usage and the manufacturer's prediction of NVM life. A value of 100 indicates that the estimated endurance of the NVM in the NVM subsystem has been consumed, but may not indicate an NVM subsystem failure. The value is allowed to exceed 100. Percentages greater than 254 shall be represented as 255. This value shall be updated once per power-on hour (when the controller is not in a sleep state).
    873873  //
    874874  UINT8  PercentageUsed;
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/Pci22.h

    r80721 r85718  
    66    PCI-to-PCI Bridge Architecture Specification, Revision 1.2
    77    PC Card Standard, 8.0
    8     PCI Power Management Interface Specifiction, Revision 1.2
     8    PCI Power Management Interface Specification, Revision 1.2
    99
    1010  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
     
    112112
    113113///
    114 /// CardBus Conroller Configuration Space,
     114/// CardBus Controller Configuration Space,
    115115/// Section 4.5.1, PC Card Standard. 8.0
    116116///
    117117typedef struct {
    118   UINT32  CardBusSocketReg;     ///< Cardus Socket/ExCA Base
     118  UINT32  CardBusSocketReg;     ///< Cardbus Socket/ExCA Base
    119119  UINT8   Cap_Ptr;
    120120  UINT8   Reserved;
     
    223223#define     PCI_IF_ISA_PIC                0x01
    224224#define     PCI_IF_EISA_PIC               0x02
    225 #define     PCI_IF_APIC_CONTROLLER        0x10  ///< I/O APIC interrupt controller , 32 bye none-prefectable memory.
     225#define     PCI_IF_APIC_CONTROLLER        0x10  ///< I/O APIC interrupt controller , 32 byte none-prefetchable memory.
    226226#define     PCI_IF_APIC_CONTROLLER2       0x20
    227227#define   PCI_SUBCLASS_DMA              0x01
     
    510510
    511511///
    512 /// Rom Base Address in Bridge, defined in PCI-to-PCI Bridge Architecure Specification,
     512/// Rom Base Address in Bridge, defined in PCI-to-PCI Bridge Architecture Specification,
    513513///
    514514#define PCI_BRIDGE_ROMBAR             0x38
     
    643643///
    644644/// PMC - Power Management Capabilities
    645 /// Section 3.2.3, PCI Power Management Interface Specifiction, Revision 1.2
     645/// Section 3.2.3, PCI Power Management Interface Specification, Revision 1.2
    646646///
    647647typedef union {
     
    663663///
    664664/// PMCSR - Power Management Control/Status
    665 /// Section 3.2.4, PCI Power Management Interface Specifiction, Revision 1.2
     665/// Section 3.2.4, PCI Power Management Interface Specification, Revision 1.2
    666666///
    667667typedef union {
     
    686686///
    687687/// PMCSR_BSE - PMCSR PCI-to-PCI Bridge Support Extensions
    688 /// Section 3.2.5, PCI Power Management Interface Specifiction, Revision 1.2
     688/// Section 3.2.5, PCI Power Management Interface Specification, Revision 1.2
    689689///
    690690typedef union {
     
    699699///
    700700/// Power Management Register Block Definition
    701 /// Section 3.2, PCI Power Management Interface Specifiction, Revision 1.2
     701/// Section 3.2, PCI Power Management Interface Specification, Revision 1.2
    702702///
    703703typedef struct {
     
    733733///
    734734/// Slot Numbering Capabilities Register
    735 /// Section 3.2.6, PCI-to-PCI Bridge Architeture Specification, Revision 1.2
     735/// Section 3.2.6, PCI-to-PCI Bridge Architecture Specification, Revision 1.2
    736736///
    737737typedef struct {
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/PciExpress21.h

    r80721 r85718  
    305305    UINT16 IdoRequest : 1;
    306306    UINT16 IdoCompletion : 1;
    307     UINT16 LtrMechanism : 2;
     307    UINT16 LtrMechanism : 1;
    308308    UINT16 EmergencyPowerReductionRequest : 1;
    309309    UINT16 TenBitTagRequesterEnable : 1;
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/PciExpress40.h

    r80721 r85718  
    55
    66Copyright (c) 2018, American Megatrends, Inc. All rights reserved.<BR>
     7Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
    78SPDX-License-Identifier: BSD-2-Clause-Patent
    89
     
    7980///@}
    8081
     82/// The Designated Vendor Specific Capability definitions
     83/// Based on section 7.9.6 of PCI Express Base Specification 4.0.
     84///@{
     85typedef union {
     86  struct {
     87    UINT32 DvsecVendorId                                        : 16; //bit 0..15
     88    UINT32 DvsecRevision                                        : 4;  //bit 16..19
     89    UINT32 DvsecLength                                          : 12; //bit 20..31
     90  }Bits;
     91  UINT32                                                        Uint32;
     92}PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1;
     93
     94typedef union {
     95  struct {
     96    UINT16 DvsecId                                              : 16; //bit 0..15
     97  }Bits;
     98  UINT16                                                        Uint16;
     99}PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2;
     100
     101typedef struct {
     102  PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER                      Header;
     103  PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1               DesignatedVendorSpecificHeader1;
     104  PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2               DesignatedVendorSpecificHeader2;
     105  UINT8                                                         DesignatedVendorSpecific[1];
     106}PCI_EXPRESS_EXTENDED_CAPABILITIES_DESIGNATED_VENDOR_SPECIFIC;
     107///@}
     108
    81109#pragma pack()
    82110
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/PeImage.h

    r80721 r85718  
    1010Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
    1111Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
     12Portions Copyright (c) 2016 - 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
     13
    1214SPDX-License-Identifier: BSD-2-Clause-Patent
    1315
     
    3537#define IMAGE_FILE_MACHINE_ARMTHUMB_MIXED  0x01c2
    3638#define IMAGE_FILE_MACHINE_ARM64           0xAA64
     39#define IMAGE_FILE_MACHINE_RISCV32         0x5032
     40#define IMAGE_FILE_MACHINE_RISCV64         0x5064
     41#define IMAGE_FILE_MACHINE_RISCV128        0x5128
    3742
    3843//
     
    9398#define EFI_IMAGE_FILE_RELOCS_STRIPPED      BIT0     ///< 0x0001  Relocation info stripped from file.
    9499#define EFI_IMAGE_FILE_EXECUTABLE_IMAGE     BIT1     ///< 0x0002  File is executable  (i.e. no unresolved externel references).
    95 #define EFI_IMAGE_FILE_LINE_NUMS_STRIPPED   BIT2     ///< 0x0004  Line nunbers stripped from file.
     100#define EFI_IMAGE_FILE_LINE_NUMS_STRIPPED   BIT2     ///< 0x0004  Line numbers stripped from file.
    96101#define EFI_IMAGE_FILE_LOCAL_SYMS_STRIPPED  BIT3     ///< 0x0008  Local symbols stripped from file.
    97102#define EFI_IMAGE_FILE_BYTES_REVERSED_LO    BIT7     ///< 0x0080  Bytes of machine word are reversed.
     
    495500
    496501///
     502/// Relocation types of RISC-V processor.
     503///
     504#define EFI_IMAGE_REL_BASED_RISCV_HI20      5
     505#define EFI_IMAGE_REL_BASED_RISCV_LOW12I    7
     506#define EFI_IMAGE_REL_BASED_RISCV_LOW12S    8
     507
     508///
    497509/// Line number format.
    498510///
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/Scsi.h

    r80721 r85718  
    22  Support for SCSI-2 standard
    33
    4   Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
     4  Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
    55  SPDX-License-Identifier: BSD-2-Clause-Patent
    66
     
    155155
    156156//
    157 // Additional commands for Communition Devices
     157// Additional commands for Communication Devices
    158158//
    159159#define EFI_SCSI_OP_GET_MESSAGE6    0x08
     
    165165
    166166//
     167// Additional commands for Secure Transactions
     168//
     169#define EFI_SCSI_OP_SECURITY_PROTOCOL_IN  0xa2
     170#define EFI_SCSI_OP_SECURITY_PROTOCOL_OUT 0xb5
     171
     172//
    167173// SCSI Data Transfer Direction
    168174//
     
    171177
    172178//
     179// SCSI Block Command Cache Control Parameters
     180//
     181#define EFI_SCSI_BLOCK_FUA  BIT3  ///< Force Unit Access
     182#define EFI_SCSI_BLOCK_DPO  BIT4  ///< Disable Page Out
     183
     184//
    173185// Peripheral Device Type Definitions
    174186//
    175 #define EFI_SCSI_TYPE_DISK          0x00  ///< Direct-access device (e.g. magnetic disk)
    176 #define EFI_SCSI_TYPE_TAPE          0x01  ///< Sequential-access device (e.g. magnetic tape)
    177 #define EFI_SCSI_TYPE_PRINTER       0x02  ///< Printer device
    178 #define EFI_SCSI_TYPE_PROCESSOR     0x03  ///< Processor device
    179 #define EFI_SCSI_TYPE_WORM          0x04  ///< Write-once device (e.g. some optical disks)
    180 #define EFI_SCSI_TYPE_CDROM         0x05  ///< CD-ROM device
    181 #define EFI_SCSI_TYPE_SCANNER       0x06  ///< Scanner device
    182 #define EFI_SCSI_TYPE_OPTICAL       0x07  ///< Optical memory device (e.g. some optical disks)
    183 #define EFI_SCSI_TYPE_MEDIUMCHANGER 0x08  ///< Medium changer device (e.g. jukeboxes)
    184 #define EFI_SCSI_TYPE_COMMUNICATION 0x09  ///< Communications device
    185 #define EFI_SCSI_TYPE_ASCIT8_1      0x0A  ///< Defined by ASC IT8 (Graphic arts pre-press devices)
    186 #define EFI_SCSI_TYPE_ASCIT8_2      0x0B  ///< Defined by ASC IT8 (Graphic arts pre-press devices)
    187 //
    188 // 0Ch - 1Eh are reserved
    189 //
    190 #define EFI_SCSI_TYPE_UNKNOWN       0x1F  ///< Unknown or no device type
     187#define EFI_SCSI_TYPE_DISK            0x00  ///< Direct-access device (e.g. magnetic disk)
     188#define EFI_SCSI_TYPE_TAPE            0x01  ///< Sequential-access device (e.g. magnetic tape)
     189#define EFI_SCSI_TYPE_PRINTER         0x02  ///< Printer device
     190#define EFI_SCSI_TYPE_PROCESSOR       0x03  ///< Processor device
     191#define EFI_SCSI_TYPE_WORM            0x04  ///< Write-once device (e.g. some optical disks)
     192#define EFI_SCSI_TYPE_CDROM           0x05  ///< CD/DVD device
     193#define EFI_SCSI_TYPE_SCANNER         0x06  ///< Scanner device (obsolete)
     194#define EFI_SCSI_TYPE_OPTICAL         0x07  ///< Optical memory device (e.g. some optical disks)
     195#define EFI_SCSI_TYPE_MEDIUMCHANGER   0x08  ///< Medium changer device (e.g. jukeboxes)
     196#define EFI_SCSI_TYPE_COMMUNICATION   0x09  ///< Communications device (obsolete)
     197#define EFI_SCSI_TYPE_ASCIT8_1        0x0A  ///< Defined by ASC IT8 (Graphic arts pre-press devices)
     198#define EFI_SCSI_TYPE_ASCIT8_2        0x0B  ///< Defined by ASC IT8 (Graphic arts pre-press devices)
     199#define EFI_SCSI_TYPE_RAID            0x0C  ///< Storage array controller device (e.g., RAID)
     200#define EFI_SCSI_TYPE_SES             0x0D  ///< Enclosure services device
     201#define EFI_SCSI_TYPE_RBC             0x0E  ///< Simplified direct-access device (e.g., magnetic disk)
     202#define EFI_SCSI_TYPE_OCRW            0x0F  ///< Optical card reader/writer device
     203#define EFI_SCSI_TYPE_BRIDGE          0x10  ///< Bridge Controller Commands
     204#define EFI_SCSI_TYPE_OSD             0x11  ///< Object-based Storage Device
     205#define EFI_SCSI_TYPE_AUTOMATION      0x12  ///< Automation/Drive Interface
     206#define EFI_SCSI_TYPE_SECURITYMANAGER 0x13  ///< Security manager device
     207#define EFI_SCSI_TYPE_RESERVED_LOW    0x14  ///< Reserved (low)
     208#define EFI_SCSI_TYPE_RESERVED_HIGH   0x1D  ///< Reserved (high)
     209#define EFI_SCSI_TYPE_WLUN            0x1E  ///< Well known logical unit
     210#define EFI_SCSI_TYPE_UNKNOWN         0x1F  ///< Unknown or no device type
    191211
    192212//
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h

    r80721 r85718  
    9191#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_ARM_SBSA_GENERIC_UART     0x0e
    9292
     93///
     94/// ARM DCC
     95///
     96#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_DCC                       0x0f
     97
     98///
     99/// BCM2835 UART
     100///
     101#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_BCM2835_UART              0x10
     102
    93103//
    94104// Interrupt Type
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/SmBios.h

    r80721 r85718  
    11/** @file
    2   Industry Standard Definitions of SMBIOS Table Specification v3.2.0.
    3 
    4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
     2  Industry Standard Definitions of SMBIOS Table Specification v3.3.0.
     3
     4Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
    55(C) Copyright 2015-2017 Hewlett Packard Enterprise Development LP<BR>
     6(C) Copyright 2015 - 2019 Hewlett Packard Enterprise Development LP<BR>
    67SPDX-License-Identifier: BSD-2-Clause-Patent
    78
     
    4748
    4849//
    49 // SMBIOS type macros which is according to SMBIOS 2.7 specification.
     50// SMBIOS type macros which is according to SMBIOS 3.3.0 specification.
    5051//
    5152#define SMBIOS_TYPE_BIOS_INFORMATION                     0
     
    9394#define SMBIOS_TYPE_MANAGEMENT_CONTROLLER_HOST_INTERFACE 42
    9495#define SMBIOS_TYPE_TPM_DEVICE                           43
     96#define SMBIOS_TYPE_PROCESSOR_ADDITIONAL_INFORMATION     44
    9597
    9698///
     
    728730  ProcessorFamilyWinChip               = 0x0140,
    729731  ProcessorFamilyDSP                   = 0x015E,
    730   ProcessorFamilyVideoProcessor        = 0x01F4
     732  ProcessorFamilyVideoProcessor        = 0x01F4,
     733  ProcessorFamilyRiscvRV32             = 0x0200,
     734  ProcessorFamilyRiscVRV64             = 0x0201,
     735  ProcessorFamilyRiscVRV128            = 0x0202
    731736} PROCESSOR_FAMILY2_DATA;
    732737
     
    858863
    859864typedef struct {
     865  UINT32  ProcessorReserved1             :1;
     866  UINT32  ProcessorUnknown               :1;
     867  UINT32  Processor64BitCapble           :1;
     868  UINT32  ProcessorMultiCore             :1;
     869  UINT32  ProcessorHardwareThread        :1;
     870  UINT32  ProcessorExecuteProtection     :1;
     871  UINT32  ProcessorEnhancedVirtulization :1;
     872  UINT32  ProcessorPowerPerformanceCtrl  :1;
     873  UINT32  Processor128bitCapble          :1;
     874  UINT32  ProcessorReserved2             :7;
     875} PROCESSOR_CHARACTERISTIC_FLAGS;
     876
     877typedef struct {
    860878  PROCESSOR_SIGNATURE     Signature;
    861879  PROCESSOR_FEATURE_FLAGS FeatureFlags;
     
    12681286  SlotTypePciExpressMini52pinWithoutBSKO = 0x22,    ///< PCI Express Mini 52-pin (CEM spec. 2.0) without bottom-side keep-outs.
    12691287  SlotTypePciExpressMini76pin          = 0x23,      ///< PCI Express Mini 76-pin (CEM spec. 2.0) Corresponds to Display-Mini card.
     1288  SlotTypeCXLFlexbus10                 = 0x30,
    12701289  SlotTypePC98C20                      = 0xA0,
    12711290  SlotTypePC98C24                      = 0xA1,
     
    12901309  SlotTypePciExpressGen3X4             = 0xB4,
    12911310  SlotTypePciExpressGen3X8             = 0xB5,
    1292   SlotTypePciExpressGen3X16            = 0xB6
     1311  SlotTypePciExpressGen3X16            = 0xB6,
     1312  SlotTypePciExpressGen4               = 0xB8,
     1313  SlotTypePciExpressGen4X1             = 0xB9,
     1314  SlotTypePciExpressGen4X2             = 0xBA,
     1315  SlotTypePciExpressGen4X4             = 0xBB,
     1316  SlotTypePciExpressGen4X8             = 0xBC,
     1317  SlotTypePciExpressGen4X16            = 0xBD
    12931318} MISC_SLOT_TYPE;
    12941319
     
    15891614  MemoryArrayLocationPc98C24AddonCard      = 0xA1,
    15901615  MemoryArrayLocationPc98EAddonCard        = 0xA2,
    1591   MemoryArrayLocationPc98LocalBusAddonCard = 0xA3
     1616  MemoryArrayLocationPc98LocalBusAddonCard = 0xA3,
     1617  MemoryArrayLocationCXLFlexbus10AddonCard = 0xA4
    15921618} MEMORY_ARRAY_LOCATION;
    15931619
     
    16561682  MemoryFormFactorSodimm                   = 0x0D,
    16571683  MemoryFormFactorSrimm                    = 0x0E,
    1658   MemoryFormFactorFbDimm                   = 0x0F
     1684  MemoryFormFactorFbDimm                   = 0x0F,
     1685  MemoryFormFactorDie                      = 0x10
    16591686} MEMORY_FORM_FACTOR;
    16601687
     
    16901717  MemoryTypeLpddr3                         = 0x1D,
    16911718  MemoryTypeLpddr4                         = 0x1E,
    1692   MemoryTypeLogicalNonVolatileDevice       = 0x1F
     1719  MemoryTypeLogicalNonVolatileDevice       = 0x1F,
     1720  MemoryTypeHBM                            = 0x20,
     1721  MemoryTypeHBM2                           = 0x21
    16931722} MEMORY_DEVICE_TYPE;
    16941723
     
    17251754  MemoryTechnologyNvdimmF                   = 0x05,
    17261755  MemoryTechnologyNvdimmP                   = 0x06,
     1756  //
     1757  // This definition is updated to represent Intel
     1758  // Optane DC Presistent Memory in SMBIOS spec 3.3.0
     1759  //
    17271760  MemoryTechnologyIntelPersistentMemory     = 0x07
    17281761} MEMORY_DEVICE_TECHNOLOGY;
     
    18111844  UINT64                                    CacheSize;
    18121845  UINT64                                    LogicalSize;
     1846  //
     1847  // Add for smbios 3.3.0
     1848  //
     1849  UINT32                                    ExtendedSpeed;
     1850  UINT32                                    ExtendedConfiguredMemorySpeed;
    18131851} SMBIOS_TABLE_TYPE17;
    18141852
     
    25082546  UINT8                             InterfaceTypeSpecificData[4];   ///< This field has a minimum of four bytes
    25092547} SMBIOS_TABLE_TYPE42;
     2548
     2549
     2550///
     2551/// Processor Specific Block - Processor Architecture Type
     2552///
     2553typedef enum{
     2554  ProcessorSpecificBlockArchTypeReserved   = 0x00,
     2555  ProcessorSpecificBlockArchTypeIa32       = 0x01,
     2556  ProcessorSpecificBlockArchTypeX64        = 0x02,
     2557  ProcessorSpecificBlockArchTypeItanium    = 0x03,
     2558  ProcessorSpecificBlockArchTypeAarch32    = 0x04,
     2559  ProcessorSpecificBlockArchTypeAarch64    = 0x05,
     2560  ProcessorSpecificBlockArchTypeRiscVRV32  = 0x06,
     2561  ProcessorSpecificBlockArchTypeRiscVRV64  = 0x07,
     2562  ProcessorSpecificBlockArchTypeRiscVRV128 = 0x08
     2563} PROCESSOR_SPECIFIC_BLOCK_ARCH_TYPE;
     2564
     2565///
     2566/// Processor Specific Block is the standard container of processor-specific data.
     2567///
     2568typedef struct {
     2569  UINT8                              Length;
     2570  UINT8                              ProcessorArchType;
     2571  ///
     2572  /// Below followed by Processor-specific data
     2573  ///
     2574  ///
     2575} PROCESSOR_SPECIFIC_BLOCK;
     2576
     2577///
     2578/// Processor Additional Information(Type 44).
     2579///
     2580/// The information in this structure defines the processor additional information in case
     2581/// SMBIOS type 4 is not sufficient to describe processor characteristics.
     2582/// The SMBIOS type 44 structure has a reference handle field to link back to the related
     2583/// SMBIOS type 4 structure. There may be multiple SMBIOS type 44 structures linked to the
     2584/// same SMBIOS type 4 structure. For example, when cores are not identical in a processor,
     2585/// SMBIOS type 44 structures describe different core-specific information.
     2586///
     2587/// SMBIOS type 44 defines the standard header for the processor-specific block, while the
     2588/// contents of processor-specific data are maintained by processor
     2589/// architecture workgroups or vendors in separate documents.
     2590///
     2591typedef struct {
     2592  SMBIOS_STRUCTURE                  Hdr;
     2593  SMBIOS_HANDLE                     RefHandle;                 ///< This field refer to associated SMBIOS type 4
     2594  ///
     2595  /// Below followed by Processor-specific block
     2596  ///
     2597  PROCESSOR_SPECIFIC_BLOCK          ProcessorSpecificBlock;
     2598} SMBIOS_TABLE_TYPE44;
    25102599
    25112600///
     
    25872676  SMBIOS_TABLE_TYPE42   *Type42;
    25882677  SMBIOS_TABLE_TYPE43   *Type43;
     2678  SMBIOS_TABLE_TYPE44   *Type44;
    25892679  SMBIOS_TABLE_TYPE126  *Type126;
    25902680  SMBIOS_TABLE_TYPE127  *Type127;
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/SmBus.h

    r80721 r85718  
    11/** @file
    2   This file declares the SMBus definitions defined in SmBus Specifciation V2.0
     2  This file declares the SMBus definitions defined in SmBus Specification V2.0
    33  and defined in PI1.0 specification volume 5.
    44
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/Tpm12.h

    r80721 r85718  
    598598///
    599599/// Part 2, section 5.12: TPM_MIGRATIONKEYAUTH
    600 ///   decalared after section 10 to catch declaration of TPM_PUBKEY
     600///   declared after section 10 to catch declaration of TPM_PUBKEY
    601601///
    602602/// Part 2 section 10.1: TPM_KEY_PARMS
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/Tpm2Acpi.h

    r80721 r85718  
    2828//UINT8                       PlatformSpecificParameters[];  // size up to 12
    2929//UINT32                      Laml;                          // Optional
    30 //UINT32                      Lasa;                          // Optional
     30//UINT64                      Lasa;                          // Optional
    3131} EFI_TPM2_ACPI_TABLE;
    3232
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/UefiTcgPlatform.h

    r80721 r85718  
    11/** @file
    2   TCG EFI Platform Definition in TCG_EFI_Platform_1_20_Final
    3 
    4   Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
     2  TCG EFI Platform Definition in TCG_EFI_Platform_1_20_Final and
     3  TCG PC Client Platform Firmware Profile Specification, Revision 1.05
     4
     5  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
    56  SPDX-License-Identifier: BSD-2-Clause-Patent
    67
     
    2223#define EV_SEPARATOR                ((TCG_EVENTTYPE) 0x00000004)
    2324#define EV_ACTION                   ((TCG_EVENTTYPE) 0x00000005)
     25#define EV_EVENT_TAG                ((TCG_EVENTTYPE) 0x00000006)
    2426#define EV_S_CRTM_CONTENTS          ((TCG_EVENTTYPE) 0x00000007)
    2527#define EV_S_CRTM_VERSION           ((TCG_EVENTTYPE) 0x00000008)
     
    4648#define EV_EFI_PLATFORM_FIRMWARE_BLOB       (EV_EFI_EVENT_BASE + 8)
    4749#define EV_EFI_HANDOFF_TABLES               (EV_EFI_EVENT_BASE + 9)
     50#define EV_EFI_PLATFORM_FIRMWARE_BLOB2      (EV_EFI_EVENT_BASE + 0xA)
     51#define EV_EFI_HANDOFF_TABLES2              (EV_EFI_EVENT_BASE + 0xB)
    4852#define EV_EFI_HCRTM_EVENT                  (EV_EFI_EVENT_BASE + 0x10)
    4953#define EV_EFI_VARIABLE_AUTHORITY           (EV_EFI_EVENT_BASE + 0xE0)
     54#define EV_EFI_SPDM_FIRMWARE_BLOB           (EV_EFI_EVENT_BASE + 0xE1)
     55#define EV_EFI_SPDM_FIRMWARE_CONFIG         (EV_EFI_EVENT_BASE + 0xE2)
    5056
    5157#define EFI_CALLING_EFI_APPLICATION         \
     
    7985#define OPROM_LEN                     (sizeof(EV_POSTCODE_INFO_OPROM) - 1)
    8086
     87#define EV_POSTCODE_INFO_EMBEDDED_UEFI_DRIVER  "Embedded UEFI Driver"
     88#define EMBEDDED_UEFI_DRIVER_LEN               (sizeof(EV_POSTCODE_INFO_EMBEDDED_UEFI_DRIVER) - 1)
     89
    8190#define FIRMWARE_DEBUGGER_EVENT_STRING      "UEFI Debug Mode"
    8291#define FIRMWARE_DEBUGGER_EVENT_STRING_LEN  (sizeof(FIRMWARE_DEBUGGER_EVENT_STRING) - 1)
     
    125134
    126135///
     136/// UEFI_PLATFORM_FIRMWARE_BLOB
     137///
     138/// This structure is used in EV_EFI_PLATFORM_FIRMWARE_BLOB
     139/// event to facilitate the measurement of firmware volume.
     140///
     141typedef struct tdUEFI_PLATFORM_FIRMWARE_BLOB {
     142  EFI_PHYSICAL_ADDRESS              BlobBase;
     143  UINT64                            BlobLength;
     144} UEFI_PLATFORM_FIRMWARE_BLOB;
     145
     146///
     147/// UEFI_PLATFORM_FIRMWARE_BLOB2
     148///
     149/// This structure is used in EV_EFI_PLATFORM_FIRMWARE_BLOB2
     150/// event to facilitate the measurement of firmware volume.
     151///
     152typedef struct tdUEFI_PLATFORM_FIRMWARE_BLOB2 {
     153  UINT8                             BlobDescriptionSize;
     154//UINT8                             BlobDescription[BlobDescriptionSize];
     155//EFI_PHYSICAL_ADDRESS              BlobBase;
     156//UINT64                            BlobLength;
     157} UEFI_PLATFORM_FIRMWARE_BLOB2;
     158
     159///
    127160/// EFI_IMAGE_LOAD_EVENT
    128161///
     
    139172
    140173///
     174/// UEFI_IMAGE_LOAD_EVENT
     175///
     176/// This structure is used in EV_EFI_BOOT_SERVICES_APPLICATION,
     177/// EV_EFI_BOOT_SERVICES_DRIVER and EV_EFI_RUNTIME_SERVICES_DRIVER
     178///
     179typedef struct tdUEFI_IMAGE_LOAD_EVENT {
     180  EFI_PHYSICAL_ADDRESS              ImageLocationInMemory;
     181  UINT64                            ImageLengthInMemory;
     182  UINT64                            ImageLinkTimeAddress;
     183  UINT64                            LengthOfDevicePath;
     184  EFI_DEVICE_PATH_PROTOCOL          DevicePath[1];
     185} UEFI_IMAGE_LOAD_EVENT;
     186
     187///
    141188/// EFI_HANDOFF_TABLE_POINTERS
    142189///
     
    148195  EFI_CONFIGURATION_TABLE           TableEntry[1];
    149196} EFI_HANDOFF_TABLE_POINTERS;
     197
     198///
     199/// UEFI_HANDOFF_TABLE_POINTERS
     200///
     201/// This structure is used in EV_EFI_HANDOFF_TABLES event to facilitate
     202/// the measurement of given configuration tables.
     203///
     204typedef struct tdUEFI_HANDOFF_TABLE_POINTERS {
     205  UINT64                            NumberOfTables;
     206  EFI_CONFIGURATION_TABLE           TableEntry[1];
     207} UEFI_HANDOFF_TABLE_POINTERS;
     208
     209///
     210/// UEFI_HANDOFF_TABLE_POINTERS2
     211///
     212/// This structure is used in EV_EFI_HANDOFF_TABLES2 event to facilitate
     213/// the measurement of given configuration tables.
     214///
     215typedef struct tdUEFI_HANDOFF_TABLE_POINTERS2 {
     216  UINT8                             TableDescriptionSize;
     217//UINT8                             TableDescription[TableDescriptionSize];
     218//UINT64                            NumberOfTables;
     219//EFI_CONFIGURATION_TABLE           TableEntry[1];
     220} UEFI_HANDOFF_TABLE_POINTERS2;
    150221
    151222///
     
    198269} EFI_GPT_DATA;
    199270
     271typedef struct tdUEFI_GPT_DATA {
     272  EFI_PARTITION_TABLE_HEADER  EfiPartitionHeader;
     273  UINT64                      NumberOfPartitions;
     274  EFI_PARTITION_ENTRY         Partitions[1];
     275} UEFI_GPT_DATA;
     276
     277#define TCG_DEVICE_SECURITY_EVENT_DATA_SIGNATURE "SPDM Device Sec"
     278#define TCG_DEVICE_SECURITY_EVENT_DATA_VERSION   0
     279
     280#define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_TYPE_NULL  0
     281#define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_TYPE_PCI   1
     282#define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_TYPE_USB   2
     283
     284///
     285/// TCG_DEVICE_SECURITY_EVENT_DATA_HEADER
     286/// This is the header of TCG_DEVICE_SECURITY_EVENT_DATA, which is
     287/// used in EV_EFI_SPDM_FIRMWARE_BLOB and EV_EFI_SPDM_FIRMWARE_CONFIG.
     288///
     289typedef struct {
     290  UINT8                          Signature[16];
     291  UINT16                         Version;
     292  UINT16                         Length;
     293  UINT32                         SpdmHashAlgo;
     294  UINT32                         DeviceType;
     295//SPDM_MEASUREMENT_BLOCK         SpdmMeasurementBlock;
     296} TCG_DEVICE_SECURITY_EVENT_DATA_HEADER;
     297
     298#define TCG_DEVICE_SECURITY_EVENT_DATA_PCI_CONTEXT_VERSION  0
     299
     300///
     301/// TCG_DEVICE_SECURITY_EVENT_DATA_PCI_CONTEXT
     302/// This is the PCI context data of TCG_DEVICE_SECURITY_EVENT_DATA, which is
     303/// used in EV_EFI_SPDM_FIRMWARE_BLOB and EV_EFI_SPDM_FIRMWARE_CONFIG.
     304///
     305typedef struct {
     306  UINT16  Version;
     307  UINT16  Length;
     308  UINT16  VendorId;
     309  UINT16  DeviceId;
     310  UINT8   RevisionID;
     311  UINT8   ClassCode[3];
     312  UINT16  SubsystemVendorID;
     313  UINT16  SubsystemID;
     314} TCG_DEVICE_SECURITY_EVENT_DATA_PCI_CONTEXT;
     315
     316#define TCG_DEVICE_SECURITY_EVENT_DATA_USB_CONTEXT_VERSION  0
     317
     318///
     319/// TCG_DEVICE_SECURITY_EVENT_DATA_USB_CONTEXT
     320/// This is the USB context data of TCG_DEVICE_SECURITY_EVENT_DATA, which is
     321/// used in EV_EFI_SPDM_FIRMWARE_BLOB and EV_EFI_SPDM_FIRMWARE_CONFIG.
     322///
     323typedef struct {
     324  UINT16  Version;
     325  UINT16  Length;
     326//UINT8   DeviceDescriptor[DescLen];
     327//UINT8   BodDescriptor[DescLen];
     328//UINT8   ConfigurationDescriptor[DescLen][NumOfConfiguration];
     329} TCG_DEVICE_SECURITY_EVENT_DATA_USB_CONTEXT;
     330
    200331//
    201332// Crypto Agile Log Entry Format
     
    244375#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MINOR_TPM2   0
    245376#define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM2          0
     377#define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM2_REV_105  105
    246378
    247379typedef struct {
     
    300432} TCG_EfiSpecIDEventStruct;
    301433
    302 
     434typedef struct tdTCG_PCClientTaggedEvent {
     435  UINT32              taggedEventID;
     436  UINT32              taggedEventDataSize;
     437//UINT8               taggedEventData[taggedEventDataSize];
     438} TCG_PCClientTaggedEvent;
     439
     440#define TCG_Sp800_155_PlatformId_Event_SIGNATURE  "SP800-155 Event"
     441#define TCG_Sp800_155_PlatformId_Event2_SIGNATURE "SP800-155 Event2"
     442
     443typedef struct tdTCG_Sp800_155_PlatformId_Event2 {
     444  UINT8               Signature[16];
     445  //
     446  // Where Vendor ID is an integer defined
     447  // at http://www.iana.org/assignments/enterprisenumbers
     448  //
     449  UINT32              VendorId;
     450  //
     451  // 16-byte identifier of a given platform's static configuration of code
     452  //
     453  EFI_GUID            ReferenceManifestGuid;
     454  //
     455  // Below structure is newly added in TCG_Sp800_155_PlatformId_Event2.
     456  //
     457//UINT8               PlatformManufacturerStrSize;
     458//UINT8               PlatformManufacturerStr[PlatformManufacturerStrSize];
     459//UINT8               PlatformModelSize;
     460//UINT8               PlatformModel[PlatformModelSize];
     461//UINT8               PlatformVersionSize;
     462//UINT8               PlatformVersion[PlatformVersionSize];
     463//UINT8               PlatformModelSize;
     464//UINT8               PlatformModel[PlatformModelSize];
     465//UINT8               FirmwareManufacturerStrSize;
     466//UINT8               FirmwareManufacturerStr[FirmwareManufacturerStrSize];
     467//UINT32              FirmwareManufacturerId;
     468//UINT8               FirmwareVersion;
     469//UINT8               FirmwareVersion[FirmwareVersionSize]];
     470} TCG_Sp800_155_PlatformId_Event2;
    303471
    304472#define TCG_EfiStartupLocalityEvent_SIGNATURE      "StartupLocality"
     
    306474
    307475//
    308 // PC Client PTP spec Table 8 Relationship between Locality and Locality Attribute
    309 //
    310 #define LOCALITY_0_INDICATOR        0x01
    311 #define LOCALITY_1_INDICATOR        0x02
    312 #define LOCALITY_2_INDICATOR        0x03
    313 #define LOCALITY_3_INDICATOR        0x04
    314 #define LOCALITY_4_INDICATOR        0x05
    315 
     476// The Locality Indicator which sent the TPM2_Startup command
     477//
     478#define LOCALITY_0_INDICATOR        0x00
     479#define LOCALITY_3_INDICATOR        0x03
    316480
    317481//
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Library/BaseLib.h

    r80721 r85718  
    55Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
    66Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
     7Copyright (c) Microsoft Corporation.<BR>
     8Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
     9
    710SPDX-License-Identifier: BSD-2-Clause-Patent
    811
     
    125128#endif  // defined (MDE_CPU_AARCH64)
    126129
     130#if defined (MDE_CPU_RISCV64)
     131///
     132/// The RISC-V architecture context buffer used by SetJump() and LongJump().
     133///
     134typedef struct {
     135  UINT64                            RA;
     136  UINT64                            S0;
     137  UINT64                            S1;
     138  UINT64                            S2;
     139  UINT64                            S3;
     140  UINT64                            S4;
     141  UINT64                            S5;
     142  UINT64                            S6;
     143  UINT64                            S7;
     144  UINT64                            S8;
     145  UINT64                            S9;
     146  UINT64                            S10;
     147  UINT64                            S11;
     148  UINT64                            SP;
     149} BASE_LIBRARY_JUMP_BUFFER;
     150
     151#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8
     152
     153#endif // defined (MDE_CPU_RISCV64)
    127154
    128155//
     
    190217  If Destination is not aligned on a 16-bit boundary, then ASSERT().
    191218  If Source is not aligned on a 16-bit boundary, then ASSERT().
    192   If an error would be returned, then the function will also ASSERT().
    193219
    194220  If an error is returned, then the Destination is unmodified.
     
    226252  If Length > 0 and Destination is not aligned on a 16-bit boundary, then ASSERT().
    227253  If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().
    228   If an error would be returned, then the function will also ASSERT().
    229254
    230255  If an error is returned, then the Destination is unmodified.
     
    264289  If Destination is not aligned on a 16-bit boundary, then ASSERT().
    265290  If Source is not aligned on a 16-bit boundary, then ASSERT().
    266   If an error would be returned, then the function will also ASSERT().
    267291
    268292  If an error is returned, then the Destination is unmodified.
     
    304328  If Destination is not aligned on a 16-bit boundary, then ASSERT().
    305329  If Source is not aligned on a 16-bit boundary, then ASSERT().
    306   If an error would be returned, then the function will also ASSERT().
    307330
    308331  If an error is returned, then the Destination is unmodified.
     
    351374  valid decimal character or a Null-terminator, whichever one comes first.
    352375
    353   If String is NULL, then ASSERT().
    354   If Data is NULL, then ASSERT().
    355376  If String is not aligned in a 16-bit boundary, then ASSERT().
    356   If PcdMaximumUnicodeStringLength is not zero, and String contains more than
    357   PcdMaximumUnicodeStringLength Unicode characters, not including the
    358   Null-terminator, then ASSERT().
    359377
    360378  If String has no valid decimal digits in the above format, then 0 is stored
     
    407425  valid decimal character or a Null-terminator, whichever one comes first.
    408426
    409   If String is NULL, then ASSERT().
    410   If Data is NULL, then ASSERT().
    411427  If String is not aligned in a 16-bit boundary, then ASSERT().
    412   If PcdMaximumUnicodeStringLength is not zero, and String contains more than
    413   PcdMaximumUnicodeStringLength Unicode characters, not including the
    414   Null-terminator, then ASSERT().
    415428
    416429  If String has no valid decimal digits in the above format, then 0 is stored
     
    468481  whichever one comes first.
    469482
    470   If String is NULL, then ASSERT().
    471   If Data is NULL, then ASSERT().
    472483  If String is not aligned in a 16-bit boundary, then ASSERT().
    473   If PcdMaximumUnicodeStringLength is not zero, and String contains more than
    474   PcdMaximumUnicodeStringLength Unicode characters, not including the
    475   Null-terminator, then ASSERT().
    476484
    477485  If String has no valid hexadecimal digits in the above format, then 0 is
     
    529537  whichever one comes first.
    530538
    531   If String is NULL, then ASSERT().
    532   If Data is NULL, then ASSERT().
    533539  If String is not aligned in a 16-bit boundary, then ASSERT().
    534   If PcdMaximumUnicodeStringLength is not zero, and String contains more than
    535   PcdMaximumUnicodeStringLength Unicode characters, not including the
    536   Null-terminator, then ASSERT().
    537540
    538541  If String has no valid hexadecimal digits in the above format, then 0 is
     
    623626  This function is similar as strcpy_s defined in C11.
    624627
    625   If an error would be returned, then the function will also ASSERT().
    626 
    627628  If an error is returned, then the Destination is unmodified.
    628629
     
    656657
    657658  This function is similar as strncpy_s defined in C11.
    658 
    659   If an error would be returned, then the function will also ASSERT().
    660659
    661660  If an error is returned, then the Destination is unmodified.
     
    692691
    693692  This function is similar as strcat_s defined in C11.
    694 
    695   If an error would be returned, then the function will also ASSERT().
    696693
    697694  If an error is returned, then the Destination is unmodified.
     
    731728  This function is similar as strncat_s defined in C11.
    732729
    733   If an error would be returned, then the function will also ASSERT().
    734 
    735730  If an error is returned, then the Destination is unmodified.
    736731
     
    778773  valid decimal character or a Null-terminator, whichever one comes first.
    779774
    780   If String is NULL, then ASSERT().
    781   If Data is NULL, then ASSERT().
    782   If PcdMaximumAsciiStringLength is not zero, and String contains more than
    783   PcdMaximumAsciiStringLength Ascii characters, not including the
    784   Null-terminator, then ASSERT().
    785 
    786775  If String has no valid decimal digits in the above format, then 0 is stored
    787776  at the location pointed to by Data.
     
    833822  valid decimal character or a Null-terminator, whichever one comes first.
    834823
    835   If String is NULL, then ASSERT().
    836   If Data is NULL, then ASSERT().
    837   If PcdMaximumAsciiStringLength is not zero, and String contains more than
    838   PcdMaximumAsciiStringLength Ascii characters, not including the
    839   Null-terminator, then ASSERT().
    840 
    841824  If String has no valid decimal digits in the above format, then 0 is stored
    842825  at the location pointed to by Data.
     
    892875  whichever on comes first.
    893876
    894   If String is NULL, then ASSERT().
    895   If Data is NULL, then ASSERT().
    896   If PcdMaximumAsciiStringLength is not zero, and String contains more than
    897   PcdMaximumAsciiStringLength Ascii characters, not including the
    898   Null-terminator, then ASSERT().
    899 
    900877  If String has no valid hexadecimal digits in the above format, then 0 is
    901878  stored at the location pointed to by Data.
     
    950927  character that is a not a valid hexadecimal character or Null-terminator,
    951928  whichever on comes first.
    952 
    953   If String is NULL, then ASSERT().
    954   If Data is NULL, then ASSERT().
    955   If PcdMaximumAsciiStringLength is not zero, and String contains more than
    956   PcdMaximumAsciiStringLength Ascii characters, not including the
    957   Null-terminator, then ASSERT().
    958929
    959930  If String has no valid hexadecimal digits in the above format, then 0 is
     
    15071478  The "::" can only appear once in the String.
    15081479
    1509   If String is NULL, then ASSERT().
    1510 
    1511   If Address is NULL, then ASSERT().
    1512 
    15131480  If String is not aligned in a 16-bit boundary, then ASSERT().
    1514 
    1515   If PcdMaximumUnicodeStringLength is not zero, and String contains more than
    1516   PcdMaximumUnicodeStringLength Unicode characters, not including the
    1517   Null-terminator, then ASSERT().
    15181481
    15191482  If EndPointer is not NULL and Address is translated from String, a pointer
     
    15681531  a valid decimal digit character after P is converted.
    15691532
    1570   If String is NULL, then ASSERT().
    1571 
    1572   If Address is NULL, then ASSERT().
    1573 
    15741533  If String is not aligned in a 16-bit boundary, then ASSERT().
    1575 
    1576   If PcdMaximumUnicodeStringLength is not zero, and String contains more than
    1577   PcdMaximumUnicodeStringLength Unicode characters, not including the
    1578   Null-terminator, then ASSERT().
    15791534
    15801535  If EndPointer is not NULL and Address is translated from String, a pointer
     
    16411596                  pp          Data4[56:63]
    16421597
    1643   If String is NULL, then ASSERT().
    1644   If Guid is NULL, then ASSERT().
    16451598  If String is not aligned in a 16-bit boundary, then ASSERT().
    16461599
     
    16761629
    16771630  If String is not aligned in a 16-bit boundary, then ASSERT().
    1678 
    1679   If String is NULL, then ASSERT().
    1680 
    1681   If Buffer is NULL, then ASSERT().
    1682 
    1683   If Length is not multiple of 2, then ASSERT().
    1684 
    1685   If PcdMaximumUnicodeStringLength is not zero and Length is greater than
    1686   PcdMaximumUnicodeStringLength, then ASSERT().
    1687 
    1688   If MaxBufferSize is less than (Length / 2), then ASSERT().
    16891631
    16901632  @param  String                   Pointer to a Null-terminated Unicode string.
     
    17781720
    17791721  If Source is not aligned on a 16-bit boundary, then ASSERT().
    1780   If an error would be returned, then the function will also ASSERT().
    17811722
    17821723  If an error is returned, then the Destination is unmodified.
     
    18251766  bits, then ASSERT().
    18261767  If Source is not aligned on a 16-bit boundary, then ASSERT().
    1827   If an error would be returned, then the function will also ASSERT().
    18281768
    18291769  If an error is returned, then the Destination is unmodified.
     
    23892329  The "::" can only appear once in the String.
    23902330
    2391   If String is NULL, then ASSERT().
    2392 
    2393   If Address is NULL, then ASSERT().
    2394 
    23952331  If EndPointer is not NULL and Address is translated from String, a pointer
    23962332  to the character that stopped the scan is stored at the location pointed to
     
    24432379  When /P is in the String, the function stops at the first character that is not
    24442380  a valid decimal digit character after P is converted.
    2445 
    2446   If String is NULL, then ASSERT().
    2447 
    2448   If Address is NULL, then ASSERT().
    24492381
    24502382  If EndPointer is not NULL and Address is translated from String, a pointer
     
    25092441                  pp          Data4[56:63]
    25102442
    2511   If String is NULL, then ASSERT().
    2512   If Guid is NULL, then ASSERT().
    2513 
    25142443  @param  String                   Pointer to a Null-terminated ASCII string.
    25152444  @param  Guid                     Pointer to the converted GUID.
     
    25412470  decoding stops after Length of characters and outputs Buffer containing
    25422471  (Length / 2) bytes.
    2543 
    2544   If String is NULL, then ASSERT().
    2545 
    2546   If Buffer is NULL, then ASSERT().
    2547 
    2548   If Length is not multiple of 2, then ASSERT().
    2549 
    2550   If PcdMaximumAsciiStringLength is not zero and Length is greater than
    2551   PcdMaximumAsciiStringLength, then ASSERT().
    2552 
    2553   If MaxBufferSize is less than (Length / 2), then ASSERT().
    25542472
    25552473  @param  String                   Pointer to a Null-terminated ASCII string.
     
    26332551
    26342552  If Destination is not aligned on a 16-bit boundary, then ASSERT().
    2635   If an error would be returned, then the function will also ASSERT().
    26362553
    26372554  If an error is returned, then the Destination is unmodified.
     
    26792596
    26802597  If Destination is not aligned on a 16-bit boundary, then ASSERT().
    2681   If an error would be returned, then the function will also ASSERT().
    26822598
    26832599  If an error is returned, then Destination and DestinationLength are
     
    29732889#define INITIALIZE_LIST_HEAD_VARIABLE(ListHead)  {&(ListHead), &(ListHead)}
    29742890
     2891/**
     2892  Iterates over each node in a doubly linked list using each node's forward link.
     2893
     2894  @param  Entry     A pointer to a list node used as a loop cursor during iteration
     2895  @param  ListHead  The head node of the doubly linked list
     2896
     2897**/
     2898#define BASE_LIST_FOR_EACH(Entry, ListHead)    \
     2899  for(Entry = (ListHead)->ForwardLink; Entry != (ListHead); Entry = Entry->ForwardLink)
     2900
     2901/**
     2902  Iterates over each node in a doubly linked list using each node's forward link
     2903  with safety against node removal.
     2904
     2905  This macro uses NextEntry to temporarily store the next list node so the node
     2906  pointed to by Entry may be deleted in the current loop iteration step and
     2907  iteration can continue from the node pointed to by NextEntry.
     2908
     2909  @param  Entry     A pointer to a list node used as a loop cursor during iteration
     2910  @param  NextEntry A pointer to a list node used to temporarily store the next node
     2911  @param  ListHead  The head node of the doubly linked list
     2912
     2913**/
     2914#define BASE_LIST_FOR_EACH_SAFE(Entry, NextEntry, ListHead)            \
     2915  for(Entry = (ListHead)->ForwardLink, NextEntry = Entry->ForwardLink;\
     2916      Entry != (ListHead); Entry = NextEntry, NextEntry = Entry->ForwardLink)
    29752917
    29762918/**
     
    53885330                            ///< Unmasked SIMD Floating Point
    53895331                            ///< Exceptions.
    5390     UINT32  Reserved_2:1;   ///< Reserved.
     5332    UINT32  UMIP:1;         ///< User-Mode Instruction Prevention.
    53915333    UINT32  LA57:1;         ///< Linear Address 57bit.
    5392     UINT32  VMXE:1;         ///< VMX Enable
    5393     UINT32  Reserved_1:18;  ///< Reserved.
     5334    UINT32  VMXE:1;         ///< VMX Enable.
     5335    UINT32  SMXE:1;         ///< SMX Enable.
     5336    UINT32  Reserved_3:1;   ///< Reserved.
     5337    UINT32  FSGSBASE:1;     ///< FSGSBASE Enable.
     5338    UINT32  PCIDE:1;        ///< PCID Enable.
     5339    UINT32  OSXSAVE:1;      ///< XSAVE and Processor Extended States Enable.
     5340    UINT32  Reserved_4:1;   ///< Reserved.
     5341    UINT32  SMEP:1;         ///< SMEP Enable.
     5342    UINT32  SMAP:1;         ///< SMAP Enable.
     5343    UINT32  PKE:1;          ///< Protection-Key Enable.
     5344    UINT32  Reserved_5:9;   ///< Reserved.
    53945345  } Bits;
    53955346  UINTN     UintN;
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Library/DebugLib.h

    r80721 r85718  
    99  defined, then debug and assert related macros wrapped by it are the NULL implementations.
    1010
    11 Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
     11Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
    1212SPDX-License-Identifier: BSD-2-Clause-Patent
    1313
     
    290290
    291291**/
     292#if defined(__clang__) && defined(__FILE_NAME__)
     293#define _ASSERT(Expression)  DebugAssert (__FILE_NAME__, __LINE__, #Expression)
     294#else
    292295#define _ASSERT(Expression)  DebugAssert (__FILE__, __LINE__, #Expression)
     296#endif
    293297
    294298
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Library/DxeServicesLib.h

    r80721 r85718  
    172172
    173173/**
    174   Searches the FFS file the the currently executing module was loaded from and returns the first matching FFS section.
     174  Searches the FFS file the currently executing module was loaded from and returns the first matching FFS section.
    175175
    176176  This function searches the FFS file that the currently executing module was loaded from for a FFS sections of type SectionType.
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Library/PciCf8Lib.h

    r80721 r85718  
    10281028  configuration registers from a single PCI function to be read. Size is
    10291029  returned. When possible 32-bit PCI configuration read cycles are used to read
    1030   from StartAdress to StartAddress + Size. Due to alignment restrictions, 8-bit
     1030  from StartAddress to StartAddress + Size. Due to alignment restrictions, 8-bit
    10311031  and 16-bit PCI configuration read cycles may be used at the beginning and the
    10321032  end of the range.
     
    10611061  configuration registers from a single PCI function to be written. Size is
    10621062  returned. When possible 32-bit PCI configuration write cycles are used to
    1063   write from StartAdress to StartAddress + Size. Due to alignment restrictions,
     1063  write from StartAddress to StartAddress + Size. Due to alignment restrictions,
    10641064  8-bit and 16-bit PCI configuration write cycles may be used at the beginning
    10651065  and the end of the range.
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Library/PciExpressLib.h

    r80721 r85718  
    998998  configuration registers from a single PCI function to be read. Size is
    999999  returned. When possible 32-bit PCI configuration read cycles are used to read
    1000   from StartAdress to StartAddress + Size. Due to alignment restrictions, 8-bit
     1000  from StartAddress to StartAddress + Size. Due to alignment restrictions, 8-bit
    10011001  and 16-bit PCI configuration read cycles may be used at the beginning and the
    10021002  end of the range.
     
    10301030  configuration registers from a single PCI function to be written. Size is
    10311031  returned. When possible 32-bit PCI configuration write cycles are used to
    1032   write from StartAdress to StartAddress + Size. Due to alignment restrictions,
     1032  write from StartAddress to StartAddress + Size. Due to alignment restrictions,
    10331033  8-bit and 16-bit PCI configuration write cycles may be used at the beginning
    10341034  and the end of the range.
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Library/PciLib.h

    r80721 r85718  
    998998  configuration registers from a single PCI function to be read. Size is
    999999  returned. When possible 32-bit PCI configuration read cycles are used to read
    1000   from StartAdress to StartAddress + Size. Due to alignment restrictions, 8-bit
     1000  from StartAddress to StartAddress + Size. Due to alignment restrictions, 8-bit
    10011001  and 16-bit PCI configuration read cycles may be used at the beginning and the
    10021002  end of the range.
     
    10301030  configuration registers from a single PCI function to be written. Size is
    10311031  returned. When possible 32-bit PCI configuration write cycles are used to
    1032   write from StartAdress to StartAddress + Size. Due to alignment restrictions,
     1032  write from StartAddress to StartAddress + Size. Due to alignment restrictions,
    10331033  8-bit and 16-bit PCI configuration write cycles may be used at the beginning
    10341034  and the end of the range.
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Library/PciSegmentLib.h

    r80721 r85718  
    985985  configuration registers from a single PCI function to be read. Size is
    986986  returned. When possible 32-bit PCI configuration read cycles are used to read
    987   from StartAdress to StartAddress + Size. Due to alignment restrictions, 8-bit
     987  from StartAddress to StartAddress + Size. Due to alignment restrictions, 8-bit
    988988  and 16-bit PCI configuration read cycles may be used at the beginning and the
    989989  end of the range.
     
    10171017  configuration registers from a single PCI function to be written. Size is
    10181018  returned. When possible 32-bit PCI configuration write cycles are used to
    1019   write from StartAdress to StartAddress + Size. Due to alignment restrictions,
     1019  write from StartAddress to StartAddress + Size. Due to alignment restrictions,
    10201020  8-bit and 16-bit PCI configuration write cycles may be used at the beginning
    10211021  and the end of the range.
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Library/SmmLib.h

    r80721 r85718  
    4646
    4747  @retval TRUE   A software SMI triggered at boot time happened.
    48   @retval FLASE  No software SMI happened, or the software SMI was triggered at run time.
     48  @retval FALSE  No software SMI happened, or the software SMI was triggered at run time.
    4949
    5050**/
     
    6363
    6464  @retval TRUE   A software SMI triggered at run time happened.
    65   @retval FLASE  No software SMI happened or the software SMI was triggered at boot time.
     65  @retval FALSE  No software SMI happened or the software SMI was triggered at boot time.
    6666
    6767**/
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Library/SmmMemLib.h

    r80721 r85718  
    6868  @param  Length              The number of bytes to copy from SourceBuffer to DestinationBuffer.
    6969
    70   @retval EFI_SECURITY_VIOLATION The DesinationBuffer is invalid per processor architecture or overlap with SMRAM.
     70  @retval EFI_SECURITY_VIOLATION The DestinationBuffer is invalid per processor architecture or overlap with SMRAM.
    7171  @retval EFI_SUCCESS            Memory is copied.
    7272
     
    9393  @param  Length              The number of bytes to copy from SourceBuffer to DestinationBuffer.
    9494
    95   @retval EFI_SECURITY_VIOLATION The DesinationBuffer is invalid per processor architecture or overlap with SMRAM.
     95  @retval EFI_SECURITY_VIOLATION The DestinationBuffer is invalid per processor architecture or overlap with SMRAM.
    9696  @retval EFI_SECURITY_VIOLATION The SourceBuffer is invalid per processor architecture or overlap with SMRAM.
    9797  @retval EFI_SUCCESS            Memory is copied.
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Library/SmmPeriodicSmiLib.h

    r80721 r85718  
    6565  periodic SMI for the currently executing handler is triggered, the periodic
    6666  SMI handler will be resumed and this function will return.  Use of this
    67   function requires a seperate stack for the periodic SMI handler.  A non zero
     67  function requires a separate stack for the periodic SMI handler.  A non zero
    6868  stack size must be specified in PeriodicSmiEnable() for this function to be
    6969  used.
     
    114114  @param[in]     Context           Optional content to pass into DispatchFunction.
    115115  @param[in]     TickPeriod        The requested tick period in 100ns units that
    116                                    control should be givien to the periodic SMI
     116                                   control should be given to the periodic SMI
    117117                                   handler.  Must be one of the supported values
    118118                                   returned by PeriodicSmiSupportedPickPeriod().
     
    138138                                 periodic SMI handler.
    139139  @retval EFI_OUT_OF_RESOURCES   There are not enough resources to allocate the
    140                                  stack speficied by StackSize.
     140                                 stack specified by StackSize.
    141141  @retval EFI_SUCCESS            The periodic SMI handler was enabled.
    142142
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Library/UefiLib.h

    r80721 r85718  
    460460  IN CONST EFI_HANDLE       ChildHandle,
    461461  IN CONST EFI_GUID         *ProtocolGuid
     462  );
     463
     464/**
     465  This function checks the supported languages list for a target language,
     466  This only supports RFC 4646 Languages.
     467
     468  @param  SupportedLanguages  The supported languages
     469  @param  TargetLanguage      The target language
     470
     471  @retval Returns EFI_SUCCESS if the language is supported,
     472          EFI_UNSUPPORTED otherwise
     473
     474**/
     475EFI_STATUS
     476EFIAPI
     477IsLanguageSupported (
     478  IN CONST CHAR8 *SupportedLanguages,
     479  IN CONST CHAR8 *TargetLanguage
    462480  );
    463481
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Library/UefiScsiLib.h

    r80721 r85718  
    66  This library class depends on SCSI I/O Protocol defined in UEFI Specification and SCSI-2 industry standard.
    77
    8 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
     8Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
    99SPDX-License-Identifier: BSD-2-Clause-Patent
    1010
     
    815815
    816816/**
     817  Execute Security Protocol In SCSI command on a specific SCSI target.
     818
     819  Executes the SCSI Security Protocol In command on the SCSI target specified by ScsiIo.
     820  If Timeout is zero, then this function waits indefinitely for the command to complete.
     821  If Timeout is greater than zero, then the command is executed and will timeout after
     822  Timeout 100 ns units.
     823  If ScsiIo is NULL, then ASSERT().
     824  If SenseDataLength is NULL, then ASSERT().
     825  If HostAdapterStatus is NULL, then ASSERT().
     826  If TargetStatus is NULL, then ASSERT().
     827  If TransferLength is NULL, then ASSERT().
     828
     829  If SenseDataLength is non-zero and SenseData is not NULL, SenseData must meet buffer
     830  alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
     831  gets returned.
     832
     833  If DataLength is non-zero and DataBuffer is not NULL, DataBuffer must meet buffer
     834  alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
     835  gets returned.
     836
     837  @param[in]      ScsiIo                    SCSI IO Protocol to use.
     838  @param[in]      Timeout                   The length of timeout period.
     839  @param[in, out] SenseData                 A pointer to output sense data.
     840  @param[in, out] SenseDataLength           The length of output sense data.
     841  @param[out]     HostAdapterStatus         The status of Host Adapter.
     842  @param[out]     TargetStatus              The status of the target.
     843  @param[in]      SecurityProtocol          The Security Protocol to use.
     844  @param[in]      SecurityProtocolSpecific  The Security Protocol Specific data.
     845  @param[in]      Inc512                    If TRUE, 512 increment (INC_512) bit will be set for the
     846                                            SECURITY PROTOCOL IN command.
     847  @param[in]      DataLength                The size in bytes of the data buffer.
     848  @param[in, out] DataBuffer                A pointer to a data buffer.
     849  @param[out]     TransferLength            A pointer to a buffer to store the size in
     850                                            bytes of the data written to the data buffer.
     851
     852  @retval  EFI_SUCCESS                 Command is executed successfully.
     853  @retval  EFI_BAD_BUFFER_SIZE         The SCSI Request Packet was executed, but the entire DataBuffer could
     854                                       not be transferred. The actual number of bytes transferred is returned in TransferLength.
     855  @retval  EFI_NOT_READY               The SCSI Request Packet could not be sent because there are too many
     856                                       SCSI Command Packets already queued.
     857  @retval  EFI_DEVICE_ERROR            A device error occurred while attempting to send SCSI Request Packet.
     858  @retval  EFI_UNSUPPORTED             The command described by the SCSI Request Packet is not supported by
     859                                       the SCSI initiator(i.e., SCSI  Host Controller)
     860  @retval  EFI_TIMEOUT                 A timeout occurred while waiting for the SCSI Request Packet to execute.
     861  @retval  EFI_INVALID_PARAMETER       The contents of the SCSI Request Packet are invalid.
     862
     863**/
     864EFI_STATUS
     865EFIAPI
     866ScsiSecurityProtocolInCommand (
     867  IN     EFI_SCSI_IO_PROTOCOL  *ScsiIo,
     868  IN     UINT64                Timeout,
     869  IN OUT VOID                  *SenseData,   OPTIONAL
     870  IN OUT UINT8                 *SenseDataLength,
     871     OUT UINT8                 *HostAdapterStatus,
     872     OUT UINT8                 *TargetStatus,
     873  IN     UINT8                 SecurityProtocol,
     874  IN     UINT16                SecurityProtocolSpecific,
     875  IN     BOOLEAN               Inc512,
     876  IN     UINTN                 DataLength,
     877  IN OUT VOID                  *DataBuffer,  OPTIONAL
     878     OUT UINTN                 *TransferLength
     879  );
     880
     881
     882/**
     883  Execute Security Protocol Out SCSI command on a specific SCSI target.
     884
     885  Executes the SCSI Security Protocol Out command on the SCSI target specified by ScsiIo.
     886  If Timeout is zero, then this function waits indefinitely for the command to complete.
     887  If Timeout is greater than zero, then the command is executed and will timeout after
     888  Timeout 100 ns units.
     889  If ScsiIo is NULL, then ASSERT().
     890  If SenseDataLength is NULL, then ASSERT().
     891  If HostAdapterStatus is NULL, then ASSERT().
     892  If TargetStatus is NULL, then ASSERT().
     893
     894  If SenseDataLength is non-zero and SenseData is not NULL, SenseData must meet buffer
     895  alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
     896  gets returned.
     897
     898  If DataLength is non-zero and DataBuffer is not NULL, DataBuffer must meet buffer
     899  alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
     900  gets returned.
     901
     902  @param[in]      ScsiIo                    SCSI IO Protocol to use.
     903  @param[in]      Timeout                   The length of timeout period.
     904  @param[in, out] SenseData                 A pointer to output sense data.
     905  @param[in, out] SenseDataLength           The length of output sense data.
     906  @param[out]     HostAdapterStatus         The status of Host Adapter.
     907  @param[out]     TargetStatus              The status of the target.
     908  @param[in]      SecurityProtocol          The Security Protocol to use.
     909  @param[in]      SecurityProtocolSpecific  The Security Protocol Specific data.
     910  @param[in]      Inc512                    If TRUE, 512 increment (INC_512) bit will be set for the
     911                                            SECURITY PROTOCOL OUT command.
     912  @param[in]      DataLength                The size in bytes of the transfer data.
     913  @param[in, out] DataBuffer                A pointer to a data buffer.
     914
     915  @retval  EFI_SUCCESS                 Command is executed successfully.
     916  @retval  EFI_BAD_BUFFER_SIZE         The SCSI Request Packet was executed, but the entire DataBuffer could
     917                                       not be transferred. The actual number of bytes transferred is returned in DataLength.
     918  @retval  EFI_NOT_READY               The SCSI Request Packet could not be sent because there are too many
     919                                       SCSI Command Packets already queued.
     920  @retval  EFI_DEVICE_ERROR            A device error occurred while attempting to send SCSI Request Packet.
     921  @retval  EFI_UNSUPPORTED             The command described by the SCSI Request Packet is not supported by
     922                                       the SCSI initiator(i.e., SCSI  Host Controller)
     923  @retval  EFI_TIMEOUT                 A timeout occurred while waiting for the SCSI Request Packet to execute.
     924  @retval  EFI_INVALID_PARAMETER       The contents of the SCSI Request Packet are invalid.
     925
     926**/
     927EFI_STATUS
     928EFIAPI
     929ScsiSecurityProtocolOutCommand (
     930  IN     EFI_SCSI_IO_PROTOCOL  *ScsiIo,
     931  IN     UINT64                Timeout,
     932  IN OUT VOID                  *SenseData,   OPTIONAL
     933  IN OUT UINT8                 *SenseDataLength,
     934     OUT UINT8                 *HostAdapterStatus,
     935     OUT UINT8                 *TargetStatus,
     936  IN     UINT8                 SecurityProtocol,
     937  IN     UINT16                SecurityProtocolSpecific,
     938  IN     BOOLEAN               Inc512,
     939  IN     UINTN                 DataLength,
     940  IN OUT VOID                  *DataBuffer   OPTIONAL
     941  );
     942
     943
     944/**
    817945  Execute blocking/non-blocking Read(10) SCSI command on a specific SCSI
    818946  target.
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Pi/PiDxeCis.h

    r80721 r85718  
    66
    77  @par Revision Reference:
    8   PI Version 1.6
     8  PI Version 1.7
    99
    1010**/
     
    691691#define DXE_SERVICES_SIGNATURE            0x565245535f455844ULL
    692692#define DXE_SPECIFICATION_MAJOR_REVISION  1
    693 #define DXE_SPECIFICATION_MINOR_REVISION  60
     693#define DXE_SPECIFICATION_MINOR_REVISION  70
    694694#define DXE_SERVICES_REVISION             ((DXE_SPECIFICATION_MAJOR_REVISION<<16) | (DXE_SPECIFICATION_MINOR_REVISION))
    695695
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Pi/PiPeiCis.h

    r80721 r85718  
    66
    77  @par Revision Reference:
    8   PI Version 1.6.
     8  PI Version 1.7.
    99
    1010**/
     
    851851//
    852852#define PEI_SPECIFICATION_MAJOR_REVISION  1
    853 #define PEI_SPECIFICATION_MINOR_REVISION  60
     853#define PEI_SPECIFICATION_MINOR_REVISION  70
    854854///
    855855/// Specification inconsistency here:
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Pi/PiStatusCode.h

    r80721 r85718  
    341341#define EFI_CHIPSET_EC_DXE_NB_ERROR     (EFI_SUBCLASS_SPECIFIC | 0x00000001)
    342342#define EFI_CHIPSET_EC_DXE_SB_ERROR     (EFI_SUBCLASS_SPECIFIC | 0x00000002)
     343#define EFI_CHIPSET_EC_INTRUDER_DETECT  (EFI_SUBCLASS_SPECIFIC | 0x00000003)
    343344///@}
    344345
     
    362363#define EFI_PERIPHERAL_LCD_DEVICE       (EFI_PERIPHERAL | 0x000B0000)
    363364#define EFI_PERIPHERAL_NETWORK          (EFI_PERIPHERAL | 0x000C0000)
     365#define EFI_PERIPHERAL_DOCKING          (EFI_PERIPHERAL | 0x000D0000)
    364366///@}
    365367
     
    376378#define EFI_P_PC_RECONFIG         0x00000005
    377379#define EFI_P_PC_DETECTED         0x00000006
     380#define EFI_P_PC_REMOVED          0x00000007
    378381///@}
    379382
     
    465468///
    466469///@{
    467 #define EFI_P_KEYBOARD_EC_LOCKED    (EFI_SUBCLASS_SPECIFIC | 0x00000000)
    468 #define EFI_P_KEYBOARD_EC_STUCK_KEY (EFI_SUBCLASS_SPECIFIC | 0x00000001)
     470#define EFI_P_KEYBOARD_EC_LOCKED      (EFI_SUBCLASS_SPECIFIC | 0x00000000)
     471#define EFI_P_KEYBOARD_EC_STUCK_KEY   (EFI_SUBCLASS_SPECIFIC | 0x00000001)
     472#define EFI_P_KEYBOARD_EC_BUFFER_FULL (EFI_SUBCLASS_SPECIFIC | 0x00000002)
    469473///@}
    470474
     
    763767#define EFI_SW_PEI_PC_S3_BOOT_SCRIPT  (EFI_SUBCLASS_SPECIFIC | 0x00000005)
    764768#define EFI_SW_PEI_PC_OS_WAKE         (EFI_SUBCLASS_SPECIFIC | 0x00000006)
     769#define EFI_SW_PEI_PC_S3_STARTED      (EFI_SUBCLASS_SPECIFIC | 0x00000007)
    765770///@}
    766771
     
    785790#define EFI_SW_DXE_BS_PC_EXIT_BOOT_SERVICES_EVENT     (EFI_SUBCLASS_SPECIFIC | 0x00000003)
    786791#define EFI_SW_DXE_BS_PC_VIRTUAL_ADDRESS_CHANGE_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000004)
     792#define EFI_SW_DXE_BS_PC_VARIABLE_SERVICES_INIT       (EFI_SUBCLASS_SPECIFIC | 0x00000005)
     793#define EFI_SW_DXE_BS_PC_VARIABLE_RECLAIM             (EFI_SUBCLASS_SPECIFIC | 0x00000006)
    787794#define EFI_SW_DXE_BS_PC_ATTEMPT_BOOT_ORDER_EVENT     (EFI_SUBCLASS_SPECIFIC | 0x00000007)
     795#define EFI_SW_DXE_BS_PC_CONFIG_RESET                 (EFI_SUBCLASS_SPECIFIC | 0x00000008)
     796#define EFI_SW_DXE_BS_PC_CSM_INIT                     (EFI_SUBCLASS_SPECIFIC | 0x00000009)
    788797///@}
    789798
     
    975984#define EFI_SW_EC_PWD_CLEARED             0x00000010
    976985#define EFI_SW_EC_EVENT_LOG_FULL          0x00000011
     986#define EFI_SW_EC_WRITE_PROTECTED         0x00000012
     987#define EFI_SW_EC_FV_CORRUPTED            0x00000013
    977988///@}
    978989
     
    10061017#define EFI_SW_PEI_EC_RECOVERY_PPI_NOT_FOUND       (EFI_SUBCLASS_SPECIFIC | 0x00000006)
    10071018#define EFI_SW_PEI_EC_RECOVERY_FAILED              (EFI_SUBCLASS_SPECIFIC | 0x00000007)
     1019#define EFI_SW_PEI_EC_S3_RESUME_ERROR              (EFI_SUBCLASS_SPECIFIC | 0x00000008)
     1020#define EFI_SW_PEI_EC_INVALID_CAPSULE              (EFI_SUBCLASS_SPECIFIC | 0x00000009)
    10081021///@}
    10091022
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Ppi/BlockIo.h

    r80721 r85718  
    1616  @par Revision Reference:
    1717  This PPI is defined in UEFI Platform Initialization Specification 1.2 Volume 1:
    18   Pre-EFI Initalization Core Interface.
     18  Pre-EFI Initialization Core Interface.
    1919
    2020**/
     
    5959/// PEI_BLOCK_IO_MEDIA has been changed to EFI_PEI_BLOCK_IO_MEDIA.
    6060/// Inconsistency exists in UEFI Platform Initialization Specification 1.2
    61 /// Volume 1: Pre-EFI Initalization Core Interface, where all referrences to
     61/// Volume 1: Pre-EFI Initialization Core Interface, where all references to
    6262/// this structure name are with the "EFI_" prefix, except for the definition
    6363/// which is without "EFI_".  So the name of PEI_BLOCK_IO_MEDIA is taken as the
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Ppi/BlockIo2.h

    r80721 r85718  
    88  @par Revision Reference:
    99  This PPI is defined in UEFI Platform Initialization Specification 1.4 Volume 1:
    10   Pre-EFI Initalization Core Interface.
     10  Pre-EFI Initialization Core Interface.
    1111
    1212**/
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Ppi/Capsule.h

    r80721 r85718  
    4646                            coalesced capsule.
    4747
    48   @retval EFI_NOT_FOUND          If: boot modecould not be determined, or the
     48  @retval EFI_NOT_FOUND          If: boot mode could not be determined, or the
    4949                                 boot mode is not flash-update, or the capsule descriptors were not found.
    5050  @retval EFI_BUFFER_TOO_SMALL   The capsule could not be coalesced in the provided memory region.
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Ppi/Decompress.h

    r80721 r85718  
    11/** @file
    2   Provides decompression services to the PEI Foundatoin.
     2  Provides decompression services to the PEI Foundation.
    33
    44  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Ppi/DeviceRecoveryModule.h

    r80721 r85718  
    1616  @par Revision Reference:
    1717  This PPI is defined in UEFI Platform Initialization Specification 1.2 Volume 1:
    18   Pre-EFI Initalization Core Interface
     18  Pre-EFI Initialization Core Interface
    1919
    2020**/
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Ppi/IsaHc.h

    r80721 r85718  
    2929  It may be possible that a single hardware aperture may be used for more than
    3030  one device. This function tracks the number of times that each aperture is
    31   referenced, and doesa not close the hardware aperture (via CloseIoAperture())
     31  referenced, and does not close the hardware aperture (via CloseIoAperture())
    3232  until there are no more references to it.
    3333
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Ppi/MpServices.h

    r80721 r85718  
    7676
    7777/**
    78   Activate all of the application proessors.
     78  Activate all of the application processors.
    7979
    8080  @param[in] PeiServices          An indirect pointer to the PEI Services Table
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Ppi/Pcd.h

    r80721 r85718  
    138138  @param[in]  TokenNumber The PCD token number.
    139139
    140   @return The pointer to the buffer to be retrived.
     140  @return The pointer to the buffer to be retrieved.
    141141
    142142**/
     
    292292  @param[in]  TokenNumber The PCD token number.
    293293
    294   @return The pointer to the buffer to be retrived.
     294  @return The pointer to the buffer to be retrieved.
    295295
    296296**/
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Ppi/RecoveryModule.h

    r80721 r85718  
    3737  @par Revision Reference:
    3838  This PPI is defined in UEFI Platform Initialization Specification 1.2 Errata B Volume 1:
    39   Pre-EFI Initalization Core Interface
     39  Pre-EFI Initialization Core Interface
    4040
    4141**/
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Ppi/TemporaryRamDone.h

    r80721 r85718  
    1919/**
    2020  TemporaryRamDone() disables the use of Temporary RAM. If present, this service is invoked
    21   by the PEI Foundation after the EFI_PEI_PERMANANT_MEMORY_INSTALLED_PPI is installed.
     21  by the PEI Foundation after the EFI_PEI_PERMANENT_MEMORY_INSTALLED_PPI is installed.
    2222
    2323  @retval EFI_SUCCESS           Use of Temporary RAM was disabled.
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Ppi/VectorHandoffInfo.h

    r80721 r85718  
    4444  UINT32    VectorNumber;
    4545  //
    46   // A bitmask that describes the attributes ofthe interrupt or exception vector.
     46  // A bitmask that describes the attributes of the interrupt or exception vector.
    4747  //
    4848  UINT32    Attribute;
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Protocol/AbsolutePointer.h

    r80721 r85718  
    170170(EFIAPI *EFI_ABSOLUTE_POINTER_GET_STATE)(
    171171  IN      EFI_ABSOLUTE_POINTER_PROTOCOL  *This,
    172   IN OUT  EFI_ABSOLUTE_POINTER_STATE     *State
     172  OUT  EFI_ABSOLUTE_POINTER_STATE        *State
    173173);
    174174
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Protocol/AtaPassThru.h

    r80721 r85718  
    316316                                     device path node is to be allocated and built. If there is no
    317317                                     port multiplier, then specify 0xFFFF.
    318   @param[in,out] DevicePath          A pointer to a single device path node that describes the ATA
     318  @param[out]    DevicePath          A pointer to a single device path node that describes the ATA
    319319                                     device specified by Port and PortMultiplierPort. This function
    320320                                     is responsible for allocating the buffer DevicePath with the
     
    335335  IN     UINT16                     Port,
    336336  IN     UINT16                     PortMultiplierPort,
    337   IN OUT EFI_DEVICE_PATH_PROTOCOL   **DevicePath
     337  OUT    EFI_DEVICE_PATH_PROTOCOL   **DevicePath
    338338  );
    339339
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Protocol/BluetoothLeConfig.h

    r80721 r85718  
    33  This protocol abstracts user interface configuration for BluetoothLe device.
    44
    5   Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
     5  Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
    66  SPDX-License-Identifier: BSD-2-Clause-Patent
    77
     
    452452  EfiBluetoothSmpLocalSignCounter,
    453453  EfiBluetoothSmpLocalDIV,
     454  EfiBluetoothSmpPeerAddressList,
     455  EfiBluetoothSmpMax,
    454456} EFI_BLUETOOTH_LE_SMP_DATA_TYPE;
    455457
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Protocol/DebugSupport.h

    r80721 r85718  
    88Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
    99Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>
     10Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
    1011
    1112SPDX-License-Identifier: BSD-2-Clause-Patent
     
    604605} EFI_SYSTEM_CONTEXT_AARCH64;
    605606
     607///
     608/// RISC-V processor exception types.
     609///
     610#define EXCEPT_RISCV_INST_MISALIGNED              0
     611#define EXCEPT_RISCV_INST_ACCESS_FAULT            1
     612#define EXCEPT_RISCV_ILLEGAL_INST                 2
     613#define EXCEPT_RISCV_BREAKPOINT                   3
     614#define EXCEPT_RISCV_LOAD_ADDRESS_MISALIGNED      4
     615#define EXCEPT_RISCV_LOAD_ACCESS_FAULT            5
     616#define EXCEPT_RISCV_STORE_AMO_ADDRESS_MISALIGNED 6
     617#define EXCEPT_RISCV_STORE_AMO_ACCESS_FAULT       7
     618#define EXCEPT_RISCV_ENV_CALL_FROM_UMODE          8
     619#define EXCEPT_RISCV_ENV_CALL_FROM_SMODE          9
     620#define EXCEPT_RISCV_ENV_CALL_FROM_HMODE          10
     621#define EXCEPT_RISCV_ENV_CALL_FROM_MMODE          11
     622
     623#define EXCEPT_RISCV_SOFTWARE_INT       0x0
     624#define EXCEPT_RISCV_TIMER_INT          0x1
     625
     626typedef struct {
     627  UINT64  X0;
     628  UINT64  X1;
     629  UINT64  X2;
     630  UINT64  X3;
     631  UINT64  X4;
     632  UINT64  X5;
     633  UINT64  X6;
     634  UINT64  X7;
     635  UINT64  X8;
     636  UINT64  X9;
     637  UINT64  X10;
     638  UINT64  X11;
     639  UINT64  X12;
     640  UINT64  X13;
     641  UINT64  X14;
     642  UINT64  X15;
     643  UINT64  X16;
     644  UINT64  X17;
     645  UINT64  X18;
     646  UINT64  X19;
     647  UINT64  X20;
     648  UINT64  X21;
     649  UINT64  X22;
     650  UINT64  X23;
     651  UINT64  X24;
     652  UINT64  X25;
     653  UINT64  X26;
     654  UINT64  X27;
     655  UINT64  X28;
     656  UINT64  X29;
     657  UINT64  X30;
     658  UINT64  X31;
     659} EFI_SYSTEM_CONTEXT_RISCV64;
    606660
    607661///
     
    615669  EFI_SYSTEM_CONTEXT_ARM  *SystemContextArm;
    616670  EFI_SYSTEM_CONTEXT_AARCH64  *SystemContextAArch64;
     671  EFI_SYSTEM_CONTEXT_RISCV64  *SystemContextRiscV64;
    617672} EFI_SYSTEM_CONTEXT;
    618673
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Protocol/DevicePath.h

    r80721 r85718  
    283283} ACPI_ADR_DEVICE_PATH;
    284284
     285///
     286/// ACPI NVDIMM Device Path SubType.
     287///
     288#define ACPI_NVDIMM_DP               0x04
     289///
     290///
     291typedef struct {
     292  EFI_DEVICE_PATH_PROTOCOL        Header;
     293  ///
     294  /// NFIT Device Handle, the _ADR of the NVDIMM device.
     295  /// The value of this field comes from Section 9.20.3 of the ACPI 6.2A specification.
     296  ///
     297  UINT32                          NFITDeviceHandle;
     298} ACPI_NVDIMM_DEVICE_PATH;
     299
    285300#define ACPI_ADR_DISPLAY_TYPE_OTHER             0
    286301#define ACPI_ADR_DISPLAY_TYPE_VGA               1
     
    712727  UINT8                           StopBits;
    713728} UART_DEVICE_PATH;
     729
     730///
     731/// NVDIMM Namespace Device Path SubType.
     732///
     733#define NVDIMM_NAMESPACE_DP               0x20
     734typedef struct {
     735  EFI_DEVICE_PATH_PROTOCOL        Header;
     736  ///
     737  /// Namespace unique label identifier UUID.
     738  ///
     739  EFI_GUID Uuid;
     740} NVDIMM_NAMESPACE_DEVICE_PATH;
    714741
    715742//
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Protocol/EdidOverride.h

    r80721 r85718  
    4545  IN  EFI_HANDLE                          *ChildHandle,
    4646  OUT UINT32                              *Attributes,
    47   IN OUT UINTN                            *EdidSize,
    48   IN OUT UINT8                            **Edid
     47  OUT UINTN                               *EdidSize,
     48  OUT UINT8                               **Edid
    4949  );
    5050
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Protocol/FirmwareManagement.h

    r80721 r85718  
    99  EFI_UNSUPPORTED if not supported by the driver.
    1010
    11   Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
     11  Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.<BR>
    1212  Copyright (c) 2013 - 2014, Hewlett-Packard Development Company, L.P.<BR>
    1313  SPDX-License-Identifier: BSD-2-Clause-Patent
     
    2828
    2929typedef struct _EFI_FIRMWARE_MANAGEMENT_PROTOCOL EFI_FIRMWARE_MANAGEMENT_PROTOCOL;
     30
     31///
     32/// Dependency Expression Opcode
     33///
     34#define EFI_FMP_DEP_PUSH_GUID        0x00
     35#define EFI_FMP_DEP_PUSH_VERSION     0x01
     36#define EFI_FMP_DEP_VERSION_STR      0x02
     37#define EFI_FMP_DEP_AND              0x03
     38#define EFI_FMP_DEP_OR               0x04
     39#define EFI_FMP_DEP_NOT              0x05
     40#define EFI_FMP_DEP_TRUE             0x06
     41#define EFI_FMP_DEP_FALSE            0x07
     42#define EFI_FMP_DEP_EQ               0x08
     43#define EFI_FMP_DEP_GT               0x09
     44#define EFI_FMP_DEP_GTE              0x0A
     45#define EFI_FMP_DEP_LT               0x0B
     46#define EFI_FMP_DEP_LTE              0x0C
     47#define EFI_FMP_DEP_END              0x0D
     48
     49///
     50/// Image Attribute - Dependency
     51///
     52typedef struct {
     53  UINT8 Dependencies[1];
     54} EFI_FIRMWARE_IMAGE_DEP;
    3055
    3156///
     
    112137  ///
    113138  UINT64                           HardwareInstance;
     139  EFI_FIRMWARE_IMAGE_DEP           *Dependencies;
    114140} EFI_FIRMWARE_IMAGE_DESCRIPTOR;
    115141
     
    144170///
    145171#define    IMAGE_ATTRIBUTE_UEFI_IMAGE              0x0000000000000010
     172///
     173/// The attribute IMAGE_ATTRIBUTE_DEPENDENCY indicates that there is an EFI_FIRMWARE_IMAGE_DEP
     174/// section associated with the image.
     175///
     176#define    IMAGE_ATTRIBUTE_DEPENDENCY              0x0000000000000020
    146177
    147178
     
    159190/// Descriptor Version exposed by GetImageInfo() function
    160191///
    161 #define   EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION   3
     192#define   EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION   4
    162193
    163194
     
    315346  @param[in]      ImageIndex     A unique number identifying the firmware image(s) within the device.
    316347                                 The number is between 1 and DescriptorCount.
    317   @param[in, out] Image          Points to the buffer where the current image is copied to.
     348  @param[out]    Image          Points to the buffer where the current image is copied to.
    318349  @param[in, out] ImageSize      On entry, points to the size of the buffer pointed to by Image, in bytes.
    319350                                 On return, points to the length of the image, in bytes.
     
    334365  IN  EFI_FIRMWARE_MANAGEMENT_PROTOCOL  *This,
    335366  IN  UINT8                             ImageIndex,
    336   IN  OUT  VOID                         *Image,
     367  OUT  VOID                             *Image,
    337368  IN  OUT  UINTN                        *ImageSize
    338369  );
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Protocol/MpService.h

    r80721 r85718  
    4949
    5050///
     51/// Value used in the NumberProcessors parameter of the GetProcessorInfo function
     52///
     53#define CPU_V2_EXTENDED_TOPOLOGY BIT24
     54
     55///
    5156/// Forward declaration for the EFI_MP_SERVICES_PROTOCOL.
    5257///
     
    96101  UINT32  Thread;
    97102} EFI_CPU_PHYSICAL_LOCATION;
     103
     104///
     105///  Structure that defines the 6-level physical location of the processor
     106///
     107typedef struct {
     108///
     109///    Package     Zero-based physical package number that identifies the cartridge of the processor.
     110///
     111UINT32  Package;
     112///
     113///    Module      Zero-based physical module number within package of the processor.
     114///
     115UINT32  Module;
     116///
     117///    Tile        Zero-based physical tile number within module of the processor.
     118///
     119UINT32  Tile;
     120///
     121///    Die         Zero-based physical die number within tile of the processor.
     122///
     123UINT32  Die;
     124///
     125///     Core        Zero-based physical core number within die of the processor.
     126///
     127UINT32  Core;
     128///
     129///     Thread      Zero-based logical thread number within core of the processor.
     130///
     131UINT32  Thread;
     132} EFI_CPU_PHYSICAL_LOCATION2;
     133
     134
     135typedef union {
     136  /// The 6-level physical location of the processor, including the
     137  /// physical package number that identifies the cartridge, the physical
     138  /// module number within package, the physical tile number within the module,
     139  /// the physical die number within the tile, the physical core number within
     140  /// package, and logical thread number within core.
     141  EFI_CPU_PHYSICAL_LOCATION2  Location2;
     142} EXTENDED_PROCESSOR_INFORMATION;
     143
    98144
    99145///
     
    133179  ///
    134180  EFI_CPU_PHYSICAL_LOCATION  Location;
     181  ///
     182  /// The extended information of the processor. This field is filled only when
     183  /// CPU_V2_EXTENDED_TOPOLOGY is set in parameter ProcessorNumber.
     184  EXTENDED_PROCESSOR_INFORMATION ExtendedInformation;
    135185} EFI_PROCESSOR_INFORMATION;
    136186
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Protocol/NvmExpressPassthru.h

    r80721 r85718  
    215215                                     allocated and built. Caller must set the NamespaceId to zero if the
    216216                                     device path node will contain a valid UUID.
    217   @param[in,out] DevicePath          A pointer to a single device path node that describes the NVM Express
     217  @param[out]    DevicePath          A pointer to a single device path node that describes the NVM Express
    218218                                     namespace specified by NamespaceId. This function is responsible for
    219219                                     allocating the buffer DevicePath with the boot service AllocatePool().
     
    232232  IN     EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL          *This,
    233233  IN     UINT32                                      NamespaceId,
    234   IN OUT EFI_DEVICE_PATH_PROTOCOL                    **DevicePath
     234  OUT    EFI_DEVICE_PATH_PROTOCOL                    **DevicePath
    235235  );
    236236
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Protocol/PxeBaseCode.h

    r80721 r85718  
    44
    55Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
     6Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
     7
    68SPDX-License-Identifier: BSD-2-Clause-Patent
    79
     
    154156#elif defined (MDE_CPU_AARCH64)
    155157#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE    0x000B
     158#elif defined (MDE_CPU_RISCV64)
     159#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE    0x001B
    156160#endif
    157161
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Protocol/ScsiPassThruExt.h

    r80721 r85718  
    260260  IN UINT8                                         *Target,
    261261  IN UINT64                                        Lun,
    262   IN OUT EFI_DEVICE_PATH_PROTOCOL                  **DevicePath
     262  OUT EFI_DEVICE_PATH_PROTOCOL                     **DevicePath
    263263  );
    264264
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Protocol/SdMmcPassThru.h

    r80721 r85718  
    165165  @param[in]     Slot           Specifies the slot number of the SD card for which a device
    166166                                path node is to be allocated and built.
    167   @param[in,out] DevicePath     A pointer to a single device path node that describes the SD
     167  @param[out]    DevicePath     A pointer to a single device path node that describes the SD
    168168                                card specified by Slot. This function is responsible for
    169169                                allocating the buffer DevicePath with the boot service
     
    183183  IN     EFI_SD_MMC_PASS_THRU_PROTOCOL       *This,
    184184  IN     UINT8                               Slot,
    185   IN OUT EFI_DEVICE_PATH_PROTOCOL            **DevicePath
     185  OUT    EFI_DEVICE_PATH_PROTOCOL            **DevicePath
    186186);
    187187
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Protocol/Security2.h

    r80721 r85718  
    8181typedef EFI_STATUS (EFIAPI *EFI_SECURITY2_FILE_AUTHENTICATION) (
    8282  IN CONST EFI_SECURITY2_ARCH_PROTOCOL *This,
    83   IN CONST EFI_DEVICE_PATH_PROTOCOL    *DevicePath,
     83  IN CONST EFI_DEVICE_PATH_PROTOCOL    *File, OPTIONAL
    8484  IN VOID                              *FileBuffer,
    8585  IN UINTN                             FileSize,
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Protocol/SerialIo.h

    r80721 r85718  
    264264
    265265#define EFI_SERIAL_IO_PROTOCOL_REVISION    0x00010000
     266#define EFI_SERIAL_IO_PROTOCOL_REVISION1p1 0x00010001
    266267#define SERIAL_IO_INTERFACE_REVISION  EFI_SERIAL_IO_PROTOCOL_REVISION
    267268
     
    288289  ///
    289290  EFI_SERIAL_IO_MODE          *Mode;
     291  ///
     292  /// Pointer to a GUID identifying the device connected to the serial port.
     293  /// This field is NULL when the protocol is installed by the serial port
     294  /// driver and may be populated by a platform driver for a serial port
     295  /// with a known device attached. The field will remain NULL if there is
     296  /// no platform serial device identification information available.
     297  ///
     298  CONST EFI_GUID              *DeviceTypeGuid; // Revision 1.1
    290299};
    291300
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Protocol/SimplePointer.h

    r80721 r85718  
    110110(EFIAPI *EFI_SIMPLE_POINTER_GET_STATE)(
    111111  IN EFI_SIMPLE_POINTER_PROTOCOL          *This,
    112   IN OUT EFI_SIMPLE_POINTER_STATE         *State
     112  OUT EFI_SIMPLE_POINTER_STATE            *State
    113113  );
    114114
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Protocol/Tls.h

    r80721 r85718  
    4343typedef enum {
    4444  ///
    45   /// Session Configuration
    46   ///
    47 
    48   ///
    4945  /// TLS session Version. The corresponding Data is of type EFI_TLS_VERSION.
    5046  ///
     
    8783  ///
    8884  EfiTlsSessionState,
    89 
    90   ///
    91   /// Session information
    92   ///
    93 
    9485  ///
    9586  /// TLS session data client random.
     
    10798  ///
    10899  EfiTlsKeyMaterial,
     100  ///
     101  /// TLS session hostname for validation which is used to verify whether the name
     102  /// within the peer certificate matches a given host name.
     103  /// This parameter is invalid when EfiTlsVerifyMethod is EFI_TLS_VERIFY_NONE.
     104  /// The corresponding Data is of type EFI_TLS_VERIFY_HOST.
     105  ///
     106  EfiTlsVerifyHost,
    109107
    110108  EfiTlsSessionDataTypeMaximum
    111 
    112109} EFI_TLS_SESSION_DATA_TYPE;
    113110
     
    179176#define EFI_TLS_VERIFY_PEER                  0x1
    180177///
    181 /// TLS session will fail peer certificate is absent.
     178/// EFI_TLS_VERIFY_FAIL_IF_NO_PEER_CERT is only meaningful in the server mode.
     179/// TLS session will fail if client certificate is absent.
    182180///
    183181#define EFI_TLS_VERIFY_FAIL_IF_NO_PEER_CERT  0x2
     
    187185///
    188186#define EFI_TLS_VERIFY_CLIENT_ONCE           0x4
     187
     188///
     189/// EFI_TLS_VERIFY_HOST_FLAG
     190///
     191typedef UINT32 EFI_TLS_VERIFY_HOST_FLAG;
     192///
     193/// There is no additional flags set for hostname validation.
     194/// Wildcards are supported and they match only in the left-most label.
     195///
     196#define EFI_TLS_VERIFY_FLAG_NONE                    0x00
     197///
     198/// Always check the Subject Distinguished Name (DN) in the peer certificate even if the
     199/// certificate contains Subject Alternative Name (SAN).
     200///
     201#define EFI_TLS_VERIFY_FLAG_ALWAYS_CHECK_SUBJECT    0x01
     202///
     203/// Disable the match of all wildcards.
     204///
     205#define EFI_TLS_VERIFY_FLAG_NO_WILDCARDS            0x02
     206///
     207/// Disable the "*" as wildcard in labels that have a prefix or suffix (e.g. "www*" or "*www").
     208///
     209#define EFI_TLS_VERIFY_FLAG_NO_PARTIAL_WILDCARDS    0x04
     210///
     211/// Allow the "*" to match more than one labels. Otherwise, only matches a single label.
     212///
     213#define EFI_TLS_VERIFY_FLAG_MULTI_LABEL_WILDCARDS   0x08
     214///
     215/// Restrict to only match direct child sub-domains which start with ".".
     216/// For example, a name of ".example.com" would match "www.example.com" with this flag,
     217/// but would not match "www.sub.example.com".
     218///
     219#define EFI_TLS_VERIFY_FLAG_SINGLE_LABEL_SUBDOMAINS 0x10
     220///
     221/// Never check the Subject Distinguished Name (DN) even there is no
     222/// Subject Alternative Name (SAN) in the certificate.
     223///
     224#define EFI_TLS_VERIFY_FLAG_NEVER_CHECK_SUBJECT     0x20
     225
     226///
     227/// EFI_TLS_VERIFY_HOST
     228///
     229#pragma pack (1)
     230typedef struct {
     231  EFI_TLS_VERIFY_HOST_FLAG Flags;
     232  CHAR8                    *HostName;
     233} EFI_TLS_VERIFY_HOST;
     234#pragma pack ()
    189235
    190236///
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Register/Amd/Cpuid.h

    r80721 r85718  
    1212
    1313  @par Specification Reference:
    14   AMD64 Architecture Programming Manaul volume 2, March 2017, Sections 15.34
     14  AMD64 Architecture Programming Manual volume 2, March 2017, Sections 15.34
    1515
    1616**/
     
    365365    UINT32  Page1GB:1;
    366366    ///
    367     /// [Bit 27] RDTSCP intructions.
     367    /// [Bit 27] RDTSCP instructions.
    368368    ///
    369369    UINT32  RDTSCP:1;
     
    514514  @retval  EAX  Extended APIC ID described by the type
    515515                CPUID_AMD_PROCESSOR_TOPOLOGY_EAX.
    516   @retval  EBX  Core Indentifiers described by the type
     516  @retval  EBX  Core Identifiers described by the type
    517517                CPUID_AMD_PROCESSOR_TOPOLOGY_EBX.
    518   @retval  ECX  Node Indentifiers described by the type
     518  @retval  ECX  Node Identifiers described by the type
    519519                CPUID_AMD_PROCESSOR_TOPOLOGY_ECX.
    520520  @retval  EDX  Reserved.
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Register/Amd/Fam17Msr.h

    r80721 r85718  
    1111
    1212  @par Specification Reference:
    13   AMD64 Architecture Programming Manaul volume 2, March 2017, Sections 15.34
     13  AMD64 Architecture Programming Manual volume 2, March 2017, Sections 15.34
    1414
    1515**/
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Register/Amd/Msr.h

    r80721 r85718  
    1111
    1212  @par Specification Reference:
    13   AMD64 Architecture Programming Manaul volume 2, March 2017, Sections 15.34
     13  AMD64 Architecture Programming Manual volume 2, March 2017, Sections 15.34
    1414
    1515**/
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Register/Intel/Msr/GoldmontPlusMsr.h

    r80721 r85718  
    11/** @file
    2   MSR Defintions for Intel Atom processors based on the Goldmont Plus microarchitecture.
     2  MSR Definitions for Intel Atom processors based on the Goldmont Plus microarchitecture.
    33
    44  Provides defines for Machine Specific Registers(MSR) indexes. Data structures
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Register/Intel/Msr/SkylakeMsr.h

    r80721 r85718  
    11/** @file
    2   MSR Defintions for Intel processors based on the Skylake/Kabylake/Coffeelake/Cannonlake microarchitecture.
     2  MSR Definitions for Intel processors based on the Skylake/Kabylake/Coffeelake/Cannonlake microarchitecture.
    33
    44  Provides defines for Machine Specific Registers(MSR) indexes. Data structures
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Register/Intel/StmResourceDescriptor.h

    r80721 r85718  
    180180
    181181/**
    182   STM Register Volation Descriptor
     182  STM Register Violation Descriptor
    183183**/
    184184typedef struct {
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Uefi/UefiBaseType.h

    r80721 r85718  
    44Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
    55Portions copyright (c) 2011 - 2016, ARM Ltd. All rights reserved.<BR>
     6Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
    67
    78SPDX-License-Identifier: BSD-2-Clause-Patent
     
    241242#define EFI_IMAGE_MACHINE_AARCH64  0xAA64
    242243
     244///
     245/// PE32+ Machine type for RISC-V 32/64/128
     246///
     247#define EFI_IMAGE_MACHINE_RISCV32   0x5032
     248#define EFI_IMAGE_MACHINE_RISCV64   0x5064
     249#define EFI_IMAGE_MACHINE_RISCV128  0x5128
    243250
    244251#if   defined (MDE_CPU_IA32)
     
    266273#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \
    267274  ((Machine) == EFI_IMAGE_MACHINE_AARCH64)
     275
     276#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE)
     277
     278#elif defined (MDE_CPU_RISCV64)
     279#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \
     280  ((Machine) == EFI_IMAGE_MACHINE_RISCV64)
    268281
    269282#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE)
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h

    r80721 r85718  
    826826#define EFI_IFR_FLAG_CALLBACK           0x04
    827827#define EFI_IFR_FLAG_RESET_REQUIRED     0x10
     828#define EFI_IFR_FLAG_REST_STYLE         0x20
    828829#define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40
    829830#define EFI_IFR_FLAG_OPTIONS_ONLY       0x80
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Uefi/UefiSpec.h

    r80721 r85718  
    77
    88Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
     9Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
     10
    911SPDX-License-Identifier: BSD-2-Clause-Patent
    1012
     
    8385//
    8486#define EFI_MEMORY_MORE_RELIABLE    0x0000000000010000ULL
     87
     88//
     89// Note: UEFI spec 2.8 and following:
     90//
     91// Specific-purpose memory (SPM). The memory is earmarked for
     92// specific purposes such as for specific device drivers or applications.
     93// The SPM attribute serves as a hint to the OS to avoid allocating this
     94// memory for core OS data or code that can not be relocated.
     95//
     96#define EFI_MEMORY_SP               0x0000000000040000ULL
     97//
     98// If this flag is set, the memory region is capable of being
     99// protected with the CPU?s memory cryptographic
     100// capabilities. If this flag is clear, the memory region is not
     101// capable of being protected with the CPU?s memory
     102// cryptographic capabilities or the CPU does not support CPU
     103// memory cryptographic capabilities.
     104//
     105#define EFI_MEMORY_CPU_CRYPTO       0x0000000000080000ULL
     106
    85107//
    86108// Runtime memory attribute
     
    190212                                         the buffer was large enough, or the size of the buffer needed to contain
    191213                                         the map if the buffer was too small.
    192   @param[in, out]  MemoryMap             A pointer to the buffer in which firmware places the current memory
     214  @param[out]      MemoryMap             A pointer to the buffer in which firmware places the current memory
    193215                                         map.
    194216  @param[out]      MapKey                A pointer to the location in which firmware returns the key for the
     
    211233(EFIAPI *EFI_GET_MEMORY_MAP)(
    212234  IN OUT UINTN                       *MemoryMapSize,
    213   IN OUT EFI_MEMORY_DESCRIPTOR       *MemoryMap,
     235  OUT    EFI_MEMORY_DESCRIPTOR       *MemoryMap,
    214236  OUT    UINTN                       *MapKey,
    215237  OUT    UINTN                       *DescriptorSize,
     
    15351557                                This parameter is only valid for a SearchType of ByProtocol.
    15361558  @param[in]       SearchKey    Supplies the search key depending on the SearchType.
    1537   @param[in, out]  NoHandles    The number of handles returned in Buffer.
     1559  @param[out]      NoHandles    The number of handles returned in Buffer.
    15381560  @param[out]      Buffer       A pointer to the buffer to return the requested array of handles that
    15391561                                support Protocol.
     
    15531575  IN     EFI_GUID                     *Protocol,      OPTIONAL
    15541576  IN     VOID                         *SearchKey,     OPTIONAL
    1555   IN OUT UINTN                        *NoHandles,
     1577  OUT    UINTN                        *NoHandles,
    15561578  OUT    EFI_HANDLE                   **Buffer
    15571579  );
     
    17621784#define EFI_OS_INDICATIONS_CAPSULE_RESULT_VAR_SUPPORTED     0x0000000000000010
    17631785#define EFI_OS_INDICATIONS_START_PLATFORM_RECOVERY          0x0000000000000040
     1786#define EFI_OS_INDICATIONS_JSON_CONFIG_DATA_REFRESH         0x0000000000000080
    17641787
    17651788//
     
    17671790//
    17681791#define EFI_SYSTEM_TABLE_SIGNATURE      SIGNATURE_64 ('I','B','I',' ','S','Y','S','T')
     1792#define EFI_2_80_SYSTEM_TABLE_REVISION  ((2 << 16) | (80))
    17691793#define EFI_2_70_SYSTEM_TABLE_REVISION  ((2 << 16) | (70))
    17701794#define EFI_2_60_SYSTEM_TABLE_REVISION  ((2 << 16) | (60))
     
    21932217#define EFI_REMOVABLE_MEDIA_FILE_NAME_ARM     L"\\EFI\\BOOT\\BOOTARM.EFI"
    21942218#define EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64 L"\\EFI\\BOOT\\BOOTAA64.EFI"
     2219#define EFI_REMOVABLE_MEDIA_FILE_NAME_RISCV64 L"\\EFI\\BOOT\\BOOTRISCV64.EFI"
    21952220
    21962221#if   defined (MDE_CPU_IA32)
     
    22032228#elif defined (MDE_CPU_AARCH64)
    22042229  #define EFI_REMOVABLE_MEDIA_FILE_NAME   EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64
     2230#elif defined (MDE_CPU_RISCV64)
     2231  #define EFI_REMOVABLE_MEDIA_FILE_NAME   EFI_REMOVABLE_MEDIA_FILE_NAME_RISCV64
    22052232#else
    22062233  #error Unknown Processor Type
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/X64/ProcessorBind.h

    r80721 r85718  
    102102#pragma warning ( disable : 4206 )
    103103
    104 #if _MSC_VER == 1800 || _MSC_VER == 1900 || _MSC_VER >= 1910
     104#if defined(_MSC_VER) && _MSC_VER >= 1800
    105105
    106106//
     
    314314#endif
    315315
    316 #if defined(__GNUC__)
     316#if defined(__GNUC__) || defined(__clang__)
    317317  ///
    318318  /// For GNU assembly code, .global or .globl can declare global symbols.
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf

    r80721 r85718  
    77#  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
    88#  Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
     9#  Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
    910#
    1011#  SPDX-License-Identifier: BSD-2-Clause-Patent
     
    4243  ArmCache.c
    4344
     45[Sources.RISCV64]
     46  RiscVCache.c
     47
    4448[Packages]
    4549  MdePkg/MdePkg.dec
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf

    r80721 r85718  
    88#  Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
    99#  Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>
     10#  Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
    1011#
    1112#  SPDX-License-Identifier: BSD-2-Clause-Patent
     
    2526
    2627#
    27 #  VALID_ARCHITECTURES           = IA32 X64 EBC ARM AARCH64
     28#  VALID_ARCHITECTURES           = IA32 X64 EBC ARM AARCH64 RISCV64
    2829#
    2930
     
    6061  AArch64/CpuSleep.asm    | MSFT
    6162
     63[Sources.RISCV64]
     64  RiscV/Cpu.S
     65
    6266[Packages]
    6367  MdePkg/MdePkg.dec
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BaseCpuLib/BaseCpuLib.uni

    r80721 r85718  
    22// Instance of CPU Library for various architecture.
    33//
    4 // CPU Library implemented using ASM functions for IA-32 and X64,
     4// CPU Library implemented using ASM functions for IA-32, X64 and RISCV64,
    55// PAL CALLs for IPF, and empty functions for EBC.
    66//
     
    88// Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
    99// Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>
     10// Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
    1011//
    1112// SPDX-License-Identifier: BSD-2-Clause-Patent
     
    1617#string STR_MODULE_ABSTRACT             #language en-US "Instance of CPU Library for various architectures"
    1718
    18 #string STR_MODULE_DESCRIPTION          #language en-US "CPU Library implemented using ASM functions for IA-32 and X64, PAL CALLs for IPF, and empty functions for EBC."
     19#string STR_MODULE_DESCRIPTION          #language en-US "CPU Library implemented using ASM functions for IA-32, X64 and RISCV64, PAL CALLs for IPF, and empty functions for EBC."
    1920
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf

    r80721 r85718  
    55#  for IA-32 and x64.  On IPF, I/O port requests are translated into MMIO requests.
    66#  MMIO requests are forwarded directly to memory.  For EBC, I/O port requests
    7 #  ASSERT().
     7#  ASSERT(). For ARM, AARCH64 and RISCV64, this I/O library only provides non I/O
     8#  read and write.
    89#
    910#  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
    1011#  Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
    1112#  Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
     13#  Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
    1214#
    1315#  SPDX-License-Identifier: BSD-2-Clause-Patent
     
    2628
    2729#
    28 #  VALID_ARCHITECTURES           = IA32 X64 EBC ARM AARCH64
     30#  VALID_ARCHITECTURES           = IA32 X64 EBC ARM AARCH64 RISCV64
    2931#
    3032
     
    5153
    5254[Sources.ARM]
    53   IoLibArm.c
     55  IoLibNoIo.c
    5456
    5557[Sources.AARCH64]
    56   IoLibArm.c
     58  IoLibNoIo.c
     59
     60[Sources.RISCV64]
     61  IoLibNoIo.c
    5762
    5863[Packages]
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BaseIoLibIntrinsic/IoLibGcc.c

    r80721 r85718  
    3333
    3434**/
    35 __inline__
    3635UINT8
    3736EFIAPI
     
    6160
    6261**/
    63 __inline__
    6462UINT8
    6563EFIAPI
     
    8886
    8987**/
    90 __inline__
    9188UINT16
    9289EFIAPI
     
    118115
    119116**/
    120 __inline__
    121117UINT16
    122118EFIAPI
     
    146142
    147143**/
    148 __inline__
    149144UINT32
    150145EFIAPI
     
    176171
    177172**/
    178 __inline__
    179173UINT32
    180174EFIAPI
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BaseLib/BaseLib.inf

    r80721 r85718  
    55#  Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
    66#  Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>
     7#  Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
    78#
    89#  SPDX-License-Identifier: BSD-2-Clause-Patent
     
    2122
    2223#
    23 #  VALID_ARCHITECTURES           = IA32 X64 EBC ARM AARCH64
     24#  VALID_ARCHITECTURES           = IA32 X64 EBC ARM AARCH64 RISCV64
    2425#
    2526
     
    395396  AArch64/SpeculationBarrier.asm    | MSFT
    396397
     398[Sources.RISCV64]
     399  Math64.c
     400  Unaligned.c
     401  RiscV64/InternalSwitchStack.c
     402  RiscV64/CpuBreakpoint.c
     403  RiscV64/GetInterruptState.c
     404  RiscV64/DisableInterrupts.c
     405  RiscV64/EnableInterrupts.c
     406  RiscV64/CpuPause.c
     407  RiscV64/RiscVSetJumpLongJump.S    | GCC
     408  RiscV64/RiscVCpuBreakpoint.S      | GCC
     409  RiscV64/RiscVCpuPause.S           | GCC
     410  RiscV64/RiscVInterrupt.S          | GCC
     411  RiscV64/FlushCache.S              | GCC
     412
    397413[Packages]
    398414  MdePkg/MdePkg.dec
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BaseLib/SafeString.c

    r80721 r85718  
    1515#define SAFE_STRING_CONSTRAINT_CHECK(Expression, Status)  \
    1616  do { \
    17     ASSERT (Expression); \
    1817    if (!(Expression)) { \
     18      DEBUG ((DEBUG_VERBOSE, \
     19        "%a(%d) %a: SAFE_STRING_CONSTRAINT_CHECK(%a) failed.  Return %r\n", \
     20        __FILE__, __LINE__, __FUNCTION__, #Expression, Status)); \
    1921      return Status; \
    2022    } \
     
    198200  If Destination is not aligned on a 16-bit boundary, then ASSERT().
    199201  If Source is not aligned on a 16-bit boundary, then ASSERT().
    200   If an error would be returned, then the function will also ASSERT().
    201202
    202203  If an error is returned, then the Destination is unmodified.
     
    280281  If Length > 0 and Destination is not aligned on a 16-bit boundary, then ASSERT().
    281282  If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().
    282   If an error would be returned, then the function will also ASSERT().
    283283
    284284  If an error is returned, then the Destination is unmodified.
     
    373373  If Destination is not aligned on a 16-bit boundary, then ASSERT().
    374374  If Source is not aligned on a 16-bit boundary, then ASSERT().
    375   If an error would be returned, then the function will also ASSERT().
    376375
    377376  If an error is returned, then the Destination is unmodified.
     
    474473  If Destination is not aligned on a 16-bit boundary, then ASSERT().
    475474  If Source is not aligned on a 16-bit boundary, then ASSERT().
    476   If an error would be returned, then the function will also ASSERT().
    477475
    478476  If an error is returned, then the Destination is unmodified.
     
    591589  valid decimal character or a Null-terminator, whichever one comes first.
    592590
    593   If String is NULL, then ASSERT().
    594   If Data is NULL, then ASSERT().
    595591  If String is not aligned in a 16-bit boundary, then ASSERT().
    596   If PcdMaximumUnicodeStringLength is not zero, and String contains more than
    597   PcdMaximumUnicodeStringLength Unicode characters, not including the
    598   Null-terminator, then ASSERT().
    599592
    600593  If String has no valid decimal digits in the above format, then 0 is stored
     
    706699  valid decimal character or a Null-terminator, whichever one comes first.
    707700
    708   If String is NULL, then ASSERT().
    709   If Data is NULL, then ASSERT().
    710701  If String is not aligned in a 16-bit boundary, then ASSERT().
    711   If PcdMaximumUnicodeStringLength is not zero, and String contains more than
    712   PcdMaximumUnicodeStringLength Unicode characters, not including the
    713   Null-terminator, then ASSERT().
    714702
    715703  If String has no valid decimal digits in the above format, then 0 is stored
     
    826814  whichever one comes first.
    827815
    828   If String is NULL, then ASSERT().
    829   If Data is NULL, then ASSERT().
    830816  If String is not aligned in a 16-bit boundary, then ASSERT().
    831   If PcdMaximumUnicodeStringLength is not zero, and String contains more than
    832   PcdMaximumUnicodeStringLength Unicode characters, not including the
    833   Null-terminator, then ASSERT().
    834817
    835818  If String has no valid hexadecimal digits in the above format, then 0 is
     
    957940  whichever one comes first.
    958941
    959   If String is NULL, then ASSERT().
    960   If Data is NULL, then ASSERT().
    961942  If String is not aligned in a 16-bit boundary, then ASSERT().
    962   If PcdMaximumUnicodeStringLength is not zero, and String contains more than
    963   PcdMaximumUnicodeStringLength Unicode characters, not including the
    964   Null-terminator, then ASSERT().
    965943
    966944  If String has no valid hexadecimal digits in the above format, then 0 is
     
    10921070  The "::" can only appear once in the String.
    10931071
    1094   If String is NULL, then ASSERT().
    1095 
    1096   If Address is NULL, then ASSERT().
    1097 
    10981072  If String is not aligned in a 16-bit boundary, then ASSERT().
    1099 
    1100   If PcdMaximumUnicodeStringLength is not zero, and String contains more than
    1101   PcdMaximumUnicodeStringLength Unicode characters, not including the
    1102   Null-terminator, then ASSERT().
    11031073
    11041074  If EndPointer is not NULL and Address is translated from String, a pointer
     
    13181288  a valid decimal digit character after P is converted.
    13191289
    1320   If String is NULL, then ASSERT().
    1321 
    1322   If Address is NULL, then ASSERT().
    1323 
    13241290  If String is not aligned in a 16-bit boundary, then ASSERT().
    1325 
    1326   If PcdMaximumUnicodeStringLength is not zero, and String contains more than
    1327   PcdMaximumUnicodeStringLength Unicode characters, not including the
    1328   Null-terminator, then ASSERT().
    13291291
    13301292  If EndPointer is not NULL and Address is translated from String, a pointer
     
    14831445                  pp          Data4[56:63]
    14841446
    1485   If String is NULL, then ASSERT().
    1486   If Guid is NULL, then ASSERT().
    14871447  If String is not aligned in a 16-bit boundary, then ASSERT().
    14881448
     
    15891549
    15901550  If String is not aligned in a 16-bit boundary, then ASSERT().
    1591 
    1592   If String is NULL, then ASSERT().
    1593 
    1594   If Buffer is NULL, then ASSERT().
    1595 
    1596   If Length is not multiple of 2, then ASSERT().
    1597 
    1598   If PcdMaximumUnicodeStringLength is not zero and Length is greater than
    1599   PcdMaximumUnicodeStringLength, then ASSERT().
    1600 
    1601   If MaxBufferSize is less than (Length / 2), then ASSERT().
    16021551
    16031552  @param  String                   Pointer to a Null-terminated Unicode string.
     
    17801729  This function is similar as strcpy_s defined in C11.
    17811730
    1782   If an error would be returned, then the function will also ASSERT().
    1783 
    17841731  If an error is returned, then the Destination is unmodified.
    17851732
     
    18561803
    18571804  This function is similar as strncpy_s defined in C11.
    1858 
    1859   If an error would be returned, then the function will also ASSERT().
    18601805
    18611806  If an error is returned, then the Destination is unmodified.
     
    19441889
    19451890  This function is similar as strcat_s defined in C11.
    1946 
    1947   If an error would be returned, then the function will also ASSERT().
    19481891
    19491892  If an error is returned, then the Destination is unmodified.
     
    20401983
    20411984  This function is similar as strncat_s defined in C11.
    2042 
    2043   If an error would be returned, then the function will also ASSERT().
    20441985
    20451986  If an error is returned, then the Destination is unmodified.
     
    21552096  valid decimal character or a Null-terminator, whichever one comes first.
    21562097
    2157   If String is NULL, then ASSERT().
    2158   If Data is NULL, then ASSERT().
    2159   If PcdMaximumAsciiStringLength is not zero, and String contains more than
    2160   PcdMaximumAsciiStringLength Ascii characters, not including the
    2161   Null-terminator, then ASSERT().
    2162 
    21632098  If String has no valid decimal digits in the above format, then 0 is stored
    21642099  at the location pointed to by Data.
     
    22672202  valid decimal character or a Null-terminator, whichever one comes first.
    22682203
    2269   If String is NULL, then ASSERT().
    2270   If Data is NULL, then ASSERT().
    2271   If PcdMaximumAsciiStringLength is not zero, and String contains more than
    2272   PcdMaximumAsciiStringLength Ascii characters, not including the
    2273   Null-terminator, then ASSERT().
    2274 
    22752204  If String has no valid decimal digits in the above format, then 0 is stored
    22762205  at the location pointed to by Data.
     
    23832312  whichever on comes first.
    23842313
    2385   If String is NULL, then ASSERT().
    2386   If Data is NULL, then ASSERT().
    2387   If PcdMaximumAsciiStringLength is not zero, and String contains more than
    2388   PcdMaximumAsciiStringLength Ascii characters, not including the
    2389   Null-terminator, then ASSERT().
    2390 
    23912314  If String has no valid hexadecimal digits in the above format, then 0 is
    23922315  stored at the location pointed to by Data.
     
    25102433  whichever on comes first.
    25112434
    2512   If String is NULL, then ASSERT().
    2513   If Data is NULL, then ASSERT().
    2514   If PcdMaximumAsciiStringLength is not zero, and String contains more than
    2515   PcdMaximumAsciiStringLength Ascii characters, not including the
    2516   Null-terminator, then ASSERT().
    2517 
    25182435  If String has no valid hexadecimal digits in the above format, then 0 is
    25192436  stored at the location pointed to by Data.
     
    26362553
    26372554  If Source is not aligned on a 16-bit boundary, then ASSERT().
    2638   If an error would be returned, then the function will also ASSERT().
    26392555
    26402556  If an error is returned, then the Destination is unmodified.
     
    27362652  bits, then ASSERT().
    27372653  If Source is not aligned on a 16-bit boundary, then ASSERT().
    2738   If an error would be returned, then the function will also ASSERT().
    27392654
    27402655  If an error is returned, then Destination and DestinationLength are
     
    28562771
    28572772  If Destination is not aligned on a 16-bit boundary, then ASSERT().
    2858   If an error would be returned, then the function will also ASSERT().
    28592773
    28602774  If an error is returned, then the Destination is unmodified.
     
    29492863
    29502864  If Destination is not aligned on a 16-bit boundary, then ASSERT().
    2951   If an error would be returned, then the function will also ASSERT().
    29522865
    29532866  If an error is returned, then Destination and DestinationLength are
     
    30722985  "::" can be used to compress one or more groups of X when X contains only 0.
    30732986  The "::" can only appear once in the String.
    3074 
    3075   If String is NULL, then ASSERT().
    3076 
    3077   If Address is NULL, then ASSERT().
    30782987
    30792988  If EndPointer is not NULL and Address is translated from String, a pointer
     
    32913200  When /P is in the String, the function stops at the first character that is not
    32923201  a valid decimal digit character after P is converted.
    3293 
    3294   If String is NULL, then ASSERT().
    3295 
    3296   If Address is NULL, then ASSERT().
    32973202
    32983203  If EndPointer is not NULL and Address is translated from String, a pointer
     
    34493354                  pp          Data4[56:63]
    34503355
    3451   If String is NULL, then ASSERT().
    3452   If Guid is NULL, then ASSERT().
    3453 
    34543356  @param  String                   Pointer to a Null-terminated ASCII string.
    34553357  @param  Guid                     Pointer to the converted GUID.
     
    35503452  decoding stops after Length of characters and outputs Buffer containing
    35513453  (Length / 2) bytes.
    3552 
    3553   If String is NULL, then ASSERT().
    3554 
    3555   If Buffer is NULL, then ASSERT().
    3556 
    3557   If Length is not multiple of 2, then ASSERT().
    3558 
    3559   If PcdMaximumAsciiStringLength is not zero and Length is greater than
    3560   PcdMaximumAsciiStringLength, then ASSERT().
    3561 
    3562   If MaxBufferSize is less than (Length / 2), then ASSERT().
    35633454
    35643455  @param  String                   Pointer to a Null-terminated ASCII string.
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BasePeCoffLib/BasePeCoff.c

    r80721 r85718  
    11/** @file
    22  Base PE/COFF loader supports loading any PE32/PE32+ or TE image, but
    3   only supports relocating IA32, x64, IPF, and EBC images.
     3  only supports relocating IA32, x64, IPF, ARM, RISC-V and EBC images.
    44
    55  Caution: This file requires additional review when modified.
     
    1818  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
    1919  Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
     20  Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
    2021  SPDX-License-Identifier: BSD-2-Clause-Patent
    2122
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf

    r80721 r85718  
    44#  The IA32 version library support loading IA32, X64 and EBC PE/COFF images.
    55#  The X64 version library support loading IA32, X64 and EBC PE/COFF images.
     6#  The RISC-V version library support loading RISC-V images.
    67#
    78#  Caution: This module requires additional review when modified.
     
    1213#  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
    1314#  Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
     15#  Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
    1416#
    1517#  SPDX-License-Identifier: BSD-2-Clause-Patent
     
    4244  Arm/PeCoffLoaderEx.c
    4345
     46[Sources.RISCV64]
     47  RiscV/PeCoffLoaderEx.c
     48
    4449[Packages]
    4550  MdePkg/MdePkg.dec
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BasePeCoffLib/BasePeCoffLib.uni

    r80721 r85718  
    55// The IA32 version library support loading IA32, X64 and EBC PE/COFF images.
    66// The X64 version library support loading IA32, X64 and EBC PE/COFF images.
     7// The RISC-V version library support loading RISC-V32 and RISC-V64 PE/COFF images.
    78//
    89// Caution: This module requires additional review when modified.
     
    1314// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
    1415// Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
     16// Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
    1517//
    1618// SPDX-License-Identifier: BSD-2-Clause-Patent
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BasePeCoffLib/BasePeCoffLibInternals.h

    r80721 r85718  
    33
    44  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
     5  Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
    56  SPDX-License-Identifier: BSD-2-Clause-Patent
    67
     
    1718#include <IndustryStandard/PeImage.h>
    1819
     20//
     21// Macro definitions for RISC-V architecture.
     22//
     23#define RV_X(x, s, n) (((x) >> (s)) & ((1<<(n))-1))
     24#define RISCV_IMM_BITS 12
     25#define RISCV_IMM_REACH (1LL<<RISCV_IMM_BITS)
     26#define RISCV_CONST_HIGH_PART(VALUE) \
     27  (((VALUE) + (RISCV_IMM_REACH/2)) & ~(RISCV_IMM_REACH-1))
    1928
    2029
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf

    r80721 r85718  
    77#  Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
    88# Copyright (c) 2017, Microsoft Corporation
     9#  Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
     10
    911#
    1012# All rights reserved.
     
    2426# The following information is for reference only and not required by the build tools.
    2527#
    26 #  VALID_ARCHITECTURES           = IA32 X64
     28#  VALID_ARCHITECTURES           = IA32 X64 ARM AARCH64 RISCV64
    2729#
    2830
     
    3335  SafeIntLib32.c
    3436
    35 [Sources.X64, Sources.AARCH64]
     37[Sources.X64, Sources.AARCH64, Sources.RISCV64]
    3638  SafeIntLib64.c
    3739
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BaseSafeIntLib/SafeIntLib.c

    r80721 r85718  
    33813381      // a * d must be less than 2^32 or there would be bits set in the high 64-bits
    33823382      //
    3383       ProductAD = (((UINT64)DwordA) *(UINT64)DwordD);
     3383      ProductAD = MultU64x64 ((UINT64)DwordA, (UINT64)DwordD);
    33843384      if ((ProductAD & 0xffffffff00000000) == 0) {
    33853385        DwordB = (UINT32)Multiplicand;
     
    33883388        // b * c must be less than 2^32 or there would be bits set in the high 64-bits
    33893389        //
    3390         ProductBC = (((UINT64)DwordB) *(UINT64)DwordC);
     3390        ProductBC = MultU64x64 ((UINT64)DwordB, (UINT64)DwordC);
    33913391        if ((ProductBC & 0xffffffff00000000) == 0) {
    33923392          //
     
    33983398            // b * d
    33993399            //
    3400             ProductBD = (((UINT64)DwordB) *(UINT64)DwordD);
     3400            ProductBD = MultU64x64 ((UINT64)DwordB, (UINT64)DwordD);
    34013401
    34023402            if (!RETURN_ERROR (SafeUint64Add (UnsignedResult, ProductBD, &UnsignedResult))) {
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf

    r80721 r85718  
    44#  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
    55#  Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
     6#  Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
    67#
    78#  SPDX-License-Identifier: BSD-2-Clause-Patent
     
    7980  AArch64/Synchronization.asm   | MSFT
    8081
     82[Sources.RISCV64]
     83  Synchronization.c
     84  RiscV64/Synchronization.S
     85
    8186[Packages]
    8287  MdePkg/MdePkg.dec
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.c

    r80721 r85718  
    151151  If DecodeHandler is NULL, then ASSERT().
    152152
    153   @param[in]  SectionGuid    A pointer to the GUID associated with the the handlers
     153  @param[in]  SectionGuid    A pointer to the GUID associated with the handlers
    154154                             of the GUIDed section type being registered.
    155155  @param[in]  GetInfoHandler The pointer to a function that examines a GUIDed section and returns the
     
    232232  If GUID for InputSection does not match any of the GUIDs registered through ExtractGuidedSectionRegisterHandlers(),
    233233  then RETURN_UNSUPPORTED is returned.
    234   If the GUID of InputSection does match the GUID that this handler supports, then the the associated handler
     234  If the GUID of InputSection does match the GUID that this handler supports, then the associated handler
    235235  of type EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER that was registered with ExtractGuidedSectionRegisterHandlers()
    236   is used to retrieve the OututBufferSize, ScratchSize, and Attributes values. The return status from the handler of
     236  is used to retrieve the OutputBufferSize, ScratchSize, and Attributes values. The return status from the handler of
    237237  type EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER is returned.
    238238
     
    312312  If GUID for InputSection does not match any of the GUIDs registered through ExtractGuidedSectionRegisterHandlers(),
    313313  then RETURN_UNSUPPORTED is returned.
    314   If the GUID of InputSection does match the GUID that this handler supports, then the the associated handler
     314  If the GUID of InputSection does match the GUID that this handler supports, then the associated handler
    315315  of type EXTRACT_GUIDED_SECTION_DECODE_HANDLER that was registered with ExtractGuidedSectionRegisterHandlers()
    316316  is used to decode InputSection into the buffer specified by OutputBuffer and the authentication status of this
     
    398398  If SectionGuid is NULL, then ASSERT().
    399399
    400   @param[in]  SectionGuid    A pointer to the GUID associated with the handlersof the GUIDed
     400  @param[in]  SectionGuid    A pointer to the GUID associated with the handlers of the GUIDed
    401401                             section type being retrieved.
    402402  @param[out] GetInfoHandler Pointer to a function that examines a GUIDed section and returns
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/DxeHobLib/HobLib.c

    r80721 r85718  
    11/** @file
    2   HOB Library implemenation for Dxe Phase.
     2  HOB Library implementation for Dxe Phase.
    33
    44Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/DxeHstiLib/HstiDxe.c

    r80721 r85718  
    7878                    &InfoTypesBufferCount
    7979                    );
    80     if (EFI_ERROR (Status)) {
     80    if (EFI_ERROR (Status) || (InfoTypesBuffer == NULL) || (InfoTypesBufferCount == 0)) {
    8181      continue;
    8282    }
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/DxeIoLibCpuIo2/IoLib.c

    r80721 r85718  
    1212
    1313//
    14 // Globle varible to cache pointer to CpuIo2 protocol.
     14// Global variable to cache pointer to CpuIo2 protocol.
    1515//
    1616EFI_CPU_IO2_PROTOCOL  *mCpuIo = NULL;
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/DxePcdLib/DxePcdLib.inf

    r80721 r85718  
    1717#  in their initialization without any issues to access Dynamic and DynamicEx PCD. They can't
    1818#  access Dynamic and DynamicEx PCD in the implementation of runtime services and SMI handlers.
    19 #  Because EFI_PCD_PROTOCOL is DXE protocol that is not aviable in OS runtime phase.
     19#  Because EFI_PCD_PROTOCOL is DXE protocol that is not available in OS runtime phase.
    2020#
    2121# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/DxePcdLib/DxePcdLib.uni

    r80721 r85718  
    2323#string STR_MODULE_ABSTRACT             #language en-US "PCD Library using PCD Protocol"
    2424
    25 #string STR_MODULE_DESCRIPTION          #language en-US "There are two PCD protocols: 1) PCD_PROTOCOL It is an EDKII implementation that supporst Dynamic/DynamicEx PCDs. 2) EFI_PCD_PROTOCOL It is defined by PI Specification 1.2, Vol 3, which only support dynamicEx type PCD.  For dynamicEx type PCDs, it is compatible between PCD_PROTOCOL and EFI_PCD_PROTOCOL.  This library instance uses the PCD_PROTOCOL to handle dynamic PCD requests and uses EFI_PCD_PROTOCOL to handle DynamicEx type PCDs."
     25#string STR_MODULE_DESCRIPTION          #language en-US "There are two PCD protocols: 1) PCD_PROTOCOL It is an EDKII implementation that supports Dynamic/DynamicEx PCDs. 2) EFI_PCD_PROTOCOL It is defined by PI Specification 1.2, Vol 3, which only support dynamicEx type PCD.  For dynamicEx type PCDs, it is compatible between PCD_PROTOCOL and EFI_PCD_PROTOCOL.  This library instance uses the PCD_PROTOCOL to handle dynamic PCD requests and uses EFI_PCD_PROTOCOL to handle DynamicEx type PCDs."
    2626
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c

    r80721 r85718  
    7878  }
    7979
    80   return SystemTable->BootServices->CreateEventEx (EVT_NOTIFY_SIGNAL,
     80  return SystemTable->BootServices->CreateEvent (EVT_SIGNAL_EXIT_BOOT_SERVICES,
    8181                                      TPL_NOTIFY, ExitBootServicesEvent, NULL,
    82                                       &gEfiEventExitBootServicesGuid,
    8382                                      &mEfiExitBootServicesEvent);
    8483}
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf

    r80721 r85718  
    4242  SerialPortLib
    4343
    44 [Guids]
    45   gEfiEventExitBootServicesGuid                         ## CONSUMES ## Event
    46 
    4744[Pcd]
    4845  gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue     ## SOMETIMES_CONSUMES
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/DxeRuntimePciExpressLib/DxeRuntimePciExpressLib.inf

    r80721 r85718  
    4848[Pcd]
    4949  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress  ## CONSUMES
    50 
    51 [Guids]
    52   gEfiEventVirtualAddressChangeGuid         ## CONSUMES ## Event
    53 
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/DxeRuntimePciExpressLib/PciExpressLib.c

    r80721 r85718  
    125125  // Register SetVirtualAddressMap () notify function
    126126  //
    127   Status = gBS->CreateEventEx (
    128                   EVT_NOTIFY_SIGNAL,
     127  Status = gBS->CreateEvent (
     128                  EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
    129129                  TPL_NOTIFY,
    130130                  DxeRuntimePciExpressLibVirtualNotify,
    131131                  NULL,
    132                   &gEfiEventVirtualAddressChangeGuid,
    133132                  &mDxeRuntimePciExpressLibVirtualNotifyEvent
    134133                  );
     
    300299
    301300  //
    302   // See if Address has already been registerd for runtime access
     301  // See if Address has already been registered for runtime access
    303302  //
    304303  for (Index = 0; Index < mDxeRuntimePciExpressLibNumberOfRuntimeRanges; Index++) {
     
    14581457  configuration registers from a single PCI function to be read. Size is
    14591458  returned. When possible 32-bit PCI configuration read cycles are used to read
    1460   from StartAdress to StartAddress + Size. Due to alignment restrictions, 8-bit
     1459  from StartAddress to StartAddress + Size. Due to alignment restrictions, 8-bit
    14611460  and 16-bit PCI configuration read cycles may be used at the beginning and the
    14621461  end of the range.
     
    15611560  configuration registers from a single PCI function to be written. Size is
    15621561  returned. When possible 32-bit PCI configuration write cycles are used to
    1563   write from StartAdress to StartAddress + Size. Due to alignment restrictions,
     1562  write from StartAddress to StartAddress + Size. Due to alignment restrictions,
    15641563  8-bit and 16-bit PCI configuration write cycles may be used at the beginning
    15651564  and the end of the range.
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/DxeServicesLib/DxeServicesLib.c

    r80721 r85718  
    2626  Identify the device handle from which the Image is loaded from. As this device handle is passed to
    2727  GetSectionFromFv as the identifier for a Firmware Volume, an EFI_FIRMWARE_VOLUME2_PROTOCOL
    28   protocol instance should be located succesfully by calling gBS->HandleProtocol ().
     28  protocol instance should be located successfully by calling gBS->HandleProtocol ().
    2929
    3030  This function locates the EFI_LOADED_IMAGE_PROTOCOL instance installed
     
    5050
    5151  Status = gBS->HandleProtocol (
    52              (EFI_HANDLE *) ImageHandle,
     52             ImageHandle,
    5353             &gEfiLoadedImageProtocolGuid,
    5454             (VOID **) &LoadedImage
     
    7272
    7373  This functions first locate the EFI_FIRMWARE_VOLUME2_PROTOCOL protocol instance on FvHandle in order to
    74   carry out the Firmware Volume read operation. The function then reads the Firmware Section found sepcifed
     74  carry out the Firmware Volume read operation. The function then reads the Firmware Section found specified
    7575  by NameGuid, SectionType and SectionInstance.
    7676
     
    9595  @param  SectionInstance         The instance number of Firmware Section to
    9696                                  read from starting from 0.
    97   @param  Buffer                  On output, Buffer contains the the data read
     97  @param  Buffer                  On output, Buffer contains the data read
    9898                                  from the section in the Firmware File found.
    9999  @param  Size                    On output, the size of Buffer.
     
    518518
    519519/**
    520   Searches the FFS file the the currently executing module was loaded from and returns the first matching FFS section.
     520  Searches the FFS file the currently executing module was loaded from and returns the first matching FFS section.
    521521
    522522  This function searches the FFS file that the currently executing module was loaded from for a FFS sections of type SectionType.
     
    598598                                        match an exact file to be loaded.
    599599  @param[in]       FilePath             The pointer to the device path of the file
    600                                         that is absracted to the file buffer.
     600                                        that is abstracted to the file buffer.
    601601  @param[out]      FileSize             The pointer to the size of the abstracted
    602602                                        file buffer.
     
    746746        //
    747747        // Parse each MEDIA_FILEPATH_DP node. There may be more than one, since the
    748         // directory information and filename can be seperate. The goal is to inch
     748        // directory information and filename can be separate. The goal is to inch
    749749        // our way down each device path node and close the previous node
    750750        //
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/DxeServicesLib/DxeServicesLib.inf

    r80721 r85718  
    2323
    2424#
    25 #  VALID_ARCHITECTURES           = IA32 X64 EBC ARM AARCH64
     25#  VALID_ARCHITECTURES           = IA32 X64 EBC ARM AARCH64 RISCV64
    2626#
    2727
     
    2929  DxeServicesLib.c
    3030
    31 [Sources.IA32, Sources.EBC, Sources.ARM, Sources.AARCH64]
     31[Sources.IA32, Sources.EBC, Sources.ARM, Sources.AARCH64, Sources.RISCV64]
    3232  Allocate.c
    3333
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.c

    r80721 r85718  
    1010  initialized.
    1111
    12   This library contains contruct function to retrieve EFI_DXE_SERIVCE, this construct
     12  This library contains construct function to retrieve EFI_DXE_SERVICE, this construct
    1313  function will be invoked in DXE driver's autogen file.
    1414
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/DxeSmbusLib/DxeSmbusLib.c

    r80721 r85718  
    1313
    1414//
    15 // Globle varible to cache pointer to Smbus protocol.
     15// Global variable to cache pointer to Smbus protocol.
    1616//
    1717EFI_SMBUS_HC_PROTOCOL      *mSmbus = NULL;
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/PciSegmentLibSegmentInfo/DxeRuntimePciSegmentLib.c

    r80721 r85718  
    110110  // Register SetVirtualAddressMap () notify function
    111111  //
    112   Status = gBS->CreateEventEx (
    113                   EVT_NOTIFY_SIGNAL,
     112  Status = gBS->CreateEvent (
     113                  EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
    114114                  TPL_NOTIFY,
    115115                  DxeRuntimePciSegmentLibVirtualNotify,
    116116                  NULL,
    117                   &gEfiEventVirtualAddressChangeGuid,
    118117                  &mDxeRuntimePciSegmentLibVirtualNotifyEvent
    119118                  );
     
    212211
    213212  //
    214   // See if Address has already been registerd for runtime access
     213  // See if Address has already been registered for runtime access
    215214  //
    216215  for (Index = 0; Index < mDxeRuntimePciSegmentLibNumberOfRuntimeRanges; Index++) {
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/PciSegmentLibSegmentInfo/DxeRuntimePciSegmentLibSegmentInfo.inf

    r80721 r85718  
    4646  DxeServicesTableLib
    4747  UefiBootServicesTableLib
    48 
    49 [Guids]
    50   gEfiEventVirtualAddressChangeGuid         ## CONSUMES ## Event
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/PciSegmentLibSegmentInfo/PciSegmentLibCommon.c

    r80721 r85718  
    11701170  configuration registers from a single PCI function to be read. Size is
    11711171  returned. When possible 32-bit PCI configuration read cycles are used to read
    1172   from StartAdress to StartAddress + Size. Due to alignment restrictions, 8-bit
     1172  from StartAddress to StartAddress + Size. Due to alignment restrictions, 8-bit
    11731173  and 16-bit PCI configuration read cycles may be used at the beginning and the
    11741174  end of the range.
     
    12731273  configuration registers from a single PCI function to be written. Size is
    12741274  returned. When possible 32-bit PCI configuration write cycles are used to
    1275   write from StartAdress to StartAddress + Size. Due to alignment restrictions,
     1275  write from StartAddress to StartAddress + Size. Due to alignment restrictions,
    12761276  8-bit and 16-bit PCI configuration write cycles may be used at the beginning
    12771277  and the end of the range.
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/SmmMemLib/SmmMemLib.c

    r80721 r85718  
    276276  @param  Length              The number of bytes to copy from SourceBuffer to DestinationBuffer.
    277277
    278   @retval EFI_SECURITY_VIOLATION The DesinationBuffer is invalid per processor architecture or overlap with SMRAM.
     278  @retval EFI_SECURITY_VIOLATION The DestinationBuffer is invalid per processor architecture or overlap with SMRAM.
    279279  @retval EFI_SUCCESS            Memory is copied.
    280280
     
    309309  @param  Length              The number of bytes to copy from SourceBuffer to DestinationBuffer.
    310310
    311   @retval EFI_SECURITY_VIOLATION The DesinationBuffer is invalid per processor architecture or overlap with SMRAM.
     311  @retval EFI_SECURITY_VIOLATION The DestinationBuffer is invalid per processor architecture or overlap with SMRAM.
    312312  @retval EFI_SECURITY_VIOLATION The SourceBuffer is invalid per processor architecture or overlap with SMRAM.
    313313  @retval EFI_SUCCESS            Memory is copied.
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/SmmPciExpressLib/PciExpressLib.c

    r80721 r85718  
    12271227 configuration registers from a single PCI function to be read. Size is
    12281228 returned. When possible 32-bit PCI configuration read cycles are used to read
    1229  from StartAdress to StartAddress + Size. Due to alignment restrictions, 8-bit
     1229 from StartAddress to StartAddress + Size. Due to alignment restrictions, 8-bit
    12301230 and 16-bit PCI configuration read cycles may be used at the beginning and the
    12311231 end of the range.
     
    13301330 configuration registers from a single PCI function to be written. Size is
    13311331 returned. When possible 32-bit PCI configuration write cycles are used to
    1332  write from StartAdress to StartAddress + Size. Due to alignment restrictions,
     1332 write from StartAddress to StartAddress + Size. Due to alignment restrictions,
    13331333 8-bit and 16-bit PCI configuration write cycles may be used at the beginning
    13341334 and the end of the range.
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/SmmPciLibPciRootBridgeIo/PciLib.c

    r80721 r85718  
    3636
    3737//
    38 // Global varible to cache pointer to PCI Root Bridge I/O protocol.
     38// Global variable to cache pointer to PCI Root Bridge I/O protocol.
    3939//
    4040EFI_SMM_PCI_ROOT_BRIDGE_IO_PROTOCOL      *mSmmPciRootBridgeIo = NULL;
     
    12391239  configuration registers from a single PCI function to be read. Size is
    12401240  returned. When possible 32-bit PCI configuration read cycles are used to read
    1241   from StartAdress to StartAddress + Size. Due to alignment restrictions, 8-bit
     1241  from StartAddress to StartAddress + Size. Due to alignment restrictions, 8-bit
    12421242  and 16-bit PCI configuration read cycles may be used at the beginning and the
    12431243  end of the range.
     
    13371337  configuration registers from a single PCI function to be written. Size is
    13381338  returned. When possible 32-bit PCI configuration write cycles are used to
    1339   write from StartAdress to StartAddress + Size. Due to alignment restrictions,
     1339  write from StartAddress to StartAddress + Size. Due to alignment restrictions,
    13401340  8-bit and 16-bit PCI configuration write cycles may be used at the beginning
    13411341  and the end of the range.
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/SmmPeriodicSmiLib/SmmPeriodicSmiLib.c

    r80721 r85718  
    108108  ///
    109109  /// The performance counter value that was captured the last time that the
    110   /// periodic SMI handler called PeriodcSmiExecutionTime().  This allows the
    111   /// time value returned by PeriodcSmiExecutionTime() to be accurate even when
     110  /// periodic SMI handler called PeriodicSmiExecutionTime().  This allows the
     111  /// time value returned by PeriodicSmiExecutionTime() to be accurate even when
    112112  /// the performance counter rolls over.
    113113  ///
     
    128128  /// Buffer used to save the context when a periodic SMI handler requests to
    129129  /// yield using PeriodicSmiYield().  This context is used to resume the
    130   /// execution of a periodic SMI handler the next time control is transferd
     130  /// execution of a periodic SMI handler the next time control is transferred
    131131  /// to the periodic SMI handler that yielded.
    132132  ///
     
    153153
    154154///
    155 /// Pointer to the SMM Periodic Timer Disatch Protocol that was located in the constuctor.
     155/// Pointer to the SMM Periodic Timer Dispatch Protocol that was located in the constructor.
    156156///
    157157EFI_SMM_PERIODIC_TIMER_DISPATCH2_PROTOCOL  *gSmmPeriodicTimerDispatch2           = NULL;
     
    523523  periodic SMI for the currently executing handler is triggered, the periodic
    524524  SMI handler will be resumed and this function will return.  Use of this
    525   function requires a seperate stack for the periodic SMI handler.  A non zero
     525  function requires a separate stack for the periodic SMI handler.  A non zero
    526526  stack size must be specified in PeriodicSmiEnable() for this function to be
    527527  used.
     
    573573  if (SetJumpFlag == 0) {
    574574    //
    575     // The intial call to SetJump() always returns 0.
     575    // The initial call to SetJump() always returns 0.
    576576    // If this is the initial call, then exit the current periodic SMI handler
    577577    //
     
    589589
    590590  //
    591   // Return the amount elapsed time that occured while yielded
     591  // Return the amount elapsed time that occurred while yielded
    592592  //
    593593  return PeriodicSmiLibraryHandler->ElapsedTime;
     
    621621  // Dispatch the registered handler passing in the context that was registered
    622622  // and the amount of time that has elapsed since the previous time this
    623   // periodic SMI handler was dispacthed.
     623  // periodic SMI handler was dispatched.
    624624  //
    625625  PeriodicSmiLibraryHandler->DispatchFunction (
     
    629629
    630630  //
    631   // If this DispatchFunction() returns, then unconditially call PeriodicSmiExit()
     631  // If this DispatchFunction() returns, then unconditionally call PeriodicSmiExit()
    632632  // to perform a LongJump() back to PeriodicSmiDispatchFunctionOnCpu(). The
    633   // LongJump() will resume exection on the original stack.
     633  // LongJump() will resume execution on the original stack.
    634634  //
    635635  PeriodicSmiExit ();
     
    638638/**
    639639  Internal worker function that transfers control to an enabled periodic SMI
    640   handler on the specified logial CPU.  This function determines if the periodic
     640  handler on the specified logical CPU.  This function determines if the periodic
    641641  SMI handler yielded and needs to be resumed.  It also and switches to an
    642642  allocated stack if one was allocated in PeriodicSmiEnable().
     
    653653{
    654654  //
    655   // Save context in DispatchJumpBuffer.  The intial call to SetJump() always
     655  // Save context in DispatchJumpBuffer.  The initial call to SetJump() always
    656656  // returns 0.  If this is the initial call, then either resume from a prior
    657   // call to PeriodicSmiYield() or call the DispatchFunction registerd in
     657  // call to PeriodicSmiYield() or call the DispatchFunction registered in
    658658  // PeriodicSmiEnable() using an allocated stack if one was specified.
    659659  //
     
    680680    // If Stack is NULL then call DispatchFunction using current stack passing
    681681    // in the context that was registered and the amount of time that has
    682     // elapsed since the previous time this periodic SMI handler was dispacthed.
     682    // elapsed since the previous time this periodic SMI handler was dispatched.
    683683    //
    684684    PeriodicSmiLibraryHandler->DispatchFunction (
     
    688688
    689689    //
    690     // If this DispatchFunction() returns, then unconditially call PeriodicSmiExit()
     690    // If this DispatchFunction() returns, then unconditionally call PeriodicSmiExit()
    691691    // to perform a LongJump() back to this function.
    692692    //
     
    713713/**
    714714  Internal worker function that transfers control to an enabled periodic SMI
    715   handler on the specified logial CPU.  This worker function is only called
     715  handler on the specified logical CPU.  This worker function is only called
    716716  using the SMM Services Table function SmmStartupThisAp() to execute the
    717717  periodic SMI handler on a logical CPU that is different than the one that is
     
    737737
    738738  //
    739   // Execute dispatch function on the currently excuting logical CPU
     739  // Execute dispatch function on the currently executing logical CPU
    740740  //
    741741  PeriodicSmiDispatchFunctionOnCpu (PeriodicSmiLibraryHandler);
     
    806806    //
    807807    // Dispatch on the currently execution CPU if the CPU specified in PeriodicSmiEnable()
    808     // was PERIODIC_SMI_LIBARRY_ANY_CPU or the currently executing CPU matches the CPU
     808    // was PERIODIC_SMI_LIBRARY_ANY_CPU or the currently executing CPU matches the CPU
    809809    // that was specified in PeriodicSmiEnable().
    810810    //
     
    868868  @param[in]     Context           Optional content to pass into DispatchFunction.
    869869  @param[in]     TickPeriod        The requested tick period in 100ns units that
    870                                    control should be givien to the periodic SMI
     870                                   control should be given to the periodic SMI
    871871                                   handler.  Must be one of the supported values
    872872                                   returned by PeriodicSmiSupportedPickPeriod().
     
    892892                                 periodic SMI handler.
    893893  @retval EFI_OUT_OF_RESOURCES   There are not enough resources to allocate the
    894                                  stack speficied by StackSize.
     894                                 stack specified by StackSize.
    895895  @retval EFI_SUCCESS            The periodic SMI handler was enabled.
    896896
     
    10781078  //
    10791079  // Count the number of periodic SMI tick intervals that the SMM Periodic Timer
    1080   // Dipatch 2 Protocol supports.
     1080  // Dispatch 2 Protocol supports.
    10811081  //
    10821082  SmiTickInterval = NULL;
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.c

    r80721 r85718  
    3737  // Retrieve SMM Base2 Protocol,  Do not use gBS from UefiBootServicesTableLib on purpose
    3838  // to prevent inclusion of gBS, gST, and gImageHandle from SMM Drivers unless the
    39   // SMM driver explicity declares that dependency.
     39  // SMM driver explicitly declares that dependency.
    4040  //
    4141  Status = SystemTable->BootServices->LocateProtocol (
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/UefiDebugLibConOut/DebugLib.c

    r80721 r85718  
    105105    //
    106106    if (BaseListMarker == NULL) {
    107       UnicodeVSPrintAsciiFormat (Buffer, MAX_DEBUG_MESSAGE_LENGTH, Format, VaListMarker);
     107      UnicodeVSPrintAsciiFormat (Buffer, sizeof (Buffer), Format, VaListMarker);
    108108    } else {
    109       UnicodeBSPrintAsciiFormat (Buffer, MAX_DEBUG_MESSAGE_LENGTH, Format, BaseListMarker);
     109      UnicodeBSPrintAsciiFormat (Buffer, sizeof (Buffer), Format, BaseListMarker);
    110110    }
    111111
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/UefiDebugLibConOut/DebugLibConstructor.c

    r80721 r85718  
    6565  mDebugST = SystemTable;
    6666
    67   SystemTable->BootServices->CreateEventEx (
    68                                 EVT_NOTIFY_SIGNAL,
     67  SystemTable->BootServices->CreateEvent (
     68                                EVT_SIGNAL_EXIT_BOOT_SERVICES,
    6969                                TPL_NOTIFY,
    7070                                ExitBootServicesCallback,
    7171                                NULL,
    72                                 &gEfiEventExitBootServicesGuid,
    7372                                &mExitBootServicesEvent
    7473                                );
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf

    r80721 r85718  
    4747  DebugPrintErrorLevelLib
    4848
    49 [Guids]
    50   gEfiEventExitBootServicesGuid                 ## CONSUMES
    51 
    5249[Pcd]
    5350  gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue        ## SOMETIMES_CONSUMES
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLibConstructor.c

    r80721 r85718  
    6565  mDebugBS = SystemTable->BootServices;
    6666
    67   mDebugBS->CreateEventEx (
    68               EVT_NOTIFY_SIGNAL,
     67  mDebugBS->CreateEvent (
     68              EVT_SIGNAL_EXIT_BOOT_SERVICES,
    6969              TPL_NOTIFY,
    7070              ExitBootServicesCallback,
    7171              NULL,
    72               &gEfiEventExitBootServicesGuid,
    7372              &mExitBootServicesEvent
    7473              );
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/UefiDebugLibDebugPortProtocol/UefiDebugLibDebugPortProtocol.inf

    r80721 r85718  
    4747  DebugPrintErrorLevelLib
    4848
    49 [Guids]
    50   gEfiEventExitBootServicesGuid                 ## CONSUMES
    51 
    5249[Protocols]
    5350  gEfiDebugPortProtocolGuid                     ## CONSUMES
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c

    r80721 r85718  
    107107    //
    108108    if (BaseListMarker == NULL) {
    109       UnicodeVSPrintAsciiFormat (Buffer, MAX_DEBUG_MESSAGE_LENGTH, Format, VaListMarker);
     109      UnicodeVSPrintAsciiFormat (Buffer, sizeof (Buffer), Format, VaListMarker);
    110110    } else {
    111       UnicodeBSPrintAsciiFormat (Buffer, MAX_DEBUG_MESSAGE_LENGTH, Format, BaseListMarker);
     111      UnicodeBSPrintAsciiFormat (Buffer, sizeof (Buffer), Format, BaseListMarker);
    112112    }
    113113
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c

    r80721 r85718  
    6565  mDebugST = SystemTable;
    6666
    67   SystemTable->BootServices->CreateEventEx (
    68                                 EVT_NOTIFY_SIGNAL,
     67  SystemTable->BootServices->CreateEvent (
     68                                EVT_SIGNAL_EXIT_BOOT_SERVICES,
    6969                                TPL_NOTIFY,
    7070                                ExitBootServicesCallback,
    7171                                NULL,
    72                                 &gEfiEventExitBootServicesGuid,
    7372                                &mExitBootServicesEvent
    7473                                );
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf

    r80721 r85718  
    4545  DebugPrintErrorLevelLib
    4646
    47 [Guids]
    48   gEfiEventExitBootServicesGuid                 ## CONSUMES
    49 
    5047[Pcd]
    5148  gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue   ## SOMETIMES_CONSUMES
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c

    r80721 r85718  
    6969    //
    7070    FileInfo = AllocateZeroPool(FileInfoSize);
    71     //
    72     // now get the information
    73     //
    74     Status = FileHandle->GetInfo(FileHandle,
    75                                  &gEfiFileInfoGuid,
    76                                  &FileInfoSize,
    77                                  FileInfo);
    78     //
    79     // if we got an error free the memory and return NULL
    80     //
    81     if (EFI_ERROR(Status) && (FileInfo != NULL)) {
    82       FreePool(FileInfo);
    83       FileInfo = NULL;
     71    if (FileInfo != NULL) {
     72      //
     73      // now get the information
     74      //
     75      Status = FileHandle->GetInfo(FileHandle,
     76                                   &gEfiFileInfoGuid,
     77                                   &FileInfoSize,
     78                                   FileInfo);
     79      //
     80      // if we got an error free the memory and return NULL
     81      //
     82      if (EFI_ERROR(Status)) {
     83        FreePool(FileInfo);
     84        FileInfo = NULL;
     85      }
    8486    }
    8587  }
     
    816818      } else {
    817819        //
     820        // Prepare to move to the parent directory.
     821        // Also determine whether CurrentHandle refers to the Root directory.
     822        //
     823        Status = CurrentHandle->Open (CurrentHandle, &NextHigherHandle, L"..", EFI_FILE_MODE_READ, 0);
     824        //
    818825        // We got info... do we have a name? if yes precede the current path with it...
    819826        //
    820         if (StrLen (FileInfo->FileName) == 0) {
     827        if ((StrLen (FileInfo->FileName) == 0) || EFI_ERROR (Status)) {
     828          //
     829          // Both FileInfo->FileName being '\0' and EFI_ERROR() suggest that
     830          // CurrentHandle refers to the Root directory.  As this loop ensures
     831          // FullFileName is starting with '\\' at all times, signal success
     832          // and exit the loop.
     833          // While FileInfo->FileName could theoretically be a value other than
     834          // '\0' or '\\', '\\' is guaranteed to be supported by the
     835          // specification and hence its value can safely be ignored.
     836          //
     837          Status = EFI_SUCCESS;
    821838          if (*FullFileName == NULL) {
    822839            ASSERT((*FullFileName == NULL && Size == 0) || (*FullFileName != NULL));
     
    836853        }
    837854      }
     855
     856      FileHandleClose(CurrentHandle);
    838857      //
    839858      // Move to the parent directory
    840859      //
    841       Status = CurrentHandle->Open (CurrentHandle, &NextHigherHandle, L"..", EFI_FILE_MODE_READ, 0);
    842       if (EFI_ERROR (Status)) {
    843         break;
    844       }
    845 
    846       FileHandleClose(CurrentHandle);
    847860      CurrentHandle = NextHigherHandle;
    848861    }
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/UefiLib/UefiLib.c

    r80721 r85718  
    639639  FreePool (OpenInfoBuffer);
    640640  return Status;
     641}
     642
     643/**
     644  This function checks the supported languages list for a target language,
     645  This only supports RFC 4646 Languages.
     646
     647  @param  SupportedLanguages  The supported languages
     648  @param  TargetLanguage      The target language
     649
     650  @retval Returns EFI_SUCCESS if the language is supported,
     651          EFI_UNSUPPORTED otherwise
     652**/
     653EFI_STATUS
     654EFIAPI
     655IsLanguageSupported (
     656  IN CONST CHAR8 *SupportedLanguages,
     657  IN CONST CHAR8 *TargetLanguage
     658  )
     659{
     660  UINTN Index;
     661  while (*SupportedLanguages != 0) {
     662    for (Index = 0; SupportedLanguages[Index] != 0 && SupportedLanguages[Index] != ';'; Index++);
     663    if ((AsciiStrnCmp(SupportedLanguages, TargetLanguage, Index) == 0) && (TargetLanguage[Index] == 0)) {
     664      return EFI_SUCCESS;
     665    }
     666    SupportedLanguages += Index;
     667    for (; *SupportedLanguages != 0 && *SupportedLanguages == ';'; SupportedLanguages++);
     668  }
     669
     670  return EFI_UNSUPPORTED;
    641671}
    642672
     
    801831  //
    802832  Found = FALSE;
    803   while (*SupportedLanguages != 0) {
    804     if (Iso639Language) {
     833  if (Iso639Language) {
     834    while (*SupportedLanguages != 0) {
    805835      if (CompareIso639LanguageCode (Language, SupportedLanguages)) {
    806836        Found = TRUE;
     
    808838      }
    809839      SupportedLanguages += 3;
    810     } else {
    811       for (Index = 0; SupportedLanguages[Index] != 0 && SupportedLanguages[Index] != ';'; Index++);
    812       if ((AsciiStrnCmp(SupportedLanguages, Language, Index) == 0) && (Language[Index] == 0)) {
    813         Found = TRUE;
    814         break;
    815       }
    816       SupportedLanguages += Index;
    817       for (; *SupportedLanguages != 0 && *SupportedLanguages == ';'; SupportedLanguages++);
    818840    }
    819   }
     841  } else {
     842    Found = !IsLanguageSupported(Language, SupportedLanguages);
     843  }
     844
    820845
    821846  //
     
    11001125  //
    11011126  Found = FALSE;
    1102   while (*SupportedLanguages != 0) {
    1103     if (Iso639Language) {
     1127  if (Iso639Language) {
     1128    while (*SupportedLanguages != 0) {
    11041129      if (CompareIso639LanguageCode (Language, SupportedLanguages)) {
    11051130        Found = TRUE;
     
    11071132      }
    11081133      SupportedLanguages += 3;
    1109     } else {
    1110       for (Index = 0; SupportedLanguages[Index] != 0 && SupportedLanguages[Index] != ';'; Index++);
    1111       if (AsciiStrnCmp(SupportedLanguages, Language, Index) == 0) {
    1112         Found = TRUE;
    1113         break;
    1114       }
    1115       SupportedLanguages += Index;
    1116       for (; *SupportedLanguages != 0 && *SupportedLanguages == ';'; SupportedLanguages++);
    11171134    }
    1118   }
    1119 
     1135  } else {
     1136    Found = !IsLanguageSupported(Language, SupportedLanguages);
     1137  }
    11201138  //
    11211139  // If Language is not a member of SupportedLanguages, then return EFI_UNSUPPORTED
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c

    r80721 r85718  
    9494  // Register SetVirtualAddressMap () notify function
    9595  //
    96   Status = gBS->CreateEventEx (
    97                   EVT_NOTIFY_SIGNAL,
     96  Status = gBS->CreateEvent (
     97                  EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
    9898                  TPL_NOTIFY,
    9999                  RuntimeLibVirtualNotifyEvent,
    100100                  NULL,
    101                   &gEfiEventVirtualAddressChangeGuid,
    102101                  &mEfiVirtualNotifyEvent
    103102                  );
     
    105104  ASSERT_EFI_ERROR (Status);
    106105
    107   Status = gBS->CreateEventEx (
    108                   EVT_NOTIFY_SIGNAL,
     106  Status = gBS->CreateEvent (
     107                  EVT_SIGNAL_EXIT_BOOT_SERVICES,
    109108                  TPL_NOTIFY,
    110109                  RuntimeLibExitBootServicesEvent,
    111110                  NULL,
    112                   &gEfiEventExitBootServicesGuid,
    113111                  &mEfiExitBootServicesEvent
    114112                  );
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf

    r80721 r85718  
    4040  UefiRuntimeServicesTableLib
    4141  DebugLib
    42 
    43 [Guids]
    44   gEfiEventExitBootServicesGuid             ## CONSUMES ## Event
    45   gEfiEventVirtualAddressChangeGuid         ## CONSUMES ## Event
    46 
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/UefiScsiLib/UefiScsiLib.c

    r80721 r85718  
    22  UEFI SCSI Library implementation
    33
    4   Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
     4  Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
    55  SPDX-License-Identifier: BSD-2-Clause-Patent
    66
     
    2424#define EFI_SCSI_OP_LENGTH_SIX      0x6
    2525#define EFI_SCSI_OP_LENGTH_TEN      0xa
     26#define EFI_SCSI_OP_LENGTH_TWELVE   0xc
    2627#define EFI_SCSI_OP_LENGTH_SIXTEEN  0x10
    2728
     
    10551056  ZeroMem (Cdb, EFI_SCSI_OP_LENGTH_TEN);
    10561057
    1057   CommandPacket.Timeout         = Timeout;
    1058   CommandPacket.OutDataBuffer    = DataBuffer;
    1059   CommandPacket.SenseData       = SenseData;
    1060   CommandPacket.OutTransferLength= *DataLength;
    1061   CommandPacket.Cdb             = Cdb;
     1058  CommandPacket.Timeout           = Timeout;
     1059  CommandPacket.OutDataBuffer     = DataBuffer;
     1060  CommandPacket.SenseData         = SenseData;
     1061  CommandPacket.OutTransferLength = *DataLength;
     1062  CommandPacket.Cdb               = Cdb;
    10621063  //
    10631064  // Fill Cdb for Write (10) Command
    10641065  //
    10651066  Cdb[0]                        = EFI_SCSI_OP_WRITE10;
     1067  Cdb[1]                        = EFI_SCSI_BLOCK_FUA;
    10661068  WriteUnaligned32 ((UINT32 *)&Cdb[2], SwapBytes32 (StartLba));
    10671069  WriteUnaligned16 ((UINT16 *)&Cdb[7], SwapBytes16 ((UINT16) SectorSize));
     
    12631265  //
    12641266  Cdb[0]                        = EFI_SCSI_OP_WRITE16;
     1267  Cdb[1]                        = EFI_SCSI_BLOCK_FUA;
    12651268  WriteUnaligned64 ((UINT64 *)&Cdb[2], SwapBytes64 (StartLba));
    12661269  WriteUnaligned32 ((UINT32 *)&Cdb[10], SwapBytes32 (SectorSize));
     
    12761279  *SenseDataLength              = CommandPacket.SenseDataLength;
    12771280  *DataLength                   = CommandPacket.OutTransferLength;
     1281
     1282  return Status;
     1283}
     1284
     1285
     1286/**
     1287  Execute Security Protocol In SCSI command on a specific SCSI target.
     1288
     1289  Executes the SCSI Security Protocol In command on the SCSI target specified by ScsiIo.
     1290  If Timeout is zero, then this function waits indefinitely for the command to complete.
     1291  If Timeout is greater than zero, then the command is executed and will timeout after
     1292  Timeout 100 ns units.
     1293  If ScsiIo is NULL, then ASSERT().
     1294  If SenseDataLength is NULL, then ASSERT().
     1295  If HostAdapterStatus is NULL, then ASSERT().
     1296  If TargetStatus is NULL, then ASSERT().
     1297  If TransferLength is NULL, then ASSERT().
     1298
     1299  If SenseDataLength is non-zero and SenseData is not NULL, SenseData must meet buffer
     1300  alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
     1301  gets returned.
     1302
     1303  If DataLength is non-zero and DataBuffer is not NULL, DataBuffer must meet buffer
     1304  alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
     1305  gets returned.
     1306
     1307  @param[in]      ScsiIo                    SCSI IO Protocol to use.
     1308  @param[in]      Timeout                   The length of timeout period.
     1309  @param[in, out] SenseData                 A pointer to output sense data.
     1310  @param[in, out] SenseDataLength           The length of output sense data.
     1311  @param[out]     HostAdapterStatus         The status of Host Adapter.
     1312  @param[out]     TargetStatus              The status of the target.
     1313  @param[in]      SecurityProtocol          The Security Protocol to use.
     1314  @param[in]      SecurityProtocolSpecific  The Security Protocol Specific data.
     1315  @param[in]      Inc512                    If TRUE, 512 increment (INC_512) bit will be set for the
     1316                                            SECURITY PROTOCOL IN command.
     1317  @param[in]      DataLength                The size in bytes of the data buffer.
     1318  @param[in, out] DataBuffer                A pointer to a data buffer.
     1319  @param[out]     TransferLength            A pointer to a buffer to store the size in
     1320                                            bytes of the data written to the data buffer.
     1321
     1322  @retval  EFI_SUCCESS                 Command is executed successfully.
     1323  @retval  EFI_BAD_BUFFER_SIZE         The SCSI Request Packet was executed, but the entire DataBuffer could
     1324                                       not be transferred. The actual number of bytes transferred is returned in TransferLength.
     1325  @retval  EFI_NOT_READY               The SCSI Request Packet could not be sent because there are too many
     1326                                       SCSI Command Packets already queued.
     1327  @retval  EFI_DEVICE_ERROR            A device error occurred while attempting to send SCSI Request Packet.
     1328  @retval  EFI_UNSUPPORTED             The command described by the SCSI Request Packet is not supported by
     1329                                       the SCSI initiator(i.e., SCSI  Host Controller)
     1330  @retval  EFI_TIMEOUT                 A timeout occurred while waiting for the SCSI Request Packet to execute.
     1331  @retval  EFI_INVALID_PARAMETER       The contents of the SCSI Request Packet are invalid.
     1332
     1333**/
     1334EFI_STATUS
     1335EFIAPI
     1336ScsiSecurityProtocolInCommand (
     1337  IN     EFI_SCSI_IO_PROTOCOL  *ScsiIo,
     1338  IN     UINT64                Timeout,
     1339  IN OUT VOID                  *SenseData,   OPTIONAL
     1340  IN OUT UINT8                 *SenseDataLength,
     1341     OUT UINT8                 *HostAdapterStatus,
     1342     OUT UINT8                 *TargetStatus,
     1343  IN     UINT8                 SecurityProtocol,
     1344  IN     UINT16                SecurityProtocolSpecific,
     1345  IN     BOOLEAN               Inc512,
     1346  IN     UINTN                 DataLength,
     1347  IN OUT VOID                  *DataBuffer,  OPTIONAL
     1348     OUT UINTN                 *TransferLength
     1349  )
     1350{
     1351  EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket;
     1352  EFI_STATUS                      Status;
     1353  UINT8                           Cdb[EFI_SCSI_OP_LENGTH_TWELVE];
     1354
     1355  ASSERT (SenseDataLength != NULL);
     1356  ASSERT (HostAdapterStatus != NULL);
     1357  ASSERT (TargetStatus != NULL);
     1358  ASSERT (ScsiIo != NULL);
     1359  ASSERT (TransferLength != NULL);
     1360  ASSERT (DataLength <= MAX_UINT32);
     1361
     1362  ZeroMem (&CommandPacket, sizeof (EFI_SCSI_IO_SCSI_REQUEST_PACKET));
     1363  ZeroMem (Cdb, EFI_SCSI_OP_LENGTH_TWELVE);
     1364
     1365  CommandPacket.Timeout           = Timeout;
     1366  CommandPacket.InDataBuffer      = DataBuffer;
     1367  CommandPacket.SenseData         = SenseData;
     1368  CommandPacket.InTransferLength  = (UINT32) DataLength;
     1369  CommandPacket.Cdb               = Cdb;
     1370  //
     1371  // Fill Cdb for Security Protocol In Command
     1372  //
     1373  Cdb[0]                        = EFI_SCSI_OP_SECURITY_PROTOCOL_IN;
     1374  Cdb[1]                        = SecurityProtocol;
     1375  WriteUnaligned16 ((UINT16 *)&Cdb[2], SwapBytes16 (SecurityProtocolSpecific));
     1376
     1377  if (Inc512) {
     1378    if (DataLength % 512 != 0) {
     1379      return EFI_INVALID_PARAMETER;
     1380    }
     1381    Cdb[4]                      = BIT7;
     1382    WriteUnaligned32 ((UINT32 *)&Cdb[6], SwapBytes32 ((UINT32) DataLength / 512));
     1383  } else {
     1384    WriteUnaligned32 ((UINT32 *)&Cdb[6], SwapBytes32 ((UINT32) DataLength));
     1385  }
     1386
     1387  CommandPacket.CdbLength       = EFI_SCSI_OP_LENGTH_TWELVE;
     1388  CommandPacket.DataDirection   = EFI_SCSI_DATA_IN;
     1389  CommandPacket.SenseDataLength = *SenseDataLength;
     1390
     1391  Status                        = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL);
     1392
     1393  *HostAdapterStatus            = CommandPacket.HostAdapterStatus;
     1394  *TargetStatus                 = CommandPacket.TargetStatus;
     1395  *SenseDataLength              = CommandPacket.SenseDataLength;
     1396  *TransferLength               = (UINTN) CommandPacket.InTransferLength;
     1397
     1398  return Status;
     1399}
     1400
     1401
     1402/**
     1403  Execute Security Protocol Out SCSI command on a specific SCSI target.
     1404
     1405  Executes the SCSI Security Protocol Out command on the SCSI target specified by ScsiIo.
     1406  If Timeout is zero, then this function waits indefinitely for the command to complete.
     1407  If Timeout is greater than zero, then the command is executed and will timeout after
     1408  Timeout 100 ns units.
     1409  If ScsiIo is NULL, then ASSERT().
     1410  If SenseDataLength is NULL, then ASSERT().
     1411  If HostAdapterStatus is NULL, then ASSERT().
     1412  If TargetStatus is NULL, then ASSERT().
     1413
     1414  If SenseDataLength is non-zero and SenseData is not NULL, SenseData must meet buffer
     1415  alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
     1416  gets returned.
     1417
     1418  If DataLength is non-zero and DataBuffer is not NULL, DataBuffer must meet buffer
     1419  alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
     1420  gets returned.
     1421
     1422  @param[in]      ScsiIo                    SCSI IO Protocol to use.
     1423  @param[in]      Timeout                   The length of timeout period.
     1424  @param[in, out] SenseData                 A pointer to output sense data.
     1425  @param[in, out] SenseDataLength           The length of output sense data.
     1426  @param[out]     HostAdapterStatus         The status of Host Adapter.
     1427  @param[out]     TargetStatus              The status of the target.
     1428  @param[in]      SecurityProtocol          The Security Protocol to use.
     1429  @param[in]      SecurityProtocolSpecific  The Security Protocol Specific data.
     1430  @param[in]      Inc512                    If TRUE, 512 increment (INC_512) bit will be set for the
     1431                                            SECURITY PROTOCOL OUT command.
     1432  @param[in]      DataLength                The size in bytes of the transfer data.
     1433  @param[in, out] DataBuffer                A pointer to a data buffer.
     1434
     1435  @retval  EFI_SUCCESS                 Command is executed successfully.
     1436  @retval  EFI_BAD_BUFFER_SIZE         The SCSI Request Packet was executed, but the entire DataBuffer could
     1437                                       not be transferred. The actual number of bytes transferred is returned in DataLength.
     1438  @retval  EFI_NOT_READY               The SCSI Request Packet could not be sent because there are too many
     1439                                       SCSI Command Packets already queued.
     1440  @retval  EFI_DEVICE_ERROR            A device error occurred while attempting to send SCSI Request Packet.
     1441  @retval  EFI_UNSUPPORTED             The command described by the SCSI Request Packet is not supported by
     1442                                       the SCSI initiator(i.e., SCSI  Host Controller)
     1443  @retval  EFI_TIMEOUT                 A timeout occurred while waiting for the SCSI Request Packet to execute.
     1444  @retval  EFI_INVALID_PARAMETER       The contents of the SCSI Request Packet are invalid.
     1445
     1446**/
     1447EFI_STATUS
     1448EFIAPI
     1449ScsiSecurityProtocolOutCommand (
     1450  IN     EFI_SCSI_IO_PROTOCOL  *ScsiIo,
     1451  IN     UINT64                Timeout,
     1452  IN OUT VOID                  *SenseData,   OPTIONAL
     1453  IN OUT UINT8                 *SenseDataLength,
     1454     OUT UINT8                 *HostAdapterStatus,
     1455     OUT UINT8                 *TargetStatus,
     1456  IN     UINT8                 SecurityProtocol,
     1457  IN     UINT16                SecurityProtocolSpecific,
     1458  IN     BOOLEAN               Inc512,
     1459  IN     UINTN                 DataLength,
     1460  IN OUT VOID                  *DataBuffer   OPTIONAL
     1461  )
     1462{
     1463  EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket;
     1464  EFI_STATUS                      Status;
     1465  UINT8                           Cdb[EFI_SCSI_OP_LENGTH_TWELVE];
     1466
     1467  ASSERT (SenseDataLength != NULL);
     1468  ASSERT (HostAdapterStatus != NULL);
     1469  ASSERT (TargetStatus != NULL);
     1470  ASSERT (ScsiIo != NULL);
     1471  ASSERT (DataLength <= MAX_UINT32);
     1472
     1473  ZeroMem (&CommandPacket, sizeof (EFI_SCSI_IO_SCSI_REQUEST_PACKET));
     1474  ZeroMem (Cdb, EFI_SCSI_OP_LENGTH_TWELVE);
     1475
     1476  CommandPacket.Timeout           = Timeout;
     1477  CommandPacket.OutDataBuffer     = DataBuffer;
     1478  CommandPacket.SenseData         = SenseData;
     1479  CommandPacket.OutTransferLength = (UINT32) DataLength;
     1480  CommandPacket.Cdb               = Cdb;
     1481  //
     1482  // Fill Cdb for Security Protocol Out Command
     1483  //
     1484  Cdb[0]                        = EFI_SCSI_OP_SECURITY_PROTOCOL_OUT;
     1485  Cdb[1]                        = SecurityProtocol;
     1486  WriteUnaligned16 ((UINT16 *)&Cdb[2], SwapBytes16 (SecurityProtocolSpecific));
     1487
     1488  if (Inc512) {
     1489    if (DataLength % 512 != 0) {
     1490      return EFI_INVALID_PARAMETER;
     1491    }
     1492    Cdb[4]                      = BIT7;
     1493    WriteUnaligned32 ((UINT32 *)&Cdb[6], SwapBytes32 ((UINT32) DataLength / 512));
     1494  } else {
     1495    WriteUnaligned32 ((UINT32 *)&Cdb[6], SwapBytes32 ((UINT32) DataLength));
     1496  }
     1497
     1498  CommandPacket.CdbLength       = EFI_SCSI_OP_LENGTH_TWELVE;
     1499  CommandPacket.DataDirection   = EFI_SCSI_DATA_OUT;
     1500  CommandPacket.SenseDataLength = *SenseDataLength;
     1501
     1502  Status                        = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL);
     1503
     1504  *HostAdapterStatus            = CommandPacket.HostAdapterStatus;
     1505  *TargetStatus                 = CommandPacket.TargetStatus;
     1506  *SenseDataLength              = CommandPacket.SenseDataLength;
    12781507
    12791508  return Status;
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/MdePkg.dec

    r80721 r85718  
    77# Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.<BR>
    88# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
    9 # (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
     9# (C) Copyright 2016 - 2020 Hewlett Packard Enterprise Development LP<BR>
    1010#
    1111# SPDX-License-Identifier: BSD-2-Clause-Patent
     
    4040  Include/AArch64
    4141
     42[Includes.RISCV64]
     43  Include/RiscV64
     44
    4245[LibraryClasses]
    4346  ##  @libraryclass  Provides most usb APIs to support the Hid requests defined in Usb Hid 1.1 spec
     
    132135  ##                 PCI configuration and enable the PCI operations to be replayed during an
    133136  ##                 S3 resume. This library class maps directly on top of the PciSegmentLib class.
    134   S3PciSegmentLib|Include/Library/PciSegmentLib.h
     137  S3PciSegmentLib|Include/Library/S3PciSegmentLib.h
    135138
    136139  ##  @libraryclass  Provides services to access PCI Configuration Space.
     
    245248  StandaloneMmDriverEntryPoint|Include/Library/StandaloneMmDriverEntryPoint.h
    246249
     250  ## @libraryclass Provides a unit test framework
     251  #
     252  UnitTestLib|Include/Library/UnitTestLib.h
     253
    247254[LibraryClasses.IA32, LibraryClasses.X64]
    248255  ##  @libraryclass  Abstracts both S/W SMI generation and detection.
     
    429436  ## Include/Guid/Cper.h
    430437  gEfiEventNotificationTypeDmarGuid  = { 0x667DD791, 0xC6B3, 0x4c27, { 0x8A, 0x6B, 0x0F, 0x8E, 0x72, 0x2D, 0xEB, 0x41 }}
     438
     439  ## Include/Guid/Cper.h
     440  gEfiEventNotificationTypeSeaGuid   = { 0x9A78788A, 0xBBE8, 0x11E4, { 0x80, 0x9E, 0x67, 0x61, 0x1E, 0x5D, 0x46, 0xB0 }}
     441
     442  ## Include/Guid/Cper.h
     443  gEfiEventNotificationTypeSeiGuid   = { 0x5C284C81, 0xB0AE, 0x4E87, { 0xA3, 0x22, 0xB0, 0x4C, 0x85, 0x62, 0x43, 0x23 }}
     444
     445  ## Include/Guid/Cper.h
     446  gEfiEventNotificationTypePeiGuid   = { 0x09A9D5AC, 0x5204, 0x4214, { 0x96, 0xE5, 0x94, 0x99, 0x2E, 0x75, 0x2B, 0xCD }}
    431447
    432448  ## Include/Guid/Cper.h
     
    575591  #
    576592
    577   ## Include/Guid/PropertiesTable.h
    578   gEfiPropertiesTableGuid        = { 0x880aaca3, 0x4adc, 0x4a04, {0x90, 0x79, 0xb7, 0x47, 0x34, 0x8, 0x25, 0xe5 }}
    579 
    580593  ## Include/Guid/SystemResourceTable.h
    581594  gEfiSystemResourceTableGuid    = { 0xb122a263, 0x3661, 0x4f68, {0x99, 0x29, 0x78, 0xf8, 0xb0, 0xd6, 0x21, 0x80 }}
     
    642655  gEfiBttAbstractionGuid         = { 0x18633bfc, 0x1735, 0x4217, { 0x8a, 0xc9, 0x17, 0x23, 0x92, 0x82, 0xd3, 0xf8 }}
    643656
     657  # GUIDs defined in UEFI2.8
     658  #
     659  ## Include/Guid/JsonCapsule.h
     660  gEfiJsonConfigDataTableGuid      = { 0x87367f87, 0x1119, 0x41ce, { 0xaa, 0xec, 0x8b, 0xe0, 0x11, 0x1f, 0x55, 0x8a }}
     661  gEfiJsonCapsuleDataTableGuid     = { 0x35e7a725, 0x8dd2, 0x4cac, { 0x80, 0x11, 0x33, 0xcd, 0xa8, 0x10, 0x90, 0x56 }}
     662  gEfiJsonCapsuleResultTableGuid   = { 0xdbc461c3, 0xb3de, 0x422a, { 0xb9, 0xb4, 0x98, 0x86, 0xfd, 0x49, 0xa1, 0xe5 }}
     663  gEfiJsonCapsuleIdGuid            = { 0x67d6f4cd, 0xd6b8, 0x4573, { 0xbf, 0x4a, 0xde, 0x5e, 0x25, 0x2d, 0x61, 0xae }}
     664
     665  ## Include/Guid/HiiPlatformSetupFormset.h
     666  gEfiHiiResetStyleFormsetGuid     = { 0x790217bd, 0xbecf, 0x485b, { 0x91, 0x70, 0x5f, 0xf7, 0x11, 0x31, 0x8b, 0x27 }}
     667
     668  # GUIDs defined in UEFI2.8a
     669  #
     670  ## Include/Guid/RtPropertiesTable.h
     671  gEfiRtPropertiesTableGuid      = { 0xeb66918a, 0x7eef, 0x402a, { 0x84, 0x2e, 0x93, 0x1d, 0x21, 0xc3, 0x8a, 0xe9 }}
     672
    644673  #
    645674  # GUID defined in PI1.0
     
    942971  gEfiPeiCoreFvLocationPpiGuid   = { 0x52888eae, 0x5b10, 0x47d0, { 0xa8, 0x7f, 0xb8, 0x22, 0xab, 0xa0, 0xca, 0xf4 }}
    943972
     973  ## Include/Ppi/DelayedDispatch.h
     974  gEfiPeiDelayedDispatchPpiGuid  = { 0x869c711d, 0x649c, 0x44fe, { 0x8b, 0x9e, 0x2c, 0xbb, 0x29, 0x11, 0xc3, 0xe6 }}
     975
    944976[Protocols]
    945977  ## Include/Protocol/Pcd.h
     
    12761308  ## Include/Protocol/SpiSmmNorFlash.h
    12771309  gEfiSpiSmmNorFlashProtocolGuid         = { 0xaab18f19, 0xfe14, 0x4666, { 0x86, 0x04, 0x87, 0xff, 0x6d, 0x66, 0x2c, 0x9a }}
     1310
     1311  #
     1312  # Protocols defined in PI 1.7.
     1313  #
     1314
     1315  ## Include/Protocol/MmCommunication2.h
     1316  gEfiMmCommunication2ProtocolGuid  = { 0x378daedc, 0xf06b, 0x4446, { 0x83, 0x14, 0x40, 0xab, 0x93, 0x3c, 0x87, 0xa3 }}
    12781317
    12791318  #
  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/MdePkg.dsc

    r80721 r85718  
    44# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
    55# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
     6# (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
    67#
    78#    SPDX-License-Identifier: BSD-2-Clause-Patent
     
    1516  DSC_SPECIFICATION              = 0x00010005
    1617  OUTPUT_DIRECTORY               = Build/Mde
    17   SUPPORTED_ARCHITECTURES        = IA32|X64|EBC|ARM|AARCH64
     18  SUPPORTED_ARCHITECTURES        = IA32|X64|EBC|ARM|AARCH64|RISCV64
    1819  BUILD_TARGETS                  = DEBUG|RELEASE|NOOPT
    1920  SKUID_IDENTIFIER               = DEFAULT
     21
     22!include UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc
    2023
    2124[PcdsFeatureFlag]
     
    2730  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xE0000000
    2831
     32[LibraryClasses]
     33  SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
     34
    2935[Components]
     36  MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
    3037  MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
    3138  MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
     
    6168  MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf
    6269  MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
     70  MdePkg/Library/BaseRngLibNull/BaseRngLibNull.inf
    6371
    6472  MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
     
    114122  MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLib.inf
    115123
     124[Components.IA32, Components.X64, Components.ARM, Components.AARCH64]
     125  #
     126  # Add UEFI Target Based Unit Tests
     127  #
     128  MdePkg/Test/UnitTest/Library/BaseLib/BaseLibUnitTestsUefi.inf
     129
     130  #
     131  # Build PEIM, DXE_DRIVER, SMM_DRIVER, UEFI Shell components that test SafeIntLib
     132  #
     133  MdePkg/Test/UnitTest/Library/BaseSafeIntLib/TestBaseSafeIntLibPei.inf
     134  MdePkg/Test/UnitTest/Library/BaseSafeIntLib/TestBaseSafeIntLibDxe.inf
     135  MdePkg/Test/UnitTest/Library/BaseSafeIntLib/TestBaseSafeIntLibSmm.inf
     136  MdePkg/Test/UnitTest/Library/BaseSafeIntLib/TestBaseSafeIntLibUefiShell.inf
     137
    116138[Components.IA32, Components.X64]
    117139  MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
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