]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[efi] Update to current EDK2 headers
authorMichael Brown <mcb30@ipxe.org>
Mon, 10 Mar 2025 11:19:26 +0000 (11:19 +0000)
committerMichael Brown <mcb30@ipxe.org>
Mon, 10 Mar 2025 12:34:35 +0000 (12:34 +0000)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 files changed:
src/include/ipxe/efi/Base.h
src/include/ipxe/efi/Guid/Rng.h [new file with mode: 0644]
src/include/ipxe/efi/IndustryStandard/Acpi30.h
src/include/ipxe/efi/IndustryStandard/Acpi40.h
src/include/ipxe/efi/IndustryStandard/Acpi50.h
src/include/ipxe/efi/IndustryStandard/Acpi51.h
src/include/ipxe/efi/IndustryStandard/Acpi60.h
src/include/ipxe/efi/Pi/PiHob.h
src/include/ipxe/efi/Pi/PiStatusCode.h
src/include/ipxe/efi/Protocol/PxeBaseCode.h
src/include/ipxe/efi/Protocol/Rng.h
src/include/ipxe/efi/Uefi/UefiSpec.h

index abc4e4627655754a934859489533a8b0e6c33e50..ff90beef53b2e4676ee68fd614c0f903e794b33f 100644 (file)
@@ -802,12 +802,12 @@ typedef UINTN *BASE_LIST;
   @param  Message     Raised compiler diagnostic message when expression is false.
 
 **/
-#ifdef MDE_CPU_EBC
-#define STATIC_ASSERT(Expression, Message)
-#elif defined (_MSC_EXTENSIONS) || defined (__cplusplus)
+#if defined (__cplusplus)
 #define STATIC_ASSERT  static_assert
-#else
+#elif defined (__GNUC__) || defined (__clang__)
 #define STATIC_ASSERT  _Static_assert
+#elif defined (_MSC_EXTENSIONS)
+#define STATIC_ASSERT  static_assert
 #endif
 
 //
