Extract HPET address

This commit is contained in:
Baptiste Wicht 2016-08-05 21:41:51 +02:00
parent 1c7145dc2e
commit c18076572d

View File

@ -12,13 +12,13 @@
namespace {
ACPI_TABLE_HPET* hpet_table;
} //End of anonymous namespace
bool hpet::install(){
ACPI_TABLE_HPET *hpet;
// 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)){
return false;
}
@ -32,6 +32,8 @@ void hpet::late_install(){
if(hpet::install()){
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
}
}