From 36e8ac9d4178f640f457e6e6b502e47d91786694 Mon Sep 17 00:00:00 2001 From: David Karoly Date: Wed, 26 Jan 2022 18:14:36 +0100 Subject: [PATCH] boot/efi/x86: implement timer initialization Change-Id: Ida16e63d2b8f87b90897892faf0e6db92b185d34 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4851 Reviewed-by: Adrien Destugues --- .../boot/platform/efi/arch/x86/arch_timer.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/system/boot/platform/efi/arch/x86/arch_timer.cpp b/src/system/boot/platform/efi/arch/x86/arch_timer.cpp index a59a2fb52f..6ae9507902 100644 --- a/src/system/boot/platform/efi/arch/x86/arch_timer.cpp +++ b/src/system/boot/platform/efi/arch/x86/arch_timer.cpp @@ -1,13 +1,27 @@ /* - * Copyright 2021 Haiku, Inc. All rights reserved. + * Copyright 2021-2022 Haiku, Inc. All rights reserved. * Released under the terms of the MIT License. + * + * Copyright 2008, Dustin Howett, dustin.howett@gmail.com. All rights reserved. + * Distributed under the terms of the MIT License. + * + * Copyright 2001, Travis Geiselbrecht. All rights reserved. + * Distributed under the terms of the NewOS License. */ #include "arch_timer.h" +#include +#include + void arch_timer_init(void) { + // use PIT channel 2 for the calibration loop + // as channel 0 is reserved for the UEFI firmware + calculate_cpu_conversion_factor(2); + + hpet_init(); }