<div dir="ltr">Hi,<div><br></div><div>I'm looking at the src/device/pciexp_device.c file trying to understand what it does and I've noticed this in pciexp_enable_aspm :</div><div><div><span class="gmail-Apple-tab-span" style="white-space:pre">         </span>/* Enable ASPM role based error reporting. */</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">          </span>devcap = pci_read_config32(endp, endp_cap + PCI_EXP_DEVCAP);</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">           </span>devcap |= PCI_EXP_DEVCAP_RBER;</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">         </span>pci_write_config32(endp, endp_cap + PCI_EXP_DEVCAP, devcap);</div></div><div><br></div><div>This looks like it tries to write a bit to 1 to enable Role-based error-reporting in the DEVCAP (offset 0x04) in the PCIe capability, but according to the spec (looking at page 612 of the spec version 3.0 that I found here  : <a href="http://composter.com.ua/documents/PCI_Express_Base_Specification_Revision_3.0.pdf">http://composter.com.ua/documents/PCI_Express_Base_Specification_Revision_3.0.pdf</a>), that structure is read-only (it's the device capabilities register, not the device control register).</div><div>Is that an error ? </div><div>I tracked that code (moved, then moved again) all the way to this change from 2011 : <a href="https://review.coreboot.org/#/c/735/">https://review.coreboot.org/#/c/735/</a> but for some reason git blame can't find the file in commits before that.<br></div><div><br></div><div>That code is probably harmless since it's a Read-only field anyways, but I'm wondering if the code that should be there shouldn't instead be enabling the bits 0:3 in the device control register to enable the error reporting. Also, I don't see how this actually relates to ASPM (it only gets called if ASPM is enabled).</div><div><br></div><div>Does anyone know if I'm on the right track in my interpretation or if I misunderstood the spec or what that code is meant to do ?</div><div><br></div><div>Thanks,</div><div>Youness.</div><div><br></div></div>