Commit Graph

4 Commits

Author SHA1 Message Date
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
Yin Fengwei 4fcdebc434 DM: vrtc code cleanup
- Move the variable local_time from main.c to rtc.c
- Change vrtc_init to return int instead of pointer to vrtc. We do
  track vrtc in struct vmctx.

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-05-15 17:25:57 +08:00
Yin Fengwei eadc921bf0 DM: refine cleanup functionality of virtual RTC
The patch includes:
1. vrtc_cleanup -> vrtc_deinit to align with other devices
2. delete timer created in vrtc_init
3. make call to vrtc_deinit in cleanup path

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <Eddie.dong@intel.com>
2018-05-15 17:25:24 +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