summaryrefslogtreecommitdiff
path: root/sys/src/9/xen/archxen.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2021-01-17 21:21:12 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2021-01-17 21:21:12 +0100
commita05bab362f66ddd6fa65f2e7cda9eaaa0217ec08 (patch)
treeccd2fdef5230d2d5369619e6e7f84b389928ad3d /sys/src/9/xen/archxen.c
parent999e98b9b856ae4fc75b3ad33783488e33cdd426 (diff)
pc, pc64: add minimal HPET driver to measure LAPIC and TSC frequencies
This adds the new function pointer PCArch.clockinit(), which is a timer dependent initialization routine. It also takes over the job of guesscpuhz(). This way, the architecture ident code can switch between different timers (i8253, HPET and XEN timer).
Diffstat (limited to 'sys/src/9/xen/archxen.c')
-rw-r--r--sys/src/9/xen/archxen.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/src/9/xen/archxen.c b/sys/src/9/xen/archxen.c
index 6f3d1bfae..0e30e6591 100644
--- a/sys/src/9/xen/archxen.c
+++ b/sys/src/9/xen/archxen.c
@@ -52,10 +52,11 @@ shutdown(void)
HYPERVISOR_shutdown(1);
}
-int xenintrassign(Vctl *v);
-void xentimerenable(void);
-uvlong xentimerread(uvlong*);
-void xentimerset(uvlong);
+extern int xenintrassign(Vctl *v);
+extern void xentimerinit(void);
+extern void xentimerenable(void);
+extern uvlong xentimerread(uvlong*);
+extern void xentimerset(uvlong);
PCArch archxen = {
.id= "Xen",
@@ -63,6 +64,7 @@ PCArch archxen = {
.reset= shutdown,
.intrinit= intrinit,
.intrassign= xenintrassign,
+.clockinit= xentimerinit,
.clockenable= xentimerenable,
.fastclock= xentimerread,
.timerset= xentimerset,