summaryrefslogtreecommitdiffstats
path: root/usr.sbin/acpi
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2003-08-02 01:55:03 +0000
committerpeter <peter@FreeBSD.org>2003-08-02 01:55:03 +0000
commitfa1757a15668f4d9956dce95fa668920106bf312 (patch)
tree7d0aae876befd8b20821947c52e9841c80aa39c0 /usr.sbin/acpi
parent844a52c0a0bc2f85fa3e515c235551e02a290ccf (diff)
downloadFreeBSD-src-fa1757a15668f4d9956dce95fa668920106bf312.zip
FreeBSD-src-fa1757a15668f4d9956dce95fa668920106bf312.tar.gz
Dump the HPET information block.
What is the HPET I hear you ask? It is the High Precision Event Timer that is supposed to supplement and eventually replace the 8254 timer and the RTC periodic interrupts. Among other things, it is 64 bit (can be run in 32 bit mode for 32 bit cpus), and is suitable as a replacement for the ACPI timer on SMP systems (the specs are much better) and as a replacement for the ITC based synthetic clock for on ia64 systems. It seems IA64 and AMD64 systems tend to have this. It is likely to start showing up in i386 systems if it isn't already on some of them.
Diffstat (limited to 'usr.sbin/acpi')
-rw-r--r--usr.sbin/acpi/acpidump/acpi.c25
-rw-r--r--usr.sbin/acpi/acpidump/acpidump.h13
2 files changed, 38 insertions, 0 deletions
diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c
index 97df172..18b8308 100644
--- a/usr.sbin/acpi/acpidump/acpi.c
+++ b/usr.sbin/acpi/acpidump/acpi.c
@@ -296,6 +296,29 @@ acpi_handle_apic(struct ACPIsdt *sdp)
}
static void
+acpi_handle_hpet(struct ACPIsdt *sdp)
+{
+ struct HPETbody *hpetp;
+
+ acpi_print_sdt(sdp);
+ hpetp = (struct HPETbody *) sdp->body;
+ printf(BEGIN_COMMENT);
+ printf("\tHPET Number=%d\n", hpetp->hpet_number);
+ printf("\tADDR=0x%08x\n", hpetp->base_addr);
+ printf("\tHW Rev=0x%x\n", hpetp->block_hwrev);
+ printf("\tComparitors=%d\n", hpetp->block_comparitors);
+ printf("\tCounter Size=%d\n", hpetp->block_counter_size);
+ printf("\tLegacy IRQ routing capable={");
+ if (hpetp->block_legacy_capable)
+ printf("TRUE}\n");
+ else
+ printf("FALSE}\n");
+ printf("\tPCI Vendor ID=0x%04x\n", hpetp->block_pcivendor);
+ printf("\tMinimul Tick=%d\n", hpetp->clock_tick);
+ printf(END_COMMENT);
+}
+
+static void
init_namespace()
{
struct aml_environ env;
@@ -522,6 +545,8 @@ acpi_handle_rsdt(struct ACPIsdt *rsdp)
acpi_handle_facp((struct FACPbody *) sdp->body);
} else if (!memcmp(sdp->signature, "APIC", 4)) {
acpi_handle_apic(sdp);
+ } else if (!memcmp(sdp->signature, "HPET", 4)) {
+ acpi_handle_hpet(sdp);
} else {
acpi_print_sdt(sdp);
}
diff --git a/usr.sbin/acpi/acpidump/acpidump.h b/usr.sbin/acpi/acpidump/acpidump.h
index 579b388..5863c9c 100644
--- a/usr.sbin/acpi/acpidump/acpidump.h
+++ b/usr.sbin/acpi/acpidump/acpidump.h
@@ -265,6 +265,19 @@ struct MADTbody {
u_char body[1];
} __packed;
+struct HPETbody {
+ u_int32_t block_hwrev:8,
+ block_comparitors:5,
+ block_counter_size:1,
+ :1,
+ block_legacy_capable:1,
+ block_pcivendor:16;
+ u_int32_t base_addr;
+ u_int64_t reserved1;
+ u_int8_t hpet_number;
+ u_int16_t clock_tick __packed;
+} __packed;
+
void *acpi_map_physical(vm_offset_t, size_t);
struct ACPIrsdp *acpi_find_rsd_ptr(void);
int acpi_checksum(void *, size_t);
OpenPOWER on IntegriCloud