mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-27 15:56:54 +00:00
dm: vrtc: add RTC to ACPI DSDT
Clear Linux complains about not finding RTC as a PNP device: platform rtc_cmos: registered platform RTC device (no PNP device found) This is a port of Bhyve vRTC's user-space logic. Tracked-On: #2176 Signed-off-by: Peter Fang <peter.fang@intel.com> Reviewed-by: Eddie Dong <eddie.dong@intel.com> Reviewed-by: Victor Sun <victor.sun@intel.com>
This commit is contained in:
parent
067273af18
commit
57c661c48d
@ -39,6 +39,8 @@
|
|||||||
#include "rtc.h"
|
#include "rtc.h"
|
||||||
#include "mevent.h"
|
#include "mevent.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
#include "acpi.h"
|
||||||
|
#include "lpc.h"
|
||||||
|
|
||||||
/* #define DEBUG_RTC */
|
/* #define DEBUG_RTC */
|
||||||
#ifdef DEBUG_RTC
|
#ifdef DEBUG_RTC
|
||||||
@ -1178,3 +1180,27 @@ vrtc_deinit(struct vmctx *ctx)
|
|||||||
free(vrtc);
|
free(vrtc);
|
||||||
ctx->vrtc = NULL;
|
ctx->vrtc = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
rtc_dsdt(void)
|
||||||
|
{
|
||||||
|
dsdt_line("");
|
||||||
|
dsdt_line("Device (RTC)");
|
||||||
|
dsdt_line("{");
|
||||||
|
dsdt_line(" Name (_HID, EisaId (\"PNP0B00\"))");
|
||||||
|
dsdt_line(" Name (_CRS, ResourceTemplate ()");
|
||||||
|
dsdt_line(" {");
|
||||||
|
dsdt_indent(2);
|
||||||
|
dsdt_fixed_ioport(IO_RTC, 2);
|
||||||
|
dsdt_fixed_irq(8);
|
||||||
|
dsdt_unindent(2);
|
||||||
|
dsdt_line(" })");
|
||||||
|
dsdt_line("}");
|
||||||
|
}
|
||||||
|
LPC_DSDT(rtc_dsdt);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Reserve the extended RTC I/O ports although they are not emulated at this
|
||||||
|
* time.
|
||||||
|
*/
|
||||||
|
SYSRES_IO(0x72, 6);
|
||||||
|
Loading…
Reference in New Issue
Block a user