#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
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
/** 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
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
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
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
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
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
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
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
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
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
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
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