boot/efi/x86: implement timer initialization

Change-Id: Ida16e63d2b8f87b90897892faf0e6db92b185d34
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4851
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
David Karoly 2022-01-26 18:14:36 +01:00 committed by Adrien Destugues
parent 367beefadc
commit 36e8ac9d41

View File

@ -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 <boot/arch/x86/arch_cpu.h>
#include <boot/arch/x86/arch_hpet.h>
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();
}