diff options
author | jhb <jhb@FreeBSD.org> | 2012-10-04 20:00:32 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2012-10-04 20:00:32 +0000 |
commit | 6597e6ceb28f9f02b005316c692b1262f0f2ed92 (patch) | |
tree | db96f0221fbc022abf0d6a301ce80b35d5ca6e2d /usr.sbin/acpi | |
parent | c9ef684bc2b146386cb5c0fe058108d62dcc11a3 (diff) | |
download | FreeBSD-src-6597e6ceb28f9f02b005316c692b1262f0f2ed92.zip FreeBSD-src-6597e6ceb28f9f02b005316c692b1262f0f2ed92.tar.gz |
Display the matrix of inter-domain distances in the SLIT table. This is
used to complement the SRAT table on NUMA machines.
MFC after: 1 week
Diffstat (limited to 'usr.sbin/acpi')
-rw-r--r-- | usr.sbin/acpi/acpidump/acpi.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c index 8a05ef1..85e5e0e 100644 --- a/usr.sbin/acpi/acpidump/acpi.c +++ b/usr.sbin/acpi/acpidump/acpi.c @@ -63,6 +63,7 @@ static void acpi_handle_madt(ACPI_TABLE_HEADER *sdp); static void acpi_handle_ecdt(ACPI_TABLE_HEADER *sdp); static void acpi_handle_hpet(ACPI_TABLE_HEADER *sdp); static void acpi_handle_mcfg(ACPI_TABLE_HEADER *sdp); +static void acpi_handle_slit(ACPI_TABLE_HEADER *sdp); static void acpi_print_srat_cpu(uint32_t apic_id, uint32_t proximity_domain, uint32_t flags); static void acpi_print_srat_memory(ACPI_SRAT_MEM_AFFINITY *mp); @@ -519,6 +520,33 @@ acpi_handle_mcfg(ACPI_TABLE_HEADER *sdp) } static void +acpi_handle_slit(ACPI_TABLE_HEADER *sdp) +{ + ACPI_TABLE_SLIT *slit; + UINT64 i, j; + + printf(BEGIN_COMMENT); + acpi_print_sdt(sdp); + slit = (ACPI_TABLE_SLIT *)sdp; + printf("\tLocality Count=%jd\n", slit->LocalityCount); + printf("\n\t "); + for (i = 0; i < slit->LocalityCount; i++) + printf(" %3jd", i); + printf("\n\t +"); + for (i = 0; i < slit->LocalityCount; i++) + printf("----"); + printf("\n"); + for (i = 0; i < slit->LocalityCount; i++) { + printf("\t %3jd |", i); + for (j = 0; j < slit->LocalityCount; j++) + printf(" %3d", + slit->Entry[i * slit->LocalityCount + j]); + printf("\n"); + } + printf(END_COMMENT); +} + +static void acpi_print_srat_cpu(uint32_t apic_id, uint32_t proximity_domain, uint32_t flags) { @@ -1092,6 +1120,8 @@ acpi_handle_rsdt(ACPI_TABLE_HEADER *rsdp) acpi_handle_ecdt(sdp); else if (!memcmp(sdp->Signature, ACPI_SIG_MCFG, 4)) acpi_handle_mcfg(sdp); + else if (!memcmp(sdp->Signature, ACPI_SIG_SLIT, 4)) + acpi_handle_slit(sdp); else if (!memcmp(sdp->Signature, ACPI_SIG_SRAT, 4)) acpi_handle_srat(sdp); else if (!memcmp(sdp->Signature, ACPI_SIG_TCPA, 4)) |