FreeBSD/sys/contrib/dev/acpica/components/namespace/nsinit.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiNsInitializeObjects
 *
 * PARAMETERS:  None
 *
 * RETURN:      Status
 *
 * DESCRIPTION: Walk the entire namespace and perform any necessary
 *              initialization on the objects found therein
 *
 ******************************************************************************/


Status

Walk the entire namespace and perform any necessary
initialization on the objects found therein
Status Walk the entire namespace and perform any necessary initialization on the objects found therein
ACPI_STATUS
AcpiNsInitializeObjects (
    void)
{
    ACPI_STATUS             Status;
    ACPI_INIT_WALK_INFO     Info;
    ACPI_FUNCTION_TRACE (NsInitializeObjects);
    ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
        "[Init] Completing Initialization of ACPI Objects\n"));
    ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
        "**** Starting initialization of namespace objects ****\n"));
    ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
        "Completing Region/Field/Buffer/Package initialization:\n"));
    memset (&Info, 0, sizeof (ACPI_INIT_WALK_INFO));
    Status = AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
        ACPI_UINT32_MAX, AcpiNsInitOneObject, NULL,
        &Info, NULL);
    if (ACPI_FAILURE (Status))
    {
        ACPI_EXCEPTION ((AE_INFO, Status, "During WalkNamespace"));
    }
    ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
        "    Initialized %u/%u Regions %u/%u Fields %u/%u "
        "Buffers %u/%u Packages (%u nodes)\n",
        Info.OpRegionInit,  Info.OpRegionCount,
        Info.FieldInit,     Info.FieldCount,
        Info.BufferInit,    Info.BufferCount,
        Info.PackageInit,   Info.PackageCount, Info.ObjectCount));
    ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
        "%u Control Methods found\n%u Op Regions found\n",
        Info.MethodCount, Info.OpRegionCount));
    return_ACPI_STATUS (AE_OK);
}
ACPI_STATUS AcpiNsInitializeObjects ( void ) { ACPI_STATUS Status ; ACPI_INIT_WALK_INFO Info ; ACPI_FUNCTION_TRACE ( NsInitializeObjects ) ; ACPI_DEBUG_PRINT ( ( ACPI_DB_EXEC , " \n " ) ) ; ACPI_DEBUG_PRINT ( ( ACPI_DB_DISPATCH , " \n " ) ) ; ACPI_DEBUG_PRINT_RAW ( ( ACPI_DB_INIT , " \n " ) ) ; memset ( & Info , 0 , sizeof ( ACPI_INIT_WALK_INFO ) ) ; Status = AcpiWalkNamespace ( ACPI_TYPE_ANY , ACPI_ROOT_OBJECT , ACPI_UINT32_MAX , AcpiNsInitOneObject , NULL , & Info , NULL ) ; if ( ACPI_FAILURE ( Status ) ) { ACPI_EXCEPTION ( ( AE_INFO , Status , " " ) ) ; } ACPI_DEBUG_PRINT_RAW ( ( ACPI_DB_INIT , " " " \n " , Info . OpRegionInit , Info . OpRegionCount , Info . FieldInit , Info . FieldCount , Info . BufferInit , Info . BufferCount , Info . PackageInit , Info . PackageCount , Info . ObjectCount ) ) ; ACPI_DEBUG_PRINT ( ( ACPI_DB_DISPATCH , " \n \n " , Info . MethodCount , Info . OpRegionCount ) ) ; return_ACPI_STATUS ( AE_OK ) ; }
FUNCTION:    AcpiNsInitializeObjects
 PARAMETERS:  None
FUNCTION : AcpiNsInitializeObjects PARAMETERS : None
/* Set all init info to zero */ /* Walk entire namespace from the supplied root */