]> git.proxmox.com Git - mirror_edk2.git/blobdiff - DynamicTablesPkg/Library/Common/AmlLib/AmlEncoding/Aml.h
DynamicTablesPkg: Apply uncrustify changes
[mirror_edk2.git] / DynamicTablesPkg / Library / Common / AmlLib / AmlEncoding / Aml.h
index 0641500fcd5f5df76774b90bad648e1b5dd66e78..0c931dce9782989da6792a7a4787e806a133f2f9 100644 (file)
@@ -15,9 +15,9 @@
 #include <IndustryStandard/AcpiAml.h>\r
 \r
 #if !defined (MDEPKG_NDEBUG)\r
-#define AML_OPCODE_DEF(str, OpCode) str, OpCode\r
+#define AML_OPCODE_DEF(str, OpCode)  str, OpCode\r
 #else\r
-#define AML_OPCODE_DEF(str, OpCode) OpCode\r
+#define AML_OPCODE_DEF(str, OpCode)  OpCode\r
 #endif // MDEPKG_NDEBUG\r
 \r
 /** AML types.\r
@@ -31,7 +31,7 @@
   These are internal types.\r
 */\r
 typedef enum EAmlParseFormat {\r
-  EAmlNone   = 0,     ///< No data expected.\r
+  EAmlNone = 0,       ///< No data expected.\r
   EAmlUInt8,          ///< One byte value evaluated as a UINT8.\r
   EAmlUInt16,         ///< Two byte value evaluated as a UINT16.\r
   EAmlUInt32,         ///< Four byte value evaluated as a UINT32.\r
@@ -61,46 +61,46 @@ typedef UINT32 AML_OP_ATTRIBUTE;
 /** A PkgLength is expected between the OpCode/SubOpCode couple and the first\r
     fixed argument of the object.\r
 */\r
-#define AML_HAS_PKG_LENGTH      0x00001U\r
+#define AML_HAS_PKG_LENGTH  0x00001U\r
 \r
 /** The object's OpCode is actually a character. Encodings with this attribute\r
     don't describe objects. The dual/multi name prefix have this attribute,\r
     indicating the start of a longer NameString.\r
 */\r
-#define AML_IS_NAME_CHAR        0x00002U\r
+#define AML_IS_NAME_CHAR  0x00002U\r
 \r
 /** A variable list of arguments is following the last fixed argument. Each\r
     argument is evaluated as an EAmlObject.\r
 */\r
-#define AML_HAS_CHILD_OBJ       0x00004U\r
+#define AML_HAS_CHILD_OBJ  0x00004U\r
 \r
 /** This is a sub-type of a variable list of arguments. It can only be\r
     found in buffer objects. A ByteList is either a list of\r
     bytes or a list of resource data elements. Resource data elements\r
     have specific opcodes.\r
 */\r
-#define AML_HAS_BYTE_LIST       0x00008U\r
+#define AML_HAS_BYTE_LIST  0x00008U\r
 \r
 /** This is a sub-type of a variable list of arguments. It can only be\r
     found in Fields, IndexFields and BankFields.\r
     A FieldList is made of FieldElements. FieldElements have specific opcodes.\r
 */\r
-#define AML_HAS_FIELD_LIST      0x00010U\r
+#define AML_HAS_FIELD_LIST  0x00010U\r
 \r
 /** This object node is a field element. Its opcode is to be fetched from\r
     the field encoding table.\r
 */\r
-#define AML_IS_FIELD_ELEMENT    0x00020U\r
+#define AML_IS_FIELD_ELEMENT  0x00020U\r
 \r
 /** The object has a name and which is part of the AML namespace. The name\r
     can be found in the fixed argument list at the NameIndex.\r
 */\r
-#define AML_IN_NAMESPACE        0x10000U\r
+#define AML_IN_NAMESPACE  0x10000U\r
 \r
 /** Some OpCodes have been created in this library. They are called\r
     pseudo opcodes and must stay internal to this library.\r
 */\r
-#define AML_IS_PSEUDO_OPCODE    0x20000U\r
+#define AML_IS_PSEUDO_OPCODE  0x20000U\r
 \r
 /** Encoding of an AML object.\r
 \r
@@ -112,37 +112,37 @@ typedef UINT32 AML_OP_ATTRIBUTE;
   Cf. ACPI 6.3 specification, s20.2.\r
 */\r
 typedef struct _AML_BYTE_ENCODING {\r
-// Enable this field for debug.\r
-#if !defined (MDEPKG_NDEBUG)\r
+  // Enable this field for debug.\r
+ #if !defined (MDEPKG_NDEBUG)\r
   /// String field allowing to print the AML object.\r
-  CONST CHAR8         * Str;\r
-#endif // MDEPKG_NDEBUG\r
+  CONST CHAR8         *Str;\r
+ #endif // MDEPKG_NDEBUG\r
 \r
   /// OpCode of the AML object.\r
-  UINT8                 OpCode;\r
+  UINT8               OpCode;\r
 \r
   /// SubOpCode of the AML object.\r
   /// The SubOpcode field has a valid value when the OpCode is 0x5B,\r
   /// otherwise this field must be zero.\r
   /// For field objects, the SubOpCode is not used.\r
-  UINT8                 SubOpCode;\r
+  UINT8               SubOpCode;\r
 \r
   /// Number of fixed arguments for the AML statement represented\r
   /// by the OpCode & SubOpcode.\r
   /// Maximum is 6 for AML objects.\r
   /// Maximum is 3 for field objects.\r
-  EAML_PARSE_INDEX      MaxIndex;\r
+  EAML_PARSE_INDEX    MaxIndex;\r
 \r
   /// If the encoding has the AML_IN_NAMESPACE attribute (cf Attribute\r
   /// field below), indicate where to find the name in the fixed list\r
   /// of arguments.\r
-  EAML_PARSE_INDEX      NameIndex;\r
+  EAML_PARSE_INDEX    NameIndex;\r
 \r
   /// Type of each fixed argument.\r
-  AML_PARSE_FORMAT      Format[EAmlParseIndexMax];\r
+  AML_PARSE_FORMAT    Format[EAmlParseIndexMax];\r
 \r
   /// Additional information on the AML object.\r
-  AML_OP_ATTRIBUTE      Attribute;\r
+  AML_OP_ATTRIBUTE    Attribute;\r
 } AML_BYTE_ENCODING;\r
 \r
 /** Get the AML_BYTE_ENCODING entry in the AML encoding table.\r
@@ -160,7 +160,7 @@ CONST
 AML_BYTE_ENCODING *\r
 EFIAPI\r
 AmlGetByteEncoding (\r
-  IN  CONST UINT8   * Buffer\r
+  IN  CONST UINT8  *Buffer\r
   );\r
 \r
 /** Get the AML_BYTE_ENCODING entry in the AML encoding table\r
@@ -176,8 +176,8 @@ CONST
 AML_BYTE_ENCODING *\r
 EFIAPI\r
 AmlGetByteEncodingByOpCode (\r
-  IN  UINT8   OpCode,\r
-  IN  UINT8   SubOpCode\r
+  IN  UINT8  OpCode,\r
+  IN  UINT8  SubOpCode\r
   );\r
 \r
 /** Get the AML_BYTE_ENCODING entry in the field encoding table.\r
@@ -195,7 +195,7 @@ CONST
 AML_BYTE_ENCODING *\r
 EFIAPI\r
 AmlGetFieldEncoding (\r
-  IN  CONST UINT8   * Buffer\r
+  IN  CONST UINT8  *Buffer\r
   );\r
 \r
 /** Get the AML_BYTE_ENCODING entry in the field encoding table\r
@@ -212,12 +212,13 @@ CONST
 AML_BYTE_ENCODING *\r
 EFIAPI\r
 AmlGetFieldEncodingByOpCode (\r
-  IN  UINT8   OpCode,\r
-  IN  UINT8   SubOpCode\r
+  IN  UINT8  OpCode,\r
+  IN  UINT8  SubOpCode\r
   );\r
 \r
 // Enable this function for debug.\r
 #if !defined (MDEPKG_NDEBUG)\r
+\r
 /** Look for an OpCode/SubOpCode couple in the AML grammar,\r
     and return a corresponding string.\r
 \r
@@ -230,8 +231,8 @@ AmlGetFieldEncodingByOpCode (
 CONST\r
 CHAR8 *\r
 AmlGetOpCodeStr (\r
-  IN  UINT8   OpCode,\r
-  IN  UINT8   SubOpCode\r
+  IN  UINT8  OpCode,\r
+  IN  UINT8  SubOpCode\r
   );\r
 \r
 /** Look for an OpCode/SubOpCode couple in the AML field element grammar,\r
@@ -246,9 +247,10 @@ AmlGetOpCodeStr (
 CONST\r
 CHAR8 *\r
 AmlGetFieldOpCodeStr (\r
-  IN  UINT8   OpCode,\r
-  IN  UINT8   SubOpCode\r
+  IN  UINT8  OpCode,\r
+  IN  UINT8  SubOpCode\r
   );\r
+\r
 #endif // MDEPKG_NDEBUG\r
 \r
 /** Check whether the OpCode/SubOpcode couple is a valid entry\r
@@ -263,8 +265,8 @@ AmlGetFieldOpCodeStr (
 BOOLEAN\r
 EFIAPI\r
 AmlIsOpCodeValid (\r
-  IN  UINT8   OpCode,\r
-  IN  UINT8   SubOpCode\r
+  IN  UINT8  OpCode,\r
+  IN  UINT8  SubOpCode\r
   );\r
 \r
 /** Convert an AML_PARSE_FORMAT to its corresponding EAML_NODE_DATA_TYPE.\r
@@ -292,8 +294,8 @@ AmlTypeToNodeDataType (
 UINT32\r
 EFIAPI\r
 AmlGetPkgLength (\r
-  IN  CONST UINT8   * Buffer,\r
-  OUT       UINT32  * PkgLength\r
+  IN  CONST UINT8   *Buffer,\r
+  OUT       UINT32  *PkgLength\r
   );\r
 \r
 /** Convert the Length to the AML PkgLen encoding,\r
@@ -308,8 +310,8 @@ AmlGetPkgLength (
 UINT8\r
 EFIAPI\r
 AmlSetPkgLength (\r
-  IN  UINT32    Length,\r
-  OUT UINT8   * Buffer\r
+  IN  UINT32  Length,\r
+  OUT UINT8   *Buffer\r
   );\r
 \r
 /** Compute the number of bytes required to write a package length.\r
@@ -367,9 +369,8 @@ AmlComputePkgLengthWidth (
 EFI_STATUS\r
 EFIAPI\r
 AmlComputePkgLength (\r
-  IN  UINT32    Length,\r
-  OUT UINT32  * PkgLen\r
+  IN  UINT32  Length,\r
+  OUT UINT32  *PkgLen\r
   );\r
 \r
 #endif // AML_H_\r
-\r