class RtcMc146818
Defined at line 19 of file ../../src/virtualization/bin/vmm/arch/x64/rtc_mc146818.h
Emulates the MC146818 real time clock, present in most PC BIOS's to
track the wall time when systems are powered down
Public Methods
void ~RtcMc146818 ()
Defined at line 22 of file ../../src/virtualization/bin/vmm/arch/x64/rtc_mc146818.h
bool IsValidRegister (uint8_t reg)
Defined at line 40 of file ../../src/virtualization/bin/vmm/arch/x64/rtc_mc146818.h
void RtcMc146818 ()
Defined at line 44 of file ../../src/virtualization/bin/vmm/arch/x64/rtc_mc146818.cc
zx_status_t ReadRegister (Register reg, uint8_t * value)
Reads have side effects, so not const
Defined at line 54 of file ../../src/virtualization/bin/vmm/arch/x64/rtc_mc146818.cc
zx_status_t WriteRegister (Register reg, uint8_t value)
Defined at line 71 of file ../../src/virtualization/bin/vmm/arch/x64/rtc_mc146818.cc
Protected Methods
std::chrono::time_point<std::chrono::system_clock> Now ()
Get the current system time. Virtual for testing use
Defined at line 51 of file ../../src/virtualization/bin/vmm/arch/x64/rtc_mc146818.h
Enumerations
enum Register
| Name | Value |
|---|---|
| kSeconds | 0 |
| kSecondsAlarm | 1 |
| kMinutes | 2 |
| kMinutesAlarm | 3 |
| kHours | 4 |
| kHoursAlarm | 5 |
| kDayOfWeek | 6 |
| kDayOfMonth | 7 |
| kMonth | 8 |
| kYear | 9 |
| kA | 0xa |
| kB | 0xb |
| kC | 0xc |
| kCentury | 0x32 |
Defined at line 24 of file ../../src/virtualization/bin/vmm/arch/x64/rtc_mc146818.h