Commit Graph

4 Commits

Author SHA1 Message Date
Peter Fang b5f770707e dm: vpit: add vPIT support
vPIT is used as a source of system timer by UEFI (e.g. OVMF).

This is ported from Bhyve, with a few changes:

- move to user space, using POSIX timer
- support timer mode 3
- improve the emulation of OUT and STATUS byte
- improve the emulation of counter behavior
- improve the emulation of CE update in periodic mode
- treat CR == 0 as 0x10000

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

Tracked-On: #1392
Signed-off-by: Peter Fang <peter.fang@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-10-09 13:24:47 +08:00
Peter Fang 1657544152 dm: vrtc: add memory configuration in RTC CMOS
Some firmware (e.g. UEFI) uses RTC CMOS to fetch the system's memory
configuration. Put lowmem / highmem info in the designated area.

This is a port of Bhyve vRTC's user-space logic.

v1 -> v2:
* move KB/MB/GB to macros.h
* move nvram offset definitions to rtc.h

Tracked-On: #1390
Signed-off-by: Peter Fang <peter.fang@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-10-05 00:33:17 +08:00
David B. Kinder f4122d99c5 license: Replace license text with SPDX tag
Replace the BSD-3-Clause boiler plate license text with an SPDX tag.

Fixes: #189

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-06-01 10:43:06 +08:00
Anthony Xu bd31b1c53e initial import
internal commit: 0ab1ea615e5cfbb0687a9d593a86a7b774386076

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
2018-05-11 14:44:28 +08:00