acpi_find_root_pointer(ACPI_PHYSICAL_ADDRESSING, rsdp_address); 
if (ACPI_FAILURE(acpi_find_root_pointer(ACPI_PHYSICAL_ADDRESSING, rsdp_address))) { printk("%s: System description tables not found\n", __FUNCTION__); goto out_err; } 
int __init get_memcfg_from_srat(void){	struct acpi_table_header *header = NULL;	struct acpi_table_rsdp *rsdp = NULL;	struct acpi_table_rsdt *rsdt = NULL;	struct acpi_pointer *rsdp_address = NULL;	struct acpi_table_rsdt saved_rsdt;	int tables = 0;	int i = 0;	acpi_find_root_pointer(ACPI_PHYSICAL_ADDRESSING, rsdp_address);	if (rsdp_address->pointer_type == ACPI_PHYSICAL_POINTER) {		printk("%s: assigning address to rsdp\n", __FUNCTION__);		rsdp = (struct acpi_table_rsdp *)				(u32)rsdp_address->pointer.physical;	} else {		printk("%s: rsdp_address is not a physical pointer\n", __FUNCTION__);		goto out_err;	}	if (!rsdp) {		printk("%s: Didn't find ACPI root!\n", __FUNCTION__);		goto out_err;	}	printk(KERN_INFO "%.8s v%d [%.6s]\n", rsdp->signature, rsdp->revision,		rsdp->oem_id);	if (strncmp(rsdp->signature, RSDP_SIG,strlen(RSDP_SIG))) {		printk(KERN_WARNING "%s: RSDP table signature incorrect\n", __FUNCTION__);		goto out_err;	}	rsdt = (struct acpi_table_rsdt *)	    boot_ioremap(rsdp->rsdt_address, sizeof(struct acpi_table_rsdt));	if (!rsdt) {		printk(KERN_WARNING		       "%s: ACPI: Invalid root system description tables (RSDT)\n",		       __FUNCTION__);		goto out_err;	}	header = & rsdt->header;	if (strncmp(header->signature, RSDT_SIG, strlen(RSDT_SIG))) {		printk(KERN_WARNING "ACPI: RSDT signature incorrect\n");		goto out_err;	}	/* 	 * The number of tables is computed by taking the 	 * size of all entries (header size minus total 	 * size of RSDT) divided by the size of each entry	 * (4-byte table pointers).	 */	tables = (header->length - sizeof(struct acpi_table_header)) / 4;	if (!tables)		goto out_err;	memcpy(&saved_rsdt, rsdt, sizeof(saved_rsdt));	if (saved_rsdt.header.length > sizeof(saved_rsdt)) {		printk(KERN_WARNING "ACPI: Too big length in RSDT: %d\n",		       saved_rsdt.header.length);		goto out_err;	}	printk("Begin SRAT table scan....\n");	for (i = 0; i < tables; i++) {		/* Map in header, then map in full table length. */		header = (struct acpi_table_header *)			boot_ioremap(saved_rsdt.entry[i], sizeof(struct acpi_table_header));		if (!header)			break;		header = (struct acpi_table_header *)			boot_ioremap(saved_rsdt.entry[i], header->length);		if (!header)			break;		if (strncmp((char *) &header->signature, "SRAT", 4))			continue;		/* we've found the srat table. don't need to look at any more tables */		return acpi20_parse_srat((struct acpi_table_srat *)header);	}out_err:	printk("failed to get NUMA memory information from SRAT table\n");	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/5d35704028d09a183448daceab5dcb94f21a3645/srat.c/clean/arch/i386/kernel/srat.c