<p>Nico Huber has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21324">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">[WIP] arch/x86/acpigen: Add function to write a CPU package<br><br>Emits a list of CPU cores, e.g.<br><br>  Name (PPKG, Package (2) { \_PR.CP00, \_PR.CP01 })<br><br>Change-Id: I10e9ebad84343d1fb282b3fbb28f5f014f664f14<br>Signed-off-by: Nico Huber <nico.h@gmx.de><br>---<br>M src/arch/x86/acpigen.c<br>M src/arch/x86/include/arch/acpigen.h<br>2 files changed, 19 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/24/21324/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/arch/x86/acpigen.c b/src/arch/x86/acpigen.c<br>index 758386d..d97723c 100644<br>--- a/src/arch/x86/acpigen.c<br>+++ b/src/arch/x86/acpigen.c<br>@@ -353,6 +353,23 @@<br>        acpigen_emit_byte(pblock_len);<br> }<br> <br>+void acpigen_write_processor_package(const char *const name,<br>+                              const size_t first_core,<br>+                                     const size_t core_count)<br>+{<br>+    size_t i;<br>+    char pscope[16];<br>+<br>+  acpigen_write_name(name);<br>+    acpigen_write_package(core_count);<br>+   for (i = first_core; i < core_count; ++i) {<br>+               snprintf(pscope, sizeof(pscope),<br>+                      CONFIG_ACPI_CPU_STRING, (unsigned int)i);<br>+           acpigen_emit_namestring(pscope);<br>+     }<br>+    acpigen_pop_len();<br>+}<br>+<br> /*<br>  * Generate ACPI AML code for OperationRegion<br>  * Arg0: Pointer to struct opregion opreg = OPREGION(rname, space, offset, len)<br>diff --git a/src/arch/x86/include/arch/acpigen.h b/src/arch/x86/include/arch/acpigen.h<br>index 37d0d55..68d7957 100644<br>--- a/src/arch/x86/include/arch/acpigen.h<br>+++ b/src/arch/x86/include/arch/acpigen.h<br>@@ -219,6 +219,8 @@<br> void acpigen_write_CSD_package(u32 domain, u32 numprocs, CSD_coord coordtype,<br>                            u32 index);<br> void acpigen_write_processor(u8 cpuindex, u32 pblock_addr, u8 pblock_len);<br>+void acpigen_write_processor_package(const char *name,<br>+                                 size_t first_core, size_t core_count);<br> void acpigen_write_TSS_package(int entries, acpi_tstate_t *tstate_list);<br> void acpigen_write_TSD_package(u32 domain, u32 numprocs, PSD_coord coordtype);<br> void acpigen_write_mem32fixed(int readwrite, u32 base, u32 size);<br></pre><p>To view, visit <a href="https://review.coreboot.org/21324">change 21324</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/21324"/><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: I10e9ebad84343d1fb282b3fbb28f5f014f664f14 </div>
<div style="display:none"> Gerrit-Change-Number: 21324 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Nico Huber <nico.h@gmx.de> </div>