<div dir="ltr">When tracing the problem I found that there is no GPE events getting triggered even though they are enabled. All the gpe interrupt counters are zero in /sys/firmware/acpi/interrupts. GPE0a_EN register has desired bits enabled. Any idea what could be the reason for not getting GPE events?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 28, 2014 at 3:52 PM, WANG FEI <span dir="ltr"><<a href="mailto:wangfei.jimei@gmail.com" target="_blank">wangfei.jimei@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Guilu,<div><br></div><div>About the item 2, please refer to <a href="https://www.pcisig.com/specifications/conventional/pcipm1.2.pdf" target="_blank">https://www.pcisig.com/specifications/conventional/pcipm1.2.pdf</a>, chapter 3, my experience is based on this spec. I bet PCIE devices should be compatible with this doc.</div><div><br></div><div>This doc will focus on PCI/PCIE devices behind PCI/PCIE bridges/root ports, it's described how to configure the PCI/PCIE devices to wake themselves from PME signals. This job suppose to be done before system sleep(S1/S3/S4/S5).</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-Fei</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 28, 2014 at 6:42 AM, Gailu Singh <span dir="ltr"><<a href="mailto:gailu96@gmail.com" target="_blank">gailu96@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi Wang Fei,<br><br></div>Thank you very much for your help. I checked the things you suggested but still it does not work. Here are some details.<span><br><br>>>1) SoC ACPI registers: Enable PCIE PME in PM and GPE registers. <br></span></div><div>            You are right  PCIE Wake was disabled in smm.c I enabled it <br>                - enable_pm1(PWRBTN_EN | GBL_EN | PCIEXPWAK_DIS);<br>                + enable_pm1(PWRBTN_EN | GBL_EN);<br></div><div>             I Enabled GPE registers as well<br>                + enable_gpe(PCI_EXP_EN | PCIE_WAKE1_EN | PCIE_WAKE2_EN | SUS_GPIO_EN1 | SUS_GPIO_EN2);<span><br><br>>>3) Report WOL PME single in ASL _GPE{} with _Lxx method<br></span></div><div>             I have _Lxx methods in GPE as below<br>                Method(_L11) {<br>                    Notify(PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */<span><br>                }<br><br>>> 4) (Option) If WOL PME single connect a GPIO, you have to configure GPIO pin as well.<br></span></div><div>             I tried configuring GPIO in gpio.c as GPIO_ACPI_WAKE and GPIO_ACPI_SCI<br>             - GPIO_DEFAULT,           /* GPIO_S5[01] */<br>             - GPIO_DEFAULT,           /* GPIO_S5[02] */<br>             + GPIO_ACPI_WAKE,     /* GPIO_S5[01] */<br>             + GPIO_ACPI_WAKE,     /* GPIO_S5[02] */<span><br><br>>>2) PCIE Card ACPI register: Yeah, you need set some registers of the PCIE card to allow it waked by packages.</span></div><div>        I am not clear about this. Can you please elaborate little more on this. Do I need it to wake SoC or is it required for SoC to wake PCIe card after resume? From power button resume card works fine post resume.<br></div><div><br></div><div>Am I doing something wrong in the first three things you suggested?<br><br></div><div>Best Regards<br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 26, 2014 at 8:33 PM, WANG FEI <span dir="ltr"><<a href="mailto:wangfei.jimei@gmail.com" target="_blank">wangfei.jimei@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I remember WOL PME wakeup function need configure 3-4 different areas,<div><br></div><div>1) SoC ACPI registers: Enable PCIE PME in PM and GPE registers. </div><div><br></div><div>2) PCIE Card ACPI register: Yeah, you need set some registers of the PCIE card to allow it waked by packages.</div><div><br></div><div>3) Report WOL PME single in ASL _GPE{} with _Lxx method</div><div><br></div><div>4) (Option) If WOL PME single connect a GPIO, you have to configure GPIO pin as well.</div><div><br></div><div>Please check your code and see if anything missed.</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Tue, Nov 25, 2014 at 2:27 PM, Gailu Singh <span dir="ltr"><<a href="mailto:gailu96@gmail.com" target="_blank">gailu96@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div><div>Hi Sean,<br><br></div>Thanks for your help and showing me the direction. You are right GPIO pins for PMC_WAKE_PCIE were set to GPIO_DEFAULT in src/mainboard/intel/bayleybay_fsp/gpio.c. I have changed that to GPIO_ACPI_WAKE now. This seems to be one step closer to the solution but looks like something still missing as wakeup from PCIE device is still not working with coreboot. Any other thing that I should look at?<br><br></div>Best Regards<span><br><div><div><div><br>>>Perhaps you do not have all your GPIO pins set properly.</div></div></div></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 24, 2014 at 5:04 PM, Gailu Singh <span dir="ltr"><<a href="mailto:gailu96@gmail.com" target="_blank">gailu96@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Hi Experts,<br><br></div>I have PCIe card that supports wake on lan and it works fine with BIOS. On sending magic packet System wakes up from S3.<br><br></div>However If I use same Linux image with coreboot wake from PCI device does not wake the system. System wakes up from S3 using power button only.<br><br></div>I suspected the problem with dsdt and took dsdt binary from bios setup, disassembled it and replaced dsdt.asl in coreboot with the one from bios to match dsdt configuration. Now my dsdt and linux image are same but still system does not wake from PCI PME (WOL) in coreboot but works fine with bios.<br><br></div>In both cases wakeup is enabled in /sys/bus/pci/devices/0000\:01\:00.0/power/wakeup <br><br>Can you please advise what else could be the problem?<br><br></div>PME signal is connected to GPIOS5 on the SoC.<br><br></div>Best Regards<br><div><div><br></div></div></div>
</blockquote></div><br></div>
</div></div><br></div></div><span><font color="#888888">--<br>
coreboot mailing list: <a href="mailto:coreboot@coreboot.org" target="_blank">coreboot@coreboot.org</a><br>
<a href="http://www.coreboot.org/mailman/listinfo/coreboot" target="_blank">http://www.coreboot.org/mailman/listinfo/coreboot</a><br></font></span></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>