/** @file
ACPI Sdt Protocol Driver
Copyright (c) 2010, 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
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include "AcpiTable.h"
/**
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.
**/
)
{
//
// Root is considered as SCOPE, which has TermList.
// We need return only Object in TermList.
//
if (AmlByteEncoding == NULL) {
return EFI_INVALID_PARAMETER;
}
//
// NOTE: We need return everything, because user might need parse the returned object.
//
*Buffer = CurrentBuffer;
return EFI_SUCCESS;
}
);
if (DataSize == 0) {
return EFI_INVALID_PARAMETER;
}
}
//
// No more
//
return EFI_SUCCESS;
}
/**
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.
**/
)
{
//
// First One
//
} else {
}
}
/**
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.
**/
)
{
&DataType,
);
return EFI_INVALID_PARAMETER;
}
if (DataType == EFI_ACPI_DATA_TYPE_NONE) {
//
// Not found
//
break;
}
//
// Find it, and Check Data
//
if ((DataType == EFI_ACPI_DATA_TYPE_CHILD) &&
//
// Buffer < Data means current node is next one
//
return EFI_SUCCESS;
}
//
// Not Child
//
Index ++;
}
return EFI_SUCCESS;
}
/**
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.
**/
)
{
//
// No ObjectList
//
return EFI_SUCCESS;
}
//
// Do we need add node within METHOD?
// Yes, just add Object is OK. But we need filter NameString for METHOD invoke.
//
//
// Now, we get the last node.
//
return EFI_INVALID_PARAMETER;
}
//
// Go through all the reset buffer.
//
//
// Buffer < Data means next node is first object
//
} else if ((UINTN)AmlHandle->Buffer + AmlHandle->Size < (UINTN)AmlParentHandle->Buffer + AmlParentHandle->Size) {
//
// There is still more node
//
} else {
//
// No more data
//
return EFI_SUCCESS;
}
}
/**
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.
**/
)
{
//
// NULL means first one
//
}
//
// 1. Get Option
//
return EFI_INVALID_PARAMETER;
}
return EFI_SUCCESS;
}
//
// 2. search ObjectList
//
}