Ejemplo n.º 1
0
/*******************************************************************************
 *
 * FUNCTION:    acpi_load_tables
 *
 * PARAMETERS:  None
 *
 * RETURN:      Status
 *
 * DESCRIPTION: This function is called to load the ACPI tables from the
 *              provided RSDT
 *
 ******************************************************************************/
acpi_status acpi_load_tables(void)
{
	struct acpi_pointer rsdp_address;
	acpi_status status;

	ACPI_FUNCTION_TRACE(acpi_load_tables);

	/* Get the RSDP */

	status = acpi_os_get_root_pointer(ACPI_LOGICAL_ADDRESSING,
					  &rsdp_address);
	if (ACPI_FAILURE(status)) {
		ACPI_EXCEPTION((AE_INFO, status, "Could not get the RSDP"));
		goto error_exit;
	}

	/* Map and validate the RSDP */

	acpi_gbl_table_flags = rsdp_address.pointer_type;

	status = acpi_tb_verify_rsdp(&rsdp_address);
	if (ACPI_FAILURE(status)) {
		ACPI_EXCEPTION((AE_INFO, status, "During RSDP validation"));
		goto error_exit;
	}

	/* Get the RSDT via the RSDP */

	status = acpi_tb_get_table_rsdt();
	if (ACPI_FAILURE(status)) {
		ACPI_EXCEPTION((AE_INFO, status, "Could not load RSDT"));
		goto error_exit;
	}

	/* Now get the tables needed by this subsystem (FADT, DSDT, etc.) */

	status = acpi_tb_get_required_tables();
	if (ACPI_FAILURE(status)) {
		ACPI_EXCEPTION((AE_INFO, status,
				"Could not get all required tables (DSDT/FADT/FACS)"));
		goto error_exit;
	}

	ACPI_DEBUG_PRINT((ACPI_DB_INIT, "ACPI Tables successfully acquired\n"));

	/* Load the namespace from the tables */

	status = acpi_ns_load_namespace();
	if (ACPI_FAILURE(status)) {
		ACPI_EXCEPTION((AE_INFO, status, "Could not load namespace"));
		goto error_exit;
	}

	return_ACPI_STATUS(AE_OK);

      error_exit:
	ACPI_EXCEPTION((AE_INFO, status, "Could not load tables"));
	return_ACPI_STATUS(status);
}
Ejemplo n.º 2
0
acpi_status
acpi_load_tables (void)
{
    struct acpi_pointer             rsdp_address;
    acpi_status                     status;


    ACPI_FUNCTION_TRACE ("acpi_load_tables");


    /* Get the RSDP */

    status = acpi_os_get_root_pointer (ACPI_LOGICAL_ADDRESSING,
                                       &rsdp_address);
    if (ACPI_FAILURE (status)) {
        ACPI_REPORT_ERROR (("acpi_load_tables: Could not get RSDP, %s\n",
                            acpi_format_exception (status)));
        goto error_exit;
    }

    /* Map and validate the RSDP */

    acpi_gbl_table_flags = rsdp_address.pointer_type;

    status = acpi_tb_verify_rsdp (&rsdp_address);
    if (ACPI_FAILURE (status)) {
        ACPI_REPORT_ERROR (("acpi_load_tables: RSDP Failed validation: %s\n",
                            acpi_format_exception (status)));
        goto error_exit;
    }

    /* Get the RSDT via the RSDP */

    status = acpi_tb_get_table_rsdt ();
    if (ACPI_FAILURE (status)) {
        ACPI_REPORT_ERROR (("acpi_load_tables: Could not load RSDT: %s\n",
                            acpi_format_exception (status)));
        goto error_exit;
    }

    /* Now get the tables needed by this subsystem (FADT, DSDT, etc.) */

    status = acpi_tb_get_required_tables ();
    if (ACPI_FAILURE (status)) {
        ACPI_REPORT_ERROR (("acpi_load_tables: Error getting required tables (DSDT/FADT/FACS): %s\n",
                            acpi_format_exception (status)));
        goto error_exit;
    }

    ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "ACPI Tables successfully acquired\n"));


    /* Load the namespace from the tables */

    status = acpi_ns_load_namespace ();
    if (ACPI_FAILURE (status)) {
        ACPI_REPORT_ERROR (("acpi_load_tables: Could not load namespace: %s\n",
                            acpi_format_exception (status)));
        goto error_exit;
    }

    return_ACPI_STATUS (AE_OK);


error_exit:
    ACPI_REPORT_ERROR (("acpi_load_tables: Could not load tables: %s\n",
                        acpi_format_exception (status)));

    return_ACPI_STATUS (status);
}
Ejemplo n.º 3
0
acpi_status
acpi_load_tables (void)
{
	ACPI_PHYSICAL_ADDRESS   rsdp_physical_address;
	acpi_status             status;
	u32                     number_of_tables = 0;


	FUNCTION_TRACE ("Acpi_load_tables");


	/* Get the RSDP */

	status = acpi_os_get_root_pointer (ACPI_LOGICAL_ADDRESSING,
			  &rsdp_physical_address);
	if (ACPI_FAILURE (status)) {
		REPORT_ERROR (("Acpi_load_tables: Could not get RSDP, %s\n",
				  acpi_format_exception (status)));
		goto error_exit;
	}

	/* Map and validate the RSDP */

	status = acpi_tb_verify_rsdp (rsdp_physical_address);
	if (ACPI_FAILURE (status)) {
		REPORT_ERROR (("Acpi_load_tables: RSDP Failed validation: %s\n",
				  acpi_format_exception (status)));
		goto error_exit;
	}

	/* Get the RSDT via the RSDP */

	status = acpi_tb_get_table_rsdt (&number_of_tables);
	if (ACPI_FAILURE (status)) {
		REPORT_ERROR (("Acpi_load_tables: Could not load RSDT: %s\n",
				  acpi_format_exception (status)));
		goto error_exit;
	}

	/* Now get the rest of the tables */

	status = acpi_tb_get_all_tables (number_of_tables, NULL);
	if (ACPI_FAILURE (status)) {
		REPORT_ERROR (("Acpi_load_tables: Error getting required tables (DSDT/FADT/FACS): %s\n",
				  acpi_format_exception (status)));
		goto error_exit;
	}

	ACPI_DEBUG_PRINT ((ACPI_DB_OK, "ACPI Tables successfully loaded\n"));


	/* Load the namespace from the tables */

	status = acpi_ns_load_namespace ();
	if (ACPI_FAILURE (status)) {
		REPORT_ERROR (("Acpi_load_tables: Could not load namespace: %s\n",
				  acpi_format_exception (status)));
		goto error_exit;
	}

	return_ACPI_STATUS (AE_OK);


error_exit:
	REPORT_ERROR (("Acpi_load_tables: Could not load tables: %s\n",
			  acpi_format_exception (status)));

	return_ACPI_STATUS (status);
}