mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 21:27:56 +00:00
parent
dca71dbad9
commit
661330a97a
@ -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>
|
||||
|
||||
|
@ -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_ */
|
||||
|
@ -195,6 +195,7 @@ append config {
|
||||
<pci class="ISABRIDGE"/>
|
||||
</policy>
|
||||
<policy label_prefix="acpica">
|
||||
<device name="acpi"/>
|
||||
</policy>
|
||||
</config>
|
||||
<route>
|
||||
|
@ -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>
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user