From 5f05c79450788b33bd82738ee27bf6d0ceeb12ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Date: Tue, 11 Mar 2014 10:20:42 +0000 Subject: xen: implement an early timer for Xen PVH When running as a PVH guest, there's no emulated i8254, so we need to use the Xen PV timer as the early source for DELAY. This change allows for different implementations of the early DELAY function and implements a Xen variant for it. Approved by: gibbs Sponsored by: Citrix Systems R&D dev/xen/timer/timer.c: dev/xen/timer/timer.h: - Implement Xen early delay functions using the PV timer and declare them. x86/include/init.h: - Add hooks for early clock source initialization and early delay functions. i386/i386/machdep.c: pc98/pc98/machdep.c: amd64/amd64/machdep.c: - Set early delay hooks to use the i8254 on bare metal. - Use clock_init (that will in turn make use of init_ops) to initialize the early clock source. amd64/include/clock.h: i386/include/clock.h: - Declare i8254_delay and clock_init. i386/xen/clock.c: - Rename DELAY to i8254_delay. x86/isa/clock.c: - Introduce clock_init that will take care of initializing the early clock by making use of the init_ops hooks. - Move non ISA related delay functions to the newly introduced delay file. x86/x86/delay.c: - Add moved delay related functions. - Implement generic DELAY function that will use the init_ops hooks. x86/xen/pv.c: - Set PVH hooks for the early delay related functions in init_ops. conf/files.amd64: conf/files.i386: conf/files.pc98: - Add delay.c to the kernel build. --- sys/conf/files.amd64 | 1 + sys/conf/files.i386 | 1 + sys/conf/files.pc98 | 2 ++ 3 files changed, 4 insertions(+) (limited to 'sys/conf') diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index a6eb12acad6f..45c092730019 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -554,6 +554,7 @@ x86/x86/mptable_pci.c optional mptable pci x86/x86/msi.c optional pci x86/x86/nexus.c standard x86/x86/tsc.c standard +x86/x86/delay.c standard x86/xen/hvm.c optional xenhvm x86/xen/xen_intr.c optional xen | xenhvm x86/xen/pv.c optional xenhvm diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 index 5408908c6e84..8d724ca95927 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -593,5 +593,6 @@ x86/x86/mptable_pci.c optional apic native pci x86/x86/msi.c optional apic pci x86/x86/nexus.c standard x86/x86/tsc.c standard +x86/x86/delay.c standard x86/xen/hvm.c optional xenhvm x86/xen/xen_intr.c optional xen | xenhvm diff --git a/sys/conf/files.pc98 b/sys/conf/files.pc98 index 0c315e4ddac1..92696ee9c08b 100644 --- a/sys/conf/files.pc98 +++ b/sys/conf/files.pc98 @@ -259,3 +259,5 @@ x86/x86/mptable_pci.c optional apic pci x86/x86/msi.c optional apic pci x86/x86/nexus.c standard x86/x86/tsc.c standard +x86/x86/tsc.c standard +x86/x86/delay.c standard -- cgit v1.2.3