dm: vhpet: add vHPET support

vHPET is used as a source of system timer by UEFI (e.g. OVMF).

This provides an alternative to using vPIT, which OVMF assumes is always
connected to vPIC.

This is ported from Bhyve, with a few changes:

- move to user space, using acrn_timer
- enable timers only when necessary

Origin: FreeBSD
License: BSD-3-Clause
URL: https://svnweb.freebsd.org/
commit: 326257
Purpose: Adding vHPET support.
Maintained-by: External

Tracked-On: #2319
Signed-off-by: Peter Fang <peter.fang@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Peter Fang
2019-01-10 19:44:30 -08:00
committed by wenlingz
parent 0343da8c70
commit 4642269248
7 changed files with 1045 additions and 34 deletions

View File

@@ -556,7 +556,8 @@ basl_fwrite_hpet(FILE *fp, struct vmctx *ctx)
EFPRINTF(fp, "[0004]\t\tAsl Compiler Revision : 00000000\n");
EFPRINTF(fp, "\n");
EFPRINTF(fp, "[0004]\t\tTimer Block ID : 00000000\n");
EFPRINTF(fp, "[0004]\t\tTimer Block ID : %08X\n",
(uint32_t)vhpet_capabilities());
EFPRINTF(fp,
"[0012]\t\tTimer Block Register : [Generic Address Structure]\n");
EFPRINTF(fp, "[0001]\t\tSpace ID : 00 [SystemMemory]\n");