mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 03:57:15 +02:00
Kernel: Remove "non-operational" ACPI parser state
If we don't support ACPI, just don't instantiate an ACPI parser. This is way less confusing than having a special parser class whose only purpose is to do nothing. We now search for the RSDP in ACPI::initialize() instead of letting the parser constructor do it. This allows us to defer the decision to create a parser until we're sure we can make a useful one.
This commit is contained in:
Notes:
sideshowbarker
2024-07-19 07:46:47 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/46442170942
@@ -92,8 +92,8 @@ void TimeManagement::stale_function(const RegisterState&)
|
||||
|
||||
TimeManagement::TimeManagement(bool probe_non_legacy_hardware_timers)
|
||||
{
|
||||
if (ACPI::Parser::the().is_operable()) {
|
||||
if (!ACPI::Parser::the().x86_specific_flags().cmos_rtc_not_present) {
|
||||
if (ACPI::is_enabled()) {
|
||||
if (!ACPI::Parser::the()->x86_specific_flags().cmos_rtc_not_present) {
|
||||
RTC::initialize();
|
||||
m_epoch_time += boot_time();
|
||||
} else {
|
||||
@@ -161,7 +161,7 @@ bool TimeManagement::is_hpet_periodic_mode_allowed()
|
||||
|
||||
bool TimeManagement::probe_and_set_non_legacy_hardware_timers()
|
||||
{
|
||||
if (!ACPI::Parser::the().is_operable())
|
||||
if (!ACPI::is_enabled())
|
||||
return false;
|
||||
if (!HPET::test_and_initialize())
|
||||
return false;
|
||||
@@ -211,8 +211,8 @@ bool TimeManagement::probe_and_set_non_legacy_hardware_timers()
|
||||
|
||||
bool TimeManagement::probe_and_set_legacy_hardware_timers()
|
||||
{
|
||||
if (ACPI::Parser::the().is_operable()) {
|
||||
if (ACPI::Parser::the().x86_specific_flags().cmos_rtc_not_present) {
|
||||
if (ACPI::is_enabled()) {
|
||||
if (ACPI::Parser::the()->x86_specific_flags().cmos_rtc_not_present) {
|
||||
dbg() << "ACPI: CMOS RTC Not Present";
|
||||
return false;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user