mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-09 04:15:52 +00:00
acpica: request 'Acpi' only if 'acpi_ready="yes"'
The synchronization with the ACPI driver is not needed when starting acpica at a later stage. It could already be disabled via the 'acpi_ready="yes"' config attribute. However, acpica still unconditionally requests the so-called "Acpi" service, which is an alias for the platform_drv's "Platform" service. This patch disables the use of this alias when the 'acpi_ready' synchronization is disabled.
This commit is contained in:
parent
72f2ea349d
commit
4e115a7de2
@ -19,6 +19,11 @@ namespace Genode {
|
||||
struct Allocator;
|
||||
}
|
||||
|
||||
namespace Acpica { void init(Genode::Env &env, Genode::Allocator &heap); }
|
||||
namespace Acpica {
|
||||
|
||||
struct Wait_acpi_ready { bool enabled; };
|
||||
|
||||
void init(Genode::Env &, Genode::Allocator &, Wait_acpi_ready);
|
||||
}
|
||||
|
||||
#endif /* _INCLUDE__ACPICA__ACPICA_H_ */
|
||||
|
@ -117,7 +117,7 @@ struct Acpica::Main
|
||||
void *context;
|
||||
} irq_handler;
|
||||
|
||||
void init_acpica();
|
||||
void init_acpica(Acpica::Wait_acpi_ready);
|
||||
|
||||
Main(Genode::Env &env)
|
||||
:
|
||||
@ -132,7 +132,7 @@ struct Acpica::Main
|
||||
if (enable_report)
|
||||
report = new (heap) Acpica::Reportstate(env);
|
||||
|
||||
init_acpica();
|
||||
init_acpica(Wait_acpi_ready{enable_ready});
|
||||
|
||||
if (enable_report)
|
||||
report->enable();
|
||||
@ -188,9 +188,9 @@ struct Acpica::Main
|
||||
#include "sb.h"
|
||||
#include "ec.h"
|
||||
|
||||
void Acpica::Main::init_acpica()
|
||||
void Acpica::Main::init_acpica(Wait_acpi_ready wait_acpi_ready)
|
||||
{
|
||||
Acpica::init(env, heap);
|
||||
Acpica::init(env, heap, wait_acpi_ready);
|
||||
|
||||
/* enable debugging: */
|
||||
/* AcpiDbgLevel |= ACPI_LV_IO | ACPI_LV_INTERRUPTS | ACPI_LV_INIT_NAMES; */
|
||||
|
@ -27,7 +27,10 @@ struct Acpica::Env
|
||||
Genode::Env &env;
|
||||
Genode::Allocator &heap;
|
||||
|
||||
Genode::Parent::Service_name announce_for_acpica { "Acpi" };
|
||||
Wait_acpi_ready const wait_acpi_ready;
|
||||
|
||||
Genode::Parent::Service_name announce_for_acpica {
|
||||
wait_acpi_ready.enabled ? "Acpi" : Platform::Session::service_name() };
|
||||
|
||||
Genode::Parent::Client parent_client;
|
||||
|
||||
@ -42,8 +45,8 @@ struct Acpica::Env
|
||||
|
||||
Platform::Client platform { cap };
|
||||
|
||||
Env(Genode::Env &env, Genode::Allocator &heap)
|
||||
: env(env), heap(heap) { }
|
||||
Env(Genode::Env &env, Genode::Allocator &heap, Wait_acpi_ready wait_acpi_ready)
|
||||
: env(env), heap(heap), wait_acpi_ready(wait_acpi_ready) { }
|
||||
};
|
||||
|
||||
static Genode::Constructible<Acpica::Env> instance;
|
||||
@ -54,7 +57,8 @@ Genode::Env & Acpica::env() { return instance->env; }
|
||||
Platform::Client & Acpica::platform() { return instance->platform; }
|
||||
|
||||
|
||||
void Acpica::init(Genode::Env &env, Genode::Allocator &heap)
|
||||
void Acpica::init(Genode::Env &env, Genode::Allocator &heap,
|
||||
Wait_acpi_ready wait_acpi_ready)
|
||||
{
|
||||
instance.construct(env, heap);
|
||||
instance.construct(env, heap, wait_acpi_ready);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user