mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 08:17:34 +00:00
ACPI: Adopt the changes in the definitions file
Also, the functions for StaticParsing namespace were added. Therefore, some early access functionality is being used also in ACPI::StaticParser class.
This commit is contained in:
parent
bf55d83c1f
commit
b9c65ea746
6 changed files with 453 additions and 510 deletions
|
@ -27,78 +27,78 @@
|
|||
#include <Kernel/ACPI/ACPIParser.h>
|
||||
|
||||
namespace Kernel {
|
||||
namespace ACPI {
|
||||
static Parser* s_acpi_parser;
|
||||
|
||||
static ACPIParser* s_acpi_parser;
|
||||
Parser& Parser::the()
|
||||
{
|
||||
ASSERT(s_acpi_parser != nullptr);
|
||||
return *s_acpi_parser;
|
||||
}
|
||||
|
||||
ACPIParser& ACPIParser::the()
|
||||
{
|
||||
ASSERT(s_acpi_parser != nullptr);
|
||||
return *s_acpi_parser;
|
||||
}
|
||||
void Parser::initialize_limited()
|
||||
{
|
||||
if (!Parser::is_initialized()) {
|
||||
s_acpi_parser = new Parser(false);
|
||||
}
|
||||
}
|
||||
|
||||
void ACPIParser::initialize_limited()
|
||||
{
|
||||
if (!ACPIParser::is_initialized()) {
|
||||
s_acpi_parser = new ACPIParser(false);
|
||||
bool Parser::is_initialized()
|
||||
{
|
||||
return (s_acpi_parser != nullptr);
|
||||
}
|
||||
|
||||
Parser::Parser(bool usable)
|
||||
{
|
||||
if (usable) {
|
||||
kprintf("ACPI: Setting up a functional parser\n");
|
||||
} else {
|
||||
kprintf("ACPI: Limited Initialization. Vital functions are disabled by a request\n");
|
||||
}
|
||||
s_acpi_parser = this;
|
||||
}
|
||||
|
||||
PhysicalAddress Parser::find_table(const char*)
|
||||
{
|
||||
kprintf("ACPI: Requested to search for a table, Abort!\n");
|
||||
return {};
|
||||
}
|
||||
|
||||
void Parser::do_acpi_reboot()
|
||||
{
|
||||
kprintf("ACPI: Cannot invoke reboot!\n");
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
void Parser::do_acpi_shutdown()
|
||||
{
|
||||
kprintf("ACPI: Cannot invoke shutdown!\n");
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
void Parser::enable_aml_interpretation()
|
||||
{
|
||||
kprintf("ACPI: No AML Interpretation Allowed\n");
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
void Parser::enable_aml_interpretation(File&)
|
||||
{
|
||||
kprintf("ACPI: No AML Interpretation Allowed\n");
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
void Parser::enable_aml_interpretation(u8*, u32)
|
||||
{
|
||||
kprintf("ACPI: No AML Interpretation Allowed\n");
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
void Parser::disable_aml_interpretation()
|
||||
{
|
||||
kprintf("ACPI Limited: No AML Interpretation Allowed\n");
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
bool Parser::is_operable()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool ACPIParser::is_initialized()
|
||||
{
|
||||
return (s_acpi_parser != nullptr);
|
||||
}
|
||||
|
||||
ACPIParser::ACPIParser(bool usable)
|
||||
{
|
||||
if (usable) {
|
||||
kprintf("ACPI: Setting up a functional parser\n");
|
||||
} else {
|
||||
kprintf("ACPI: Limited Initialization. Vital functions are disabled by a request\n");
|
||||
}
|
||||
s_acpi_parser = this;
|
||||
}
|
||||
|
||||
PhysicalAddress ACPIParser::find_table(const char*)
|
||||
{
|
||||
kprintf("ACPI: Requested to search for a table, Abort!\n");
|
||||
return {};
|
||||
}
|
||||
|
||||
void ACPIParser::do_acpi_reboot()
|
||||
{
|
||||
kprintf("ACPI: Cannot invoke reboot!\n");
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
void ACPIParser::do_acpi_shutdown()
|
||||
{
|
||||
kprintf("ACPI: Cannot invoke shutdown!\n");
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
void ACPIParser::enable_aml_interpretation()
|
||||
{
|
||||
kprintf("ACPI: No AML Interpretation Allowed\n");
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
void ACPIParser::enable_aml_interpretation(File&)
|
||||
{
|
||||
kprintf("ACPI: No AML Interpretation Allowed\n");
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
void ACPIParser::enable_aml_interpretation(u8*, u32)
|
||||
{
|
||||
kprintf("ACPI: No AML Interpretation Allowed\n");
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
void ACPIParser::disable_aml_interpretation()
|
||||
{
|
||||
kprintf("ACPI Limited: No AML Interpretation Allowed\n");
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
bool ACPIParser::is_operable()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue