Changeset View
Changeset View
Standalone View
Standalone View
head/sys/arm64/arm64/mp_machdep.c
Show First 20 Lines • Show All 436 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
#ifdef DEV_ACPI | #ifdef DEV_ACPI | ||||
static void | static void | ||||
madt_handler(ACPI_SUBTABLE_HEADER *entry, void *arg) | madt_handler(ACPI_SUBTABLE_HEADER *entry, void *arg) | ||||
{ | { | ||||
ACPI_MADT_GENERIC_INTERRUPT *intr; | ACPI_MADT_GENERIC_INTERRUPT *intr; | ||||
u_int *cpuid; | u_int *cpuid; | ||||
u_int id; | |||||
switch(entry->Type) { | switch(entry->Type) { | ||||
case ACPI_MADT_TYPE_GENERIC_INTERRUPT: | case ACPI_MADT_TYPE_GENERIC_INTERRUPT: | ||||
intr = (ACPI_MADT_GENERIC_INTERRUPT *)entry; | intr = (ACPI_MADT_GENERIC_INTERRUPT *)entry; | ||||
cpuid = arg; | cpuid = arg; | ||||
id = *cpuid; | |||||
start_cpu((*cpuid), intr->ArmMpidr); | start_cpu(id, intr->ArmMpidr); | ||||
__pcpu[id].pc_acpi_id = intr->Uid; | |||||
(*cpuid)++; | (*cpuid)++; | ||||
break; | break; | ||||
default: | default: | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
static void | static void | ||||
Show All 13 Lines | if (madt == NULL) { | ||||
return; | return; | ||||
} | } | ||||
cpuid = 0; | cpuid = 0; | ||||
acpi_walk_subtables(madt + 1, (char *)madt + madt->Header.Length, | acpi_walk_subtables(madt + 1, (char *)madt + madt->Header.Length, | ||||
madt_handler, &cpuid); | madt_handler, &cpuid); | ||||
acpi_unmap_table(madt); | acpi_unmap_table(madt); | ||||
#if MAXMEMDOM > 1 | |||||
/* set proximity info */ | |||||
acpi_pxm_set_cpu_locality(); | |||||
acpi_pxm_free(); | |||||
#endif | |||||
} | } | ||||
#endif | #endif | ||||
#ifdef FDT | #ifdef FDT | ||||
static boolean_t | static boolean_t | ||||
cpu_init_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) | cpu_init_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) | ||||
{ | { | ||||
uint64_t target_cpu; | uint64_t target_cpu; | ||||
▲ Show 20 Lines • Show All 330 Lines • Show Last 20 Lines |