@@ -890,7 +890,7 @@ STATIC_ASSERT (ALIGNOF (__VERIFY_INT32_ENUM_SIZE) == sizeof (__VERIFY_INT32_ENUM
   @return  A pointer to the structure from one of it's elements.
 
 **/
-#define BASE_CR(Record, TYPE, Field)  ((TYPE *) ((CHAR8 *) (Record) - OFFSET_OF (TYPE, Field)))
+#define BASE_CR(Record, TYPE, Field)  ((TYPE *) (VOID *) ((CHAR8 *) (Record) - OFFSET_OF (TYPE, Field)))
 
 /**
   Checks whether a value is a power of two.
diff --git a/src/include/ipxe/efi/Guid/Rng.h b/src/include/ipxe/efi/Guid/Rng.h
new file mode 100644 (file)
index 0000000..26f6375
--- /dev/null
@@ -0,0 +1,157 @@
+/** @file
+  Random Number Generator (RNG) GUIDs and structures shared across RNG interfaces.
+
+  Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) Microsoft Corporation.
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef RNG_GUID_H_
+#define RNG_GUID_H_
+
+FILE_LICENCE ( BSD2_PATENT );
+
+typedef struct _EFI_RNG_INTERFACE EFI_RNG_INTERFACE;
+
+///
+/// A selection of EFI_RNG_PROTOCOL algorithms.
+/// The algorithms listed are optional, not meant to be exhaustive and be argmented by
+/// vendors or other industry standards.
+///
+typedef EFI_GUID EFI_RNG_ALGORITHM;
+
+///
+/// The algorithms corresponds to SP800-90 as defined in
+/// NIST SP 800-90, "Recommendation for Random Number Generation Using Deterministic Random
+/// Bit Generators", March 2007.
+///
+#define EFI_RNG_ALGORITHM_SP800_90_HASH_256_GUID \
+  { \
+    0xa7af67cb, 0x603b, 0x4d42, {0xba, 0x21, 0x70, 0xbf, 0xb6, 0x29, 0x3f, 0x96 } \
+  }
+#define EFI_RNG_ALGORITHM_SP800_90_HMAC_256_GUID \
+  { \
+    0xc5149b43, 0xae85, 0x4f53, {0x99, 0x82, 0xb9, 0x43, 0x35, 0xd3, 0xa9, 0xe7 } \
+  }
+#define EFI_RNG_ALGORITHM_SP800_90_CTR_256_GUID \
+  { \
+    0x44f0de6e, 0x4d8c, 0x4045, {0xa8, 0xc7, 0x4d, 0xd1, 0x68, 0x85, 0x6b, 0x9e } \
+  }
+
+///
+/// The algorithms correspond to X9.31 as defined in
+/// NIST, "Recommended Random Number Generator Based on ANSI X9.31 Appendix A.2.4 Using
+/// the 3-Key Triple DES and AES Algorithm", January 2005.
+///
+#define EFI_RNG_ALGORITHM_X9_31_3DES_GUID \
+  { \
+    0x63c4785a, 0xca34, 0x4012, {0xa3, 0xc8, 0x0b, 0x6a, 0x32, 0x4f, 0x55, 0x46 } \
+  }
+#define EFI_RNG_ALGORITHM_X9_31_AES_GUID \
+  { \
+    0xacd03321, 0x777e, 0x4d3d, {0xb1, 0xc8, 0x20, 0xcf, 0xd8, 0x88, 0x20, 0xc9 } \
+  }
+
+///
+/// The "raw" algorithm, when supported, is intended to provide entropy directly from
+/// the source, without it going through some deterministic random bit generator.
+///
+#define EFI_RNG_ALGORITHM_RAW \
+  { \
+    0xe43176d7, 0xb6e8, 0x4827, {0xb7, 0x84, 0x7f, 0xfd, 0xc4, 0xb6, 0x85, 0x61 } \
+  }
+
+///
+/// The Arm Architecture states the RNDR that the DRBG algorithm should be compliant
+/// with NIST SP800-90A, while not mandating a particular algorithm, so as to be
+/// inclusive of different geographies.
+///
+#define EFI_RNG_ALGORITHM_ARM_RNDR \
+  { \
+    0x43d2fde3, 0x9d4e, 0x4d79,  {0x02, 0x96, 0xa8, 0x9b, 0xca, 0x78, 0x08, 0x41} \
+  }
+
+/**
+  Returns information about the random number generation implementation.
+
+  @param[in]     This                 A pointer to this interface instance.
+  @param[in,out] RNGAlgorithmListSize On input, the size in bytes of RNGAlgorithmList.
+                                      On output with a return code of EFI_SUCCESS, the size
+                                      in bytes of the data returned in RNGAlgorithmList. On output
+                                      with a return code of EFI_BUFFER_TOO_SMALL,
+                                      the size of RNGAlgorithmList required to obtain the list.
+  @param[out] RNGAlgorithmList        A caller-allocated memory buffer filled by the driver
+                                      with one EFI_RNG_ALGORITHM element for each supported
+                                      RNG algorithm. The list must not change across multiple
+                                      calls to the same driver. The first algorithm in the list
+                                      is the default algorithm for the driver.
+
+  @retval EFI_SUCCESS                 The RNG algorithm list was returned successfully.
+  @retval EFI_UNSUPPORTED             The services is not supported by this driver.
+  @retval EFI_DEVICE_ERROR            The list of algorithms could not be retrieved due to a
+                                      hardware or firmware error.
+  @retval EFI_INVALID_PARAMETER       One or more of the parameters are incorrect.
+  @retval EFI_BUFFER_TOO_SMALL        The buffer RNGAlgorithmList is too small to hold the result.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_RNG_GET_INFO)(
+  IN EFI_RNG_INTERFACE            *This,
+  IN OUT UINTN                    *RNGAlgorithmListSize,
+  OUT EFI_RNG_ALGORITHM           *RNGAlgorithmList
+  );
+
+/**
+  Produces and returns an RNG value using either the default or specified RNG algorithm.
+
+  @param[in]  This                    A pointer to this interface instance.
+  @param[in]  RNGAlgorithm            A pointer to the EFI_RNG_ALGORITHM that identifies the RNG
+                                      algorithm to use. May be NULL in which case the function will
+                                      use its default RNG algorithm.
+  @param[in]  RNGValueLength          The length in bytes of the memory buffer pointed to by
+                                      RNGValue. The driver shall return exactly this numbers of bytes.
+  @param[out] RNGValue                A caller-allocated memory buffer filled by the driver with the
+                                      resulting RNG value.
+
+  @retval EFI_SUCCESS                 The RNG value was returned successfully.
+  @retval EFI_UNSUPPORTED             The algorithm specified by RNGAlgorithm is not supported by
+                                      this driver.
+  @retval EFI_DEVICE_ERROR            An RNG value could not be retrieved due to a hardware or
+                                      firmware error.
+  @retval EFI_NOT_READY               There is not enough random data available to satisfy the length
+                                      requested by RNGValueLength.
+  @retval EFI_INVALID_PARAMETER       RNGValue is NULL or RNGValueLength is zero.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_RNG_GET_RNG)(
+  IN EFI_RNG_INTERFACE           *This,
+  IN EFI_RNG_ALGORITHM           *RNGAlgorithm  OPTIONAL,
+  IN UINTN                       RNGValueLength,
+  OUT UINT8                      *RNGValue
+  );
+
+///
+/// The Random Number Generator (RNG) interface provides random bits for use in
+/// applications, or entropy for seeding other random number generators.
+///
+/// This interface is shared between the RNG Protocol defined in the UEFI 2.4 Specification
+/// and the RNG PPI defined in the PI 1.9 Specification.
+///
+struct _EFI_RNG_INTERFACE {
+  EFI_RNG_GET_INFO    GetInfo;
+  EFI_RNG_GET_RNG     GetRNG;
+};
+
+extern EFI_GUID  gEfiRngAlgorithmSp80090Hash256Guid;
+extern EFI_GUID  gEfiRngAlgorithmSp80090Hmac256Guid;
+extern EFI_GUID  gEfiRngAlgorithmSp80090Ctr256Guid;
+extern EFI_GUID  gEfiRngAlgorithmX9313DesGuid;
+extern EFI_GUID  gEfiRngAlgorithmX931AesGuid;
+extern EFI_GUID  gEfiRngAlgorithmRaw;
+extern EFI_GUID  gEfiRngAlgorithmArmRndr;
+
+#endif // #ifndef RNG_GUID_H_
index ff82bf20327521a3345d5df470920c54d6de1d8c..867f26d3653400c9c9abc6d3fece7da697e230cb 100644 (file)
@@ -2,6 +2,7 @@
   ACPI 3.0 definitions from the ACPI Specification Revision 3.0b October 10, 2006
 
   Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+  Copyright (C) 2025, Advanced Micro Devices, Inc. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 **/
 
@@ -12,6 +13,16 @@ FILE_LICENCE ( BSD2_PATENT );
 
 #include <ipxe/efi/IndustryStandard/Acpi20.h>
 
+///
+/// _CSD Revision for ACPI 3.0
+///
+#define EFI_ACPI_3_0_AML_CSD_REVISION  0
+
+///
+/// _CSD NumEntries for ACPI 3.0
+///
+#define EFI_ACPI_3_0_AML_CSD_NUM_ENTRIES  6
+
 //
 // Define for Descriptor
 //
index 97b817039776926c1d9bc26a01ea4d948b868a70..6b8a0c981fccc3e7138c57c0c2b9c86699856165 100644 (file)
@@ -2,6 +2,7 @@
   ACPI 4.0 definitions from the ACPI Specification Revision 4.0a April 5, 2010
 
   Copyright (c) 2010 - 2022, Intel Corporation. All rights reserved.<BR>
+  Copyright (C) 2025, Advanced Micro Devices, Inc. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 **/
 
@@ -12,6 +13,16 @@ FILE_LICENCE ( BSD2_PATENT );
 
 #include <ipxe/efi/IndustryStandard/Acpi30.h>
 
+///
+/// _CSD Revision for ACPI 4.0
+///
+#define EFI_ACPI_4_0_AML_CSD_REVISION  0
+
+///
+/// _CSD NumEntries for ACPI 4.0
+///
+#define EFI_ACPI_4_0_AML_CSD_NUM_ENTRIES  6
+
 ///
 /// _PSD Revision for ACPI 4.0
 ///
index 2addcb008f1a5b797ac546863fe218f5ca2b051a..6008582674b1d49dab239b94d0c035ad958bfc28 100644 (file)
@@ -4,6 +4,7 @@
   Copyright (c) 2014 Hewlett-Packard Development Company, L.P.<BR>
   Copyright (c) 2011 - 2022, Intel Corporation. All rights reserved.<BR>
   Copyright (c) 2020, ARM Ltd. All rights reserved.<BR>
+  Copyright (C) 2025, Advanced Micro Devices, Inc. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 **/
 
@@ -14,6 +15,16 @@ FILE_LICENCE ( BSD2_PATENT );
 
 #include <ipxe/efi/IndustryStandard/Acpi40.h>
 
+///
+/// _CSD Revision for ACPI 5.0
+///
+#define EFI_ACPI_5_0_AML_CSD_REVISION  0
+
+///
+/// _CSD NumEntries for ACPI 5.0
+///
+#define EFI_ACPI_5_0_AML_CSD_NUM_ENTRIES  6
+
 //
 // Define for Descriptor
 //
index 101d7b5d1b3bd22662319764022cb24ca3f1ffaf..de2ed987cd59b11ee3447d2133834fb2769c9b5b 100644 (file)
@@ -5,6 +5,7 @@
   Copyright (c) 2014 - 2022, Intel Corporation. All rights reserved.<BR>
   (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
   Copyright (c) 2020, ARM Ltd. All rights reserved.<BR>
+  Copyright (C) 2024, Advanced Micro Devices, Inc. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 **/
 
@@ -15,6 +16,16 @@ FILE_LICENCE ( BSD2_PATENT );
 
 #include <ipxe/efi/IndustryStandard/Acpi50.h>
 
+///
+/// _CSD Revision for ACPI 5.1
+///
+#define EFI_ACPI_5_1_AML_CSD_REVISION  0
+
+///
+/// _CSD NumEntries for ACPI 5.1
+///
+#define EFI_ACPI_5_1_AML_CSD_NUM_ENTRIES  6
+
 ///
 /// _PSD Revision for ACPI 5.1
 ///
index 19c51df5c672c119e5c72c1fc5254f5375c65d16..2b7d52ac48581a3151db7b0d271df715b5952634 100644 (file)
@@ -4,6 +4,7 @@
   Copyright (c) 2015 - 2022, Intel Corporation. All rights reserved.<BR>
   (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
   Copyright (c) 2020, ARM Ltd. All rights reserved.<BR>
+  Copyright (C) 2025, Advanced Micro Devices, Inc. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 **/
 
@@ -14,6 +15,16 @@ FILE_LICENCE ( BSD2_PATENT );
 
 #include <ipxe/efi/IndustryStandard/Acpi51.h>
 
+///
+/// _CSD Revision for ACPI 6.0
+///
+#define EFI_ACPI_6_0_AML_CSD_REVISION  0
+
+///
+/// _CSD NumEntries for ACPI 6.0
+///
+#define EFI_ACPI_6_0_AML_CSD_NUM_ENTRIES  6
+
 ///
 /// _PSD Revision for ACPI 6.0
 ///
index 1a19c34a080454b5d1cc38870bdfdf046edb830a..7cc19c61d053e6782d780c427d5c48909676e590 100644 (file)
@@ -5,7 +5,7 @@ Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
   @par Revision Reference:
-  PI Version 1.6
+  PI Version 1.9
 
 **/
 
@@ -293,6 +293,7 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE;
 
 #define EFI_RESOURCE_ATTRIBUTE_ENCRYPTED        0x04000000
 #define EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE  0x08000000
+#define EFI_RESOURCE_ATTRIBUTE_HOT_PLUGGABLE    0x10000000
 //
 // Physical memory relative reliability attribute. This
 // memory provides higher reliability relative to other
index 427e5061dc2c8228bfa820ef371fe8f0ce86d9a8..3bdc96edf7081d8a4859178fc8655fe67135c7fd 100644 (file)
@@ -2,6 +2,7 @@
   StatusCode related definitions in PI.
 
 Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
   @par Revision Reference:
@@ -142,6 +143,7 @@ typedef struct {
 #define EFI_COMPUTING_UNIT_CACHE               (EFI_COMPUTING_UNIT | 0x00040000)
 #define EFI_COMPUTING_UNIT_MEMORY              (EFI_COMPUTING_UNIT | 0x00050000)
 #define EFI_COMPUTING_UNIT_CHIPSET             (EFI_COMPUTING_UNIT | 0x00060000)
+#define EFI_COMPUTING_UNIT_MANAGEABILITY       (EFI_COMPUTING_UNIT | 0x00070000)
 ///@}
 
 ///
@@ -345,6 +347,16 @@ typedef struct {
 #define EFI_CHIPSET_EC_INTRUDER_DETECT  (EFI_SUBCLASS_SPECIFIC | 0x00000003)
 ///@}
 
+///
+/// Computing Unit Manageability Subclass Error Code definitions.
+/// The detail information is reported by REPORT_STATUS_CODE_WITH_EXTENDED_DATA
+//  with ASCII string in EFI_STATUS_CODE_STRING_DATA.
+///@{
+#define EFI_MANAGEABILITY_EC_REDFISH_COMMUNICATION_ERROR         (EFI_SUBCLASS_SPECIFIC | 0x00000000)
+#define EFI_MANAGEABILITY_EC_REDFISH_HOST_INTERFACE_ERROR        (EFI_SUBCLASS_SPECIFIC | 0x00000001)
+#define EFI_MANAGEABILITY_EC_REDFISH_BOOTSTRAP_CREDENTIAL_ERROR  (EFI_SUBCLASS_SPECIFIC | 0x00000002)
+///@}
+
 ///
 /// Peripheral Subclass definitions.
 /// Values of 12-127 are reserved for future use by this specification.
index 20efd72804215880b55a08c9985415a5dd062e86..212dd677bcb0bf6f1c37ebbd04c4b51d9ebdd228 100644 (file)
@@ -36,7 +36,7 @@ typedef EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE;
 ///
 /// Default IP TTL and ToS.
 ///
-#define DEFAULT_TTL  16
+#define DEFAULT_TTL  64
 #define DEFAULT_ToS  0
 
 ///
index 92d648bee8bef8c22b2b430df1cb86ccc97d82e0..a252a222c2453dfbe29a00f605fb4b235c2274cd 100644 (file)
@@ -8,11 +8,13 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
-#ifndef __EFI_RNG_PROTOCOL_H__
-#define __EFI_RNG_PROTOCOL_H__
+#ifndef EFI_RNG_PROTOCOL_H_
+#define EFI_RNG_PROTOCOL_H_
 
 FILE_LICENCE ( BSD2_PATENT );
 
+#include <ipxe/efi/Guid/Rng.h>
+
 ///
 /// Global ID for the Random Number Generator Protocol
 ///
@@ -21,142 +23,8 @@ FILE_LICENCE ( BSD2_PATENT );
     0x3152bca5, 0xeade, 0x433d, {0x86, 0x2e, 0xc0, 0x1c, 0xdc, 0x29, 0x1f, 0x44 } \
   }
 
-typedef struct _EFI_RNG_PROTOCOL EFI_RNG_PROTOCOL;
-
-///
-/// A selection of EFI_RNG_PROTOCOL algorithms.
-/// The algorithms listed are optional, not meant to be exhaustive and be argmented by
-/// vendors or other industry standards.
-///
-
-typedef EFI_GUID EFI_RNG_ALGORITHM;
-
-///
-/// The algorithms corresponds to SP800-90 as defined in
-/// NIST SP 800-90, "Recommendation for Random Number Generation Using Deterministic Random
-/// Bit Generators", March 2007.
-///
-#define EFI_RNG_ALGORITHM_SP800_90_HASH_256_GUID \
-  { \
-    0xa7af67cb, 0x603b, 0x4d42, {0xba, 0x21, 0x70, 0xbf, 0xb6, 0x29, 0x3f, 0x96 } \
-  }
-#define EFI_RNG_ALGORITHM_SP800_90_HMAC_256_GUID \
-  { \
-    0xc5149b43, 0xae85, 0x4f53, {0x99, 0x82, 0xb9, 0x43, 0x35, 0xd3, 0xa9, 0xe7 } \
-  }
-#define EFI_RNG_ALGORITHM_SP800_90_CTR_256_GUID \
-  { \
-    0x44f0de6e, 0x4d8c, 0x4045, {0xa8, 0xc7, 0x4d, 0xd1, 0x68, 0x85, 0x6b, 0x9e } \
-  }
-///
-/// The algorithms correspond to X9.31 as defined in
-/// NIST, "Recommended Random Number Generator Based on ANSI X9.31 Appendix A.2.4 Using
-/// the 3-Key Triple DES and AES Algorithm", January 2005.
-///
-#define EFI_RNG_ALGORITHM_X9_31_3DES_GUID \
-  { \
-    0x63c4785a, 0xca34, 0x4012, {0xa3, 0xc8, 0x0b, 0x6a, 0x32, 0x4f, 0x55, 0x46 } \
-  }
-#define EFI_RNG_ALGORITHM_X9_31_AES_GUID \
-  { \
-    0xacd03321, 0x777e, 0x4d3d, {0xb1, 0xc8, 0x20, 0xcf, 0xd8, 0x88, 0x20, 0xc9 } \
-  }
-///
-/// The "raw" algorithm, when supported, is intended to provide entropy directly from
-/// the source, without it going through some deterministic random bit generator.
-///
-#define EFI_RNG_ALGORITHM_RAW \
-  { \
-    0xe43176d7, 0xb6e8, 0x4827, {0xb7, 0x84, 0x7f, 0xfd, 0xc4, 0xb6, 0x85, 0x61 } \
-  }
-///
-/// The Arm Architecture states the RNDR that the DRBG algorithm should be compliant
-/// with NIST SP800-90A, while not mandating a particular algorithm, so as to be
-/// inclusive of different geographies.
-///
-#define EFI_RNG_ALGORITHM_ARM_RNDR \
-  { \
-    0x43d2fde3, 0x9d4e, 0x4d79,  {0x02, 0x96, 0xa8, 0x9b, 0xca, 0x78, 0x08, 0x41} \
-  }
-
-/**
-  Returns information about the random number generation implementation.
-
-  @param[in]     This                 A pointer to the EFI_RNG_PROTOCOL instance.
-  @param[in,out] RNGAlgorithmListSize On input, the size in bytes of RNGAlgorithmList.
-                                      On output with a return code of EFI_SUCCESS, the size
-                                      in bytes of the data returned in RNGAlgorithmList. On output
-                                      with a return code of EFI_BUFFER_TOO_SMALL,
-                                      the size of RNGAlgorithmList required to obtain the list.
-  @param[out] RNGAlgorithmList        A caller-allocated memory buffer filled by the driver
-                                      with one EFI_RNG_ALGORITHM element for each supported
-                                      RNG algorithm. The list must not change across multiple
-                                      calls to the same driver. The first algorithm in the list
-                                      is the default algorithm for the driver.
-
-  @retval EFI_SUCCESS                 The RNG algorithm list was returned successfully.
-  @retval EFI_UNSUPPORTED             The services is not supported by this driver.
-  @retval EFI_DEVICE_ERROR            The list of algorithms could not be retrieved due to a
-                                      hardware or firmware error.
-  @retval EFI_INVALID_PARAMETER       One or more of the parameters are incorrect.
-  @retval EFI_BUFFER_TOO_SMALL        The buffer RNGAlgorithmList is too small to hold the result.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_RNG_GET_INFO)(
-  IN EFI_RNG_PROTOCOL             *This,
-  IN OUT UINTN                    *RNGAlgorithmListSize,
-  OUT EFI_RNG_ALGORITHM           *RNGAlgorithmList
-  );
-
-/**
-  Produces and returns an RNG value using either the default or specified RNG algorithm.
-
-  @param[in]  This                    A pointer to the EFI_RNG_PROTOCOL instance.
-  @param[in]  RNGAlgorithm            A pointer to the EFI_RNG_ALGORITHM that identifies the RNG
-                                      algorithm to use. May be NULL in which case the function will
-                                      use its default RNG algorithm.
-  @param[in]  RNGValueLength          The length in bytes of the memory buffer pointed to by
-                                      RNGValue. The driver shall return exactly this numbers of bytes.
-  @param[out] RNGValue                A caller-allocated memory buffer filled by the driver with the
-                                      resulting RNG value.
-
-  @retval EFI_SUCCESS                 The RNG value was returned successfully.
-  @retval EFI_UNSUPPORTED             The algorithm specified by RNGAlgorithm is not supported by
-                                      this driver.
-  @retval EFI_DEVICE_ERROR            An RNG value could not be retrieved due to a hardware or
-                                      firmware error.
-  @retval EFI_NOT_READY               There is not enough random data available to satisfy the length
-                                      requested by RNGValueLength.
-  @retval EFI_INVALID_PARAMETER       RNGValue is NULL or RNGValueLength is zero.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_RNG_GET_RNG)(
-  IN EFI_RNG_PROTOCOL            *This,
-  IN EFI_RNG_ALGORITHM           *RNGAlgorithm  OPTIONAL,
-  IN UINTN                       RNGValueLength,
-  OUT UINT8                      *RNGValue
-  );
-
-///
-/// The Random Number Generator (RNG) protocol provides random bits for use in
-/// applications, or entropy for seeding other random number generators.
-///
-struct _EFI_RNG_PROTOCOL {
-  EFI_RNG_GET_INFO    GetInfo;
-  EFI_RNG_GET_RNG     GetRNG;
-};
+typedef EFI_RNG_INTERFACE EFI_RNG_PROTOCOL;
 
 extern EFI_GUID  gEfiRngProtocolGuid;
-extern EFI_GUID  gEfiRngAlgorithmSp80090Hash256Guid;
-extern EFI_GUID  gEfiRngAlgorithmSp80090Hmac256Guid;
-extern EFI_GUID  gEfiRngAlgorithmSp80090Ctr256Guid;
-extern EFI_GUID  gEfiRngAlgorithmX9313DesGuid;
-extern EFI_GUID  gEfiRngAlgorithmX931AesGuid;
-extern EFI_GUID  gEfiRngAlgorithmRaw;
-extern EFI_GUID  gEfiRngAlgorithmArmRndr;
 
 #endif
index 4dfc346df501a878e20b4848baa20364e909c43f..b007afee00e75f6923bf20993751cc0f9c32d460 100644 (file)
@@ -107,6 +107,16 @@ typedef enum {
 //
 #define EFI_MEMORY_CPU_CRYPTO  0x0000000000080000ULL
 
+//
+// If this flag is set, the memory region is present and capable of having
+// memory dynamically removed from the platform. This attribute serves as
+// a hint to the OS prior to its ACPI subsystem initialization to avoid
+// allocating this memory for core OS data or code that cannot be dynamically
+// relocated at runtime. If this flag is clear, the memory region is not
+// capable of being dynamically removed from the platform at runtime.
+//
+#define EFI_MEMORY_HOT_PLUGGABLE  0x0000000000100000
+
 //
 // Runtime memory attribute
 //
@@ -1841,21 +1851,24 @@ EFI_STATUS
 //
 // EFI Runtime Services Table
 //
-#define EFI_SYSTEM_TABLE_SIGNATURE      SIGNATURE_64 ('I','B','I',' ','S','Y','S','T')
-#define EFI_2_80_SYSTEM_TABLE_REVISION  ((2 << 16) | (80))
-#define EFI_2_70_SYSTEM_TABLE_REVISION  ((2 << 16) | (70))
-#define EFI_2_60_SYSTEM_TABLE_REVISION  ((2 << 16) | (60))
-#define EFI_2_50_SYSTEM_TABLE_REVISION  ((2 << 16) | (50))
-#define EFI_2_40_SYSTEM_TABLE_REVISION  ((2 << 16) | (40))
-#define EFI_2_31_SYSTEM_TABLE_REVISION  ((2 << 16) | (31))
-#define EFI_2_30_SYSTEM_TABLE_REVISION  ((2 << 16) | (30))
-#define EFI_2_20_SYSTEM_TABLE_REVISION  ((2 << 16) | (20))
-#define EFI_2_10_SYSTEM_TABLE_REVISION  ((2 << 16) | (10))
-#define EFI_2_00_SYSTEM_TABLE_REVISION  ((2 << 16) | (00))
-#define EFI_1_10_SYSTEM_TABLE_REVISION  ((1 << 16) | (10))
-#define EFI_1_02_SYSTEM_TABLE_REVISION  ((1 << 16) | (02))
-#define EFI_SYSTEM_TABLE_REVISION       EFI_2_70_SYSTEM_TABLE_REVISION
-#define EFI_SPECIFICATION_VERSION       EFI_SYSTEM_TABLE_REVISION
+#define EFI_SYSTEM_TABLE_SIGNATURE       SIGNATURE_64 ('I','B','I',' ','S','Y','S','T')
+#define EFI_2_110_SYSTEM_TABLE_REVISION  ((2 << 16) | (110))
+#define EFI_2_100_SYSTEM_TABLE_REVISION  ((2 << 16) | (100))
+#define EFI_2_90_SYSTEM_TABLE_REVISION   ((2 << 16) | (90))
+#define EFI_2_80_SYSTEM_TABLE_REVISION   ((2 << 16) | (80))
+#define EFI_2_70_SYSTEM_TABLE_REVISION   ((2 << 16) | (70))
+#define EFI_2_60_SYSTEM_TABLE_REVISION   ((2 << 16) | (60))
+#define EFI_2_50_SYSTEM_TABLE_REVISION   ((2 << 16) | (50))
+#define EFI_2_40_SYSTEM_TABLE_REVISION   ((2 << 16) | (40))
+#define EFI_2_31_SYSTEM_TABLE_REVISION   ((2 << 16) | (31))
+#define EFI_2_30_SYSTEM_TABLE_REVISION   ((2 << 16) | (30))
+#define EFI_2_20_SYSTEM_TABLE_REVISION   ((2 << 16) | (20))
+#define EFI_2_10_SYSTEM_TABLE_REVISION   ((2 << 16) | (10))
+#define EFI_2_00_SYSTEM_TABLE_REVISION   ((2 << 16) | (00))
+#define EFI_1_10_SYSTEM_TABLE_REVISION   ((1 << 16) | (10))
+#define EFI_1_02_SYSTEM_TABLE_REVISION   ((1 << 16) | (02))
+#define EFI_SYSTEM_TABLE_REVISION        EFI_2_70_SYSTEM_TABLE_REVISION
+#define EFI_SPECIFICATION_VERSION        EFI_SYSTEM_TABLE_REVISION
 
 #define EFI_RUNTIME_SERVICES_SIGNATURE  SIGNATURE_64 ('R','U','N','T','S','E','R','V')
 #define EFI_RUNTIME_SERVICES_REVISION   EFI_SPECIFICATION_VERSION