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.
This commit is contained in:
Peter Wemm 2003-08-02 01:55:03 +00:00
parent 6a1909919b
commit 79d7565c5a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118334
2 changed files with 38 additions and 0 deletions

View File

@ -295,6 +295,29 @@ acpi_handle_apic(struct ACPIsdt *sdp)
printf(END_COMMENT);
}
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()
{
@ -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);
}

View File

@ -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);