@@ -316,6 +316,17 @@ static void acpi_dsdt_add_gpio(Aml *scope, const MemMapEntry *gpio_memmap,
aml_interrupt(aml_consumer, aml_edge, aml_active_high,
aml_exclusive, aml_not_wake_capable, gpio_irq + 32));
aml_append(dev, aml_name_decl("_CRS", crs));
+
+ Aml *aei = aml_resource_template();
+ /* Pin 3 for power button */
+ aml_append(aei, aml_gpio_int(aml_edge, aml_active_high, aml_exclusive,
+ aml_wake_capable, aml_pull_up, 3, "GPO0"));
+ aml_append(dev, aml_name_decl("_AEI", aei));
+
+ /* _E03 is handle for power button */
+ Aml *method = aml_method("_E03", 0);
+ aml_append(method, aml_notify(aml_name("PWRB"), aml_int(0x80)));
+ aml_append(dev, method);
aml_append(scope, dev);
}