MdeModulePkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
ACPI Sdt Protocol Driver
|
||||
|
||||
Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. <BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -196,7 +196,7 @@ SdtNotifyAcpiList (
|
||||
|
||||
/**
|
||||
Returns a requested ACPI table.
|
||||
|
||||
|
||||
The GetAcpiTable() function returns a pointer to a buffer containing the ACPI table associated
|
||||
with the Index that was input. The following structures are not considered elements in the list of
|
||||
ACPI tables:
|
||||
@@ -206,19 +206,19 @@ SdtNotifyAcpiList (
|
||||
Version is updated with a bit map containing all the versions of ACPI of which the table is a
|
||||
member. For tables installed via the EFI_ACPI_TABLE_PROTOCOL.InstallAcpiTable() interface,
|
||||
the function returns the value of EFI_ACPI_STD_PROTOCOL.AcpiVersion.
|
||||
|
||||
|
||||
@param[in] Index The zero-based index of the table to retrieve.
|
||||
@param[out] Table Pointer for returning the table buffer.
|
||||
@param[out] Version On return, updated with the ACPI versions to which this table belongs. Type
|
||||
EFI_ACPI_TABLE_VERSION is defined in "Related Definitions" in the
|
||||
EFI_ACPI_SDT_PROTOCOL.
|
||||
EFI_ACPI_SDT_PROTOCOL.
|
||||
@param[out] TableKey On return, points to the table key for the specified ACPI system definition table.
|
||||
This is identical to the table key used in the EFI_ACPI_TABLE_PROTOCOL.
|
||||
The TableKey can be passed to EFI_ACPI_TABLE_PROTOCOL.UninstallAcpiTable()
|
||||
to uninstall the table.
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
@retval EFI_NOT_FOUND The requested index is too large and a table was not found.
|
||||
**/
|
||||
@retval EFI_NOT_FOUND The requested index is too large and a table was not found.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GetAcpiTable2 (
|
||||
@@ -278,9 +278,9 @@ GetAcpiTable2 (
|
||||
|
||||
/**
|
||||
Register a callback when an ACPI table is installed.
|
||||
|
||||
|
||||
This function registers a function which will be called whenever a new ACPI table is installed.
|
||||
|
||||
|
||||
@param[in] Notification Points to the callback function to be registered
|
||||
**/
|
||||
VOID
|
||||
@@ -318,13 +318,13 @@ SdtRegisterNotify (
|
||||
|
||||
/**
|
||||
Unregister a callback when an ACPI table is installed.
|
||||
|
||||
|
||||
This function unregisters a function which will be called whenever a new ACPI table is installed.
|
||||
|
||||
|
||||
@param[in] Notification Points to the callback function to be unregistered.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Callback successfully unregistered.
|
||||
@retval EFI_INVALID_PARAMETER Notification does not match a known registration function.
|
||||
@retval EFI_INVALID_PARAMETER Notification does not match a known registration function.
|
||||
**/
|
||||
EFI_STATUS
|
||||
SdtUnregisterNotify (
|
||||
@@ -371,17 +371,17 @@ SdtUnregisterNotify (
|
||||
|
||||
/**
|
||||
Register or unregister a callback when an ACPI table is installed.
|
||||
|
||||
|
||||
This function registers or unregisters a function which will be called whenever a new ACPI table is
|
||||
installed.
|
||||
|
||||
|
||||
@param[in] Register If TRUE, then the specified function will be registered. If FALSE, then the specified
|
||||
function will be unregistered.
|
||||
@param[in] Notification Points to the callback function to be registered or unregistered.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Callback successfully registered or unregistered.
|
||||
@retval EFI_INVALID_PARAMETER Notification is NULL
|
||||
@retval EFI_INVALID_PARAMETER Register is FALSE and Notification does not match a known registration function.
|
||||
@retval EFI_INVALID_PARAMETER Register is FALSE and Notification does not match a known registration function.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -413,12 +413,12 @@ RegisterNotify (
|
||||
|
||||
/**
|
||||
Create a handle for the first ACPI opcode in an ACPI system description table.
|
||||
|
||||
|
||||
@param[in] TableKey The table key for the ACPI table, as returned by GetTable().
|
||||
@param[out] Handle On return, points to the newly created ACPI handle.
|
||||
|
||||
@retval EFI_SUCCESS Handle created successfully.
|
||||
@retval EFI_NOT_FOUND TableKey does not refer to a valid ACPI table.
|
||||
@retval EFI_NOT_FOUND TableKey does not refer to a valid ACPI table.
|
||||
**/
|
||||
EFI_STATUS
|
||||
SdtOpenSdtTable (
|
||||
@@ -466,12 +466,12 @@ SdtOpenSdtTable (
|
||||
|
||||
/**
|
||||
Create a handle for the first ACPI opcode in an ACPI system description table.
|
||||
|
||||
|
||||
@param[in] TableKey The table key for the ACPI table, as returned by GetTable().
|
||||
@param[out] Handle On return, points to the newly created ACPI handle.
|
||||
|
||||
@retval EFI_SUCCESS Handle created successfully.
|
||||
@retval EFI_NOT_FOUND TableKey does not refer to a valid ACPI table.
|
||||
@retval EFI_NOT_FOUND TableKey does not refer to a valid ACPI table.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -489,21 +489,21 @@ OpenSdt (
|
||||
|
||||
/**
|
||||
Create a handle from an ACPI opcode
|
||||
|
||||
|
||||
@param[in] Buffer Points to the ACPI opcode.
|
||||
@param[in] BufferSize Max buffer size.
|
||||
@param[out] Handle Upon return, holds the handle.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER Buffer is NULL or Handle is NULL or Buffer points to an
|
||||
invalid opcode.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
SdtOpenEx (
|
||||
IN VOID *Buffer,
|
||||
IN UINTN BufferSize,
|
||||
OUT EFI_ACPI_HANDLE *Handle
|
||||
OUT EFI_ACPI_HANDLE *Handle
|
||||
)
|
||||
{
|
||||
AML_BYTE_ENCODING *AmlByteEncoding;
|
||||
@@ -526,7 +526,7 @@ SdtOpenEx (
|
||||
//
|
||||
AmlHandle = AllocatePool (sizeof(*AmlHandle));
|
||||
ASSERT (AmlHandle != NULL);
|
||||
|
||||
|
||||
AmlHandle->Signature = EFI_AML_HANDLE_SIGNATURE;
|
||||
AmlHandle->Buffer = Buffer;
|
||||
AmlHandle->AmlByteEncoding = AmlByteEncoding;
|
||||
@@ -545,20 +545,20 @@ SdtOpenEx (
|
||||
|
||||
/**
|
||||
Create a handle from an ACPI opcode
|
||||
|
||||
|
||||
@param[in] Buffer Points to the ACPI opcode.
|
||||
@param[out] Handle Upon return, holds the handle.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER Buffer is NULL or Handle is NULL or Buffer points to an
|
||||
invalid opcode.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
Open (
|
||||
IN VOID *Buffer,
|
||||
OUT EFI_ACPI_HANDLE *Handle
|
||||
OUT EFI_ACPI_HANDLE *Handle
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
@@ -583,11 +583,11 @@ Open (
|
||||
|
||||
/**
|
||||
Close an ACPI handle.
|
||||
|
||||
|
||||
@param[in] Handle Returns the handle.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER Handle is NULL or does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER Handle is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -628,7 +628,7 @@ Close (
|
||||
|
||||
/**
|
||||
Retrieve information about an ACPI object.
|
||||
|
||||
|
||||
@param[in] Handle ACPI object handle.
|
||||
@param[in] Index Index of the data to retrieve from the object. In general, indexes read from left-to-right
|
||||
in the ACPI encoding, with index 0 always being the ACPI opcode.
|
||||
@@ -636,7 +636,7 @@ Close (
|
||||
for the specified index.
|
||||
@param[out] Data Upon return, points to the pointer to the data.
|
||||
@param[out] DataSize Upon return, points to the size of Data.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER Handle is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
@@ -692,7 +692,7 @@ GetOption (
|
||||
|
||||
/**
|
||||
Change information about an ACPI object.
|
||||
|
||||
|
||||
@param[in] Handle ACPI object handle.
|
||||
@param[in] Index Index of the data to retrieve from the object. In general, indexes read from left-to-right
|
||||
in the ACPI encoding, with index 0 always being the ACPI opcode.
|
||||
@@ -769,14 +769,14 @@ SetOption (
|
||||
|
||||
/**
|
||||
Return the child ACPI objects.
|
||||
|
||||
|
||||
@param[in] ParentHandle Parent handle.
|
||||
@param[in, out] Handle On entry, points to the previously returned handle or NULL to start with the first
|
||||
handle. On return, points to the next returned ACPI handle or NULL if there are no
|
||||
child objects.
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -834,14 +834,14 @@ GetChild (
|
||||
|
||||
/**
|
||||
Returns the handle of the ACPI object representing the specified ACPI path
|
||||
|
||||
|
||||
@param[in] HandleIn Points to the handle of the object representing the starting point for the path search.
|
||||
@param[in] AmlPath Points to the AML path.
|
||||
@param[out] HandleOut On return, points to the ACPI object which represents AcpiPath, relative to
|
||||
HandleIn.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER HandleIn is NULL or does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER HandleIn is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
SdtFindPathFromNonRoot (
|
||||
@@ -873,9 +873,9 @@ SdtFindPathFromNonRoot (
|
||||
|
||||
/**
|
||||
Duplicate AML handle.
|
||||
|
||||
|
||||
@param[in] AmlHandle Handle to be duplicated.
|
||||
|
||||
|
||||
@return Duplicated AML handle.
|
||||
**/
|
||||
EFI_AML_HANDLE *
|
||||
@@ -894,14 +894,14 @@ SdtDuplicateHandle (
|
||||
|
||||
/**
|
||||
Returns the handle of the ACPI object representing the specified ACPI path
|
||||
|
||||
|
||||
@param[in] HandleIn Points to the handle of the object representing the starting point for the path search.
|
||||
@param[in] AmlPath Points to the AML path.
|
||||
@param[out] HandleOut On return, points to the ACPI object which represents AcpiPath, relative to
|
||||
HandleIn.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER HandleIn is NULL or does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER HandleIn is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
SdtFindPathFromRoot (
|
||||
@@ -977,14 +977,14 @@ SdtFindPathFromRoot (
|
||||
|
||||
/**
|
||||
Returns the handle of the ACPI object representing the specified ACPI path
|
||||
|
||||
|
||||
@param[in] HandleIn Points to the handle of the object representing the starting point for the path search.
|
||||
@param[in] AcpiPath Points to the ACPI path, which conforms to the ACPI encoded path format.
|
||||
@param[out] HandleOut On return, points to the ACPI object which represents AcpiPath, relative to
|
||||
HandleIn.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER HandleIn is NULL or does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER HandleIn is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -1006,7 +1006,7 @@ FindPath (
|
||||
}
|
||||
|
||||
AmlHandle = (EFI_AML_HANDLE *)HandleIn;
|
||||
|
||||
|
||||
//
|
||||
// Convert ASL path to AML path
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
ACPI Sdt Protocol Driver
|
||||
|
||||
Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. <BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -130,7 +130,7 @@ typedef UINT32 AML_OP_ATTRIBUTE;
|
||||
#define AML_HAS_CHILD_OBJ 0x4 // it is ACPI attribute - if OpCode has Child Object.
|
||||
#define AML_IN_NAMESPACE 0x10000 // It is UEFI SDT attribute - if OpCode will be in NameSpace
|
||||
// NOTE; Not all OBJECT will be in NameSpace
|
||||
// For example, BankField | CreateBitField | CreateByteField | CreateDWordField |
|
||||
// For example, BankField | CreateBitField | CreateByteField | CreateDWordField |
|
||||
// CreateField | CreateQWordField | CreateWordField | Field | IndexField.
|
||||
|
||||
struct _AML_BYTE_ENCODING {
|
||||
@@ -147,7 +147,7 @@ struct _AML_BYTE_ENCODING {
|
||||
|
||||
/**
|
||||
Returns a requested ACPI table.
|
||||
|
||||
|
||||
The GetAcpiTable() function returns a pointer to a buffer containing the ACPI table associated
|
||||
with the Index that was input. The following structures are not considered elements in the list of
|
||||
ACPI tables:
|
||||
@@ -157,20 +157,20 @@ struct _AML_BYTE_ENCODING {
|
||||
Version is updated with a bit map containing all the versions of ACPI of which the table is a
|
||||
member. For tables installed via the EFI_ACPI_TABLE_PROTOCOL.InstallAcpiTable() interface,
|
||||
the function returns the value of EFI_ACPI_STD_PROTOCOL.AcpiVersion.
|
||||
|
||||
|
||||
@param[in] Index The zero-based index of the table to retrieve.
|
||||
@param[out] Table Pointer for returning the table buffer.
|
||||
@param[out] Version On return, updated with the ACPI versions to which this table belongs. Type
|
||||
EFI_ACPI_TABLE_VERSION is defined in "Related Definitions" in the
|
||||
EFI_ACPI_SDT_PROTOCOL.
|
||||
EFI_ACPI_SDT_PROTOCOL.
|
||||
@param[out] TableKey On return, points to the table key for the specified ACPI system definition table.
|
||||
This is identical to the table key used in the EFI_ACPI_TABLE_PROTOCOL.
|
||||
The TableKey can be passed to EFI_ACPI_TABLE_PROTOCOL.UninstallAcpiTable()
|
||||
to uninstall the table.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
@retval EFI_NOT_FOUND The requested index is too large and a table was not found.
|
||||
**/
|
||||
@retval EFI_NOT_FOUND The requested index is too large and a table was not found.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GetAcpiTable2 (
|
||||
@@ -182,17 +182,17 @@ GetAcpiTable2 (
|
||||
|
||||
/**
|
||||
Register or unregister a callback when an ACPI table is installed.
|
||||
|
||||
|
||||
This function registers or unregisters a function which will be called whenever a new ACPI table is
|
||||
installed.
|
||||
|
||||
|
||||
@param[in] Register If TRUE, then the specified function will be registered. If FALSE, then the specified
|
||||
function will be unregistered.
|
||||
@param[in] Notification Points to the callback function to be registered or unregistered.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Callback successfully registered or unregistered.
|
||||
@retval EFI_INVALID_PARAMETER Notification is NULL
|
||||
@retval EFI_INVALID_PARAMETER Register is FALSE and Notification does not match a known registration function.
|
||||
@retval EFI_INVALID_PARAMETER Register is FALSE and Notification does not match a known registration function.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -203,12 +203,12 @@ RegisterNotify (
|
||||
|
||||
/**
|
||||
Create a handle for the first ACPI opcode in an ACPI system description table.
|
||||
|
||||
|
||||
@param[in] TableKey The table key for the ACPI table, as returned by GetTable().
|
||||
@param[out] Handle On return, points to the newly created ACPI handle.
|
||||
|
||||
@retval EFI_SUCCESS Handle created successfully.
|
||||
@retval EFI_NOT_FOUND TableKey does not refer to a valid ACPI table.
|
||||
@retval EFI_NOT_FOUND TableKey does not refer to a valid ACPI table.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -219,29 +219,29 @@ OpenSdt (
|
||||
|
||||
/**
|
||||
Create a handle from an ACPI opcode
|
||||
|
||||
|
||||
@param[in] Buffer Points to the ACPI opcode.
|
||||
@param[out] Handle Upon return, holds the handle.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER Buffer is NULL or Handle is NULL or Buffer points to an
|
||||
invalid opcode.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
Open (
|
||||
IN VOID *Buffer,
|
||||
OUT EFI_ACPI_HANDLE *Handle
|
||||
OUT EFI_ACPI_HANDLE *Handle
|
||||
);
|
||||
|
||||
/**
|
||||
Close an ACPI handle.
|
||||
|
||||
|
||||
@param[in] Handle Returns the handle.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER Handle is NULL or does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER Handle is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -251,7 +251,7 @@ Close (
|
||||
|
||||
/**
|
||||
Retrieve information about an ACPI object.
|
||||
|
||||
|
||||
@param[in] Handle ACPI object handle.
|
||||
@param[in] Index Index of the data to retrieve from the object. In general, indexes read from left-to-right
|
||||
in the ACPI encoding, with index 0 always being the ACPI opcode.
|
||||
@@ -259,7 +259,7 @@ Close (
|
||||
for the specified index.
|
||||
@param[out] Data Upon return, points to the pointer to the data.
|
||||
@param[out] DataSize Upon return, points to the size of Data.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER Handle is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
@@ -275,7 +275,7 @@ GetOption (
|
||||
|
||||
/**
|
||||
Change information about an ACPI object.
|
||||
|
||||
|
||||
@param[in] Handle ACPI object handle.
|
||||
@param[in] Index Index of the data to retrieve from the object. In general, indexes read from left-to-right
|
||||
in the ACPI encoding, with index 0 always being the ACPI opcode.
|
||||
@@ -299,14 +299,14 @@ SetOption (
|
||||
|
||||
/**
|
||||
Return the child ACPI objects.
|
||||
|
||||
|
||||
@param[in] ParentHandle Parent handle.
|
||||
@param[in, out] Handle On entry, points to the previously returned handle or NULL to start with the first
|
||||
handle. On return, points to the next returned ACPI handle or NULL if there are no
|
||||
child objects.
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -317,14 +317,14 @@ GetChild (
|
||||
|
||||
/**
|
||||
Returns the handle of the ACPI object representing the specified ACPI path
|
||||
|
||||
|
||||
@param[in] HandleIn Points to the handle of the object representing the starting point for the path search.
|
||||
@param[in] AcpiPath Points to the ACPI path, which conforms to the ACPI encoded path format.
|
||||
@param[out] HandleOut On return, points to the ACPI object which represents AcpiPath, relative to
|
||||
HandleIn.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER HandleIn is NULL or does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER HandleIn is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -340,21 +340,21 @@ FindPath (
|
||||
|
||||
/**
|
||||
Create a handle from an ACPI opcode
|
||||
|
||||
|
||||
@param[in] Buffer Points to the ACPI opcode.
|
||||
@param[in] BufferSize Max buffer size.
|
||||
@param[out] Handle Upon return, holds the handle.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER Buffer is NULL or Handle is NULL or Buffer points to an
|
||||
invalid opcode.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
SdtOpenEx (
|
||||
IN VOID *Buffer,
|
||||
IN UINTN BufferSize,
|
||||
OUT EFI_ACPI_HANDLE *Handle
|
||||
OUT EFI_ACPI_HANDLE *Handle
|
||||
);
|
||||
|
||||
//
|
||||
@@ -365,8 +365,8 @@ SdtOpenEx (
|
||||
Get AML NameString size.
|
||||
|
||||
@param[in] Buffer AML NameString.
|
||||
@param[out] BufferSize AML NameString size
|
||||
|
||||
@param[out] BufferSize AML NameString size
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER Buffer does not refer to a valid AML NameString.
|
||||
**/
|
||||
@@ -416,11 +416,11 @@ AmlSearchByOpByte (
|
||||
|
||||
/**
|
||||
Return object size.
|
||||
|
||||
|
||||
@param[in] AmlByteEncoding AML Byte Encoding.
|
||||
@param[in] Buffer AML object buffer.
|
||||
@param[in] MaxBufferSize AML object buffer MAX size. The parser can not parse any data exceed this region.
|
||||
|
||||
|
||||
@return Size of the object.
|
||||
**/
|
||||
UINTN
|
||||
@@ -432,9 +432,9 @@ AmlGetObjectSize (
|
||||
|
||||
/**
|
||||
Return object name.
|
||||
|
||||
|
||||
@param[in] AmlHandle AML handle.
|
||||
|
||||
|
||||
@return Name of the object.
|
||||
**/
|
||||
CHAR8 *
|
||||
@@ -444,7 +444,7 @@ AmlGetObjectName (
|
||||
|
||||
/**
|
||||
Retrieve information according to AmlHandle
|
||||
|
||||
|
||||
@param[in] AmlHandle AML handle.
|
||||
@param[in] Index Index of the data to retrieve from the object. In general, indexes read from left-to-right
|
||||
in the ACPI encoding, with index 0 always being the ACPI opcode.
|
||||
@@ -452,7 +452,7 @@ AmlGetObjectName (
|
||||
for the specified index.
|
||||
@param[out] Data Upon return, points to the pointer to the data.
|
||||
@param[out] DataSize Upon return, points to the size of Data.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER AmlHandle does not refer to a valid ACPI object.
|
||||
**/
|
||||
@@ -467,10 +467,10 @@ AmlParseOptionHandleCommon (
|
||||
|
||||
/**
|
||||
Return offset of last option.
|
||||
|
||||
|
||||
@param[in] AmlHandle AML Handle.
|
||||
@param[out] Buffer Upon return, points to the offset after last option.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER AmlHandle does not refer to a valid ACPI object.
|
||||
**/
|
||||
@@ -482,14 +482,14 @@ AmlGetOffsetAfterLastOption (
|
||||
|
||||
/**
|
||||
Return the child ACPI objects from Root Handle.
|
||||
|
||||
|
||||
@param[in] AmlParentHandle Parent handle. It is Root Handle.
|
||||
@param[in] AmlHandle The previously returned handle or NULL to start with the first handle.
|
||||
@param[out] Buffer On return, points to the next returned ACPI handle or NULL if there are no
|
||||
child objects.
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
AmlGetChildFromRoot (
|
||||
@@ -500,14 +500,14 @@ AmlGetChildFromRoot (
|
||||
|
||||
/**
|
||||
Return the child ACPI objects from Non-Root Handle.
|
||||
|
||||
|
||||
@param[in] AmlParentHandle Parent handle. It is Non-Root Handle.
|
||||
@param[in] AmlHandle The previously returned handle or NULL to start with the first handle.
|
||||
@param[out] Buffer On return, points to the next returned ACPI handle or NULL if there are no
|
||||
child objects.
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
AmlGetChildFromNonRoot (
|
||||
@@ -531,16 +531,16 @@ AmlNameFromAslName (
|
||||
|
||||
/**
|
||||
Returns the handle of the ACPI object representing the specified ACPI AML path
|
||||
|
||||
|
||||
@param[in] AmlHandle Points to the handle of the object representing the starting point for the path search.
|
||||
@param[in] AmlPath Points to the ACPI AML path.
|
||||
@param[out] Buffer On return, points to the ACPI object which represents AcpiPath, relative to
|
||||
HandleIn.
|
||||
@param[in] FromRoot TRUE means to find AML path from \ (Root) Node.
|
||||
FALSE means to find AML path from this Node (The HandleIn).
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER HandleIn does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER HandleIn does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
AmlFindPath (
|
||||
@@ -574,7 +574,7 @@ AmlPrintNameSeg (
|
||||
Check if it is AML Root name
|
||||
|
||||
@param[in] Buffer AML path.
|
||||
|
||||
|
||||
@retval TRUE AML path is root.
|
||||
@retval FALSE AML path is not root.
|
||||
**/
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
ACPI Table Protocol Driver
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -150,14 +150,14 @@ AcpiTableAcpiTableConstructor (
|
||||
|
||||
/**
|
||||
Entry point of the ACPI table driver.
|
||||
Creates and initializes an instance of the ACPI Table
|
||||
Creates and initializes an instance of the ACPI Table
|
||||
Protocol and installs it on a new handle.
|
||||
|
||||
@param ImageHandle A handle for the image that is initializing this driver
|
||||
@param SystemTable A pointer to the EFI system table
|
||||
|
||||
@return EFI_SUCCESS Driver initialized successfully
|
||||
@return EFI_LOAD_ERROR Failed to Initialize or has been loaded
|
||||
@return EFI_LOAD_ERROR Failed to Initialize or has been loaded
|
||||
@return EFI_OUT_OF_RESOURCES Could not allocate needed resources
|
||||
|
||||
**/
|
||||
@@ -176,7 +176,7 @@ InitializeAcpiTableDxe (
|
||||
|
||||
@param[in] Handle Table to find.
|
||||
@param[in] TableList Table list to search
|
||||
@param[out] Table Pointer to table found.
|
||||
@param[out] Table Pointer to table found.
|
||||
|
||||
@retval EFI_SUCCESS The function completed successfully.
|
||||
@retval EFI_NOT_FOUND No table found matching the handle specified.
|
||||
|
@@ -1,16 +1,16 @@
|
||||
## @file
|
||||
# ACPI Table Protocol Driver
|
||||
#
|
||||
# This driver initializes ACPI tables (Rsdp, Rsdt and Xsdt) and produces UEFI/PI
|
||||
# This driver initializes ACPI tables (Rsdp, Rsdt and Xsdt) and produces UEFI/PI
|
||||
# services to install/uninstall/manage ACPI tables.
|
||||
#
|
||||
# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>
|
||||
# This program and the accompanying materials are
|
||||
# licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
|
@@ -1,13 +1,13 @@
|
||||
// /** @file
|
||||
// AcpiTableDxe Module Localized Abstract and Description Content
|
||||
//
|
||||
// Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials are
|
||||
// licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// AcpiTableDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials are
|
||||
// licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"ACPI Table DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
ACPI Table Protocol Implementation
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -18,9 +18,9 @@
|
||||
//
|
||||
#include "AcpiTable.h"
|
||||
//
|
||||
// The maximum number of tables that pre-allocated.
|
||||
// The maximum number of tables that pre-allocated.
|
||||
//
|
||||
UINTN mEfiAcpiMaxNumTables = EFI_ACPI_MAX_NUM_TABLES;
|
||||
UINTN mEfiAcpiMaxNumTables = EFI_ACPI_MAX_NUM_TABLES;
|
||||
|
||||
//
|
||||
// Allocation strategy to use for AllocatePages ().
|
||||
@@ -196,7 +196,7 @@ PublishTables (
|
||||
@param TableKey Reurns a key to refer to the ACPI table.
|
||||
|
||||
@return EFI_SUCCESS The table was successfully inserted.
|
||||
@return EFI_INVALID_PARAMETER Either AcpiTableBuffer is NULL, TableKey is NULL, or AcpiTableBufferSize
|
||||
@return EFI_INVALID_PARAMETER Either AcpiTableBuffer is NULL, TableKey is NULL, or AcpiTableBufferSize
|
||||
and the size field embedded in the ACPI table pointed to by AcpiTableBuffer
|
||||
are not in sync.
|
||||
@return EFI_OUT_OF_RESOURCES Insufficient resources exist to complete the request.
|
||||
@@ -253,7 +253,7 @@ InstallAcpiTable (
|
||||
);
|
||||
}
|
||||
FreePool (AcpiTableBufferConst);
|
||||
|
||||
|
||||
//
|
||||
// Add a new table successfully, notify registed callback
|
||||
//
|
||||
@@ -342,8 +342,8 @@ ReallocateAcpiTableBuffer (
|
||||
EFI_ACPI_TABLE_INSTANCE TempPrivateData;
|
||||
EFI_STATUS Status;
|
||||
UINT64 CurrentData;
|
||||
|
||||
CopyMem (&TempPrivateData, AcpiTableInstance, sizeof (EFI_ACPI_TABLE_INSTANCE));
|
||||
|
||||
CopyMem (&TempPrivateData, AcpiTableInstance, sizeof (EFI_ACPI_TABLE_INSTANCE));
|
||||
//
|
||||
// Enlarge the max table number from mEfiAcpiMaxNumTables to mEfiAcpiMaxNumTables + EFI_ACPI_MAX_NUM_TABLES
|
||||
//
|
||||
@@ -384,7 +384,7 @@ ReallocateAcpiTableBuffer (
|
||||
|
||||
Pointer = (UINT8 *) (UINTN) PageAddress;
|
||||
ZeroMem (Pointer, TotalSize);
|
||||
|
||||
|
||||
AcpiTableInstance->Rsdt1 = (EFI_ACPI_DESCRIPTION_HEADER *) Pointer;
|
||||
if ((PcdGet32 (PcdAcpiExposedTableVersions) & EFI_ACPI_TABLE_VERSION_1_0B) != 0) {
|
||||
Pointer += (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + NewMaxTableNumber * sizeof (UINT32));
|
||||
@@ -404,14 +404,14 @@ ReallocateAcpiTableBuffer (
|
||||
CopyMem (&AcpiTableInstance->Rsdp3->XsdtAddress, &CurrentData, sizeof (UINT64));
|
||||
|
||||
//
|
||||
// copy the original Rsdt1, Rsdt3 and Xsdt structure to new buffer
|
||||
// copy the original Rsdt1, Rsdt3 and Xsdt structure to new buffer
|
||||
//
|
||||
if ((PcdGet32 (PcdAcpiExposedTableVersions) & EFI_ACPI_TABLE_VERSION_1_0B) != 0) {
|
||||
CopyMem (AcpiTableInstance->Rsdt1, TempPrivateData.Rsdt1, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT32)));
|
||||
CopyMem (AcpiTableInstance->Rsdt3, TempPrivateData.Rsdt3, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT32)));
|
||||
CopyMem (AcpiTableInstance->Rsdt1, TempPrivateData.Rsdt1, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT32)));
|
||||
CopyMem (AcpiTableInstance->Rsdt3, TempPrivateData.Rsdt3, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT32)));
|
||||
}
|
||||
CopyMem (AcpiTableInstance->Xsdt, TempPrivateData.Xsdt, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT64)));
|
||||
|
||||
|
||||
//
|
||||
// Calculate orignal ACPI table buffer size
|
||||
//
|
||||
@@ -426,10 +426,10 @@ ReallocateAcpiTableBuffer (
|
||||
}
|
||||
|
||||
gBS->FreePages ((EFI_PHYSICAL_ADDRESS)(UINTN)TempPrivateData.Rsdt1, EFI_SIZE_TO_PAGES (TotalSize));
|
||||
|
||||
|
||||
//
|
||||
// Update the Max ACPI table number
|
||||
//
|
||||
//
|
||||
mEfiAcpiMaxNumTables = NewMaxTableNumber;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
@@ -508,7 +508,7 @@ AddTableToList (
|
||||
//
|
||||
// Allocation memory type depends on the type of the table
|
||||
//
|
||||
if ((CurrentTableSignature == EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE) ||
|
||||
if ((CurrentTableSignature == EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE) ||
|
||||
(CurrentTableSignature == EFI_ACPI_4_0_UEFI_ACPI_DATA_TABLE_SIGNATURE)) {
|
||||
//
|
||||
// Allocate memory for the FACS. This structure must be aligned
|
||||
@@ -634,7 +634,7 @@ AddTableToList (
|
||||
|
||||
//
|
||||
// Update pointers in FADT. If tables don't exist this will put NULL pointers there.
|
||||
// Note: If the FIRMWARE_CTRL is non-zero, then X_FIRMWARE_CTRL must be zero, and
|
||||
// Note: If the FIRMWARE_CTRL is non-zero, then X_FIRMWARE_CTRL must be zero, and
|
||||
// vice-versa.
|
||||
//
|
||||
if ((UINT64)(UINTN)AcpiTableInstance->Facs3 < BASE_4GB) {
|
||||
@@ -682,7 +682,7 @@ AddTableToList (
|
||||
&AcpiTableInstance->Fadt3->Header.OemId,
|
||||
6
|
||||
);
|
||||
|
||||
|
||||
if ((PcdGet32 (PcdAcpiExposedTableVersions) & EFI_ACPI_TABLE_VERSION_1_0B) != 0) {
|
||||
//
|
||||
// RSDT OEM information is updated to match FADT OEM information.
|
||||
@@ -714,7 +714,7 @@ AddTableToList (
|
||||
sizeof (UINT64)
|
||||
);
|
||||
AcpiTableInstance->Xsdt->OemRevision = AcpiTableInstance->Fadt3->Header.OemRevision;
|
||||
}
|
||||
}
|
||||
//
|
||||
// Checksum the table
|
||||
//
|
||||
@@ -782,7 +782,7 @@ AddTableToList (
|
||||
//
|
||||
if (AcpiTableInstance->Fadt3 != NULL) {
|
||||
//
|
||||
// Note: If the FIRMWARE_CTRL is non-zero, then X_FIRMWARE_CTRL must be zero, and
|
||||
// Note: If the FIRMWARE_CTRL is non-zero, then X_FIRMWARE_CTRL must be zero, and
|
||||
// vice-versa.
|
||||
//
|
||||
if ((UINT64)(UINTN)AcpiTableInstance->Facs3 < BASE_4GB) {
|
||||
@@ -854,7 +854,7 @@ AddTableToList (
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ((Version & ACPI_TABLE_VERSION_GTE_2_0) != 0) {
|
||||
//
|
||||
// Save a pointer to the table
|
||||
@@ -900,7 +900,7 @@ AddTableToList (
|
||||
Checksum)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
// Checksum the table
|
||||
//
|
||||
@@ -1050,7 +1050,7 @@ AddTableToList (
|
||||
|
||||
@param Handle Table to find.
|
||||
@param TableList Table list to search
|
||||
@param Table Pointer to table found.
|
||||
@param Table Pointer to table found.
|
||||
|
||||
@return EFI_SUCCESS The function completed successfully.
|
||||
@return EFI_NOT_FOUND No table found matching the handle specified.
|
||||
@@ -1100,7 +1100,7 @@ FindTableByHandle (
|
||||
For Acpi 1.0 tables, pass in the Rsdt.
|
||||
For Acpi 2.0 tables, pass in both Rsdt and Xsdt.
|
||||
|
||||
@param Table Pointer to table found.
|
||||
@param Table Pointer to table found.
|
||||
@param NumberOfTableEntries Current number of table entries in the RSDT/XSDT
|
||||
@param Rsdt Pointer to the RSDT to remove from
|
||||
@param Xsdt Pointer to the Xsdt to remove from
|
||||
@@ -1320,7 +1320,7 @@ DeleteTable (
|
||||
// Remove this version from the table
|
||||
//
|
||||
Table->Version = Table->Version &~(Version & ACPI_TABLE_VERSION_GTE_2_0);
|
||||
|
||||
|
||||
//
|
||||
// Remove from Rsdt and Xsdt. We don't care about the return value
|
||||
// because it is acceptable for the table to not exist in Rsdt/Xsdt.
|
||||
@@ -1334,7 +1334,7 @@ DeleteTable (
|
||||
AcpiTableInstance->Xsdt
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
// Free the table, clean up any dependent tables and our private data pointers.
|
||||
//
|
||||
@@ -1392,7 +1392,7 @@ DeleteTable (
|
||||
Checksum)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE:
|
||||
@@ -1417,7 +1417,7 @@ DeleteTable (
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ((Version & ACPI_TABLE_VERSION_GTE_2_0) != 0) {
|
||||
AcpiTableInstance->Dsdt3 = NULL;
|
||||
|
||||
@@ -1640,7 +1640,7 @@ ChecksumCommonTables (
|
||||
OFFSET_OF (EFI_ACPI_DESCRIPTION_HEADER,
|
||||
Checksum)
|
||||
);
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
ACPI Sdt Protocol Driver
|
||||
|
||||
Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. <BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -209,7 +209,7 @@ AmlSearchByOpByte (
|
||||
return &mAmlByteEncoding[Index];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ AmlGetPkgLength (
|
||||
UINT8 ByteCount;
|
||||
UINTN RealLength;
|
||||
UINTN Offset;
|
||||
|
||||
|
||||
//
|
||||
// <bit 7-6: ByteData count that follows (0-3)>
|
||||
// <bit 5-4: Only used if PkgLength < 63>
|
||||
@@ -265,8 +265,8 @@ AmlGetPkgLength (
|
||||
// package length value. The next ByteData will become the next least significant 8 bits
|
||||
// of the resulting value and so on, up to 3 ByteData bytes. Thus, the maximum package
|
||||
// length is 2**28.
|
||||
//
|
||||
|
||||
//
|
||||
|
||||
LeadByte = *Buffer;
|
||||
ByteCount = (UINT8)((LeadByte >> 6) & 0x03);
|
||||
Offset = ByteCount + 1;
|
||||
@@ -295,7 +295,7 @@ AmlGetPkgLength (
|
||||
ASSERT (0);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
*PkgLength = RealLength;
|
||||
return Offset;
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
ACPI Sdt Protocol Driver
|
||||
|
||||
Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. <BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -16,14 +16,14 @@
|
||||
|
||||
/**
|
||||
Return the child objects buffer from AML Handle's buffer.
|
||||
|
||||
|
||||
@param[in] AmlParentHandle Parent handle.
|
||||
@param[in] CurrentBuffer The current child buffer.
|
||||
@param[out] Buffer On return, points to the next returned child buffer or NULL if there are no
|
||||
child buffer.
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER AmlParentHandle does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER AmlParentHandle does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
AmlGetChildFromObjectBuffer (
|
||||
@@ -72,14 +72,14 @@ AmlGetChildFromObjectBuffer (
|
||||
|
||||
/**
|
||||
Return the child ACPI objects from Root Handle.
|
||||
|
||||
|
||||
@param[in] AmlParentHandle Parent handle. It is Root Handle.
|
||||
@param[in] AmlHandle The previously returned handle or NULL to start with the first handle.
|
||||
@param[out] Buffer On return, points to the next returned ACPI handle or NULL if there are no
|
||||
child objects.
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
AmlGetChildFromRoot (
|
||||
@@ -104,14 +104,14 @@ AmlGetChildFromRoot (
|
||||
|
||||
/**
|
||||
Return the child objects buffer from AML Handle's option list.
|
||||
|
||||
|
||||
@param[in] AmlParentHandle Parent handle.
|
||||
@param[in] AmlHandle The current child handle.
|
||||
@param[out] Buffer On return, points to the next returned child buffer or NULL if there are no
|
||||
child buffer.
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER AmlParentHandle does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER AmlParentHandle does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
AmlGetChildFromOptionList (
|
||||
@@ -170,14 +170,14 @@ AmlGetChildFromOptionList (
|
||||
|
||||
/**
|
||||
Return the child objects buffer from AML Handle's object child list.
|
||||
|
||||
|
||||
@param[in] AmlParentHandle Parent handle.
|
||||
@param[in] AmlHandle The current child handle.
|
||||
@param[out] Buffer On return, points to the next returned child buffer or NULL if there are no
|
||||
child buffer.
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER AmlParentHandle does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER AmlParentHandle does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
AmlGetChildFromObjectChildList (
|
||||
@@ -237,14 +237,14 @@ AmlGetChildFromObjectChildList (
|
||||
|
||||
/**
|
||||
Return the child ACPI objects from Non-Root Handle.
|
||||
|
||||
|
||||
@param[in] AmlParentHandle Parent handle. It is Non-Root Handle.
|
||||
@param[in] AmlHandle The previously returned handle or NULL to start with the first handle.
|
||||
@param[out] Buffer On return, points to the next returned ACPI handle or NULL if there are no
|
||||
child objects.
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
AmlGetChildFromNonRoot (
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
ACPI Sdt Protocol Driver
|
||||
|
||||
Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. <BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -16,11 +16,11 @@
|
||||
|
||||
/**
|
||||
Construct node list according to the AML handle.
|
||||
|
||||
|
||||
@param[in] AmlHandle AML handle.
|
||||
@param[in] AmlRootNodeList AML root node list.
|
||||
@param[in] AmlParentNodeList AML parent node list.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER AML handle does not refer to a valid ACPI object.
|
||||
**/
|
||||
@@ -33,11 +33,11 @@ AmlConstructNodeList (
|
||||
|
||||
/**
|
||||
Create AML Node.
|
||||
|
||||
|
||||
@param[in] NameSeg AML NameSeg.
|
||||
@param[in] Parent AML parent node list.
|
||||
@param[in] AmlByteEncoding AML Byte Encoding.
|
||||
|
||||
|
||||
@return AML Node.
|
||||
**/
|
||||
EFI_AML_NODE_LIST *
|
||||
@@ -66,11 +66,11 @@ AmlCreateNode (
|
||||
|
||||
/**
|
||||
Find the AML NameSeg in the children of AmlParentNodeList.
|
||||
|
||||
|
||||
@param[in] NameSeg AML NameSeg.
|
||||
@param[in] AmlParentNodeList AML parent node list.
|
||||
@param[in] Create TRUE means to create node if not found.
|
||||
|
||||
|
||||
@return AmlChildNode whoes name is same as NameSeg.
|
||||
**/
|
||||
EFI_AML_NODE_LIST *
|
||||
@@ -120,12 +120,12 @@ AmlFindNodeInThis (
|
||||
|
||||
/**
|
||||
Find the AML NameString in the children of AmlParentNodeList or AmlRootNodeList.
|
||||
|
||||
|
||||
@param[in] NameString AML NameString.
|
||||
@param[in] AmlRootNodeList AML root node list.
|
||||
@param[in] AmlParentNodeList AML parent node list.
|
||||
@param[in] Create TRUE means to create node if not found.
|
||||
|
||||
|
||||
@return AmlChildNode whoes name is same as NameSeg.
|
||||
**/
|
||||
EFI_AML_NODE_LIST *
|
||||
@@ -166,7 +166,7 @@ AmlFindNodeInTheTree (
|
||||
} else {
|
||||
AmlCurrentNodeList = AmlParentNodeList;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Handle name segment
|
||||
//
|
||||
@@ -206,13 +206,13 @@ AmlFindNodeInTheTree (
|
||||
|
||||
/**
|
||||
Insert the NameString to the AmlNodeList.
|
||||
|
||||
|
||||
@param[in] NameString AML NameString.
|
||||
@param[in] Buffer Buffer for the Node.
|
||||
@param[in] Size Size for the Node.
|
||||
@param[in] AmlRootNodeList AML root node list.
|
||||
@param[in] AmlParentNodeList AML parent node list.
|
||||
|
||||
|
||||
@return AmlChildNode whoes name is NameString.
|
||||
**/
|
||||
EFI_AML_NODE_LIST *
|
||||
@@ -278,11 +278,11 @@ AmlInsertNodeToTree (
|
||||
|
||||
/**
|
||||
Construct child node list according to the AML handle.
|
||||
|
||||
|
||||
@param[in] AmlHandle AML handle.
|
||||
@param[in] AmlRootNodeList AML root node list.
|
||||
@param[in] AmlParentNodeList AML parent node list.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER AML handle does not refer to a valid ACPI object.
|
||||
**/
|
||||
@@ -369,11 +369,11 @@ AmlConstructNodeListForChild (
|
||||
|
||||
/**
|
||||
Construct node list according to the AML handle.
|
||||
|
||||
|
||||
@param[in] AmlHandle AML handle.
|
||||
@param[in] AmlRootNodeList AML root node list.
|
||||
@param[in] AmlParentNodeList AML parent node list.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER AML handle does not refer to a valid ACPI object.
|
||||
**/
|
||||
@@ -420,7 +420,7 @@ AmlConstructNodeList (
|
||||
|
||||
/**
|
||||
Destruct node list
|
||||
|
||||
|
||||
@param[in] AmlParentNodeList AML parent node list.
|
||||
**/
|
||||
VOID
|
||||
@@ -465,7 +465,7 @@ AmlDestructNodeList (
|
||||
|
||||
/**
|
||||
Dump node list
|
||||
|
||||
|
||||
@param[in] AmlParentNodeList AML parent node list.
|
||||
@param[in] Level Output debug level.
|
||||
**/
|
||||
@@ -502,16 +502,16 @@ AmlDumpNodeInfo (
|
||||
|
||||
/**
|
||||
Returns the handle of the ACPI object representing the specified ACPI AML path
|
||||
|
||||
|
||||
@param[in] AmlHandle Points to the handle of the object representing the starting point for the path search.
|
||||
@param[in] AmlPath Points to the ACPI AML path.
|
||||
@param[out] Buffer On return, points to the ACPI object which represents AcpiPath, relative to
|
||||
HandleIn.
|
||||
@param[in] FromRoot TRUE means to find AML path from \ (Root) Node.
|
||||
FALSE means to find AML path from this Node (The HandleIn).
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_INVALID_PARAMETER HandleIn does not refer to a valid ACPI object.
|
||||
@retval EFI_INVALID_PARAMETER HandleIn does not refer to a valid ACPI object.
|
||||
**/
|
||||
EFI_STATUS
|
||||
AmlFindPath (
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
ACPI Sdt Protocol Driver
|
||||
|
||||
Copyright (c) 2010, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. <BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/**
|
||||
Retrieve option term according to AmlByteEncoding and Buffer.
|
||||
|
||||
|
||||
@param[in] AmlByteEncoding AML Byte Encoding.
|
||||
@param[in] Buffer AML buffer.
|
||||
@param[in] MaxBufferSize AML buffer MAX size. The parser can not parse any data exceed this region.
|
||||
@@ -25,7 +25,7 @@
|
||||
for the specified index.
|
||||
@param[out] Data Upon return, points to the pointer to the data.
|
||||
@param[out] DataSize Upon return, points to the size of Data.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER Buffer does not refer to a valid ACPI object.
|
||||
**/
|
||||
@@ -125,7 +125,7 @@ AmlParseOptionTerm (
|
||||
|
||||
/**
|
||||
Retrieve information according to AmlByteEncoding and Buffer.
|
||||
|
||||
|
||||
@param[in] AmlByteEncoding AML Byte Encoding.
|
||||
@param[in] Buffer AML buffer.
|
||||
@param[in] MaxBufferSize AML buffer MAX size. The parser can not parse any data exceed this region.
|
||||
@@ -135,7 +135,7 @@ AmlParseOptionTerm (
|
||||
for the specified index.
|
||||
@param[out] Data Upon return, points to the pointer to the data.
|
||||
@param[out] DataSize Upon return, points to the size of Data.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER Buffer does not refer to a valid ACPI object.
|
||||
**/
|
||||
@@ -286,11 +286,11 @@ AmlParseOptionCommon (
|
||||
|
||||
/**
|
||||
Return object size.
|
||||
|
||||
|
||||
@param[in] AmlByteEncoding AML Byte Encoding.
|
||||
@param[in] Buffer AML object buffer.
|
||||
@param[in] MaxBufferSize AML object buffer MAX size. The parser can not parse any data exceed this region.
|
||||
|
||||
|
||||
@return Size of the object.
|
||||
**/
|
||||
UINTN
|
||||
@@ -321,9 +321,9 @@ AmlGetObjectSize (
|
||||
|
||||
/**
|
||||
Return object name.
|
||||
|
||||
|
||||
@param[in] AmlHandle AML handle.
|
||||
|
||||
|
||||
@return Name of the object.
|
||||
**/
|
||||
CHAR8 *
|
||||
@@ -374,10 +374,10 @@ AmlGetObjectName (
|
||||
|
||||
/**
|
||||
Return offset of last option.
|
||||
|
||||
|
||||
@param[in] AmlHandle AML Handle.
|
||||
@param[out] Buffer Upon return, points to the offset after last option.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER AmlHandle does not refer to a valid ACPI object.
|
||||
**/
|
||||
@@ -419,7 +419,7 @@ AmlGetOffsetAfterLastOption (
|
||||
|
||||
/**
|
||||
Retrieve information according to AmlHandle
|
||||
|
||||
|
||||
@param[in] AmlHandle AML handle.
|
||||
@param[in] Index Index of the data to retrieve from the object. In general, indexes read from left-to-right
|
||||
in the ACPI encoding, with index 0 always being the ACPI opcode.
|
||||
@@ -427,7 +427,7 @@ AmlGetOffsetAfterLastOption (
|
||||
for the specified index.
|
||||
@param[out] Data Upon return, points to the pointer to the data.
|
||||
@param[out] DataSize Upon return, points to the size of Data.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER AmlHandle does not refer to a valid ACPI object.
|
||||
**/
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
ACPI Sdt Protocol Driver
|
||||
|
||||
Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. <BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -18,7 +18,7 @@
|
||||
Check if it is AML Root name
|
||||
|
||||
@param[in] Buffer AML path.
|
||||
|
||||
|
||||
@retval TRUE AML path is root.
|
||||
@retval FALSE AML path is not root.
|
||||
**/
|
||||
@@ -38,7 +38,7 @@ AmlIsRootPath (
|
||||
Check if it is AML LeadName.
|
||||
|
||||
@param[in] Ch Char.
|
||||
|
||||
|
||||
@retval TRUE Char is AML LeadName.
|
||||
@retval FALSE Char is not AML LeadName.
|
||||
**/
|
||||
@@ -58,7 +58,7 @@ AmlIsLeadName (
|
||||
Check if it is AML Name.
|
||||
|
||||
@param[in] Ch Char.
|
||||
|
||||
|
||||
@retval TRUE Char is AML Name.
|
||||
@retval FALSE Char is not AML Name.
|
||||
**/
|
||||
@@ -78,7 +78,7 @@ AmlIsName (
|
||||
Return is buffer is AML NameSeg.
|
||||
|
||||
@param[in] Buffer AML NameSement.
|
||||
|
||||
|
||||
@retval TRUE It is AML NameSegment.
|
||||
@retval FALSE It is not AML NameSegment.
|
||||
**/
|
||||
@@ -103,8 +103,8 @@ AmlIsNameSeg (
|
||||
Get AML NameString size.
|
||||
|
||||
@param[in] Buffer AML NameString.
|
||||
@param[out] BufferSize AML NameString size
|
||||
|
||||
@param[out] BufferSize AML NameString size
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER Buffer does not refer to a valid AML NameString.
|
||||
**/
|
||||
@@ -183,7 +183,7 @@ AmlGetNameStringSize (
|
||||
Check if it is ASL LeadName.
|
||||
|
||||
@param[in] Ch Char.
|
||||
|
||||
|
||||
@retval TRUE Char is ASL LeadName.
|
||||
@retval FALSE Char is not ASL LeadName.
|
||||
**/
|
||||
@@ -203,7 +203,7 @@ AmlIsAslLeadName (
|
||||
Check if it is ASL Name.
|
||||
|
||||
@param[in] Ch Char.
|
||||
|
||||
|
||||
@retval TRUE Char is ASL Name.
|
||||
@retval FALSE Char is not ASL Name.
|
||||
**/
|
||||
@@ -223,7 +223,7 @@ AmlIsAslName (
|
||||
Get ASL NameString size.
|
||||
|
||||
@param[in] Buffer ASL NameString.
|
||||
|
||||
|
||||
@return ASL NameString size.
|
||||
**/
|
||||
UINTN
|
||||
@@ -237,7 +237,7 @@ AmlGetAslNameSegLength (
|
||||
if (*Buffer == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Length = 0;
|
||||
//
|
||||
// 1st
|
||||
@@ -275,7 +275,7 @@ AmlGetAslNameSegLength (
|
||||
@param[out] Root On return, points to Root char number.
|
||||
@param[out] Parent On return, points to Parent char number.
|
||||
@param[out] SegCount On return, points to Segment count.
|
||||
|
||||
|
||||
@return ASL NameString size.
|
||||
**/
|
||||
UINTN
|
||||
@@ -532,7 +532,7 @@ AmlPrintNameString (
|
||||
//
|
||||
SegCount = 1;
|
||||
}
|
||||
|
||||
|
||||
AmlPrintNameSeg (Buffer);
|
||||
Buffer += AML_NAME_SEG_SIZE;
|
||||
for (Index = 0; Index < SegCount - 1; Index++) {
|
||||
|
Reference in New Issue
Block a user