• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision88d0278aa7f5c882d8a485788ab4bae4702099b8 (tree)
Time2022-01-20 20:47:52
AuthorYanan Wang <wangyanan55@huaw...>
CommiterPeter Maydell

Log Message

hw/acpi/aml-build: Support cluster level in PPTT generation

Support CPU cluster topology level in generation of ACPI
Processor Properties Topology Table (PPTT).

Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Message-id: 20220107083232.16256-6-wangyanan55@huawei.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Change Summary

Incremental Difference

--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -2001,6 +2001,7 @@ static void build_processor_hierarchy_node(GArray *tbl, uint32_t flags,
20012001 void build_pptt(GArray *table_data, BIOSLinker *linker, MachineState *ms,
20022002 const char *oem_id, const char *oem_table_id)
20032003 {
2004+ MachineClass *mc = MACHINE_GET_CLASS(ms);
20042005 GQueue *list = g_queue_new();
20052006 guint pptt_start = table_data->len;
20062007 guint parent_offset;
@@ -2025,6 +2026,23 @@ void build_pptt(GArray *table_data, BIOSLinker *linker, MachineState *ms,
20252026 0, socket, NULL, 0);
20262027 }
20272028
2029+ if (mc->smp_props.clusters_supported) {
2030+ length = g_queue_get_length(list);
2031+ for (i = 0; i < length; i++) {
2032+ int cluster;
2033+
2034+ parent_offset = GPOINTER_TO_UINT(g_queue_pop_head(list));
2035+ for (cluster = 0; cluster < ms->smp.clusters; cluster++) {
2036+ g_queue_push_tail(list,
2037+ GUINT_TO_POINTER(table_data->len - pptt_start));
2038+ build_processor_hierarchy_node(
2039+ table_data,
2040+ (0 << 0), /* not a physical package */
2041+ parent_offset, cluster, NULL, 0);
2042+ }
2043+ }
2044+ }
2045+
20282046 length = g_queue_get_length(list);
20292047 for (i = 0; i < length; i++) {
20302048 int core;