예제 #1
0
파일: nsload.c 프로젝트: 274914765/C
acpi_status acpi_ns_load_namespace(void)
{
    acpi_status status;

    ACPI_FUNCTION_TRACE(acpi_load_name_space);

    /* There must be at least a DSDT installed */

    if (acpi_gbl_DSDT == NULL) {
        ACPI_ERROR((AE_INFO, "DSDT is not in memory"));
        return_ACPI_STATUS(AE_NO_ACPI_TABLES);
    }

    /*
     * Load the namespace.  The DSDT is required,
     * but the SSDT and PSDT tables are optional.
     */
    status = acpi_ns_load_table_by_type(ACPI_TABLE_ID_DSDT);
    if (ACPI_FAILURE(status)) {
        return_ACPI_STATUS(status);
    }

    /* Ignore exceptions from these */

    (void)acpi_ns_load_table_by_type(ACPI_TABLE_ID_SSDT);
    (void)acpi_ns_load_table_by_type(ACPI_TABLE_ID_PSDT);

    ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT,
                  "ACPI Namespace successfully loaded at root %p\n",
                  acpi_gbl_root_node));

    return_ACPI_STATUS(status);
}
예제 #2
0
acpi_status acpi_ns_load_namespace(void)
{
	acpi_status status;

	ACPI_FUNCTION_TRACE(acpi_load_name_space);

	

	if (acpi_gbl_DSDT == NULL) {
		ACPI_ERROR((AE_INFO, "DSDT is not in memory"));
		return_ACPI_STATUS(AE_NO_ACPI_TABLES);
	}

	status = acpi_ns_load_table_by_type(ACPI_TABLE_ID_DSDT);
	if (ACPI_FAILURE(status)) {
		return_ACPI_STATUS(status);
	}

	

	(void)acpi_ns_load_table_by_type(ACPI_TABLE_ID_SSDT);
	(void)acpi_ns_load_table_by_type(ACPI_TABLE_ID_PSDT);

	ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT,
			      "ACPI Namespace successfully loaded at root %p\n",
			      acpi_gbl_root_node));

	return_ACPI_STATUS(status);
}