ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

ACPI_STATUS acpi_tb_get_table_rsdt ( u32 number_of_tables)

Definition at line 450 of file tbget.c.

{
    ACPI_TABLE_DESC         table_info;
    ACPI_STATUS             status = AE_OK;
    ACPI_PHYSICAL_ADDRESS   physical_address;
    u32                     signature_length;
    char                    *table_signature;


    /*
     * Get the RSDT from the RSDP
     */

    /*
     * For RSDP revision 0 or 1, we use the RSDT.
     * For RSDP revision 2 (and above), we use the XSDT
     */
    if (acpi_gbl_RSDP->revision < 2) {
#ifdef _IA64
        /* 0.71 RSDP has 64bit Rsdt address field */
        physical_address = ((RSDP_DESCRIPTOR_REV071 *)acpi_gbl_RSDP)->rsdt_physical_address;
#else
        physical_address = (ACPI_PHYSICAL_ADDRESS) acpi_gbl_RSDP->rsdt_physical_address;
#endif
        table_signature = RSDT_SIG;
        signature_length = sizeof (RSDT_SIG) -1;
    }
    else {
        physical_address = (ACPI_PHYSICAL_ADDRESS)
                   ACPI_GET_ADDRESS (acpi_gbl_RSDP->xsdt_physical_address);
        table_signature = XSDT_SIG;
        signature_length = sizeof (XSDT_SIG) -1;
    }


    /* Get the RSDT/XSDT */

    status = acpi_tb_get_table (physical_address, NULL, &table_info);
    if (ACPI_FAILURE (status)) {
        return (status);
    }


    /* Check the RSDT or XSDT signature */

    if (STRNCMP ((char *) table_info.pointer, table_signature,
              signature_length)) {
        /* Invalid RSDT or XSDT signature */

        REPORT_ERROR (("Invalid signature where RSDP indicates %s should be located\n",
                  table_signature));

        return (AE_NO_ACPI_TABLES);
    }


    /* Valid RSDT signature, verify the checksum */

    status = acpi_tb_verify_table_checksum (table_info.pointer);


    /* Convert and/or copy to an XSDT structure */

    status = acpi_tb_convert_to_xsdt (&table_info, number_of_tables);
    if (ACPI_FAILURE (status)) {
        return (status);
    }

    /* Save the table pointers and allocation info */

    status = acpi_tb_init_table_descriptor (ACPI_TABLE_XSDT, &table_info);
    if (ACPI_FAILURE (status)) {
        return (status);
    }

    acpi_gbl_XSDT = (XSDT_DESCRIPTOR *) table_info.pointer;

    return (status);
}

Generated on Sat May 26 2012 05:21:35 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.