<p>Marc Jones has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21165">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">amd/stoneyridge: Change ACPI _PR.CPxx to _PR.Pxxx<br><br>This is a bug introduced by this commit:<br>stoneyridge: Fix CPU ASL \_PR table [commit I870f81]<br><br>The following error is found in dmesg<br><br> ACPI Error: [\_PR_.P000] Namespace lookup failure, AE_NOT_FOUND...<br> ACPI Exception: AE_NOT_FOUND, During name lookup/catalog...<br> ACPI Exception: AE_NOT_FOUND, (SSDT:AGESA   ) while loading table...<br> ACPI Error: 1 table load failures, 3 successful...<br> ...<br> acpi-cpufreq: overriding BIOS provided _PSD data<br><br>And, "ls -la /sys/devices/system/cpu/cpufreq/" doesn't work<br><br>The cause is that the Pstate SSDT table generated by AGESA expects CPU<br>variables \_PR.Pxxx, not \_PR.CPxx as generated by coreboot. Use an<br>AGESA specifc function to set Pxxx.<br><br>BRANCH=none<br>BUG=b:64885241<br>TEST= Check dmeg and ls -la /sys/devices/system/cpu/cpufreq/<br><br>Change-Id: I4929f9a1c39705c6df9d965c8d030f4d1f0b5e5f<br>Signed-off-by: Marc Jones <marcj303@gmail.com><br>---<br>M src/soc/amd/stoneyridge/acpi.c<br>1 file changed, 28 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/65/21165/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/soc/amd/stoneyridge/acpi.c b/src/soc/amd/stoneyridge/acpi.c<br>index 9788a91..ed84d32 100644<br>--- a/src/soc/amd/stoneyridge/acpi.c<br>+++ b/src/soc/amd/stoneyridge/acpi.c<br>@@ -232,6 +232,30 @@<br>    header->checksum = acpi_checksum((void *)fadt, sizeof(acpi_fadt_t));<br> }<br> <br>+<br>+/**<br>+ * The AMD AGESA SSDT Pstate table expects Processor devices labeled \_PR.Pxxx,<br>+ * not _PR.CPxx, as the generic write acpigen_write_processor() generates.<br>+ */<br>+static void agesa_acpigen_write_processor(u8 cpuindex, u32 pblock_addr,<br>+                                          u8 pblock_len)<br>+{<br>+/*<br>+   Processor (\_PR.CPUcpuindex, cpuindex, pblock_addr, pblock_len)<br>+      {<br>+*/<br>+       char pscope[16];<br>+     acpigen_emit_ext_op(PROCESSOR_OP);<br>+   acpigen_write_len_f();<br>+<br>+    snprintf(pscope, sizeof(pscope),<br>+              "\\_PR.P%03d", (unsigned int) cpuindex);<br>+  acpigen_emit_namestring(pscope);<br>+     acpigen_emit_byte(cpuindex);<br>+ acpigen_emit_dword(pblock_addr);<br>+     acpigen_emit_byte(pblock_len);<br>+}<br>+<br> void generate_cpu_entries(device_t device)<br> {<br>        int cores, cpu, plen = 6;<br>@@ -245,15 +269,15 @@<br>      printk(BIOS_DEBUG, "ACPI \\_PR report %d core(s)\n", cores);<br> <br> <br>- /* Generate BSP \_PR.CPU0 */<br>- acpigen_write_processor(0, pcontrol_blk, plen);<br>+      /* Generate BSP \_PR.P000 */<br>+ agesa_acpigen_write_processor(0, pcontrol_blk, plen);<br>         acpigen_pop_len();<br> <br>-        /* Generate AP \_PR.CPUx */<br>+  /* Generate AP \_PR.Pxxx */<br>   pcontrol_blk = 0;<br>     plen = 0;<br>     for (cpu = 1; cpu < cores; cpu++) {<br>-               acpigen_write_processor(cpu, pcontrol_blk, 0);<br>+               agesa_acpigen_write_processor(cpu, pcontrol_blk, 0);<br>          acpigen_pop_len();<br>    }<br> }<br></pre><p>To view, visit <a href="https://review.coreboot.org/21165">change 21165</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/21165"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I4929f9a1c39705c6df9d965c8d030f4d1f0b5e5f </div>
<div style="display:none"> Gerrit-Change-Number: 21165 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Marc Jones <marc@marcjonesconsulting.com> </div>