FreeBSD/sys/x86/acpica/srat.c
/*
 * Look for an ACPI System Resource Affinity Table ("SRAT")
 */
Look for an ACPI System Resource Affinity Table ("SRAT")
Look for an ACPI System Resource Affinity Table ( " SRAT " )
static int
parse_srat(void)
{
	int error;
	if (resource_disabled("srat", 0))
		return (-1);
	srat_physaddr = acpi_find_table(ACPI_SIG_SRAT);
	if (srat_physaddr == 0)
		return (-1);
	srat = acpi_map_table(srat_physaddr, ACPI_SIG_SRAT);
	error = 0;
	srat_walk_table(srat_parse_entry, &error);
	acpi_unmap_table(srat);
	srat = NULL;
	if (error || check_domains() != 0 || check_phys_avail() != 0 ||
	    renumber_domains() != 0) {
		srat_physaddr = 0;
		return (-1);
	}
#ifdef VM_NUMA_ALLOC
	vm_ndomains = ndomain;
	mem_affinity = mem_info;
#endif
	return (0);
}
static int parse_srat ( void ) { int error ; if ( resource_disabled ( " " , 0 ) ) return ( -1 ) ; srat_physaddr = acpi_find_table ( ACPI_SIG_SRAT ) ; if ( srat_physaddr == 0 ) return ( -1 ) ; srat = acpi_map_table ( srat_physaddr , ACPI_SIG_SRAT ) ; error = 0 ; srat_walk_table ( srat_parse_entry , & error ) ; acpi_unmap_table ( srat ) ; srat = NULL ; if ( error || check_domains ( ) != 0 || check_phys_avail ( ) != 0 || renumber_domains ( ) != 0 ) { srat_physaddr = 0 ; return ( -1 ) ; } #ifdef VM_NUMA_ALLOC vm_ndomains = ndomain ; mem_affinity = mem_info ; #endif return ( 0 ) ; }
Look for an ACPI System Resource Affinity Table ("SRAT")
Look for an ACPI System Resource Affinity Table ( " SRAT " )
/*
	 * Make a pass over the table to populate the cpus[] and
	 * mem_info[] tables.
	 */ /* Point vm_phys at our memory affinity table. */