diff -ur src.old/sys/amd64/acpica/madt.c src/sys/amd64/acpica/madt.c --- src.old/sys/amd64/acpica/madt.c Fri Aug 25 15:02:44 2006 +++ src/sys/amd64/acpica/madt.c Sat Sep 2 12:48:04 2006 @@ -245,7 +245,8 @@ sizeof(UINT64); for (i = 0; i < count; i++) if (madt_probe_table(xsdt->TableOffsetEntry[i])) - break; + //break; + continue; madt_unmap_table(xsdt); } else { rsdt = madt_map_table(rsdp->RsdtPhysicalAddress, 1, RSDT_SIG); @@ -258,7 +259,8 @@ sizeof(UINT32); for (i = 0; i < count; i++) if (madt_probe_table(rsdt->TableOffsetEntry[i])) - break; + //break; + continue; madt_unmap_table(rsdt); } pmap_unmapbios((vm_offset_t)rsdp, sizeof(RSDP_DESCRIPTOR)); @@ -299,7 +301,7 @@ (uintmax_t)address); return (0); } - if (bootverbose) +// if (bootverbose) printf("Table '%.4s' at 0x%jx\n", table->Signature, (uintmax_t)address); diff -ur src.old/sys/amd64/amd64/machdep.c src/sys/amd64/amd64/machdep.c --- src.old/sys/amd64/amd64/machdep.c Fri Aug 25 15:02:44 2006 +++ src/sys/amd64/amd64/machdep.c Sun Sep 3 15:32:38 2006 @@ -131,6 +131,8 @@ #include #include +#include + /* Sanity check for __curthread() */ CTASSERT(offsetof(struct pcpu, pc_curthread) == 0); @@ -145,6 +147,7 @@ #define EFL_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) static void cpu_startup(void *); +static void k8_topology(void); static void get_fpcontext(struct thread *td, mcontext_t *mcp); static int set_fpcontext(struct thread *td, const mcontext_t *mcp); SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL) @@ -219,6 +222,8 @@ ptoa((uintmax_t)cnt.v_free_count), ptoa((uintmax_t)cnt.v_free_count) / 1048576); + k8_topology(); + /* * Set up buffers, so they can be used to read disk labels. */ @@ -226,6 +231,36 @@ vm_pager_bufferinit(); cpu_setregs(); +} + +static void +k8_topology(void) +{ + unsigned int val; + int i, base, limit; + + pci_cfgregopen(); + + val = pci_cfgregread(0, 24, 0, 0x60, 4); + printf("%s: 0x60: 0x%x\n", __func__, val); + val = pci_cfgregread(0, 24, 0, 0x60, 4); + + printf("Found %d nodes (%d cpus)\n", ((val & 0x70) >> 4) + 1, + ((val & 0xF0000) >> 16) + 1); + + for (i = 0; i < 8; i++) { + base = pci_cfgregread(0, 24, 1, 0x40 + i * 8, 4); + limit = pci_cfgregread(0, 24, 1, 0x44 + i * 8, 4); + + if ((base & 3) == 0) + continue; + + printf("%d: 0x%lx - 0x%lx interleave %d:%d node %d\n", i, + ((long)((base & 0xffff0000) >> 16)) << 24, + ((long)((limit & 0xffff0000) >> 16)) << 24, + (base & 0x700) >> 8, (limit & 0x700) >> 8, + limit & 7); + } } /*