mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-15 15:37:51 -04:00
Defer HPET loading to after ACPI
This commit is contained in:
parent
3dec990e75
commit
1c7145dc2e
@ -11,6 +11,7 @@
|
||||
namespace hpet {
|
||||
|
||||
bool install();
|
||||
void late_install();
|
||||
|
||||
} //end of namespace hpet
|
||||
|
||||
|
@ -16,6 +16,8 @@
|
||||
#include "arch.hpp"
|
||||
#include "assert.hpp"
|
||||
|
||||
#include "drivers/hpet.hpp"
|
||||
|
||||
namespace {
|
||||
|
||||
// This is copied from acexcep.h
|
||||
@ -104,6 +106,11 @@ void initialize_acpica(){
|
||||
acpi_initialized = true;
|
||||
|
||||
logging::logf(logging::log_level::DEBUG, "acpi:: Finished initialization of ACPICA\n");
|
||||
|
||||
// Here we initialize the drivers that need ACPI
|
||||
// TODO This is not good coupling: Find a better solution
|
||||
|
||||
hpet::late_install();
|
||||
}
|
||||
|
||||
uint64_t acpi_read(const ACPI_GENERIC_ADDRESS& address){
|
||||
|
@ -25,5 +25,13 @@ bool hpet::install(){
|
||||
|
||||
logging::logf(logging::log_level::TRACE, "hpet: Found ACPI HPET table\n");
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void hpet::late_install(){
|
||||
if(hpet::install()){
|
||||
logging::logf(logging::log_level::TRACE, "hpet: Late install suceeded\n");
|
||||
|
||||
//TODO Register the timer to the timer system
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user