mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-17 00:26:44 -04:00
Extract HPET address
This commit is contained in:
parent
1c7145dc2e
commit
c18076572d
@ -12,13 +12,13 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
ACPI_TABLE_HPET* hpet_table;
|
||||||
|
|
||||||
} //End of anonymous namespace
|
} //End of anonymous namespace
|
||||||
|
|
||||||
bool hpet::install(){
|
bool hpet::install(){
|
||||||
ACPI_TABLE_HPET *hpet;
|
|
||||||
|
|
||||||
// Find the HPET table
|
// Find the HPET table
|
||||||
auto status = AcpiGetTable("HPET", 0, (ACPI_TABLE_HEADER **) &hpet);
|
auto status = AcpiGetTable(ACPI_SIG_HPET, 0, (ACPI_TABLE_HEADER **) &hpet_table);
|
||||||
if (ACPI_FAILURE(status)){
|
if (ACPI_FAILURE(status)){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -32,6 +32,8 @@ void hpet::late_install(){
|
|||||||
if(hpet::install()){
|
if(hpet::install()){
|
||||||
logging::logf(logging::log_level::TRACE, "hpet: Late install suceeded\n");
|
logging::logf(logging::log_level::TRACE, "hpet: Late install suceeded\n");
|
||||||
|
|
||||||
|
logging::logf(logging::log_level::TRACE, "hpet: HPET Address: %h\n", hpet_table->Address.Address);
|
||||||
|
|
||||||
//TODO Register the timer to the timer system
|
//TODO Register the timer to the timer system
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user