mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-16 07:57:13 -04:00
Defer HPET loading to after ACPI
This commit is contained in:
parent
9b9f39ab58
commit
f019c4664f
@ -11,6 +11,7 @@
|
|||||||
namespace hpet {
|
namespace hpet {
|
||||||
|
|
||||||
bool install();
|
bool install();
|
||||||
|
void late_install();
|
||||||
|
|
||||||
} //end of namespace hpet
|
} //end of namespace hpet
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
#include "arch.hpp"
|
#include "arch.hpp"
|
||||||
#include "assert.hpp"
|
#include "assert.hpp"
|
||||||
|
|
||||||
|
#include "drivers/hpet.hpp"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
// This is copied from acexcep.h
|
// This is copied from acexcep.h
|
||||||
@ -104,6 +106,11 @@ void initialize_acpica(){
|
|||||||
acpi_initialized = true;
|
acpi_initialized = true;
|
||||||
|
|
||||||
logging::logf(logging::log_level::DEBUG, "acpi:: Finished initialization of ACPICA\n");
|
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){
|
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");
|
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