mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-29 15:44:02 +00:00
acpica: add option to select GPE usage
Mitigates the ACPI IRQ storm of T490s. Issue #4643
This commit is contained in:
parent
64b3ab59b0
commit
ab91750869
@ -1,4 +1,4 @@
|
||||
<runtime ram="6M" caps="200" binary="acpica">
|
||||
<runtime ram="10M" caps="300" binary="acpica">
|
||||
|
||||
<requires>
|
||||
<io_mem/>
|
||||
@ -15,6 +15,6 @@
|
||||
<rom label="acpica"/>
|
||||
</content>
|
||||
|
||||
<config reset="yes" poweroff="yes" report="yes" report_period_ms="20000"/>
|
||||
<config reset="yes" poweroff="yes" report="yes" report_period_ms="20000" use_gpe="false"/>
|
||||
|
||||
</runtime>
|
||||
|
@ -47,7 +47,7 @@ Excerpt of important parts of the acpica configuration
|
||||
!<start name="acpica">
|
||||
! <!-- <binary name="debug-acpica"/> -->
|
||||
! ...
|
||||
! <config reset="no" sleep="no" poweroff="no" report="yes" report_period_ms="2000"/>
|
||||
! <config reset="no" sleep="no" poweroff="no" report="yes" report_period_ms="2000" use_gpe="true"/>
|
||||
! <route>
|
||||
! <service name="ROM" label="system"> <child name="..."/> </service>
|
||||
! <service name="Report"> <child name="..."/> </service>
|
||||
|
@ -188,7 +188,7 @@ struct Acpica::Main
|
||||
|
||||
Expanding_reporter report_sleep_states { env, "sleep_states", "sleep_states" };
|
||||
|
||||
void init_acpica();
|
||||
void init_acpica(bool const);
|
||||
|
||||
Main(Env &env)
|
||||
:
|
||||
@ -205,7 +205,7 @@ struct Acpica::Main
|
||||
if (enable_report)
|
||||
report = new (heap) Acpica::Reportstate(env);
|
||||
|
||||
init_acpica();
|
||||
init_acpica(config.xml().attribute_value("use_gpe", true));
|
||||
|
||||
if (enable_report)
|
||||
report->enable();
|
||||
@ -298,7 +298,7 @@ ACPI_STATUS init_pic_mode()
|
||||
}
|
||||
|
||||
|
||||
void Acpica::Main::init_acpica()
|
||||
void Acpica::Main::init_acpica(bool const use_gpe)
|
||||
{
|
||||
Acpica::init(env, heap);
|
||||
|
||||
@ -343,8 +343,7 @@ void Acpica::Main::init_acpica()
|
||||
/* set APIC mode */
|
||||
status = init_pic_mode();
|
||||
if (status != AE_OK) {
|
||||
error("Setting PIC mode failed, status=", status);
|
||||
return;
|
||||
warning("Setting PIC mode failed, status=", status);
|
||||
}
|
||||
|
||||
/* Embedded controller */
|
||||
@ -360,16 +359,18 @@ void Acpica::Main::init_acpica()
|
||||
return;
|
||||
}
|
||||
|
||||
status = AcpiUpdateAllGpes();
|
||||
if (status != AE_OK) {
|
||||
error("AcpiUpdateAllGpes failed, status=", status);
|
||||
return;
|
||||
}
|
||||
if (use_gpe) {
|
||||
status = AcpiUpdateAllGpes();
|
||||
if (status != AE_OK) {
|
||||
error("AcpiUpdateAllGpes failed, status=", status);
|
||||
return;
|
||||
}
|
||||
|
||||
status = AcpiEnableAllRuntimeGpes();
|
||||
if (status != AE_OK) {
|
||||
error("AcpiEnableAllRuntimeGpes failed, status=", status);
|
||||
return;
|
||||
status = AcpiEnableAllRuntimeGpes();
|
||||
if (status != AE_OK) {
|
||||
error("AcpiEnableAllRuntimeGpes failed, status=", status);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Fixed * acpi_fixed = new (heap) Fixed(report);
|
||||
|
Loading…
x
Reference in New Issue
Block a user