acpica: add dependency on acpi device

Issue #4679
This commit is contained in:
Alexander Boettcher 2022-12-12 15:33:06 +01:00 committed by Christian Helmuth
parent dca71dbad9
commit 661330a97a
5 changed files with 8 additions and 15 deletions

View File

@ -147,7 +147,7 @@
<policy label_suffix="-> wifi" msix="false" info="yes"> <pci class="WIFI"/> </policy>
<policy label_suffix="-> nic"> <pci class="ETHERNET"/> </policy>
<policy label_suffix="-> audio"> <pci class="AUDIO"/> <pci class="HDAUDIO"/> </policy>
<policy label="acpica"> </policy>
<policy label="acpica"> <device name="acpi"/> </policy>
</config>
</start>

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2016-2017 Genode Labs GmbH
* Copyright (C) 2016-2022 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
@ -22,7 +22,6 @@ namespace Genode {
namespace Acpica {
void init(Genode::Env &, Genode::Allocator &);
void use_platform_drv();
}
#endif /* _INCLUDE__ACPICA__ACPICA_H_ */

View File

@ -195,6 +195,7 @@ append config {
<pci class="ISABRIDGE"/>
</policy>
<policy label_prefix="acpica">
<device name="acpi"/>
</policy>
</config>
<route>

View File

@ -10,6 +10,7 @@ if {
set build_components {
core init timer
drivers/platform
drivers/acpi
server/event_dump
app/pci_decode
app/acpica
@ -87,7 +88,7 @@ set config {
<config>
<policy label_prefix="ps2_drv"> <device name="ps2"/> </policy>
<policy label_prefix="usb_drv" info="yes"> <pci class="USB"/> </policy>
<policy label_prefix="acpica"/>
<policy label_prefix="acpica"> <device name="acpi"/> </policy>
</config>
<route>
<service name="ROM" label="devices"> <child name="drivers_reports"/> </service>

View File

@ -14,7 +14,7 @@
/* Genode includes */
#include <util/reconstructible.h>
#include <acpica/acpica.h>
#include <platform_session/connection.h>
#include <platform_session/device.h>
#include "env.h"
@ -27,7 +27,8 @@ struct Acpica::Env
Genode::Env &env;
Genode::Allocator &heap;
Genode::Constructible<Platform::Connection> platform;
Platform::Connection platform { env };
Platform::Device device { platform, "acpi" };
Env(Genode::Env &env, Genode::Allocator &heap) : env(env), heap(heap) { }
};
@ -37,18 +38,9 @@ static Genode::Constructible<Acpica::Env> instance;
Genode::Allocator & Acpica::heap() { return instance->heap; }
Genode::Env & Acpica::env() { return instance->env; }
Platform::Client & Acpica::platform()
{
if (!instance->platform.constructed())
instance->platform.construct(instance->env);
return *instance->platform;
}
void Acpica::init(Genode::Env &env, Genode::Allocator &heap)
{
instance.construct(env, heap);
platform();
}