/* * Copyright (c) 2020, Liav A. * Copyright (c) 2020, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #include #include namespace Kernel { namespace ACPI { UNMAP_AFTER_INIT void initialize() { auto feature_level = kernel_command_line().acpi_feature_level(); if (feature_level == AcpiFeatureLevel::Disabled) return; auto rsdp = StaticParsing::find_rsdp(); if (!rsdp.has_value()) return; if (feature_level == AcpiFeatureLevel::Enabled) Parser::initialize(rsdp.value()); else Parser::initialize(rsdp.value()); } bool is_enabled() { return Parser::the(); } } }