From amitay at ozlabs.org Thu Apr 2 09:48:32 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 2 Apr 2020 09:48:32 +1100 Subject: [Pdbg] [PATCH] dts: Add compatible properties for proc targets Message-ID: <20200401224832.1101596-1-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- p8.dts.m4 | 1 + p9.dts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/p8.dts.m4 b/p8.dts.m4 index 3e7a66a..a508e02 100644 --- a/p8.dts.m4 +++ b/p8.dts.m4 @@ -1,6 +1,7 @@ define(`PROC',` define(`PROC_ID',`$1')dnl proc$1 { + compatible = "ibm,power8-proc", "ibm,processor"; index = <$1>; fsi { diff --git a/p9.dts b/p9.dts index 8a35d75..29823ce 100644 --- a/p9.dts +++ b/p9.dts @@ -7,6 +7,7 @@ }; proc0 { + compatible = "ibm,power9-proc", "ibm,processor"; index = < 0x00 >; fsi { @@ -1508,6 +1509,7 @@ }; proc1 { + compatible = "ibm,power9-proc", "ibm,processor"; index = < 0x01 >; fsi { -- 2.25.1 From amitay at ozlabs.org Thu Apr 2 09:55:20 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 2 Apr 2020 09:55:20 +1100 Subject: [Pdbg] [PATCH v2 0/6] Add api for attribute get/set Message-ID: <20200401225526.1105288-1-amitay@ozlabs.org> Attributes are special properties with specific data structure. Two types of data structures are supported: 1. simple (arrays of 1, 2, 4 and 8 byte integers) 2. complex (packed stream of 1, 2, 4 and 8 byte integers) V2 changes: - Fix property tests - Clean up API (re-order arguments, drop unnecessary arguments) - Add attribute api tests Amitay Isaacs (6): tests: Fix typo in the usage tests: Use a copy of dtb for testing writes libpdbg: Add apis for reading/writing attributes tests: Add test code for testing attribute api fake.dts: Add properties for attribute api testing tests: Add attribute api tests Makefile.am | 9 +- fake.dts.m4 | 6 + libpdbg/device.c | 227 ++++++++++++++++++++++++ libpdbg/libpdbg.h | 73 ++++++++ src/tests/libpdbg_attr_test.c | 322 ++++++++++++++++++++++++++++++++++ src/tests/libpdbg_prop_test.c | 4 +- tests/test_attr_array.sh | 133 ++++++++++++++ tests/test_attr_packed.sh | 82 +++++++++ tests/test_prop.sh | 5 +- 9 files changed, 857 insertions(+), 4 deletions(-) create mode 100644 src/tests/libpdbg_attr_test.c create mode 100755 tests/test_attr_array.sh create mode 100755 tests/test_attr_packed.sh -- 2.25.1 From amitay at ozlabs.org Thu Apr 2 09:55:21 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 2 Apr 2020 09:55:21 +1100 Subject: [Pdbg] [PATCH v2 1/6] tests: Fix typo in the usage In-Reply-To: <20200401225526.1105288-1-amitay@ozlabs.org> References: <20200401225526.1105288-1-amitay@ozlabs.org> Message-ID: <20200401225526.1105288-2-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- src/tests/libpdbg_prop_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/libpdbg_prop_test.c b/src/tests/libpdbg_prop_test.c index c916dcc..f4ec16a 100644 --- a/src/tests/libpdbg_prop_test.c +++ b/src/tests/libpdbg_prop_test.c @@ -24,8 +24,8 @@ static void usage(void) { - fprintf(stderr, "Usage: libpdbg_fdt_test read char|int\n"); - fprintf(stderr, " libpdbg_fdt_test write char|int \n"); + fprintf(stderr, "Usage: libpdbg_prop_test read char|int\n"); + fprintf(stderr, " libpdbg_prop_test write char|int \n"); exit(1); } -- 2.25.1 From amitay at ozlabs.org Thu Apr 2 09:55:22 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 2 Apr 2020 09:55:22 +1100 Subject: [Pdbg] [PATCH v2 2/6] tests: Use a copy of dtb for testing writes In-Reply-To: <20200401225526.1105288-1-amitay@ozlabs.org> References: <20200401225526.1105288-1-amitay@ozlabs.org> Message-ID: <20200401225526.1105288-3-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- tests/test_prop.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_prop.sh b/tests/test_prop.sh index e2e511f..5511a75 100755 --- a/tests/test_prop.sh +++ b/tests/test_prop.sh @@ -36,7 +36,10 @@ test_run libpdbg_prop_test /proc0/pib write ATTR1 int 0xdeadbeef test_result 99 -- test_run libpdbg_prop_test /proc0/pib write ATTR2 char PROCESSOR0 -export PDBG_DTB=fake.dtb +cp fake.dtb fake-prop.dtb +test_cleanup rm -f fake-prop.dtb + +export PDBG_DTB=fake-prop.dtb test_result 0 -- test_run libpdbg_prop_test /proc1/pib write ATTR1 int 0xdeadbeef -- 2.25.1 From amitay at ozlabs.org Thu Apr 2 09:55:23 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 2 Apr 2020 09:55:23 +1100 Subject: [Pdbg] [PATCH v2 3/6] libpdbg: Add apis for reading/writing attributes In-Reply-To: <20200401225526.1105288-1-amitay@ozlabs.org> References: <20200401225526.1105288-1-amitay@ozlabs.org> Message-ID: <20200401225526.1105288-4-amitay@ozlabs.org> Attributes are special properties that have specific data types. There are two types of data types: 1. Simple - Array of integer data type (1, 2, 4, 8 bytes) 2. Complex - Stream of integer data type (1, 2, 4, 8 bytes) Signed-off-by: Amitay Isaacs --- libpdbg/device.c | 227 ++++++++++++++++++++++++++++++++++++++++++++++ libpdbg/libpdbg.h | 73 +++++++++++++++ 2 files changed, 300 insertions(+) diff --git a/libpdbg/device.c b/libpdbg/device.c index 604cddb..219569e 100644 --- a/libpdbg/device.c +++ b/libpdbg/device.c @@ -755,3 +755,230 @@ struct pdbg_target *pdbg_target_root(void) { return pdbg_dt_root; } + +bool pdbg_target_set_attribute(struct pdbg_target *target, const char *name, uint32_t size, uint32_t count, const void *val) +{ + void *buf; + size_t total_size = count * size; + uint32_t i; + bool ok; + + buf = malloc(total_size); + if (!buf) + return false; + + if (size == 1) { + memcpy(buf, val, total_size); + + } else if (size == 2) { + uint16_t *b = (uint16_t *)buf; + uint16_t *v = (uint16_t *)val; + + for (i = 0; i < count; i++) + b[i] = htobe16(v[i]); + + } else if (size == 4) { + uint32_t *b = (uint32_t *)buf; + uint32_t *v = (uint32_t *)val; + + for (i = 0; i < count; i++) + b[i] = htobe32(v[i]); + + } else if (size == 8) { + uint64_t *b = (uint64_t *)buf; + uint64_t *v = (uint64_t *)val; + + for (i = 0; i < count; i++) + b[i] = htobe64(v[i]); + + } else { + free(buf); + return false; + } + + ok = pdbg_target_set_property(target, name, buf, total_size); + free(buf); + + return ok; +} + +bool pdbg_target_get_attribute(struct pdbg_target *target, const char *name, uint32_t size, uint32_t count, void *val) +{ + const void *buf; + size_t total_size; + uint32_t i; + + buf = pdbg_target_property(target, name, &total_size); + if (!buf) + return false; + + if (total_size != count * size) + return false; + + if (size == 1) { + memcpy(val, buf, total_size); + + } else if (size == 2) { + uint16_t *b = (uint16_t *)buf; + uint16_t *v = (uint16_t *)val; + + for (i = 0; i < count; i++) + v[i] = be16toh(b[i]); + + } else if (size == 4) { + uint32_t *b = (uint32_t *)buf; + uint32_t *v = (uint32_t *)val; + + for (i = 0; i < count; i++) + v[i] = be32toh(b[i]); + + } else if (size == 8) { + uint64_t *b = (uint64_t *)buf; + uint64_t *v = (uint64_t *)val; + + for (i = 0; i < count; i++) + v[i] = be64toh(b[i]); + + } else { + return false; + } + + return true; +} + +static size_t spec_size(const char *spec) +{ + size_t size = 0, i; + + for (i = 0; i < strlen(spec); i++) { + char ch = spec[i]; + + if (ch == '1') + size += 1; + else if (ch == '2') + size += 2; + else if (ch == '4') + size += 4; + else if (ch == '8') + size += 8; + else + return -1; + } + + return size; +} + +bool pdbg_target_set_attribute_packed(struct pdbg_target *target, const char *name, const char *spec, const void *val) +{ + void *buf; + size_t size, pos, i; + bool ok; + + if (!spec || spec[0] == '\0') + return false; + + size = spec_size(spec); + if (size <= 0) + return false; + + buf = malloc(size); + if (!buf) + return false; + + pos = 0; + for (i=0; i References: <20200401225526.1105288-1-amitay@ozlabs.org> Message-ID: <20200401225526.1105288-5-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- Makefile.am | 7 +- src/tests/libpdbg_attr_test.c | 322 ++++++++++++++++++++++++++++++++++ 2 files changed, 328 insertions(+), 1 deletion(-) create mode 100644 src/tests/libpdbg_attr_test.c diff --git a/Makefile.am b/Makefile.am index a4ca5f3..84e1a1d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,7 +18,7 @@ bin_PROGRAMS = pdbg check_PROGRAMS = $(libpdbg_tests) libpdbg_dtree_test \ libpdbg_p9_fapi_translation_test \ optcmd_test hexdump_test cronus_proxy \ - libpdbg_prop_test + libpdbg_prop_test libpdbg_attr_test PDBG_TESTS = \ tests/test_selection.sh \ @@ -274,6 +274,11 @@ libpdbg_prop_test_CFLAGS = $(libpdbg_test_cflags) libpdbg_prop_test_LDFLAGS = $(libpdbg_test_ldflags) libpdbg_prop_test_LDADD = $(libpdbg_test_ldadd) +libpdbg_attr_test_SOURCES = src/tests/libpdbg_attr_test.c +libpdbg_attr_test_CFLAGS = $(libpdbg_test_cflags) +libpdbg_attr_test_LDFLAGS = $(libpdbg_test_ldflags) +libpdbg_attr_test_LDADD = $(libpdbg_test_ldadd) + M4_V = $(M4_V_$(V)) M4_V_ = $(M4_V_$(AM_DEFAULT_VERBOSITY)) M4_V_0 = @echo " M4 " $@; diff --git a/src/tests/libpdbg_attr_test.c b/src/tests/libpdbg_attr_test.c new file mode 100644 index 0000000..759f1fc --- /dev/null +++ b/src/tests/libpdbg_attr_test.c @@ -0,0 +1,322 @@ +/* Copyright 2020 IBM Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include +#include +#include + +#include + +static void usage(void) +{ + fprintf(stderr, "Usage: libpdbg_attr_test read array 1|2|4|8 \n"); + fprintf(stderr, " libpdbg_attr_test write array 1|2|4|8 [ ...]\n"); + fprintf(stderr, " libpdbg_attr_test read packed \n"); + fprintf(stderr, " libpdbg_attr_test write packed [ ...]\n"); + exit(1); +} + +static void read_array(struct pdbg_target *target, + const char *attr, + unsigned int size, + unsigned int count) +{ + void *buf; + unsigned int i; + + buf = malloc(size * count); + assert(buf); + + if (!pdbg_target_get_attribute(target, attr, size, count, buf)) + exit(88); + + if (size == 1) { + uint8_t *v = (uint8_t *)buf; + + for (i=0; i 0); + + buf = malloc(size); + assert(buf); + + if (!pdbg_target_get_attribute_packed(target, attr, spec, buf)) + exit(88); + + pos = 0; + for (i=0; i 0); + + buf = malloc(size); + assert(buf); + + pos = 0; + for (i=0; i References: <20200401225526.1105288-1-amitay@ozlabs.org> Message-ID: <20200401225526.1105288-6-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- fake.dts.m4 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fake.dts.m4 b/fake.dts.m4 index 8d51482..3824738 100644 --- a/fake.dts.m4 +++ b/fake.dts.m4 @@ -119,5 +119,11 @@ divert`'dnl / { #address-cells = <0x1>; #size-cells = <0x1>; + ATTR1 = [ 00 ]; + ATTR2 = [ 00 00 ]; + ATTR4 = <0x0>; + ATTR8 = <0x0 0x0>; + ATTR16 = <0x0 0x0 0x0 0x0>; + dump_system(8, 4, 2) }; -- 2.25.1 From amitay at ozlabs.org Thu Apr 2 09:55:26 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 2 Apr 2020 09:55:26 +1100 Subject: [Pdbg] [PATCH v2 6/6] tests: Add attribute api tests In-Reply-To: <20200401225526.1105288-1-amitay@ozlabs.org> References: <20200401225526.1105288-1-amitay@ozlabs.org> Message-ID: <20200401225526.1105288-7-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- Makefile.am | 2 + tests/test_attr_array.sh | 133 ++++++++++++++++++++++++++++++++++++++ tests/test_attr_packed.sh | 82 +++++++++++++++++++++++ 3 files changed, 217 insertions(+) create mode 100755 tests/test_attr_array.sh create mode 100755 tests/test_attr_packed.sh diff --git a/Makefile.am b/Makefile.am index 84e1a1d..3c37ac8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -28,6 +28,8 @@ PDBG_TESTS = \ tests/test_tree.sh \ tests/test_tree2.sh \ tests/test_prop.sh \ + tests/test_attr_array.sh \ + tests/test_attr_packed.sh \ tests/test_p9_fapi_translation.sh TESTS = $(libpdbg_tests) optcmd_test $(PDBG_TESTS) diff --git a/tests/test_attr_array.sh b/tests/test_attr_array.sh new file mode 100755 index 0000000..768e22d --- /dev/null +++ b/tests/test_attr_array.sh @@ -0,0 +1,133 @@ +#!/bin/sh + +. $(dirname "$0")/driver.sh + +FAKE_DTB=fake.dtb +TEST_DTB=fake-attr.dtb + +export PDBG_DTB=$TEST_DTB + +test_setup cp $FAKE_DTB $TEST_DTB +test_cleanup rm -f $TEST_DTB + +test_group "libpdbg array attribute tests" + +test_result 0 < For openbmc, all the hardware access is required to go via sbefifo. Currently some of the operations are hacked in to go via sbefifo. This patchset removes temporary hacks and adds infrastructure to create sbefifo backend. Also fix couple of bugs in libsbefifo. V2 changes: - Rebased on top of latest master (resolved conflicts and add missing code due to upstream changes) Amitay Isaacs (19): libsbefifo: Fix compilation error for undefined variable libsbefifo: Use the correct sized pointer libpdbg: Add an api to get current backend libpdbg: Register hwunit drivers per backend libpdbg: Register fsi drivers with fsi backend libpdbg: Register i2c driver with i2c backend libpdbg: Register fake drivers with fake backend libpdbg: Register host drivers with host backend libpdbg: Register cronus drivers with cronus backend libpdbg: Add pib driver using sbefifo libpdbg: Add chiplet driver using sbefifo libpdbg: Add core driver using sbefifo libpdbg: Add thread driver using sbefifo libpdbg: Add all thread procedures to pib target libpdbg: Implement all thread procedures using sbefifo libpdbg: Remove special case thread procedures using sbefifo libpdbg: Drop thread procedures from chipop target libpdbg: Add sbefifo backend main: Add sbefifo backend Makefile.am | 1 + libpdbg/adu.c | 4 +- libpdbg/bmcfsi.c | 2 +- libpdbg/cfam.c | 8 +- libpdbg/chip.c | 62 ++-- libpdbg/cronus.c | 6 +- libpdbg/dtb.c | 24 ++ libpdbg/fake.c | 8 +- libpdbg/host.c | 2 +- libpdbg/htm.c | 6 +- libpdbg/hwunit.c | 31 +- libpdbg/hwunit.h | 10 +- libpdbg/i2c.c | 2 +- libpdbg/kernel.c | 4 +- libpdbg/libpdbg.h | 7 +- libpdbg/p8chip.c | 4 +- libpdbg/p9_fapi_targets.c | 52 +-- libpdbg/p9chip.c | 4 +- libpdbg/sbefifo.c | 181 +++++++++-- libpdbg/target.h | 1 + libsbefifo/cmd_scom.c | 4 +- libsbefifo/operation.c | 5 +- p9-sbefifo.dts.m4 | 86 +++++ p9.dts | 652 +++++++++++++++++++------------------- src/main.c | 3 + 25 files changed, 706 insertions(+), 463 deletions(-) create mode 100644 p9-sbefifo.dts.m4 -- 2.25.2 From amitay at ozlabs.org Tue Apr 7 16:15:57 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 7 Apr 2020 16:15:57 +1000 Subject: [Pdbg] [PATCH v2 03/19] libpdbg: Add an api to get current backend In-Reply-To: <20200407061613.21325-1-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> Message-ID: <20200407061613.21325-4-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/dtb.c | 5 +++++ libpdbg/target.h | 1 + 2 files changed, 6 insertions(+) diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index b094e34..70b7962 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -293,6 +293,11 @@ bool pdbg_set_backend(enum pdbg_backend backend, const char *backend_option) return true; } +enum pdbg_backend pdbg_get_backend(void) +{ + return pdbg_backend; +} + const char *pdbg_get_backend_option(void) { return pdbg_backend_option; diff --git a/libpdbg/target.h b/libpdbg/target.h index 3b74844..7094b51 100644 --- a/libpdbg/target.h +++ b/libpdbg/target.h @@ -80,6 +80,7 @@ extern struct list_head empty_list; extern struct list_head target_classes; struct pdbg_dtb *pdbg_default_dtb(void *system_fdt); +enum pdbg_backend pdbg_get_backend(void); const char *pdbg_get_backend_option(void); bool pdbg_fdt_is_readonly(void *fdt); -- 2.25.2 From amitay at ozlabs.org Tue Apr 7 16:15:59 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 7 Apr 2020 16:15:59 +1000 Subject: [Pdbg] [PATCH v2 05/19] libpdbg: Register fsi drivers with fsi backend In-Reply-To: <20200407061613.21325-1-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> Message-ID: <20200407061613.21325-6-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/bmcfsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpdbg/bmcfsi.c b/libpdbg/bmcfsi.c index 2639595..2f199fa 100644 --- a/libpdbg/bmcfsi.c +++ b/libpdbg/bmcfsi.c @@ -519,5 +519,5 @@ DECLARE_HW_UNIT(bmcfsi); __attribute__((constructor)) static void register_bmcfsi(void) { - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &bmcfsi_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_FSI, &bmcfsi_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Tue Apr 7 16:15:56 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 7 Apr 2020 16:15:56 +1000 Subject: [Pdbg] [PATCH v2 02/19] libsbefifo: Use the correct sized pointer In-Reply-To: <20200407061613.21325-1-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> Message-ID: <20200407061613.21325-3-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libsbefifo/cmd_scom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsbefifo/cmd_scom.c b/libsbefifo/cmd_scom.c index bc9b5f9..bb44e5e 100644 --- a/libsbefifo/cmd_scom.c +++ b/libsbefifo/cmd_scom.c @@ -24,7 +24,7 @@ static int sbefifo_scom_get_push(uint64_t addr, uint8_t **buf, uint32_t *buflen) { - uint8_t *msg; + uint32_t *msg; uint32_t nwords, cmd; nwords = 4; @@ -83,7 +83,7 @@ int sbefifo_scom_get(struct sbefifo_context *sctx, uint64_t addr, uint64_t *valu static int sbefifo_scom_put_push(uint64_t addr, uint64_t value, uint8_t **buf, uint32_t *buflen) { - uint8_t *msg; + uint32_t *msg; uint32_t nwords, cmd; nwords = 6; -- 2.25.2 From amitay at ozlabs.org Tue Apr 7 16:16:00 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 7 Apr 2020 16:16:00 +1000 Subject: [Pdbg] [PATCH v2 06/19] libpdbg: Register i2c driver with i2c backend In-Reply-To: <20200407061613.21325-1-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> Message-ID: <20200407061613.21325-7-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpdbg/i2c.c b/libpdbg/i2c.c index 3d0b80a..e3d508b 100644 --- a/libpdbg/i2c.c +++ b/libpdbg/i2c.c @@ -177,5 +177,5 @@ DECLARE_HW_UNIT(p8_i2c_pib); __attribute__((constructor)) static void register_i2c(void) { - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_i2c_pib_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_I2C, &p8_i2c_pib_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Tue Apr 7 16:16:01 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 7 Apr 2020 16:16:01 +1000 Subject: [Pdbg] [PATCH v2 07/19] libpdbg: Register fake drivers with fake backend In-Reply-To: <20200407061613.21325-1-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> Message-ID: <20200407061613.21325-8-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/fake.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libpdbg/fake.c b/libpdbg/fake.c index ae02463..64925d4 100644 --- a/libpdbg/fake.c +++ b/libpdbg/fake.c @@ -90,8 +90,8 @@ DECLARE_HW_UNIT(fake_thread); __attribute__((constructor)) static void register_fake(void) { - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_fsi_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_pib_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_core_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_thread_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_FAKE, &fake_fsi_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_FAKE, &fake_pib_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_FAKE, &fake_core_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_FAKE, &fake_thread_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Tue Apr 7 16:16:02 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 7 Apr 2020 16:16:02 +1000 Subject: [Pdbg] [PATCH v2 08/19] libpdbg: Register host drivers with host backend In-Reply-To: <20200407061613.21325-1-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> Message-ID: <20200407061613.21325-9-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpdbg/host.c b/libpdbg/host.c index d02b53d..63a0d5b 100644 --- a/libpdbg/host.c +++ b/libpdbg/host.c @@ -127,5 +127,5 @@ DECLARE_HW_UNIT(host_pib); __attribute__((constructor)) static void register_host(void) { - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &host_pib_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_HOST, &host_pib_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Tue Apr 7 16:15:55 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 7 Apr 2020 16:15:55 +1000 Subject: [Pdbg] [PATCH v2 01/19] libsbefifo: Fix compilation error for undefined variable In-Reply-To: <20200407061613.21325-1-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> Message-ID: <20200407061613.21325-2-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libsbefifo/operation.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libsbefifo/operation.c b/libsbefifo/operation.c index 07d9f64..8717f15 100644 --- a/libsbefifo/operation.c +++ b/libsbefifo/operation.c @@ -60,17 +60,18 @@ static int sbefifo_transport(struct sbefifo_context *sctx, uint8_t *msg, uint32_ int rc; size_t buflen; + buflen = msg_len; rc = sbefifo_write(sctx, msg, buflen); if (rc) { - LOG("write: cmd=%08x, rc=%d\n", cmd, rc); + LOG("write: cmd=%08x, rc=%d\n", be32toh(*(uint32_t *)(msg+4)), rc); return rc; } buflen = *out_len; rc = sbefifo_read(sctx, out, &buflen); if (rc) { - LOG("read: cmd=%08x, buflen=%zu, rc=%d\n", cmd, buflen, rc); + LOG("read: cmd=%08x, buflen=%zu, rc=%d\n", be32toh(*(uint32_t *)(msg+4)), buflen, rc); return rc; } -- 2.25.2 From amitay at ozlabs.org Tue Apr 7 16:15:58 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 7 Apr 2020 16:15:58 +1000 Subject: [Pdbg] [PATCH v2 04/19] libpdbg: Register hwunit drivers per backend In-Reply-To: <20200407061613.21325-1-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> Message-ID: <20200407061613.21325-5-amitay@ozlabs.org> This will allow to load backend specific drivers first. All the drivers are registered with the default backend, so this patch does not change libpdbg behaviour. Signed-off-by: Amitay Isaacs --- libpdbg/adu.c | 4 +-- libpdbg/bmcfsi.c | 2 +- libpdbg/cfam.c | 8 +++--- libpdbg/chip.c | 2 +- libpdbg/cronus.c | 6 ++--- libpdbg/fake.c | 8 +++--- libpdbg/host.c | 2 +- libpdbg/htm.c | 6 ++--- libpdbg/hwunit.c | 31 ++++++++++++++++------- libpdbg/hwunit.h | 2 +- libpdbg/i2c.c | 2 +- libpdbg/kernel.c | 4 +-- libpdbg/p8chip.c | 4 +-- libpdbg/p9_fapi_targets.c | 52 +++++++++++++++++++-------------------- libpdbg/p9chip.c | 4 +-- libpdbg/sbefifo.c | 8 +++--- 16 files changed, 79 insertions(+), 66 deletions(-) diff --git a/libpdbg/adu.c b/libpdbg/adu.c index df610a7..fe60118 100644 --- a/libpdbg/adu.c +++ b/libpdbg/adu.c @@ -597,6 +597,6 @@ DECLARE_HW_UNIT(p9_adu); __attribute__((constructor)) static void register_adu(void) { - pdbg_hwunit_register(&p8_adu_hw_unit); - pdbg_hwunit_register(&p9_adu_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_adu_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_adu_hw_unit); } diff --git a/libpdbg/bmcfsi.c b/libpdbg/bmcfsi.c index 1d2e304..2639595 100644 --- a/libpdbg/bmcfsi.c +++ b/libpdbg/bmcfsi.c @@ -519,5 +519,5 @@ DECLARE_HW_UNIT(bmcfsi); __attribute__((constructor)) static void register_bmcfsi(void) { - pdbg_hwunit_register(&bmcfsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &bmcfsi_hw_unit); } diff --git a/libpdbg/cfam.c b/libpdbg/cfam.c index da4c5fc..0b0b6f0 100644 --- a/libpdbg/cfam.c +++ b/libpdbg/cfam.c @@ -353,8 +353,8 @@ DECLARE_HW_UNIT(cfam_hmfsi); __attribute__((constructor)) static void register_cfam(void) { - pdbg_hwunit_register(&fsi_pib_hw_unit); - pdbg_hwunit_register(&p8_opb_hw_unit); - pdbg_hwunit_register(&p8_opb_hmfsi_hw_unit); - pdbg_hwunit_register(&cfam_hmfsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fsi_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_opb_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_opb_hmfsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cfam_hmfsi_hw_unit); } diff --git a/libpdbg/chip.c b/libpdbg/chip.c index b45cffa..b961e87 100644 --- a/libpdbg/chip.c +++ b/libpdbg/chip.c @@ -679,5 +679,5 @@ DECLARE_HW_UNIT(proc); __attribute__((constructor)) static void register_proc(void) { - pdbg_hwunit_register(&proc_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &proc_hw_unit); } diff --git a/libpdbg/cronus.c b/libpdbg/cronus.c index ff8af4c..23d555b 100644 --- a/libpdbg/cronus.c +++ b/libpdbg/cronus.c @@ -219,7 +219,7 @@ DECLARE_HW_UNIT(cronus_sbefifo); __attribute__((constructor)) static void register_cronus(void) { - pdbg_hwunit_register(&cronus_pib_hw_unit); - pdbg_hwunit_register(&cronus_fsi_hw_unit); - pdbg_hwunit_register(&cronus_sbefifo_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_fsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_sbefifo_hw_unit); } diff --git a/libpdbg/fake.c b/libpdbg/fake.c index 82415db..ae02463 100644 --- a/libpdbg/fake.c +++ b/libpdbg/fake.c @@ -90,8 +90,8 @@ DECLARE_HW_UNIT(fake_thread); __attribute__((constructor)) static void register_fake(void) { - pdbg_hwunit_register(&fake_fsi_hw_unit); - pdbg_hwunit_register(&fake_pib_hw_unit); - pdbg_hwunit_register(&fake_core_hw_unit); - pdbg_hwunit_register(&fake_thread_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_fsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_core_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_thread_hw_unit); } diff --git a/libpdbg/host.c b/libpdbg/host.c index 428c18b..d02b53d 100644 --- a/libpdbg/host.c +++ b/libpdbg/host.c @@ -127,5 +127,5 @@ DECLARE_HW_UNIT(host_pib); __attribute__((constructor)) static void register_host(void) { - pdbg_hwunit_register(&host_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &host_pib_hw_unit); } diff --git a/libpdbg/htm.c b/libpdbg/htm.c index 4d23e82..a259478 100644 --- a/libpdbg/htm.c +++ b/libpdbg/htm.c @@ -1158,7 +1158,7 @@ DECLARE_HW_UNIT(p8_chtm); __attribute__((constructor)) static void register_htm(void) { - pdbg_hwunit_register(&p8_nhtm_hw_unit); - pdbg_hwunit_register(&p9_nhtm_hw_unit); - pdbg_hwunit_register(&p8_chtm_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_nhtm_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_nhtm_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_chtm_hw_unit); } diff --git a/libpdbg/hwunit.c b/libpdbg/hwunit.c index c7ec63d..710c78a 100644 --- a/libpdbg/hwunit.c +++ b/libpdbg/hwunit.c @@ -20,26 +20,28 @@ #include "hwunit.h" #define MAX_HW_UNITS 1024 +#define MAX_BACKENDS 16 -static const struct hw_unit_info *g_hw_unit[MAX_HW_UNITS]; -static int g_hw_unit_count; +static const struct hw_unit_info *g_hw_unit[MAX_BACKENDS][MAX_HW_UNITS]; +static int g_hw_unit_count[MAX_BACKENDS]; -void pdbg_hwunit_register(const struct hw_unit_info *hw_unit) +void pdbg_hwunit_register(enum pdbg_backend backend, const struct hw_unit_info *hw_unit) { - assert(g_hw_unit_count < MAX_HW_UNITS); + assert(g_hw_unit_count[backend] < MAX_HW_UNITS); - g_hw_unit[g_hw_unit_count] = hw_unit; - g_hw_unit_count++; + g_hw_unit[backend][g_hw_unit_count[backend]] = hw_unit; + g_hw_unit_count[backend]++; } -const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat) +static const struct hw_unit_info *find_compatible(enum pdbg_backend backend, + const char *compat) { const struct hw_unit_info *p; struct pdbg_target *target; int i; - for (i = 0; i < g_hw_unit_count; i++) { - p = g_hw_unit[i]; + for (i = 0; i < g_hw_unit_count[backend]; i++) { + p = g_hw_unit[backend][i]; target = p->hw_unit; if (!strcmp(target->compatible, compat)) @@ -48,3 +50,14 @@ const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat) return NULL; } + +const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat) +{ + const struct hw_unit_info *p; + + p = find_compatible(pdbg_get_backend(), compat); + if (!p) + p = find_compatible(PDBG_DEFAULT_BACKEND, compat); + + return p; +} diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h index 7165a3c..5bca088 100644 --- a/libpdbg/hwunit.h +++ b/libpdbg/hwunit.h @@ -31,7 +31,7 @@ struct hw_unit_info { size_t size; }; -void pdbg_hwunit_register(const struct hw_unit_info *hw_unit); +void pdbg_hwunit_register(enum pdbg_backend backend, const struct hw_unit_info *hw_unit); const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat); /* diff --git a/libpdbg/i2c.c b/libpdbg/i2c.c index 1a5d089..3d0b80a 100644 --- a/libpdbg/i2c.c +++ b/libpdbg/i2c.c @@ -177,5 +177,5 @@ DECLARE_HW_UNIT(p8_i2c_pib); __attribute__((constructor)) static void register_i2c(void) { - pdbg_hwunit_register(&p8_i2c_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_i2c_pib_hw_unit); } diff --git a/libpdbg/kernel.c b/libpdbg/kernel.c index dbd3586..c4637a7 100644 --- a/libpdbg/kernel.c +++ b/libpdbg/kernel.c @@ -264,6 +264,6 @@ DECLARE_HW_UNIT(kernel_pib); __attribute__((constructor)) static void register_kernel(void) { - pdbg_hwunit_register(&kernel_fsi_hw_unit); - pdbg_hwunit_register(&kernel_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_fsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_pib_hw_unit); } diff --git a/libpdbg/p8chip.c b/libpdbg/p8chip.c index 1bf71e8..484d77c 100644 --- a/libpdbg/p8chip.c +++ b/libpdbg/p8chip.c @@ -738,6 +738,6 @@ DECLARE_HW_UNIT(p8_core); __attribute__((constructor)) static void register_p8chip(void) { - pdbg_hwunit_register(&p8_thread_hw_unit); - pdbg_hwunit_register(&p8_core_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_thread_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_core_hw_unit); } diff --git a/libpdbg/p9_fapi_targets.c b/libpdbg/p9_fapi_targets.c index 1dc7af8..97680d5 100644 --- a/libpdbg/p9_fapi_targets.c +++ b/libpdbg/p9_fapi_targets.c @@ -720,30 +720,30 @@ DECLARE_HW_UNIT(p9_capp); __attribute__((constructor)) static void register_p9_fapi_targets(void) { - pdbg_hwunit_register(&p9_ex_hw_unit); - pdbg_hwunit_register(&p9_mba_hw_unit); - pdbg_hwunit_register(&p9_mcs_hw_unit); - pdbg_hwunit_register(&p9_xbus_hw_unit); - pdbg_hwunit_register(&p9_abus_hw_unit); - pdbg_hwunit_register(&p9_l4_hw_unit); - pdbg_hwunit_register(&p9_eq_hw_unit); - pdbg_hwunit_register(&p9_mca_hw_unit); - pdbg_hwunit_register(&p9_mcbist_hw_unit); - pdbg_hwunit_register(&p9_mi_hw_unit); - pdbg_hwunit_register(&p9_dmi_hw_unit); - pdbg_hwunit_register(&p9_obus_hw_unit); - pdbg_hwunit_register(&p9_obus_brick_hw_unit); - pdbg_hwunit_register(&p9_sbe_hw_unit); - pdbg_hwunit_register(&p9_ppe_hw_unit); - pdbg_hwunit_register(&p9_pec_hw_unit); - pdbg_hwunit_register(&p9_phb_hw_unit); - pdbg_hwunit_register(&p9_mc_hw_unit); - pdbg_hwunit_register(&p9_mem_port_hw_unit); - pdbg_hwunit_register(&p9_nmmu_hw_unit); - pdbg_hwunit_register(&p9_pau_hw_unit); - pdbg_hwunit_register(&p9_iohs_hw_unit); - pdbg_hwunit_register(&p9_fc_hw_unit); - pdbg_hwunit_register(&p9_pauc_hw_unit); - pdbg_hwunit_register(&p9_chiplet_hw_unit); - pdbg_hwunit_register(&p9_capp_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_ex_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mba_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mcs_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_xbus_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_abus_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_l4_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_eq_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mca_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mcbist_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_dmi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_obus_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_obus_brick_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_sbe_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_ppe_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_pec_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_phb_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mc_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mem_port_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_nmmu_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_pau_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_iohs_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_fc_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_pauc_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_chiplet_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_capp_hw_unit); } diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c index 63434ee..6222dc3 100644 --- a/libpdbg/p9chip.c +++ b/libpdbg/p9chip.c @@ -510,6 +510,6 @@ DECLARE_HW_UNIT(p9_core); __attribute__((constructor)) static void register_p9chip(void) { - pdbg_hwunit_register(&p9_thread_hw_unit); - pdbg_hwunit_register(&p9_core_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_thread_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_core_hw_unit); } diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 41e68e9..22f11f1 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -321,8 +321,8 @@ DECLARE_HW_UNIT(kernel_sbefifo); __attribute__((constructor)) static void register_sbefifo(void) { - pdbg_hwunit_register(&kernel_sbefifo_hw_unit); - pdbg_hwunit_register(&sbefifo_chipop_hw_unit); - pdbg_hwunit_register(&sbefifo_mem_hw_unit); - pdbg_hwunit_register(&sbefifo_pba_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_sbefifo_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chipop_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_mem_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pba_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Tue Apr 7 16:16:03 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 7 Apr 2020 16:16:03 +1000 Subject: [Pdbg] [PATCH v2 09/19] libpdbg: Register cronus drivers with cronus backend In-Reply-To: <20200407061613.21325-1-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> Message-ID: <20200407061613.21325-10-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/cronus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libpdbg/cronus.c b/libpdbg/cronus.c index 23d555b..eeaedc5 100644 --- a/libpdbg/cronus.c +++ b/libpdbg/cronus.c @@ -219,7 +219,7 @@ DECLARE_HW_UNIT(cronus_sbefifo); __attribute__((constructor)) static void register_cronus(void) { - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_pib_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_fsi_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_sbefifo_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_CRONUS, &cronus_pib_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_CRONUS, &cronus_fsi_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_CRONUS, &cronus_sbefifo_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Tue Apr 7 16:16:04 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 7 Apr 2020 16:16:04 +1000 Subject: [Pdbg] [PATCH v2 10/19] libpdbg: Add pib driver using sbefifo In-Reply-To: <20200407061613.21325-1-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> Message-ID: <20200407061613.21325-11-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/sbefifo.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 22f11f1..112504f 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -237,6 +237,22 @@ static int sbefifo_op_thread_sreset(struct chipop *chipop, return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_SRESET); } +static int sbefifo_pib_read(struct pib *pib, uint64_t addr, uint64_t *val) +{ + struct sbefifo *sbefifo = target_to_sbefifo(pib->target.parent); + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); + + return sbefifo_scom_get(sctx, addr, val); +} + +static int sbefifo_pib_write(struct pib *pib, uint64_t addr, uint64_t val) +{ + struct sbefifo *sbefifo = target_to_sbefifo(pib->target.parent); + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); + + return sbefifo_scom_put(sctx, addr, val); +} + static struct sbefifo_context *sbefifo_op_get_context(struct sbefifo *sbefifo) { return sbefifo->sf_ctx; @@ -306,6 +322,18 @@ static struct chipop sbefifo_chipop = { }; DECLARE_HW_UNIT(sbefifo_chipop); +static struct pib sbefifo_pib = { + .target = { + .name = "SBE FIFO Chip-op based PIB", + .compatible = "ibm,sbefifo-pib", + .class = "pib", + }, + .read = sbefifo_pib_read, + .write = sbefifo_pib_write, + .fd = -1, +}; +DECLARE_HW_UNIT(sbefifo_pib); + static struct sbefifo kernel_sbefifo = { .target = { .name = "Kernel based FSI SBE FIFO", @@ -323,6 +351,7 @@ static void register_sbefifo(void) { pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_sbefifo_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chipop_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pib_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_mem_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pba_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Tue Apr 7 16:16:05 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 7 Apr 2020 16:16:05 +1000 Subject: [Pdbg] [PATCH v2 11/19] libpdbg: Add chiplet driver using sbefifo In-Reply-To: <20200407061613.21325-1-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> Message-ID: <20200407061613.21325-12-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/sbefifo.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 112504f..72a58f9 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -334,6 +334,15 @@ static struct pib sbefifo_pib = { }; DECLARE_HW_UNIT(sbefifo_pib); +static struct chiplet sbefifo_chiplet = { + .target = { + .name = "SBE FIFO Chip-op based Chiplet", + .compatible = "ibm,sbefifo-chiplet", + .class = "chiplet", + }, +}; +DECLARE_HW_UNIT(sbefifo_chiplet); + static struct sbefifo kernel_sbefifo = { .target = { .name = "Kernel based FSI SBE FIFO", @@ -352,6 +361,7 @@ static void register_sbefifo(void) pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_sbefifo_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chipop_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chiplet_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_mem_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pba_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Tue Apr 7 16:16:06 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 7 Apr 2020 16:16:06 +1000 Subject: [Pdbg] [PATCH v2 12/19] libpdbg: Add core driver using sbefifo In-Reply-To: <20200407061613.21325-1-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> Message-ID: <20200407061613.21325-13-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/sbefifo.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 72a58f9..f498a4d 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -343,6 +343,15 @@ static struct chiplet sbefifo_chiplet = { }; DECLARE_HW_UNIT(sbefifo_chiplet); +static struct core sbefifo_core = { + .target = { + .name = "SBE FIFO Chip-op based Core", + .compatible = "ibm,sbefifo-core", + .class = "core", + }, +}; +DECLARE_HW_UNIT(sbefifo_core); + static struct sbefifo kernel_sbefifo = { .target = { .name = "Kernel based FSI SBE FIFO", @@ -362,6 +371,7 @@ static void register_sbefifo(void) pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chipop_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pib_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chiplet_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_core_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_mem_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pba_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Tue Apr 7 16:16:07 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 7 Apr 2020 16:16:07 +1000 Subject: [Pdbg] [PATCH v2 13/19] libpdbg: Add thread driver using sbefifo In-Reply-To: <20200407061613.21325-1-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> Message-ID: <20200407061613.21325-14-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/sbefifo.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index f498a4d..fbc7bfc 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -253,6 +253,65 @@ static int sbefifo_pib_write(struct pib *pib, uint64_t addr, uint64_t val) return sbefifo_scom_put(sctx, addr, val); } +static int sbefifo_thread_probe(struct pdbg_target *target) +{ + struct thread *thread = target_to_thread(target); + uint32_t tid; + + assert(!pdbg_target_u32_property(target, "tid", &tid)); + thread->id = tid; + + return 0; +} + +static void sbefifo_thread_release(struct pdbg_target *target) +{ +} + +static int sbefifo_thread_op(struct thread *thread, uint32_t oper) +{ + struct pdbg_target *core = pdbg_target_require_parent("core", &thread->target); + struct sbefifo *sbefifo = target_to_sbefifo( + pdbg_target_require_parent("sbefifo", &thread->target)); + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); + uint8_t mode = 0; + + /* Enforce special-wakeup for thread stop and sreset */ + if ((oper & 0xf) == SBEFIFO_INSN_OP_STOP || + (oper & 0xf) == SBEFIFO_INSN_OP_SRESET) + mode = 0x2; + + return sbefifo_control_insn(sctx, + pdbg_target_index(core), + thread->id, + oper, + mode); +} +static int sbefifo_thread_start(struct thread *thread) +{ + return sbefifo_thread_op(thread, SBEFIFO_INSN_OP_START); +} + +static int sbefifo_thread_stop(struct thread *thread) +{ + return sbefifo_thread_op(thread, SBEFIFO_INSN_OP_STOP); +} + +static int sbefifo_thread_step(struct thread *thread, int count) +{ + int i, rc = 0; + + for (i = 0; i < count; i++) + rc |= sbefifo_thread_op(thread, SBEFIFO_INSN_OP_STEP); + + return rc; +} + +static int sbefifo_thread_sreset(struct thread *thread) +{ + return sbefifo_thread_op(thread, SBEFIFO_INSN_OP_SRESET); +} + static struct sbefifo_context *sbefifo_op_get_context(struct sbefifo *sbefifo) { return sbefifo->sf_ctx; @@ -352,6 +411,21 @@ static struct core sbefifo_core = { }; DECLARE_HW_UNIT(sbefifo_core); +static struct thread sbefifo_thread = { + .target = { + .name = "SBE FFIO Chip-op based Thread", + .compatible = "ibm,sbefifo-thread", + .class = "thread", + .probe = sbefifo_thread_probe, + .release = sbefifo_thread_release, + }, + .start = sbefifo_thread_start, + .stop = sbefifo_thread_stop, + .step = sbefifo_thread_step, + .sreset = sbefifo_thread_sreset, +}; +DECLARE_HW_UNIT(sbefifo_thread); + static struct sbefifo kernel_sbefifo = { .target = { .name = "Kernel based FSI SBE FIFO", @@ -372,6 +446,7 @@ static void register_sbefifo(void) pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pib_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chiplet_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_core_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_thread_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_mem_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pba_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Tue Apr 7 16:16:08 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 7 Apr 2020 16:16:08 +1000 Subject: [Pdbg] [PATCH v2 14/19] libpdbg: Add all thread procedures to pib target In-Reply-To: <20200407061613.21325-1-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> Message-ID: <20200407061613.21325-15-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/hwunit.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h index 5bca088..318a611 100644 --- a/libpdbg/hwunit.h +++ b/libpdbg/hwunit.h @@ -93,6 +93,10 @@ struct pib { struct pdbg_target target; int (*read)(struct pib *, uint64_t, uint64_t *); int (*write)(struct pib *, uint64_t, uint64_t); + int (*thread_start_all)(struct pib *); + int (*thread_stop_all)(struct pib *); + int (*thread_step_all)(struct pib *, int); + int (*thread_sreset_all)(struct pib *); void *priv; int fd; }; -- 2.25.2 From amitay at ozlabs.org Tue Apr 7 16:16:09 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 7 Apr 2020 16:16:09 +1000 Subject: [Pdbg] [PATCH v2 15/19] libpdbg: Implement all thread procedures using sbefifo In-Reply-To: <20200407061613.21325-1-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> Message-ID: <20200407061613.21325-16-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/sbefifo.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index fbc7bfc..b11b188 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -253,6 +253,53 @@ static int sbefifo_pib_write(struct pib *pib, uint64_t addr, uint64_t val) return sbefifo_scom_put(sctx, addr, val); } +static int sbefifo_pib_thread_op(struct pib *pib, uint32_t oper) +{ + struct sbefifo *sbefifo = target_to_sbefifo(pib->target.parent); + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); + uint32_t core_id, thread_id; + uint8_t mode = 0; + + /* + * core_id = 0xff (all SMT4 cores) + * thread_id = 0xf (all 4 threads in the SMT4 core) + */ + core_id = 0xff; + thread_id = 0xf; + + /* Enforce special-wakeup for thread stop and sreset */ + if ((oper & 0xf) == SBEFIFO_INSN_OP_STOP || + (oper & 0xf) == SBEFIFO_INSN_OP_SRESET) + mode = 0x2; + + return sbefifo_control_insn(sctx, core_id, thread_id, oper, mode); +} + +static int sbefifo_pib_thread_start(struct pib *pib) +{ + return sbefifo_pib_thread_op(pib, SBEFIFO_INSN_OP_START); +} + +static int sbefifo_pib_thread_stop(struct pib *pib) +{ + return sbefifo_pib_thread_op(pib, SBEFIFO_INSN_OP_STOP); +} + +static int sbefifo_pib_thread_step(struct pib *pib, int count) +{ + int i, rc = 0; + + for (i = 0; i < count; i++) + rc |= sbefifo_pib_thread_op(pib, SBEFIFO_INSN_OP_STEP); + + return rc; +} + +static int sbefifo_pib_thread_sreset(struct pib *pib) +{ + return sbefifo_pib_thread_op(pib, SBEFIFO_INSN_OP_SRESET); +} + static int sbefifo_thread_probe(struct pdbg_target *target) { struct thread *thread = target_to_thread(target); @@ -389,6 +436,10 @@ static struct pib sbefifo_pib = { }, .read = sbefifo_pib_read, .write = sbefifo_pib_write, + .thread_start_all = sbefifo_pib_thread_start, + .thread_stop_all = sbefifo_pib_thread_stop, + .thread_step_all = sbefifo_pib_thread_step, + .thread_sreset_all = sbefifo_pib_thread_sreset, .fd = -1, }; DECLARE_HW_UNIT(sbefifo_pib); -- 2.25.2 From amitay at ozlabs.org Tue Apr 7 16:16:10 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 7 Apr 2020 16:16:10 +1000 Subject: [Pdbg] [PATCH v2 16/19] libpdbg: Remove special case thread procedures using sbefifo In-Reply-To: <20200407061613.21325-1-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> Message-ID: <20200407061613.21325-17-amitay@ozlabs.org> Always check if the all thread procedures are provided by pib. If not, use individual thread operations. Signed-off-by: Amitay Isaacs --- libpdbg/chip.c | 60 +++++++++++++++++--------------------------------- 1 file changed, 20 insertions(+), 40 deletions(-) diff --git a/libpdbg/chip.c b/libpdbg/chip.c index b961e87..4ab5a4c 100644 --- a/libpdbg/chip.c +++ b/libpdbg/chip.c @@ -156,21 +156,16 @@ int thread_sreset(struct pdbg_target *thread_target) int thread_step_all(void) { - struct pdbg_target *pib, *thread; + struct pdbg_target *target, *thread; int rc = 0, count = 0; - pdbg_for_each_class_target("pib", pib) { - struct chipop *chipop; + pdbg_for_each_class_target("pib", target) { + struct pib *pib = target_to_pib(target); - chipop = pib_to_chipop(pib); - if (!chipop) + if (!pib->thread_step_all) break; - /* - * core_id = 0xff (all SMT4 cores) - * thread_id = 0xf (all 4 threads in the SMT4 core) - */ - rc |= chipop->thread_step(chipop, 0xff, 0xf); + rc |= pib->thread_step_all(pib, 1); count++; } @@ -189,21 +184,16 @@ int thread_step_all(void) int thread_start_all(void) { - struct pdbg_target *pib, *thread; + struct pdbg_target *target, *thread; int rc = 0, count = 0; - pdbg_for_each_class_target("pib", pib) { - struct chipop *chipop; + pdbg_for_each_class_target("pib", target) { + struct pib *pib = target_to_pib(target); - chipop = pib_to_chipop(pib); - if (!chipop) + if (!pib->thread_start_all) break; - /* - * core_id = 0xff (all SMT4 cores) - * thread_id = 0xf (all 4 threads in the SMT4 core) - */ - rc |= chipop->thread_start(chipop, 0xff, 0xf); + rc |= pib->thread_start_all(pib); count++; } @@ -222,21 +212,16 @@ int thread_start_all(void) int thread_stop_all(void) { - struct pdbg_target *pib, *thread; + struct pdbg_target *target, *thread; int rc = 0, count = 0; - pdbg_for_each_class_target("pib", pib) { - struct chipop *chipop; + pdbg_for_each_class_target("pib", target) { + struct pib *pib = target_to_pib(target); - chipop = pib_to_chipop(pib); - if (!chipop) + if (!pib->thread_stop_all) break; - /* - * core_id = 0xff (all SMT4 cores) - * thread_id = 0xf (all 4 threads in the SMT4 core) - */ - rc |= chipop->thread_stop(chipop, 0xff, 0xf); + rc |= pib->thread_stop_all(pib); count++; } @@ -255,21 +240,16 @@ int thread_stop_all(void) int thread_sreset_all(void) { - struct pdbg_target *pib, *thread; + struct pdbg_target *target, *thread; int rc = 0, count = 0; - pdbg_for_each_class_target("pib", pib) { - struct chipop *chipop; + pdbg_for_each_class_target("pib", target) { + struct pib *pib = target_to_pib(target); - chipop = pib_to_chipop(pib); - if (!chipop) + if (!pib->thread_sreset_all) break; - /* - * core_id = 0xff (all SMT4 cores) - * thread_id = 0xf (all 4 threads in the SMT4 core) - */ - rc |= chipop->thread_sreset(chipop, 0xff, 0xf); + rc |= pib->thread_sreset_all(pib); count++; } -- 2.25.2 From amitay at ozlabs.org Tue Apr 7 16:16:11 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 7 Apr 2020 16:16:11 +1000 Subject: [Pdbg] [PATCH v2 17/19] libpdbg: Drop thread procedures from chipop target In-Reply-To: <20200407061613.21325-1-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> Message-ID: <20200407061613.21325-18-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/hwunit.h | 4 ---- libpdbg/sbefifo.c | 46 ---------------------------------------------- 2 files changed, 50 deletions(-) diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h index 318a611..de929da 100644 --- a/libpdbg/hwunit.h +++ b/libpdbg/hwunit.h @@ -75,10 +75,6 @@ struct chipop { int (*istep)(struct chipop *, uint32_t major, uint32_t minor); int (*mpipl_enter)(struct chipop *); int (*mpipl_continue)(struct chipop *); - int (*thread_start)(struct chipop *, uint32_t core_id, uint32_t thread_id); - int (*thread_stop)(struct chipop *, uint32_t core_id, uint32_t thread_id); - int (*thread_step)(struct chipop *, uint32_t core_id, uint32_t thread_id); - int (*thread_sreset)(struct chipop *, uint32_t core_id, uint32_t thread_id); }; #define target_to_chipop(x) container_of(x, struct chipop, target) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index b11b188..69ea9c7 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -195,48 +195,6 @@ static int sbefifo_op_mpipl_enter(struct chipop *chipop) return sbefifo_mpipl_enter(sctx); } -static int sbefifo_op_control(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id, - uint32_t oper) -{ - struct sbefifo *sbefifo = target_to_sbefifo(chipop->target.parent); - struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); - uint8_t mode = 0; - - /* Enforce special-wakeup for thread stop and sreset */ - if ((oper & 0xf) == SBEFIFO_INSN_OP_STOP || - (oper & 0xf) == SBEFIFO_INSN_OP_SRESET) - mode = 0x2; - - PR_NOTICE("sbefifo: control c:0x%x, t:0x%x, op:%u mode:%u\n", core_id, thread_id, oper, mode); - - return sbefifo_control_insn(sctx, core_id & 0xff, thread_id & 0xff, oper & 0xff, mode); -} - -static int sbefifo_op_thread_start(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id) -{ - return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_START); -} - -static int sbefifo_op_thread_stop(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id) -{ - return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_STOP); -} - -static int sbefifo_op_thread_step(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id) -{ - return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_STEP); -} - -static int sbefifo_op_thread_sreset(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id) -{ - return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_SRESET); -} - static int sbefifo_pib_read(struct pib *pib, uint64_t addr, uint64_t *val) { struct sbefifo *sbefifo = target_to_sbefifo(pib->target.parent); @@ -421,10 +379,6 @@ static struct chipop sbefifo_chipop = { .istep = sbefifo_op_istep, .mpipl_enter = sbefifo_op_mpipl_enter, .mpipl_continue = sbefifo_op_mpipl_continue, - .thread_start = sbefifo_op_thread_start, - .thread_stop = sbefifo_op_thread_stop, - .thread_step = sbefifo_op_thread_step, - .thread_sreset = sbefifo_op_thread_sreset, }; DECLARE_HW_UNIT(sbefifo_chipop); -- 2.25.2 From amitay at ozlabs.org Tue Apr 7 16:16:12 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 7 Apr 2020 16:16:12 +1000 Subject: [Pdbg] [PATCH v2 18/19] libpdbg: Add sbefifo backend In-Reply-To: <20200407061613.21325-1-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> Message-ID: <20200407061613.21325-19-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- Makefile.am | 1 + libpdbg/dtb.c | 19 ++ libpdbg/libpdbg.h | 7 +- libpdbg/sbefifo.c | 8 +- p9-sbefifo.dts.m4 | 86 ++++++ p9.dts | 652 +++++++++++++++++++++++----------------------- 6 files changed, 442 insertions(+), 331 deletions(-) create mode 100644 p9-sbefifo.dts.m4 diff --git a/Makefile.am b/Makefile.am index 109567d..046e1f7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -80,6 +80,7 @@ endif DT = fake.dts fake2.dts p8-cronus.dts p9-cronus.dts \ p8-fsi.dts p8-i2c.dts p8-kernel.dts \ p9w-fsi.dts p9r-fsi.dts p9z-fsi.dts p9-kernel.dts \ + p9-sbefifo.dts \ p8-host.dts p9-host.dts p8.dts DT_sources = $(DT:.dts=.dtb.S) p9.dtb.S diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index 70b7962..f72f22b 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -43,6 +43,7 @@ #include "p9-host.dt.h" #include "p8-cronus.dt.h" #include "p9-cronus.dt.h" +#include "p9-sbefifo.dt.h" #include "p8.dt.h" #include "p9.dt.h" @@ -402,6 +403,24 @@ struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) } break; + case PDBG_BACKEND_SBEFIFO: + if (!pdbg_backend_option) { + pdbg_log(PDBG_ERROR, "No system type specified\n"); + pdbg_log(PDBG_ERROR, "Use p9\n"); + return NULL; + } + + if (!strcmp(pdbg_backend_option, "p9")) { + if (!dtb->backend.fdt) + dtb->backend.fdt = &_binary_p9_sbefifo_dtb_o_start; + if (!dtb->system.fdt) + dtb->system.fdt = &_binary_p9_dtb_o_start; + } else { + pdbg_log(PDBG_ERROR, "Invalid system type %s\n", pdbg_backend_option); + pdbg_log(PDBG_ERROR, "Use p9\n"); + } + break; + default: pdbg_log(PDBG_WARNING, "Unable to determine a valid default backend, using fake backend for testing purposes\n"); /* Fall through */ diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h index 1c974f5..bdc6cea 100644 --- a/libpdbg/libpdbg.h +++ b/libpdbg/libpdbg.h @@ -142,7 +142,6 @@ enum pdbg_target_status { PDBG_TARGET_RELEASED, }; - /** * @brief Describes the various methods (referred to as backends) for * accessing hardware depending on where the code is executed. @@ -197,6 +196,12 @@ enum pdbg_backend { * the BMC network address / hostname. For example p9 at spoon2-bmc. */ PDBG_BACKEND_CRONUS, + + /** + * This backend uses sbefifo kernel driver on BMC to access hardware + * via SBE. + */ + PDBG_BACKEND_SBEFIFO, }; /** diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 69ea9c7..7936df6 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -448,10 +448,10 @@ static void register_sbefifo(void) { pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_sbefifo_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chipop_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pib_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chiplet_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_core_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_thread_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_SBEFIFO, &sbefifo_pib_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_SBEFIFO, &sbefifo_chiplet_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_SBEFIFO, &sbefifo_core_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_SBEFIFO, &sbefifo_thread_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_mem_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pba_hw_unit); } diff --git a/p9-sbefifo.dts.m4 b/p9-sbefifo.dts.m4 new file mode 100644 index 0000000..48b3051 --- /dev/null +++ b/p9-sbefifo.dts.m4 @@ -0,0 +1,86 @@ +/dts-v1/; + +/ { + #address-cells = <0x1>; + #size-cells = <0x0>; + + fsi0: kernelfsi at 0 { + #address-cells = <0x2>; + #size-cells = <0x1>; + compatible = "ibm,kernel-fsi"; + reg = <0x0 0x0 0x0>; + index = <0x0>; + status = "mustexist"; + system-path = "/proc0/fsi"; + + sbefifo at 2400 { /* Bogus address */ + reg = <0x0 0x2400 0x7>; + index = <0x0>; + compatible = "ibm,kernel-sbefifo"; + device-path = "/dev/sbefifo1"; + + sbefifo-pib { + #address-cells = <0x2>; + #size-cells = <0x1>; + index = <0x0>; + compatible = "ibm,sbefifo-pib"; + system-path = "/proc0/pib"; + }; + + sbefifo-mem { + compatible = "ibm,sbefifo-mem"; + system-path = "/mem0"; + }; + + sbefifo-pba { + compatible = "ibm,sbefifo-mem-pba"; + system-path = "/mempba0"; + }; + + sbefifo-chipop { + compatible = "ibm,sbefifo-chipop"; + index = <0x0>; + }; + }; + + hmfsi at 100000 { + #address-cells = <0x2>; + #size-cells = <0x1>; + compatible = "ibm,fsi-hmfsi"; + reg = <0x0 0x100000 0x8000>; + port = <0x1>; + index = <0x1>; + system-path = "/proc1/fsi"; + + sbefifo at 2400 { /* Bogus address */ + reg = <0x0 0x2400 0x7>; + index = <0x1>; + compatible = "ibm,kernel-sbefifo"; + device-path = "/dev/sbefifo2"; + + sbefifo-pib { + #address-cells = <0x2>; + #size-cells = <0x1>; + index = <0x1>; + compatible = "ibm,sbefifo-pib"; + system-path = "/proc1/pib"; + }; + + sbefifo-mem { + compatible = "ibm,sbefifo-mem"; + system-path = "/mem1"; + }; + + sbefifo-pba { + compatible = "ibm,sbefifo-mem-pba"; + system-path = "/mempba1"; + }; + + sbefifo-chipop { + compatible = "ibm,sbefifo-chipop"; + index = <0x1>; + }; + }; + }; + }; +}; diff --git a/p9.dts b/p9.dts index dfc413c..f8cb88b 100644 --- a/p9.dts +++ b/p9.dts @@ -38,7 +38,7 @@ }; chiplet at 1000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x01 >; reg = < 0x00 0x1000000 0xfffff >; #address-cells = < 0x02 >; @@ -52,7 +52,7 @@ }; chiplet at 2000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x02 >; reg = < 0x00 0x2000000 0xfffff >; @@ -68,7 +68,7 @@ }; chiplet at 3000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x03 >; reg = < 0x00 0x3000000 0xfffff >; @@ -89,7 +89,7 @@ }; chiplet at 4000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x04 >; reg = < 0x00 0x4000000 0xfffff >; @@ -105,7 +105,7 @@ }; chiplet at 5000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x05 >; reg = < 0x00 0x5000000 0xfffff >; @@ -126,7 +126,7 @@ }; chiplet at 6000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x06 >; reg = < 0x00 0x6000000 0xfffff >; #address-cells = < 0x02 >; @@ -141,7 +141,7 @@ }; chiplet at 7000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x07 >; reg = < 0x00 0x7000000 0xfffff >; #address-cells = < 0x02 >; @@ -180,7 +180,7 @@ }; chiplet at 8000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x08 >; reg = < 0x00 0x8000000 0xfffff >; #address-cells = < 0x02 >; @@ -219,7 +219,7 @@ }; chiplet at 9000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x09 >; reg = < 0x00 0x9000000 0xfffff >; #address-cells = < 0x02 >; @@ -248,7 +248,7 @@ }; chiplet at c000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x0c >; reg = < 0x00 0xc000000 0xfffff >; #address-cells = < 0x02 >; @@ -277,7 +277,7 @@ }; chiplet at d000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x0d >; reg = < 0x00 0xd000000 0xfffff >; #address-cells = < 0x02 >; @@ -301,7 +301,7 @@ }; chiplet at e000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x0e >; reg = < 0x00 0xe000000 0xfffff >; #address-cells = < 0x02 >; @@ -325,7 +325,7 @@ }; chiplet at f000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x0f >; reg = < 0x00 0xf000000 0xfffff >; #address-cells = < 0x02 >; @@ -349,7 +349,7 @@ }; chiplet at 10000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x10 >; reg = < 0x00 0x10000000 0xfffff >; #address-cells = < 0x02 >; @@ -372,40 +372,40 @@ chiplet at 20000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x20 >; reg = < 0x00 0x20000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x00 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -416,40 +416,40 @@ chiplet at 21000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x21 >; reg = < 0x00 0x21000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x01 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -468,40 +468,40 @@ chiplet at 22000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x22 >; reg = < 0x00 0x22000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x02 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -512,40 +512,40 @@ chiplet at 23000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x23 >; reg = < 0x00 0x23000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x03 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -557,7 +557,7 @@ }; chiplet at 11000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x11 >; reg = < 0x00 0x11000000 0xfffff >; #address-cells = < 0x02 >; @@ -580,40 +580,40 @@ chiplet at 24000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x24 >; reg = < 0x00 0x24000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x04 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -624,40 +624,40 @@ chiplet at 25000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x25 >; reg = < 0x00 0x25000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x05 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -676,40 +676,40 @@ chiplet at 26000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x26 >; reg = < 0x00 0x26000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x06 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -720,40 +720,40 @@ chiplet at 27000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x27 >; reg = < 0x00 0x27000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x07 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -765,7 +765,7 @@ }; chiplet at 12000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x12 >; reg = < 0x00 0x12000000 0xfffff >; #address-cells = < 0x02 >; @@ -788,40 +788,40 @@ chiplet at 28000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x28 >; reg = < 0x00 0x28000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x08 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -832,40 +832,40 @@ chiplet at 29000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x29 >; reg = < 0x00 0x29000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x09 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -884,40 +884,40 @@ chiplet at 2a000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x2a >; reg = < 0x00 0x2a000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x0a >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -928,40 +928,40 @@ chiplet at 2b000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x2b >; reg = < 0x00 0x2b000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x0b >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -973,7 +973,7 @@ }; chiplet at 13000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x13 >; reg = < 0x00 0x13000000 0xfffff >; #address-cells = < 0x02 >; @@ -996,40 +996,40 @@ chiplet at 2c000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x2c >; reg = < 0x00 0x2c000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x0c >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1040,40 +1040,40 @@ chiplet at 2d000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x2d >; reg = < 0x00 0x2d000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x0d >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1092,40 +1092,40 @@ chiplet at 2e000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x2e >; reg = < 0x00 0x2e000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x0e >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1136,40 +1136,40 @@ chiplet at 2f000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x2f >; reg = < 0x00 0x2f000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x0f >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1181,7 +1181,7 @@ }; chiplet at 14000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x14 >; reg = < 0x00 0x14000000 0xfffff >; #address-cells = < 0x02 >; @@ -1204,40 +1204,40 @@ chiplet at 30000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x30 >; reg = < 0x00 0x30000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x10 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1248,40 +1248,40 @@ chiplet at 31000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x31 >; reg = < 0x00 0x31000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x11 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1300,40 +1300,40 @@ chiplet at 32000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x32 >; reg = < 0x00 0x32000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x12 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1344,40 +1344,40 @@ chiplet at 33000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x33 >; reg = < 0x00 0x33000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x13 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1389,7 +1389,7 @@ }; chiplet at 15000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x15 >; reg = < 0x00 0x15000000 0xfffff >; #address-cells = < 0x02 >; @@ -1412,40 +1412,40 @@ chiplet at 34000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x34 >; reg = < 0x00 0x34000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x14 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1456,40 +1456,40 @@ chiplet at 35000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x35 >; reg = < 0x00 0x35000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x15 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1508,40 +1508,40 @@ chiplet at 36000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x36 >; reg = < 0x00 0x36000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x16 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1552,40 +1552,40 @@ chiplet at 37000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x37 >; reg = < 0x00 0x37000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x17 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1754,7 +1754,7 @@ }; chiplet at 1000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x01 >; reg = < 0x00 0x1000000 0xfffff >; #address-cells = < 0x02 >; @@ -1768,7 +1768,7 @@ }; chiplet at 2000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x02 >; reg = < 0x00 0x2000000 0xfffff >; @@ -1784,7 +1784,7 @@ }; chiplet at 3000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x03 >; reg = < 0x00 0x3000000 0xfffff >; @@ -1805,7 +1805,7 @@ }; chiplet at 4000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x04 >; reg = < 0x00 0x4000000 0xfffff >; @@ -1821,7 +1821,7 @@ }; chiplet at 5000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x05 >; reg = < 0x00 0x5000000 0xfffff >; @@ -1842,7 +1842,7 @@ }; chiplet at 6000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x06 >; reg = < 0x00 0x6000000 0xfffff >; #address-cells = < 0x02 >; @@ -1857,7 +1857,7 @@ }; chiplet at 7000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x07 >; reg = < 0x00 0x7000000 0xfffff >; #address-cells = < 0x02 >; @@ -1896,7 +1896,7 @@ }; chiplet at 8000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x08 >; reg = < 0x00 0x8000000 0xfffff >; #address-cells = < 0x02 >; @@ -1935,7 +1935,7 @@ }; chiplet at 9000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x09 >; reg = < 0x00 0x9000000 0xfffff >; #address-cells = < 0x02 >; @@ -1964,7 +1964,7 @@ }; chiplet at c000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x0c >; reg = < 0x00 0xc000000 0xfffff >; #address-cells = < 0x02 >; @@ -1993,7 +1993,7 @@ }; chiplet at d000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x0d >; reg = < 0x00 0xd000000 0xfffff >; #address-cells = < 0x02 >; @@ -2017,7 +2017,7 @@ }; chiplet at e000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x0e >; reg = < 0x00 0xe000000 0xfffff >; #address-cells = < 0x02 >; @@ -2041,7 +2041,7 @@ }; chiplet at f000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x0f >; reg = < 0x00 0xf000000 0xfffff >; #address-cells = < 0x02 >; @@ -2065,7 +2065,7 @@ }; chiplet at 10000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x10 >; reg = < 0x00 0x10000000 0xfffff >; #address-cells = < 0x02 >; @@ -2088,40 +2088,40 @@ chiplet at 20000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x20 >; reg = < 0x00 0x20000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x00 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2132,40 +2132,40 @@ chiplet at 21000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x21 >; reg = < 0x00 0x21000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x01 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2184,40 +2184,40 @@ chiplet at 22000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x22 >; reg = < 0x00 0x22000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x02 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2228,40 +2228,40 @@ chiplet at 23000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x23 >; reg = < 0x00 0x23000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x03 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2273,7 +2273,7 @@ }; chiplet at 11000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x11 >; reg = < 0x00 0x11000000 0xfffff >; #address-cells = < 0x02 >; @@ -2296,40 +2296,40 @@ chiplet at 24000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x24 >; reg = < 0x00 0x24000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x04 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2340,40 +2340,40 @@ chiplet at 25000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x25 >; reg = < 0x00 0x25000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x05 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2392,40 +2392,40 @@ chiplet at 26000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x26 >; reg = < 0x00 0x26000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x06 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2436,40 +2436,40 @@ chiplet at 27000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x27 >; reg = < 0x00 0x27000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x07 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2481,7 +2481,7 @@ }; chiplet at 12000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x12 >; reg = < 0x00 0x12000000 0xfffff >; #address-cells = < 0x02 >; @@ -2504,40 +2504,40 @@ chiplet at 28000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x28 >; reg = < 0x00 0x28000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x08 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2548,40 +2548,40 @@ chiplet at 29000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x29 >; reg = < 0x00 0x29000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x09 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2600,40 +2600,40 @@ chiplet at 2a000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x2a >; reg = < 0x00 0x2a000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x0a >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2644,40 +2644,40 @@ chiplet at 2b000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x2b >; reg = < 0x00 0x2b000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x0b >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2689,7 +2689,7 @@ }; chiplet at 13000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x13 >; reg = < 0x00 0x13000000 0xfffff >; #address-cells = < 0x02 >; @@ -2712,40 +2712,40 @@ chiplet at 2c000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x2c >; reg = < 0x00 0x2c000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x0c >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2756,40 +2756,40 @@ chiplet at 2d000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x2d >; reg = < 0x00 0x2d000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x0d >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2808,40 +2808,40 @@ chiplet at 2e000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x2e >; reg = < 0x00 0x2e000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x0e >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2852,40 +2852,40 @@ chiplet at 2f000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x2f >; reg = < 0x00 0x2f000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x0f >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2897,7 +2897,7 @@ }; chiplet at 14000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x14 >; reg = < 0x00 0x14000000 0xfffff >; #address-cells = < 0x02 >; @@ -2920,40 +2920,40 @@ chiplet at 30000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x30 >; reg = < 0x00 0x30000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x10 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2964,40 +2964,40 @@ chiplet at 31000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x31 >; reg = < 0x00 0x31000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x11 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3016,40 +3016,40 @@ chiplet at 32000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x32 >; reg = < 0x00 0x32000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x12 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3060,40 +3060,40 @@ chiplet at 33000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x33 >; reg = < 0x00 0x33000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x13 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3105,7 +3105,7 @@ }; chiplet at 15000000 { - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x15 >; reg = < 0x00 0x15000000 0xfffff >; #address-cells = < 0x02 >; @@ -3128,40 +3128,40 @@ chiplet at 34000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x34 >; reg = < 0x00 0x34000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x14 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3172,40 +3172,40 @@ chiplet at 35000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x35 >; reg = < 0x00 0x35000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x15 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3224,40 +3224,40 @@ chiplet at 36000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x36 >; reg = < 0x00 0x36000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x16 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3268,40 +3268,40 @@ chiplet at 37000000 { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; + compatible = "ibm,sbefifo-chiplet", "ibm,power9-chiplet"; index = < 0x37 >; reg = < 0x00 0x37000000 0xfffff >; core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,sbefifo-core", "ibm,power9-core"; index = < 0x17 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,sbefifo-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; -- 2.25.2 From amitay at ozlabs.org Tue Apr 7 16:16:13 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 7 Apr 2020 16:16:13 +1000 Subject: [Pdbg] [PATCH v2 19/19] main: Add sbefifo backend In-Reply-To: <20200407061613.21325-1-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> Message-ID: <20200407061613.21325-20-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- src/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.c b/src/main.c index 785dc26..5a5616d 100644 --- a/src/main.c +++ b/src/main.c @@ -149,6 +149,7 @@ static void print_usage(void) printf("\t\tRun command on all possible processors/chips/threads (default)\n"); printf("\t-b, --backend=backend\n"); printf("\t\tcronus:\tA backend based on cronus server\n"); + printf("\t\tsbefifo:\tA backend using sbefifo kernel driver\n"); printf("\t\tfsi:\tAn experimental backend that uses\n"); printf("\t\t\tbit-banging to access the host processor\n"); printf("\t\t\tvia the FSI bus.\n"); @@ -392,6 +393,8 @@ static bool parse_options(int argc, char *argv[]) backend = PDBG_BACKEND_HOST; } else if (strcmp(optarg, "cronus") == 0) { backend = PDBG_BACKEND_CRONUS; + } else if (strcmp(optarg, "sbefifo") == 0) { + backend = PDBG_BACKEND_SBEFIFO; } else { fprintf(stderr, "Invalid backend '%s'\n", optarg); opt_error = true; -- 2.25.2 From alistair at popple.id.au Thu Apr 9 11:49:29 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 9 Apr 2020 11:49:29 +1000 Subject: [Pdbg] [PATCH] p9.dts: Fix mcbist index Message-ID: <20200409014929.30111-1-alistair@popple.id.au> Commit 4bf5a1087f55 ("dts: Fix index for mcbist targets") fixed up the mcbist indicies but had them reveresed on the second processor. The tests were correctly updated and caught this problem. Signed-off-by: Alistair Popple --- p9.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/p9.dts b/p9.dts index f8cb88b..a292803 100644 --- a/p9.dts +++ b/p9.dts @@ -1890,7 +1890,7 @@ mcbist { compatible = "ibm,power9-mcbist"; - index = < 0x01 >; + index = < 0x00 >; }; }; }; @@ -1929,7 +1929,7 @@ mcbist { compatible = "ibm,power9-mcbist"; - index = < 0x00 >; + index = < 0x01 >; }; }; }; -- 2.20.1 From amitay at ozlabs.org Thu Apr 9 11:57:09 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 09 Apr 2020 11:57:09 +1000 Subject: [Pdbg] [PATCH] p9.dts: Fix mcbist index In-Reply-To: <20200409014929.30111-1-alistair@popple.id.au> References: <20200409014929.30111-1-alistair@popple.id.au> Message-ID: <863dec3b4cc308d48c6c948b0d5726498cb6d3f1.camel@ozlabs.org> Reviewed-by: Amitay Isaacs I can't believe I missed this when the test is failing. :-( Amitay. On Thu, 2020-04-09 at 11:49 +1000, Alistair Popple wrote: > Commit 4bf5a1087f55 ("dts: Fix index for mcbist targets") fixed up > the > mcbist indicies but had them reveresed on the second processor. The > tests were correctly updated and caught this problem. > > Signed-off-by: Alistair Popple > --- > p9.dts | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/p9.dts b/p9.dts > index f8cb88b..a292803 100644 > --- a/p9.dts > +++ b/p9.dts > @@ -1890,7 +1890,7 @@ > > mcbist { > compatible = > "ibm,power9-mcbist"; > - index = < 0x01 >; > + index = < 0x00 >; > }; > }; > }; > @@ -1929,7 +1929,7 @@ > > mcbist { > compatible = > "ibm,power9-mcbist"; > - index = < 0x00 >; > + index = < 0x01 >; > }; > }; > }; > -- > 2.20.1 > Amitay. -- It takes a long time to understand nothing. -Edward Dahlberg From alistair at popple.id.au Thu Apr 9 12:07:54 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 09 Apr 2020 12:07:54 +1000 Subject: [Pdbg] [PATCH] p9.dts: Fix mcbist index In-Reply-To: <863dec3b4cc308d48c6c948b0d5726498cb6d3f1.camel@ozlabs.org> References: <20200409014929.30111-1-alistair@popple.id.au> <863dec3b4cc308d48c6c948b0d5726498cb6d3f1.camel@ozlabs.org> Message-ID: <1889211.x4YJPQ2SgM@townsend> On Thursday, 9 April 2020 11:57:09 AM AEST Amitay Isaacs wrote: > Reviewed-by: Amitay Isaacs > > I can't believe I missed this when the test is failing. :-( Can't believe I didn't run the tests before pushing :-( > Amitay. > > On Thu, 2020-04-09 at 11:49 +1000, Alistair Popple wrote: > > Commit 4bf5a1087f55 ("dts: Fix index for mcbist targets") fixed up > > the > > mcbist indicies but had them reveresed on the second processor. The > > tests were correctly updated and caught this problem. > > > > Signed-off-by: Alistair Popple > > --- > > > > p9.dts | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/p9.dts b/p9.dts > > index f8cb88b..a292803 100644 > > --- a/p9.dts > > +++ b/p9.dts > > @@ -1890,7 +1890,7 @@ > > > > mcbist { > > > > compatible = > > > > "ibm,power9-mcbist"; > > - index = < 0x01 >; > > + index = < 0x00 >; > > > > }; > > > > }; > > > > }; > > > > @@ -1929,7 +1929,7 @@ > > > > mcbist { > > > > compatible = > > > > "ibm,power9-mcbist"; > > - index = < 0x00 >; > > + index = < 0x01 >; > > > > }; > > > > }; > > > > }; > > Amitay. From alistair at popple.id.au Thu Apr 9 12:10:09 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 09 Apr 2020 12:10:09 +1000 Subject: [Pdbg] [PATCH v2 01/19] libsbefifo: Fix compilation error for undefined variable In-Reply-To: <20200407061613.21325-2-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> <20200407061613.21325-2-amitay@ozlabs.org> Message-ID: <1834883.h6WgQL6TEm@townsend> We didn't hit this because of the LOG() macro which is only enabled with -DLIBSBEFIFO_DEBUG=1. Reviewed-by: Alistair Popple On Tuesday, 7 April 2020 4:15:55 PM AEST Amitay Isaacs wrote: > Signed-off-by: Amitay Isaacs > --- > libsbefifo/operation.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/libsbefifo/operation.c b/libsbefifo/operation.c > index 07d9f64..8717f15 100644 > --- a/libsbefifo/operation.c > +++ b/libsbefifo/operation.c > @@ -60,17 +60,18 @@ static int sbefifo_transport(struct sbefifo_context > *sctx, uint8_t *msg, uint32_ int rc; > size_t buflen; > > + > buflen = msg_len; > rc = sbefifo_write(sctx, msg, buflen); > if (rc) { > - LOG("write: cmd=%08x, rc=%d\n", cmd, rc); > + LOG("write: cmd=%08x, rc=%d\n", be32toh(*(uint32_t *)(msg+4)), rc); > return rc; > } > > buflen = *out_len; > rc = sbefifo_read(sctx, out, &buflen); > if (rc) { > - LOG("read: cmd=%08x, buflen=%zu, rc=%d\n", cmd, buflen, rc); > + LOG("read: cmd=%08x, buflen=%zu, rc=%d\n", be32toh(*(uint32_t *) (msg+4)), > buflen, rc); return rc; > } From alistair at popple.id.au Thu Apr 9 12:11:51 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 09 Apr 2020 12:11:51 +1000 Subject: [Pdbg] [PATCH v2 02/19] libsbefifo: Use the correct sized pointer In-Reply-To: <20200407061613.21325-3-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> <20200407061613.21325-3-amitay@ozlabs.org> Message-ID: <2098001.jsSgJI1QCG@townsend> Reviewed-by: Alistair Popple On Tuesday, 7 April 2020 4:15:56 PM AEST Amitay Isaacs wrote: > Signed-off-by: Amitay Isaacs > --- > libsbefifo/cmd_scom.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libsbefifo/cmd_scom.c b/libsbefifo/cmd_scom.c > index bc9b5f9..bb44e5e 100644 > --- a/libsbefifo/cmd_scom.c > +++ b/libsbefifo/cmd_scom.c > @@ -24,7 +24,7 @@ > > static int sbefifo_scom_get_push(uint64_t addr, uint8_t **buf, uint32_t > *buflen) { > - uint8_t *msg; > + uint32_t *msg; > uint32_t nwords, cmd; > > nwords = 4; > @@ -83,7 +83,7 @@ int sbefifo_scom_get(struct sbefifo_context *sctx, > uint64_t addr, uint64_t *valu > > static int sbefifo_scom_put_push(uint64_t addr, uint64_t value, uint8_t > **buf, uint32_t *buflen) { > - uint8_t *msg; > + uint32_t *msg; > uint32_t nwords, cmd; > > nwords = 6; From alistair at popple.id.au Thu Apr 9 12:13:36 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 09 Apr 2020 12:13:36 +1000 Subject: [Pdbg] [PATCH v2 03/19] libpdbg: Add an api to get current backend In-Reply-To: <20200407061613.21325-4-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> <20200407061613.21325-4-amitay@ozlabs.org> Message-ID: <1809904.51lXh5GjVi@townsend> We don't export this to applications, but then we also shouldn't need it from there so can export it if/when we ever find a use case. Reviewed-by: Alistair Popple On Tuesday, 7 April 2020 4:15:57 PM AEST Amitay Isaacs wrote: > Signed-off-by: Amitay Isaacs > --- > libpdbg/dtb.c | 5 +++++ > libpdbg/target.h | 1 + > 2 files changed, 6 insertions(+) > > diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c > index b094e34..70b7962 100644 > --- a/libpdbg/dtb.c > +++ b/libpdbg/dtb.c > @@ -293,6 +293,11 @@ bool pdbg_set_backend(enum pdbg_backend backend, const > char *backend_option) return true; > } > > +enum pdbg_backend pdbg_get_backend(void) > +{ > + return pdbg_backend; > +} > + > const char *pdbg_get_backend_option(void) > { > return pdbg_backend_option; > diff --git a/libpdbg/target.h b/libpdbg/target.h > index 3b74844..7094b51 100644 > --- a/libpdbg/target.h > +++ b/libpdbg/target.h > @@ -80,6 +80,7 @@ extern struct list_head empty_list; > extern struct list_head target_classes; > > struct pdbg_dtb *pdbg_default_dtb(void *system_fdt); > +enum pdbg_backend pdbg_get_backend(void); > const char *pdbg_get_backend_option(void); > bool pdbg_fdt_is_readonly(void *fdt); From alistair at popple.id.au Thu Apr 9 12:18:43 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 09 Apr 2020 12:18:43 +1000 Subject: [Pdbg] [PATCH v2 04/19] libpdbg: Register hwunit drivers per backend In-Reply-To: <20200407061613.21325-5-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> <20200407061613.21325-5-amitay@ozlabs.org> Message-ID: <3269322.4ZALju4iEE@townsend> As expected it doesn't look like this patch should cause any change in behavior. Reviewed-by: Alistair Popple On Tuesday, 7 April 2020 4:15:58 PM AEST Amitay Isaacs wrote: > This will allow to load backend specific drivers first. All the drivers > are registered with the default backend, so this patch does not change > libpdbg behaviour. > > Signed-off-by: Amitay Isaacs > --- > libpdbg/adu.c | 4 +-- > libpdbg/bmcfsi.c | 2 +- > libpdbg/cfam.c | 8 +++--- > libpdbg/chip.c | 2 +- > libpdbg/cronus.c | 6 ++--- > libpdbg/fake.c | 8 +++--- > libpdbg/host.c | 2 +- > libpdbg/htm.c | 6 ++--- > libpdbg/hwunit.c | 31 ++++++++++++++++------- > libpdbg/hwunit.h | 2 +- > libpdbg/i2c.c | 2 +- > libpdbg/kernel.c | 4 +-- > libpdbg/p8chip.c | 4 +-- > libpdbg/p9_fapi_targets.c | 52 +++++++++++++++++++-------------------- > libpdbg/p9chip.c | 4 +-- > libpdbg/sbefifo.c | 8 +++--- > 16 files changed, 79 insertions(+), 66 deletions(-) > > diff --git a/libpdbg/adu.c b/libpdbg/adu.c > index df610a7..fe60118 100644 > --- a/libpdbg/adu.c > +++ b/libpdbg/adu.c > @@ -597,6 +597,6 @@ DECLARE_HW_UNIT(p9_adu); > __attribute__((constructor)) > static void register_adu(void) > { > - pdbg_hwunit_register(&p8_adu_hw_unit); > - pdbg_hwunit_register(&p9_adu_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_adu_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_adu_hw_unit); > } > diff --git a/libpdbg/bmcfsi.c b/libpdbg/bmcfsi.c > index 1d2e304..2639595 100644 > --- a/libpdbg/bmcfsi.c > +++ b/libpdbg/bmcfsi.c > @@ -519,5 +519,5 @@ DECLARE_HW_UNIT(bmcfsi); > __attribute__((constructor)) > static void register_bmcfsi(void) > { > - pdbg_hwunit_register(&bmcfsi_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &bmcfsi_hw_unit); > } > diff --git a/libpdbg/cfam.c b/libpdbg/cfam.c > index da4c5fc..0b0b6f0 100644 > --- a/libpdbg/cfam.c > +++ b/libpdbg/cfam.c > @@ -353,8 +353,8 @@ DECLARE_HW_UNIT(cfam_hmfsi); > __attribute__((constructor)) > static void register_cfam(void) > { > - pdbg_hwunit_register(&fsi_pib_hw_unit); > - pdbg_hwunit_register(&p8_opb_hw_unit); > - pdbg_hwunit_register(&p8_opb_hmfsi_hw_unit); > - pdbg_hwunit_register(&cfam_hmfsi_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fsi_pib_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_opb_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_opb_hmfsi_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cfam_hmfsi_hw_unit); > } > diff --git a/libpdbg/chip.c b/libpdbg/chip.c > index b45cffa..b961e87 100644 > --- a/libpdbg/chip.c > +++ b/libpdbg/chip.c > @@ -679,5 +679,5 @@ DECLARE_HW_UNIT(proc); > __attribute__((constructor)) > static void register_proc(void) > { > - pdbg_hwunit_register(&proc_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &proc_hw_unit); > } > diff --git a/libpdbg/cronus.c b/libpdbg/cronus.c > index ff8af4c..23d555b 100644 > --- a/libpdbg/cronus.c > +++ b/libpdbg/cronus.c > @@ -219,7 +219,7 @@ DECLARE_HW_UNIT(cronus_sbefifo); > __attribute__((constructor)) > static void register_cronus(void) > { > - pdbg_hwunit_register(&cronus_pib_hw_unit); > - pdbg_hwunit_register(&cronus_fsi_hw_unit); > - pdbg_hwunit_register(&cronus_sbefifo_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_pib_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_fsi_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_sbefifo_hw_unit); > } > diff --git a/libpdbg/fake.c b/libpdbg/fake.c > index 82415db..ae02463 100644 > --- a/libpdbg/fake.c > +++ b/libpdbg/fake.c > @@ -90,8 +90,8 @@ DECLARE_HW_UNIT(fake_thread); > __attribute__((constructor)) > static void register_fake(void) > { > - pdbg_hwunit_register(&fake_fsi_hw_unit); > - pdbg_hwunit_register(&fake_pib_hw_unit); > - pdbg_hwunit_register(&fake_core_hw_unit); > - pdbg_hwunit_register(&fake_thread_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_fsi_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_pib_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_core_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_thread_hw_unit); > } > diff --git a/libpdbg/host.c b/libpdbg/host.c > index 428c18b..d02b53d 100644 > --- a/libpdbg/host.c > +++ b/libpdbg/host.c > @@ -127,5 +127,5 @@ DECLARE_HW_UNIT(host_pib); > __attribute__((constructor)) > static void register_host(void) > { > - pdbg_hwunit_register(&host_pib_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &host_pib_hw_unit); > } > diff --git a/libpdbg/htm.c b/libpdbg/htm.c > index 4d23e82..a259478 100644 > --- a/libpdbg/htm.c > +++ b/libpdbg/htm.c > @@ -1158,7 +1158,7 @@ DECLARE_HW_UNIT(p8_chtm); > __attribute__((constructor)) > static void register_htm(void) > { > - pdbg_hwunit_register(&p8_nhtm_hw_unit); > - pdbg_hwunit_register(&p9_nhtm_hw_unit); > - pdbg_hwunit_register(&p8_chtm_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_nhtm_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_nhtm_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_chtm_hw_unit); > } > diff --git a/libpdbg/hwunit.c b/libpdbg/hwunit.c > index c7ec63d..710c78a 100644 > --- a/libpdbg/hwunit.c > +++ b/libpdbg/hwunit.c > @@ -20,26 +20,28 @@ > #include "hwunit.h" > > #define MAX_HW_UNITS 1024 > +#define MAX_BACKENDS 16 > > -static const struct hw_unit_info *g_hw_unit[MAX_HW_UNITS]; > -static int g_hw_unit_count; > +static const struct hw_unit_info *g_hw_unit[MAX_BACKENDS][MAX_HW_UNITS]; > +static int g_hw_unit_count[MAX_BACKENDS]; > > -void pdbg_hwunit_register(const struct hw_unit_info *hw_unit) > +void pdbg_hwunit_register(enum pdbg_backend backend, const struct > hw_unit_info *hw_unit) { > - assert(g_hw_unit_count < MAX_HW_UNITS); > + assert(g_hw_unit_count[backend] < MAX_HW_UNITS); > > - g_hw_unit[g_hw_unit_count] = hw_unit; > - g_hw_unit_count++; > + g_hw_unit[backend][g_hw_unit_count[backend]] = hw_unit; > + g_hw_unit_count[backend]++; > } > > -const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat) > +static const struct hw_unit_info *find_compatible(enum pdbg_backend > backend, + const char *compat) > { > const struct hw_unit_info *p; > struct pdbg_target *target; > int i; > > - for (i = 0; i < g_hw_unit_count; i++) { > - p = g_hw_unit[i]; > + for (i = 0; i < g_hw_unit_count[backend]; i++) { > + p = g_hw_unit[backend][i]; > target = p->hw_unit; > > if (!strcmp(target->compatible, compat)) > @@ -48,3 +50,14 @@ const struct hw_unit_info > *pdbg_hwunit_find_compatible(const char *compat) > > return NULL; > } > + > +const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat) > +{ > + const struct hw_unit_info *p; > + > + p = find_compatible(pdbg_get_backend(), compat); > + if (!p) > + p = find_compatible(PDBG_DEFAULT_BACKEND, compat); > + > + return p; > +} > diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h > index 7165a3c..5bca088 100644 > --- a/libpdbg/hwunit.h > +++ b/libpdbg/hwunit.h > @@ -31,7 +31,7 @@ struct hw_unit_info { > size_t size; > }; > > -void pdbg_hwunit_register(const struct hw_unit_info *hw_unit); > +void pdbg_hwunit_register(enum pdbg_backend backend, const struct > hw_unit_info *hw_unit); const struct hw_unit_info > *pdbg_hwunit_find_compatible(const char *compat); > > /* > diff --git a/libpdbg/i2c.c b/libpdbg/i2c.c > index 1a5d089..3d0b80a 100644 > --- a/libpdbg/i2c.c > +++ b/libpdbg/i2c.c > @@ -177,5 +177,5 @@ DECLARE_HW_UNIT(p8_i2c_pib); > __attribute__((constructor)) > static void register_i2c(void) > { > - pdbg_hwunit_register(&p8_i2c_pib_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_i2c_pib_hw_unit); > } > diff --git a/libpdbg/kernel.c b/libpdbg/kernel.c > index dbd3586..c4637a7 100644 > --- a/libpdbg/kernel.c > +++ b/libpdbg/kernel.c > @@ -264,6 +264,6 @@ DECLARE_HW_UNIT(kernel_pib); > __attribute__((constructor)) > static void register_kernel(void) > { > - pdbg_hwunit_register(&kernel_fsi_hw_unit); > - pdbg_hwunit_register(&kernel_pib_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_fsi_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_pib_hw_unit); > } > diff --git a/libpdbg/p8chip.c b/libpdbg/p8chip.c > index 1bf71e8..484d77c 100644 > --- a/libpdbg/p8chip.c > +++ b/libpdbg/p8chip.c > @@ -738,6 +738,6 @@ DECLARE_HW_UNIT(p8_core); > __attribute__((constructor)) > static void register_p8chip(void) > { > - pdbg_hwunit_register(&p8_thread_hw_unit); > - pdbg_hwunit_register(&p8_core_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_thread_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_core_hw_unit); > } > diff --git a/libpdbg/p9_fapi_targets.c b/libpdbg/p9_fapi_targets.c > index 1dc7af8..97680d5 100644 > --- a/libpdbg/p9_fapi_targets.c > +++ b/libpdbg/p9_fapi_targets.c > @@ -720,30 +720,30 @@ DECLARE_HW_UNIT(p9_capp); > __attribute__((constructor)) > static void register_p9_fapi_targets(void) > { > - pdbg_hwunit_register(&p9_ex_hw_unit); > - pdbg_hwunit_register(&p9_mba_hw_unit); > - pdbg_hwunit_register(&p9_mcs_hw_unit); > - pdbg_hwunit_register(&p9_xbus_hw_unit); > - pdbg_hwunit_register(&p9_abus_hw_unit); > - pdbg_hwunit_register(&p9_l4_hw_unit); > - pdbg_hwunit_register(&p9_eq_hw_unit); > - pdbg_hwunit_register(&p9_mca_hw_unit); > - pdbg_hwunit_register(&p9_mcbist_hw_unit); > - pdbg_hwunit_register(&p9_mi_hw_unit); > - pdbg_hwunit_register(&p9_dmi_hw_unit); > - pdbg_hwunit_register(&p9_obus_hw_unit); > - pdbg_hwunit_register(&p9_obus_brick_hw_unit); > - pdbg_hwunit_register(&p9_sbe_hw_unit); > - pdbg_hwunit_register(&p9_ppe_hw_unit); > - pdbg_hwunit_register(&p9_pec_hw_unit); > - pdbg_hwunit_register(&p9_phb_hw_unit); > - pdbg_hwunit_register(&p9_mc_hw_unit); > - pdbg_hwunit_register(&p9_mem_port_hw_unit); > - pdbg_hwunit_register(&p9_nmmu_hw_unit); > - pdbg_hwunit_register(&p9_pau_hw_unit); > - pdbg_hwunit_register(&p9_iohs_hw_unit); > - pdbg_hwunit_register(&p9_fc_hw_unit); > - pdbg_hwunit_register(&p9_pauc_hw_unit); > - pdbg_hwunit_register(&p9_chiplet_hw_unit); > - pdbg_hwunit_register(&p9_capp_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_ex_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mba_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mcs_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_xbus_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_abus_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_l4_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_eq_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mca_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mcbist_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mi_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_dmi_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_obus_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_obus_brick_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_sbe_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_ppe_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_pec_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_phb_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mc_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mem_port_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_nmmu_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_pau_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_iohs_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_fc_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_pauc_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_chiplet_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_capp_hw_unit); > } > diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c > index 63434ee..6222dc3 100644 > --- a/libpdbg/p9chip.c > +++ b/libpdbg/p9chip.c > @@ -510,6 +510,6 @@ DECLARE_HW_UNIT(p9_core); > __attribute__((constructor)) > static void register_p9chip(void) > { > - pdbg_hwunit_register(&p9_thread_hw_unit); > - pdbg_hwunit_register(&p9_core_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_thread_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_core_hw_unit); > } > diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c > index 41e68e9..22f11f1 100644 > --- a/libpdbg/sbefifo.c > +++ b/libpdbg/sbefifo.c > @@ -321,8 +321,8 @@ DECLARE_HW_UNIT(kernel_sbefifo); > __attribute__((constructor)) > static void register_sbefifo(void) > { > - pdbg_hwunit_register(&kernel_sbefifo_hw_unit); > - pdbg_hwunit_register(&sbefifo_chipop_hw_unit); > - pdbg_hwunit_register(&sbefifo_mem_hw_unit); > - pdbg_hwunit_register(&sbefifo_pba_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_sbefifo_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chipop_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_mem_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pba_hw_unit); > } From alistair at popple.id.au Thu Apr 9 12:21:37 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 09 Apr 2020 12:21:37 +1000 Subject: [Pdbg] [PATCH v2 05/19] libpdbg: Register fsi drivers with fsi backend In-Reply-To: <20200407061613.21325-6-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> <20200407061613.21325-6-amitay@ozlabs.org> Message-ID: <2143131.nuKYf3skm7@townsend> Reviewed-by: Alistair Popple On Tuesday, 7 April 2020 4:15:59 PM AEST Amitay Isaacs wrote: > Signed-off-by: Amitay Isaacs > --- > libpdbg/bmcfsi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libpdbg/bmcfsi.c b/libpdbg/bmcfsi.c > index 2639595..2f199fa 100644 > --- a/libpdbg/bmcfsi.c > +++ b/libpdbg/bmcfsi.c > @@ -519,5 +519,5 @@ DECLARE_HW_UNIT(bmcfsi); > __attribute__((constructor)) > static void register_bmcfsi(void) > { > - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &bmcfsi_hw_unit); > + pdbg_hwunit_register(PDBG_BACKEND_FSI, &bmcfsi_hw_unit); > } From alistair at popple.id.au Thu Apr 9 12:23:23 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 09 Apr 2020 12:23:23 +1000 Subject: [Pdbg] [PATCH v2 06/19] libpdbg: Register i2c driver with i2c backend In-Reply-To: <20200407061613.21325-7-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> <20200407061613.21325-7-amitay@ozlabs.org> Message-ID: <1777640.5pnPnETRYf@townsend> Reviewed-by: Alistair Popple On Tuesday, 7 April 2020 4:16:00 PM AEST Amitay Isaacs wrote: > Signed-off-by: Amitay Isaacs > --- > libpdbg/i2c.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libpdbg/i2c.c b/libpdbg/i2c.c > index 3d0b80a..e3d508b 100644 > --- a/libpdbg/i2c.c > +++ b/libpdbg/i2c.c > @@ -177,5 +177,5 @@ DECLARE_HW_UNIT(p8_i2c_pib); > __attribute__((constructor)) > static void register_i2c(void) > { > - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_i2c_pib_hw_unit); > + pdbg_hwunit_register(PDBG_BACKEND_I2C, &p8_i2c_pib_hw_unit); > } From alistair at popple.id.au Thu Apr 9 12:24:16 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 09 Apr 2020 12:24:16 +1000 Subject: [Pdbg] [PATCH v2 07/19] libpdbg: Register fake drivers with fake backend In-Reply-To: <20200407061613.21325-8-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> <20200407061613.21325-8-amitay@ozlabs.org> Message-ID: <2202356.5vmYmleljy@townsend> Reviewed-by: Alistair Popple On Tuesday, 7 April 2020 4:16:01 PM AEST Amitay Isaacs wrote: > Signed-off-by: Amitay Isaacs > --- > libpdbg/fake.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/libpdbg/fake.c b/libpdbg/fake.c > index ae02463..64925d4 100644 > --- a/libpdbg/fake.c > +++ b/libpdbg/fake.c > @@ -90,8 +90,8 @@ DECLARE_HW_UNIT(fake_thread); > __attribute__((constructor)) > static void register_fake(void) > { > - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_fsi_hw_unit); > - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_pib_hw_unit); > - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_core_hw_unit); > - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_thread_hw_unit); > + pdbg_hwunit_register(PDBG_BACKEND_FAKE, &fake_fsi_hw_unit); > + pdbg_hwunit_register(PDBG_BACKEND_FAKE, &fake_pib_hw_unit); > + pdbg_hwunit_register(PDBG_BACKEND_FAKE, &fake_core_hw_unit); > + pdbg_hwunit_register(PDBG_BACKEND_FAKE, &fake_thread_hw_unit); > } From alistair at popple.id.au Thu Apr 9 12:24:30 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 09 Apr 2020 12:24:30 +1000 Subject: [Pdbg] [PATCH v2 08/19] libpdbg: Register host drivers with host backend In-Reply-To: <20200407061613.21325-9-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> <20200407061613.21325-9-amitay@ozlabs.org> Message-ID: <4537696.cCRAAeVOBf@townsend> Reviewed-by: Alistair Popple On Tuesday, 7 April 2020 4:16:02 PM AEST Amitay Isaacs wrote: > Signed-off-by: Amitay Isaacs > --- > libpdbg/host.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libpdbg/host.c b/libpdbg/host.c > index d02b53d..63a0d5b 100644 > --- a/libpdbg/host.c > +++ b/libpdbg/host.c > @@ -127,5 +127,5 @@ DECLARE_HW_UNIT(host_pib); > __attribute__((constructor)) > static void register_host(void) > { > - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &host_pib_hw_unit); > + pdbg_hwunit_register(PDBG_BACKEND_HOST, &host_pib_hw_unit); > } From alistair at popple.id.au Thu Apr 9 12:24:39 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 09 Apr 2020 12:24:39 +1000 Subject: [Pdbg] [PATCH v2 09/19] libpdbg: Register cronus drivers with cronus backend In-Reply-To: <20200407061613.21325-10-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> <20200407061613.21325-10-amitay@ozlabs.org> Message-ID: <4158005.zKZpjzEenf@townsend> Reviewed-by: Alistair Popple On Tuesday, 7 April 2020 4:16:03 PM AEST Amitay Isaacs wrote: > Signed-off-by: Amitay Isaacs > --- > libpdbg/cronus.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/libpdbg/cronus.c b/libpdbg/cronus.c > index 23d555b..eeaedc5 100644 > --- a/libpdbg/cronus.c > +++ b/libpdbg/cronus.c > @@ -219,7 +219,7 @@ DECLARE_HW_UNIT(cronus_sbefifo); > __attribute__((constructor)) > static void register_cronus(void) > { > - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_pib_hw_unit); > - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_fsi_hw_unit); > - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_sbefifo_hw_unit); > + pdbg_hwunit_register(PDBG_BACKEND_CRONUS, &cronus_pib_hw_unit); > + pdbg_hwunit_register(PDBG_BACKEND_CRONUS, &cronus_fsi_hw_unit); > + pdbg_hwunit_register(PDBG_BACKEND_CRONUS, &cronus_sbefifo_hw_unit); > } From alistair at popple.id.au Thu Apr 9 12:29:07 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 09 Apr 2020 12:29:07 +1000 Subject: [Pdbg] [PATCH v2 11/19] libpdbg: Add chiplet driver using sbefifo In-Reply-To: <20200407061613.21325-12-amitay@ozlabs.org> References: <20200407061613.21325-1-amitay@ozlabs.org> <20200407061613.21325-12-amitay@ozlabs.org> Message-ID: <1905007.9F3HTArAeM@townsend> On Tuesday, 7 April 2020 4:16:05 PM AEST Amitay Isaacs wrote: > Signed-off-by: Amitay Isaacs > --- > libpdbg/sbefifo.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c > index 112504f..72a58f9 100644 > --- a/libpdbg/sbefifo.c > +++ b/libpdbg/sbefifo.c > @@ -334,6 +334,15 @@ static struct pib sbefifo_pib = { > }; > DECLARE_HW_UNIT(sbefifo_pib); > > +static struct chiplet sbefifo_chiplet = { > + .target = { > + .name = "SBE FIFO Chip-op based Chiplet", > + .compatible = "ibm,sbefifo-chiplet", I am wondering, shouldn't these have the same compatible property as the default chiplet implementation? We search the backend specific implementations first, so would just pick up the correct implementation based on backend first anyway right? - Alistair > + .class = "chiplet", > + }, > +}; > +DECLARE_HW_UNIT(sbefifo_chiplet); > + > static struct sbefifo kernel_sbefifo = { > .target = { > .name = "Kernel based FSI SBE FIFO", > @@ -352,6 +361,7 @@ static void register_sbefifo(void) > pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_sbefifo_hw_unit); > pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chipop_hw_unit); > pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pib_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chiplet_hw_unit); > pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_mem_hw_unit); > pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pba_hw_unit); > } From amitay at ozlabs.org Tue Apr 14 12:47:34 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 14 Apr 2020 12:47:34 +1000 Subject: [Pdbg] [PATCH 07/23] libpdbg: Rename ibm,bmcfsi -> ibm,power-fsi In-Reply-To: <20200414024750.20170-1-amitay@ozlabs.org> References: <20200414024750.20170-1-amitay@ozlabs.org> Message-ID: <20200414024750.20170-8-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/bmcfsi.c | 2 +- p8-fsi.dts.m4 | 2 +- p9-fsi.dtsi.m4 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libpdbg/bmcfsi.c b/libpdbg/bmcfsi.c index 2f199fa..b295680 100644 --- a/libpdbg/bmcfsi.c +++ b/libpdbg/bmcfsi.c @@ -506,7 +506,7 @@ int bmcfsi_probe(struct pdbg_target *target) static struct fsi bmcfsi = { .target = { .name = "BMC GPIO bit-banging FSI master", - .compatible = "ibm,bmcfsi", + .compatible = "ibm,power-fsi", .class = "fsi", .probe = bmcfsi_probe, diff --git a/p8-fsi.dts.m4 b/p8-fsi.dts.m4 index 70fdb14..f109e77 100644 --- a/p8-fsi.dts.m4 +++ b/p8-fsi.dts.m4 @@ -7,7 +7,7 @@ fsi at 0 { #address-cells = <0x2>; #size-cells = <0x1>; - compatible = "ibm,bmcfsi"; + compatible = "ibm,power-fsi"; reg = <0x0 0x0 0x0>; /* GPIO pin definitions */ diff --git a/p9-fsi.dtsi.m4 b/p9-fsi.dtsi.m4 index 3bbe43d..1b74104 100644 --- a/p9-fsi.dtsi.m4 +++ b/p9-fsi.dtsi.m4 @@ -6,7 +6,7 @@ fsi0: fsi at 0 { #address-cells = <0x2>; #size-cells = <0x1>; - compatible = "ibm,bmcfsi"; + compatible = "ibm,power-fsi"; reg = <0x0 0x0 0x0>; index = <0x0>; status = "mustexist"; -- 2.25.2 From amitay at ozlabs.org Tue Apr 14 12:47:27 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 14 Apr 2020 12:47:27 +1000 Subject: [Pdbg] [PATCH 00/23] Enable drivers per backend Message-ID: <20200414024750.20170-1-amitay@ozlabs.org> This patch set adds per backend support of hardware drivers. All hardware drivers are assigned to a specific backend. When looking up a driver for a target in device tree, first lookup the specific backend and then the default backend. The same compatible property can be used to load different hardware drivers depending on different backend. As a result, the compatible properties in device tree do not need to be hardware specific. The compatible properties in system device tree will allow looking up either architecture specific driver (e.g. ibm,power9-thread) or an architecture-neutral driver (e.g. ibm,power-thread). Amitay Isaacs (23): libsbefifo: Fix compilation error for undefined variable libsbefifo: Use the correct sized pointer libpdbg: Add a private api to get current backend libpdbg: Register hwunit drivers per backend libpdbg: Backend device tree cannot be overriden libpdbg: Register fsi drivers with fsi backend libpdbg: Rename ibm,bmcfsi -> ibm,power-fsi libpdbg: Register i2c driver with i2c backend libpdbg: Rename ibm,power8-i2c-slave -> ibm-power8-i2c-pib libpdbg: Register kernel drivers with kernel backend libpdbg: Rename ibm,kernel-{fsi,pib,sbefifo} -> ibm,power-{fsi,pib,sbefifo} libpdbg: Register fake drivers with fake backend libpdbg: Register host drivers with host backend libpdbg: Rename ibm,host-pib -> ibm,power-pib libpdbg: Register cronus drivers with cronus backend libpdbg: Rename ibm,cronus-{fsi,pib,sbefifo} -> ibm,power->{fsi,pib,sbefifo} dts: Backend device trees must use specific driver libpdbg: Rename ibm,power8-opb-hmfsi -> ibm,power8-hmfsi libpdbg: Rename ibm,fsi-pib -> ibm,power-pib libpdbg: Rename ibm,fsi-hmfsi -> ibm,power-hmfsi libpdbg: Rename ibm,processor -> ibm,power-proc libpdbg: Rename ibm,sbefifo-{mem,mem-pba,chipop} -> ibm,power-{mem,mempba,chipop} dts: Add a generic compatible property for core and thread libpdbg/adu.c | 4 +- libpdbg/bmcfsi.c | 4 +- libpdbg/cfam.c | 14 +- libpdbg/chip.c | 4 +- libpdbg/cronus.c | 12 +- libpdbg/dtb.c | 37 ++- libpdbg/fake.c | 8 +- libpdbg/host.c | 4 +- libpdbg/htm.c | 6 +- libpdbg/hwunit.c | 31 +- libpdbg/hwunit.h | 2 +- libpdbg/i2c.c | 4 +- libpdbg/kernel.c | 8 +- libpdbg/p8chip.c | 4 +- libpdbg/p9_fapi_targets.c | 52 ++-- libpdbg/p9chip.c | 4 +- libpdbg/sbefifo.c | 16 +- libpdbg/target.h | 1 + libsbefifo/cmd_scom.c | 4 +- libsbefifo/operation.c | 5 +- p8-cronus.dts.m4 | 8 +- p8-fsi.dts.m4 | 12 +- p8-host.dts.m4 | 2 +- p8-i2c.dts.m4 | 10 +- p8-kernel.dts.m4 | 6 +- p8.dts.m4 | 2 +- p9-cronus.dts.m4 | 24 +- p9-fsi.dtsi.m4 | 8 +- p9-host.dts.m4 | 4 +- p9-kernel.dts.m4 | 24 +- p9.dts | 484 +++++++++++++++--------------- tests/test_p9_fapi_translation.sh | 2 +- 32 files changed, 422 insertions(+), 388 deletions(-) -- 2.25.2 From amitay at ozlabs.org Tue Apr 14 12:47:29 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 14 Apr 2020 12:47:29 +1000 Subject: [Pdbg] [PATCH 02/23] libsbefifo: Use the correct sized pointer In-Reply-To: <20200414024750.20170-1-amitay@ozlabs.org> References: <20200414024750.20170-1-amitay@ozlabs.org> Message-ID: <20200414024750.20170-3-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libsbefifo/cmd_scom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsbefifo/cmd_scom.c b/libsbefifo/cmd_scom.c index bc9b5f9..bb44e5e 100644 --- a/libsbefifo/cmd_scom.c +++ b/libsbefifo/cmd_scom.c @@ -24,7 +24,7 @@ static int sbefifo_scom_get_push(uint64_t addr, uint8_t **buf, uint32_t *buflen) { - uint8_t *msg; + uint32_t *msg; uint32_t nwords, cmd; nwords = 4; @@ -83,7 +83,7 @@ int sbefifo_scom_get(struct sbefifo_context *sctx, uint64_t addr, uint64_t *valu static int sbefifo_scom_put_push(uint64_t addr, uint64_t value, uint8_t **buf, uint32_t *buflen) { - uint8_t *msg; + uint32_t *msg; uint32_t nwords, cmd; nwords = 6; -- 2.25.2 From amitay at ozlabs.org Tue Apr 14 12:47:28 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 14 Apr 2020 12:47:28 +1000 Subject: [Pdbg] [PATCH 01/23] libsbefifo: Fix compilation error for undefined variable In-Reply-To: <20200414024750.20170-1-amitay@ozlabs.org> References: <20200414024750.20170-1-amitay@ozlabs.org> Message-ID: <20200414024750.20170-2-amitay@ozlabs.org> We didn't hit this because of the LOG() macro which is only enabled with -DLIBSBEFIFO_DEBUG=1. Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libsbefifo/operation.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libsbefifo/operation.c b/libsbefifo/operation.c index 07d9f64..8717f15 100644 --- a/libsbefifo/operation.c +++ b/libsbefifo/operation.c @@ -60,17 +60,18 @@ static int sbefifo_transport(struct sbefifo_context *sctx, uint8_t *msg, uint32_ int rc; size_t buflen; + buflen = msg_len; rc = sbefifo_write(sctx, msg, buflen); if (rc) { - LOG("write: cmd=%08x, rc=%d\n", cmd, rc); + LOG("write: cmd=%08x, rc=%d\n", be32toh(*(uint32_t *)(msg+4)), rc); return rc; } buflen = *out_len; rc = sbefifo_read(sctx, out, &buflen); if (rc) { - LOG("read: cmd=%08x, buflen=%zu, rc=%d\n", cmd, buflen, rc); + LOG("read: cmd=%08x, buflen=%zu, rc=%d\n", be32toh(*(uint32_t *)(msg+4)), buflen, rc); return rc; } -- 2.25.2 From amitay at ozlabs.org Tue Apr 14 12:47:30 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 14 Apr 2020 12:47:30 +1000 Subject: [Pdbg] [PATCH 03/23] libpdbg: Add a private api to get current backend In-Reply-To: <20200414024750.20170-1-amitay@ozlabs.org> References: <20200414024750.20170-1-amitay@ozlabs.org> Message-ID: <20200414024750.20170-4-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/dtb.c | 5 +++++ libpdbg/target.h | 1 + 2 files changed, 6 insertions(+) diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index b094e34..70b7962 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -293,6 +293,11 @@ bool pdbg_set_backend(enum pdbg_backend backend, const char *backend_option) return true; } +enum pdbg_backend pdbg_get_backend(void) +{ + return pdbg_backend; +} + const char *pdbg_get_backend_option(void) { return pdbg_backend_option; diff --git a/libpdbg/target.h b/libpdbg/target.h index 3b74844..7094b51 100644 --- a/libpdbg/target.h +++ b/libpdbg/target.h @@ -80,6 +80,7 @@ extern struct list_head empty_list; extern struct list_head target_classes; struct pdbg_dtb *pdbg_default_dtb(void *system_fdt); +enum pdbg_backend pdbg_get_backend(void); const char *pdbg_get_backend_option(void); bool pdbg_fdt_is_readonly(void *fdt); -- 2.25.2 From amitay at ozlabs.org Tue Apr 14 12:47:31 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 14 Apr 2020 12:47:31 +1000 Subject: [Pdbg] [PATCH 04/23] libpdbg: Register hwunit drivers per backend In-Reply-To: <20200414024750.20170-1-amitay@ozlabs.org> References: <20200414024750.20170-1-amitay@ozlabs.org> Message-ID: <20200414024750.20170-5-amitay@ozlabs.org> This will allow to load backend specific drivers first. All the drivers are registered with the default backend, so this patch does not change libpdbg behaviour. Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/adu.c | 4 +-- libpdbg/bmcfsi.c | 2 +- libpdbg/cfam.c | 8 +++--- libpdbg/chip.c | 2 +- libpdbg/cronus.c | 6 ++--- libpdbg/fake.c | 8 +++--- libpdbg/host.c | 2 +- libpdbg/htm.c | 6 ++--- libpdbg/hwunit.c | 31 ++++++++++++++++------- libpdbg/hwunit.h | 2 +- libpdbg/i2c.c | 2 +- libpdbg/kernel.c | 4 +-- libpdbg/p8chip.c | 4 +-- libpdbg/p9_fapi_targets.c | 52 +++++++++++++++++++-------------------- libpdbg/p9chip.c | 4 +-- libpdbg/sbefifo.c | 8 +++--- 16 files changed, 79 insertions(+), 66 deletions(-) diff --git a/libpdbg/adu.c b/libpdbg/adu.c index df610a7..fe60118 100644 --- a/libpdbg/adu.c +++ b/libpdbg/adu.c @@ -597,6 +597,6 @@ DECLARE_HW_UNIT(p9_adu); __attribute__((constructor)) static void register_adu(void) { - pdbg_hwunit_register(&p8_adu_hw_unit); - pdbg_hwunit_register(&p9_adu_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_adu_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_adu_hw_unit); } diff --git a/libpdbg/bmcfsi.c b/libpdbg/bmcfsi.c index 1d2e304..2639595 100644 --- a/libpdbg/bmcfsi.c +++ b/libpdbg/bmcfsi.c @@ -519,5 +519,5 @@ DECLARE_HW_UNIT(bmcfsi); __attribute__((constructor)) static void register_bmcfsi(void) { - pdbg_hwunit_register(&bmcfsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &bmcfsi_hw_unit); } diff --git a/libpdbg/cfam.c b/libpdbg/cfam.c index da4c5fc..0b0b6f0 100644 --- a/libpdbg/cfam.c +++ b/libpdbg/cfam.c @@ -353,8 +353,8 @@ DECLARE_HW_UNIT(cfam_hmfsi); __attribute__((constructor)) static void register_cfam(void) { - pdbg_hwunit_register(&fsi_pib_hw_unit); - pdbg_hwunit_register(&p8_opb_hw_unit); - pdbg_hwunit_register(&p8_opb_hmfsi_hw_unit); - pdbg_hwunit_register(&cfam_hmfsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fsi_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_opb_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_opb_hmfsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cfam_hmfsi_hw_unit); } diff --git a/libpdbg/chip.c b/libpdbg/chip.c index b45cffa..b961e87 100644 --- a/libpdbg/chip.c +++ b/libpdbg/chip.c @@ -679,5 +679,5 @@ DECLARE_HW_UNIT(proc); __attribute__((constructor)) static void register_proc(void) { - pdbg_hwunit_register(&proc_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &proc_hw_unit); } diff --git a/libpdbg/cronus.c b/libpdbg/cronus.c index ff8af4c..23d555b 100644 --- a/libpdbg/cronus.c +++ b/libpdbg/cronus.c @@ -219,7 +219,7 @@ DECLARE_HW_UNIT(cronus_sbefifo); __attribute__((constructor)) static void register_cronus(void) { - pdbg_hwunit_register(&cronus_pib_hw_unit); - pdbg_hwunit_register(&cronus_fsi_hw_unit); - pdbg_hwunit_register(&cronus_sbefifo_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_fsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_sbefifo_hw_unit); } diff --git a/libpdbg/fake.c b/libpdbg/fake.c index 82415db..ae02463 100644 --- a/libpdbg/fake.c +++ b/libpdbg/fake.c @@ -90,8 +90,8 @@ DECLARE_HW_UNIT(fake_thread); __attribute__((constructor)) static void register_fake(void) { - pdbg_hwunit_register(&fake_fsi_hw_unit); - pdbg_hwunit_register(&fake_pib_hw_unit); - pdbg_hwunit_register(&fake_core_hw_unit); - pdbg_hwunit_register(&fake_thread_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_fsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_core_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_thread_hw_unit); } diff --git a/libpdbg/host.c b/libpdbg/host.c index 428c18b..d02b53d 100644 --- a/libpdbg/host.c +++ b/libpdbg/host.c @@ -127,5 +127,5 @@ DECLARE_HW_UNIT(host_pib); __attribute__((constructor)) static void register_host(void) { - pdbg_hwunit_register(&host_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &host_pib_hw_unit); } diff --git a/libpdbg/htm.c b/libpdbg/htm.c index 4d23e82..a259478 100644 --- a/libpdbg/htm.c +++ b/libpdbg/htm.c @@ -1158,7 +1158,7 @@ DECLARE_HW_UNIT(p8_chtm); __attribute__((constructor)) static void register_htm(void) { - pdbg_hwunit_register(&p8_nhtm_hw_unit); - pdbg_hwunit_register(&p9_nhtm_hw_unit); - pdbg_hwunit_register(&p8_chtm_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_nhtm_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_nhtm_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_chtm_hw_unit); } diff --git a/libpdbg/hwunit.c b/libpdbg/hwunit.c index c7ec63d..710c78a 100644 --- a/libpdbg/hwunit.c +++ b/libpdbg/hwunit.c @@ -20,26 +20,28 @@ #include "hwunit.h" #define MAX_HW_UNITS 1024 +#define MAX_BACKENDS 16 -static const struct hw_unit_info *g_hw_unit[MAX_HW_UNITS]; -static int g_hw_unit_count; +static const struct hw_unit_info *g_hw_unit[MAX_BACKENDS][MAX_HW_UNITS]; +static int g_hw_unit_count[MAX_BACKENDS]; -void pdbg_hwunit_register(const struct hw_unit_info *hw_unit) +void pdbg_hwunit_register(enum pdbg_backend backend, const struct hw_unit_info *hw_unit) { - assert(g_hw_unit_count < MAX_HW_UNITS); + assert(g_hw_unit_count[backend] < MAX_HW_UNITS); - g_hw_unit[g_hw_unit_count] = hw_unit; - g_hw_unit_count++; + g_hw_unit[backend][g_hw_unit_count[backend]] = hw_unit; + g_hw_unit_count[backend]++; } -const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat) +static const struct hw_unit_info *find_compatible(enum pdbg_backend backend, + const char *compat) { const struct hw_unit_info *p; struct pdbg_target *target; int i; - for (i = 0; i < g_hw_unit_count; i++) { - p = g_hw_unit[i]; + for (i = 0; i < g_hw_unit_count[backend]; i++) { + p = g_hw_unit[backend][i]; target = p->hw_unit; if (!strcmp(target->compatible, compat)) @@ -48,3 +50,14 @@ const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat) return NULL; } + +const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat) +{ + const struct hw_unit_info *p; + + p = find_compatible(pdbg_get_backend(), compat); + if (!p) + p = find_compatible(PDBG_DEFAULT_BACKEND, compat); + + return p; +} diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h index 7165a3c..5bca088 100644 --- a/libpdbg/hwunit.h +++ b/libpdbg/hwunit.h @@ -31,7 +31,7 @@ struct hw_unit_info { size_t size; }; -void pdbg_hwunit_register(const struct hw_unit_info *hw_unit); +void pdbg_hwunit_register(enum pdbg_backend backend, const struct hw_unit_info *hw_unit); const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat); /* diff --git a/libpdbg/i2c.c b/libpdbg/i2c.c index 1a5d089..3d0b80a 100644 --- a/libpdbg/i2c.c +++ b/libpdbg/i2c.c @@ -177,5 +177,5 @@ DECLARE_HW_UNIT(p8_i2c_pib); __attribute__((constructor)) static void register_i2c(void) { - pdbg_hwunit_register(&p8_i2c_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_i2c_pib_hw_unit); } diff --git a/libpdbg/kernel.c b/libpdbg/kernel.c index dbd3586..c4637a7 100644 --- a/libpdbg/kernel.c +++ b/libpdbg/kernel.c @@ -264,6 +264,6 @@ DECLARE_HW_UNIT(kernel_pib); __attribute__((constructor)) static void register_kernel(void) { - pdbg_hwunit_register(&kernel_fsi_hw_unit); - pdbg_hwunit_register(&kernel_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_fsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_pib_hw_unit); } diff --git a/libpdbg/p8chip.c b/libpdbg/p8chip.c index 1bf71e8..484d77c 100644 --- a/libpdbg/p8chip.c +++ b/libpdbg/p8chip.c @@ -738,6 +738,6 @@ DECLARE_HW_UNIT(p8_core); __attribute__((constructor)) static void register_p8chip(void) { - pdbg_hwunit_register(&p8_thread_hw_unit); - pdbg_hwunit_register(&p8_core_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_thread_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_core_hw_unit); } diff --git a/libpdbg/p9_fapi_targets.c b/libpdbg/p9_fapi_targets.c index 1dc7af8..97680d5 100644 --- a/libpdbg/p9_fapi_targets.c +++ b/libpdbg/p9_fapi_targets.c @@ -720,30 +720,30 @@ DECLARE_HW_UNIT(p9_capp); __attribute__((constructor)) static void register_p9_fapi_targets(void) { - pdbg_hwunit_register(&p9_ex_hw_unit); - pdbg_hwunit_register(&p9_mba_hw_unit); - pdbg_hwunit_register(&p9_mcs_hw_unit); - pdbg_hwunit_register(&p9_xbus_hw_unit); - pdbg_hwunit_register(&p9_abus_hw_unit); - pdbg_hwunit_register(&p9_l4_hw_unit); - pdbg_hwunit_register(&p9_eq_hw_unit); - pdbg_hwunit_register(&p9_mca_hw_unit); - pdbg_hwunit_register(&p9_mcbist_hw_unit); - pdbg_hwunit_register(&p9_mi_hw_unit); - pdbg_hwunit_register(&p9_dmi_hw_unit); - pdbg_hwunit_register(&p9_obus_hw_unit); - pdbg_hwunit_register(&p9_obus_brick_hw_unit); - pdbg_hwunit_register(&p9_sbe_hw_unit); - pdbg_hwunit_register(&p9_ppe_hw_unit); - pdbg_hwunit_register(&p9_pec_hw_unit); - pdbg_hwunit_register(&p9_phb_hw_unit); - pdbg_hwunit_register(&p9_mc_hw_unit); - pdbg_hwunit_register(&p9_mem_port_hw_unit); - pdbg_hwunit_register(&p9_nmmu_hw_unit); - pdbg_hwunit_register(&p9_pau_hw_unit); - pdbg_hwunit_register(&p9_iohs_hw_unit); - pdbg_hwunit_register(&p9_fc_hw_unit); - pdbg_hwunit_register(&p9_pauc_hw_unit); - pdbg_hwunit_register(&p9_chiplet_hw_unit); - pdbg_hwunit_register(&p9_capp_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_ex_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mba_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mcs_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_xbus_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_abus_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_l4_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_eq_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mca_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mcbist_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_dmi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_obus_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_obus_brick_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_sbe_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_ppe_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_pec_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_phb_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mc_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mem_port_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_nmmu_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_pau_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_iohs_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_fc_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_pauc_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_chiplet_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_capp_hw_unit); } diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c index 63434ee..6222dc3 100644 --- a/libpdbg/p9chip.c +++ b/libpdbg/p9chip.c @@ -510,6 +510,6 @@ DECLARE_HW_UNIT(p9_core); __attribute__((constructor)) static void register_p9chip(void) { - pdbg_hwunit_register(&p9_thread_hw_unit); - pdbg_hwunit_register(&p9_core_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_thread_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_core_hw_unit); } diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 41e68e9..22f11f1 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -321,8 +321,8 @@ DECLARE_HW_UNIT(kernel_sbefifo); __attribute__((constructor)) static void register_sbefifo(void) { - pdbg_hwunit_register(&kernel_sbefifo_hw_unit); - pdbg_hwunit_register(&sbefifo_chipop_hw_unit); - pdbg_hwunit_register(&sbefifo_mem_hw_unit); - pdbg_hwunit_register(&sbefifo_pba_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_sbefifo_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chipop_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_mem_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pba_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Tue Apr 14 12:47:32 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 14 Apr 2020 12:47:32 +1000 Subject: [Pdbg] [PATCH 05/23] libpdbg: Backend device tree cannot be overriden In-Reply-To: <20200414024750.20170-1-amitay@ozlabs.org> References: <20200414024750.20170-1-amitay@ozlabs.org> Message-ID: <20200414024750.20170-6-amitay@ozlabs.org> With drivers getting registered per backend, backend needs to be initialised before any device tree can be parsed. PDBG_BACKEND_DTB allowed to override backend device tree without specifying backend, which cannot work any more. To be able to dynamically update backend introduce PDBG_BACKEND and PDBG_BACKEND_OPTION variables instead of PDBG_BACKEND_DTB. Signed-off-by: Amitay Isaacs --- libpdbg/dtb.c | 32 ++++++++++++++++++++++--------- tests/test_p9_fapi_translation.sh | 2 +- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index 70b7962..077bc62 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -234,7 +234,7 @@ static void bmc_target(struct pdbg_dtb *dtb) } /* Opens a dtb at the given path */ -static void mmap_dtb(char *file, bool readonly, struct pdbg_mfile *mfile) +static void mmap_dtb(const char *file, bool readonly, struct pdbg_mfile *mfile) { int fd; void *dtb; @@ -308,21 +308,36 @@ const char *pdbg_get_backend_option(void) struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) { struct pdbg_dtb *dtb = &pdbg_dtb; - char *fdt; + const char *fdt, *backend; dtb->backend.fdt = NULL; dtb->system.fdt = system_fdt; - fdt = getenv("PDBG_BACKEND_DTB"); - if (fdt) - mmap_dtb(fdt, false, &dtb->backend); - fdt = getenv("PDBG_DTB"); if (fdt) mmap_dtb(fdt, false, &dtb->system); - if (dtb->backend.fdt && dtb->system.fdt) - goto done; + backend = getenv("PDBG_BACKEND"); + if (backend) { + const char *arg; + + arg = getenv("PDBG_BACKEND_OPTION"); + + if (!strcmp(backend, "fsi")) + pdbg_set_backend(PDBG_BACKEND_FSI, arg); + else if (!strcmp(backend, "i2c")) + pdbg_set_backend(PDBG_BACKEND_I2C, arg); + else if (!strcmp(backend, "kernel")) + pdbg_set_backend(PDBG_BACKEND_KERNEL, arg); + else if (!strcmp(backend, "fake")) + pdbg_set_backend(PDBG_BACKEND_FAKE, arg); + else if (!strcmp(backend, "host")) + pdbg_set_backend(PDBG_BACKEND_HOST, arg); + else if (!strcmp(backend, "cronus")) + pdbg_set_backend(PDBG_BACKEND_CRONUS, arg); + else + pdbg_log(PDBG_ERROR, "Invalid backend '%s', ignoring\n", backend); + } if (!pdbg_backend) pdbg_backend = default_backend(); @@ -412,7 +427,6 @@ struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) break; } -done: return dtb; } diff --git a/tests/test_p9_fapi_translation.sh b/tests/test_p9_fapi_translation.sh index a5a09b1..9891d39 100755 --- a/tests/test_p9_fapi_translation.sh +++ b/tests/test_p9_fapi_translation.sh @@ -4,7 +4,7 @@ test_group "p9 fapi translation tests" -export PDBG_BACKEND_DTB=p9-kernel.dtb +export PDBG_BACKEND=kernel export PDBG_DTB=p9.dtb test_result 0 < References: <20200414024750.20170-1-amitay@ozlabs.org> Message-ID: <20200414024750.20170-7-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/bmcfsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpdbg/bmcfsi.c b/libpdbg/bmcfsi.c index 2639595..2f199fa 100644 --- a/libpdbg/bmcfsi.c +++ b/libpdbg/bmcfsi.c @@ -519,5 +519,5 @@ DECLARE_HW_UNIT(bmcfsi); __attribute__((constructor)) static void register_bmcfsi(void) { - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &bmcfsi_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_FSI, &bmcfsi_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Tue Apr 14 12:47:35 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 14 Apr 2020 12:47:35 +1000 Subject: [Pdbg] [PATCH 08/23] libpdbg: Register i2c driver with i2c backend In-Reply-To: <20200414024750.20170-1-amitay@ozlabs.org> References: <20200414024750.20170-1-amitay@ozlabs.org> Message-ID: <20200414024750.20170-9-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpdbg/i2c.c b/libpdbg/i2c.c index 3d0b80a..e3d508b 100644 --- a/libpdbg/i2c.c +++ b/libpdbg/i2c.c @@ -177,5 +177,5 @@ DECLARE_HW_UNIT(p8_i2c_pib); __attribute__((constructor)) static void register_i2c(void) { - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_i2c_pib_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_I2C, &p8_i2c_pib_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Tue Apr 14 12:47:37 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 14 Apr 2020 12:47:37 +1000 Subject: [Pdbg] [PATCH 10/23] libpdbg: Register kernel drivers with kernel backend In-Reply-To: <20200414024750.20170-1-amitay@ozlabs.org> References: <20200414024750.20170-1-amitay@ozlabs.org> Message-ID: <20200414024750.20170-11-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/kernel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libpdbg/kernel.c b/libpdbg/kernel.c index c4637a7..3024736 100644 --- a/libpdbg/kernel.c +++ b/libpdbg/kernel.c @@ -264,6 +264,6 @@ DECLARE_HW_UNIT(kernel_pib); __attribute__((constructor)) static void register_kernel(void) { - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_fsi_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_pib_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_KERNEL, &kernel_fsi_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_KERNEL, &kernel_pib_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Tue Apr 14 12:47:36 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 14 Apr 2020 12:47:36 +1000 Subject: [Pdbg] [PATCH 09/23] libpdbg: Rename ibm, power8-i2c-slave -> ibm-power8-i2c-pib In-Reply-To: <20200414024750.20170-1-amitay@ozlabs.org> References: <20200414024750.20170-1-amitay@ozlabs.org> Message-ID: <20200414024750.20170-10-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/i2c.c | 2 +- p8-i2c.dts.m4 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libpdbg/i2c.c b/libpdbg/i2c.c index e3d508b..672b981 100644 --- a/libpdbg/i2c.c +++ b/libpdbg/i2c.c @@ -164,7 +164,7 @@ int i2c_target_probe(struct pdbg_target *target) static struct pib p8_i2c_pib = { .target = { .name = "POWER8 I2C Slave", - .compatible = "ibm,power8-i2c-slave", + .compatible = "ibm,power8-i2c-pib", .class = "pib", .probe = i2c_target_probe, }, diff --git a/p8-i2c.dts.m4 b/p8-i2c.dts.m4 index 3ea4b59..a272d62 100644 --- a/p8-i2c.dts.m4 +++ b/p8-i2c.dts.m4 @@ -8,7 +8,7 @@ pib at 50 { #address-cells = <0x2>; #size-cells = <0x1>; - compatible = "ibm,power8-i2c-slave"; + compatible = "ibm,power8-i2c-pib"; bus = "/dev/i2c4"; reg = <0x50>; index = <0x0>; -- 2.25.2 From amitay at ozlabs.org Tue Apr 14 12:47:38 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 14 Apr 2020 12:47:38 +1000 Subject: [Pdbg] [PATCH 11/23] libpdbg: Rename ibm, kernel-{fsi, pib, sbefifo} -> ibm, power-{fsi, pib, sbefifo} In-Reply-To: <20200414024750.20170-1-amitay@ozlabs.org> References: <20200414024750.20170-1-amitay@ozlabs.org> Message-ID: <20200414024750.20170-12-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/kernel.c | 4 ++-- libpdbg/sbefifo.c | 2 +- p9-kernel.dts.m4 | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libpdbg/kernel.c b/libpdbg/kernel.c index 3024736..d18b60f 100644 --- a/libpdbg/kernel.c +++ b/libpdbg/kernel.c @@ -196,7 +196,7 @@ int kernel_fsi_probe(struct pdbg_target *target) static struct fsi kernel_fsi = { .target = { .name = "Kernel based FSI master", - .compatible = "ibm,kernel-fsi", + .compatible = "ibm,power-fsi", .class = "fsi", .probe = kernel_fsi_probe, }, @@ -252,7 +252,7 @@ static int kernel_pib_probe(struct pdbg_target *target) struct pib kernel_pib = { .target = { .name = "Kernel based FSI SCOM", - .compatible = "ibm,kernel-pib", + .compatible = "ibm,power-pib", .class = "pib", .probe = kernel_pib_probe, }, diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 22f11f1..ce605da 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -309,7 +309,7 @@ DECLARE_HW_UNIT(sbefifo_chipop); static struct sbefifo kernel_sbefifo = { .target = { .name = "Kernel based FSI SBE FIFO", - .compatible = "ibm,kernel-sbefifo", + .compatible = "ibm,power-sbefifo", .class = "sbefifo", .probe = sbefifo_probe, .release = sbefifo_release, diff --git a/p9-kernel.dts.m4 b/p9-kernel.dts.m4 index 5c8010f..0b92289 100644 --- a/p9-kernel.dts.m4 +++ b/p9-kernel.dts.m4 @@ -7,7 +7,7 @@ fsi0: kernelfsi at 0 { #address-cells = <0x2>; #size-cells = <0x1>; - compatible = "ibm,kernel-fsi"; + compatible = "ibm,power-fsi"; reg = <0x0 0x0 0x0>; index = <0x0>; status = "mustexist"; @@ -18,7 +18,7 @@ #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; index = <0x0>; - compatible = "ibm,kernel-pib"; + compatible = "ibm,power-pib"; device-path = "/dev/scom1"; system-path = "/proc0/pib"; }; @@ -26,7 +26,7 @@ sbefifo at 2400 { /* Bogus address */ reg = <0x0 0x2400 0x7>; index = <0x0>; - compatible = "ibm,kernel-sbefifo"; + compatible = "ibm,power-sbefifo"; device-path = "/dev/sbefifo1"; sbefifo-mem { @@ -59,7 +59,7 @@ #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; index = <0x1>; - compatible = "ibm,kernel-pib"; + compatible = "ibm,power-pib"; device-path = "/dev/scom2"; system-path = "/proc1/pib"; }; @@ -67,7 +67,7 @@ sbefifo at 2400 { /* Bogus address */ reg = <0x0 0x2400 0x7>; index = <0x1>; - compatible = "ibm,kernel-sbefifo"; + compatible = "ibm,power-sbefifo"; device-path = "/dev/sbefifo2"; sbefifo-mem { -- 2.25.2 From amitay at ozlabs.org Tue Apr 14 12:47:40 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 14 Apr 2020 12:47:40 +1000 Subject: [Pdbg] [PATCH 13/23] libpdbg: Register host drivers with host backend In-Reply-To: <20200414024750.20170-1-amitay@ozlabs.org> References: <20200414024750.20170-1-amitay@ozlabs.org> Message-ID: <20200414024750.20170-14-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpdbg/host.c b/libpdbg/host.c index d02b53d..63a0d5b 100644 --- a/libpdbg/host.c +++ b/libpdbg/host.c @@ -127,5 +127,5 @@ DECLARE_HW_UNIT(host_pib); __attribute__((constructor)) static void register_host(void) { - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &host_pib_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_HOST, &host_pib_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Tue Apr 14 12:47:41 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 14 Apr 2020 12:47:41 +1000 Subject: [Pdbg] [PATCH 14/23] libpdbg: Rename ibm, host-pib -> ibm, power-pib In-Reply-To: <20200414024750.20170-1-amitay@ozlabs.org> References: <20200414024750.20170-1-amitay@ozlabs.org> Message-ID: <20200414024750.20170-15-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/host.c | 2 +- p8-host.dts.m4 | 2 +- p9-host.dts.m4 | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libpdbg/host.c b/libpdbg/host.c index 63a0d5b..e44fd39 100644 --- a/libpdbg/host.c +++ b/libpdbg/host.c @@ -114,7 +114,7 @@ static int host_pib_probe(struct pdbg_target *target) static struct pib host_pib = { .target = { .name = "Host based debugfs SCOM", - .compatible = "ibm,host-pib", + .compatible = "ibm,power-pib", .class = "pib", .probe = host_pib_probe, }, diff --git a/p8-host.dts.m4 b/p8-host.dts.m4 index c3f1a45..817e6db 100644 --- a/p8-host.dts.m4 +++ b/p8-host.dts.m4 @@ -1,7 +1,7 @@ define(`CHIP',`pib@$1 { #address-cells = <0x2>; #size-cells = <0x1>; - compatible = "ibm,host-pib"; + compatible = "ibm,power-pib"; reg = <$1>; index = <$1>; system-path = "/proc$1/pib"; diff --git a/p9-host.dts.m4 b/p9-host.dts.m4 index 3b4c2b2..f2ca44b 100644 --- a/p9-host.dts.m4 +++ b/p9-host.dts.m4 @@ -8,7 +8,7 @@ pib at 0 { #address-cells = <0x2>; #size-cells = <0x1>; - compatible = "ibm,host-pib"; + compatible = "ibm,power-pib"; reg = <0x0>; index = <0x0>; system-path = "/proc0/pib"; @@ -17,7 +17,7 @@ pib at 8 { #address-cells = <0x2>; #size-cells = <0x1>; - compatible = "ibm,host-pib"; + compatible = "ibm,power-pib"; reg = <0x8>; index = <0x8>; system-path = "/proc1/pib"; -- 2.25.2 From amitay at ozlabs.org Tue Apr 14 12:47:39 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 14 Apr 2020 12:47:39 +1000 Subject: [Pdbg] [PATCH 12/23] libpdbg: Register fake drivers with fake backend In-Reply-To: <20200414024750.20170-1-amitay@ozlabs.org> References: <20200414024750.20170-1-amitay@ozlabs.org> Message-ID: <20200414024750.20170-13-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/fake.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libpdbg/fake.c b/libpdbg/fake.c index ae02463..64925d4 100644 --- a/libpdbg/fake.c +++ b/libpdbg/fake.c @@ -90,8 +90,8 @@ DECLARE_HW_UNIT(fake_thread); __attribute__((constructor)) static void register_fake(void) { - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_fsi_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_pib_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_core_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_thread_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_FAKE, &fake_fsi_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_FAKE, &fake_pib_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_FAKE, &fake_core_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_FAKE, &fake_thread_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Tue Apr 14 12:47:43 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 14 Apr 2020 12:47:43 +1000 Subject: [Pdbg] [PATCH 16/23] libpdbg: Rename ibm, cronus-{fsi, pib, sbefifo} -> ibm, power->{fsi, pib, sbefifo} In-Reply-To: <20200414024750.20170-1-amitay@ozlabs.org> References: <20200414024750.20170-1-amitay@ozlabs.org> Message-ID: <20200414024750.20170-17-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/cronus.c | 6 +++--- p8-cronus.dts.m4 | 8 ++++---- p9-cronus.dts.m4 | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/libpdbg/cronus.c b/libpdbg/cronus.c index eeaedc5..bf8639b 100644 --- a/libpdbg/cronus.c +++ b/libpdbg/cronus.c @@ -181,7 +181,7 @@ static void cronus_sbefifo_release(struct pdbg_target *target) static struct pib cronus_pib = { .target = { .name = "Cronus Client based PIB", - .compatible = "ibm,cronus-pib", + .compatible = "ibm,power-pib", .class = "pib", .probe = cronus_probe, .release = cronus_release, @@ -194,7 +194,7 @@ DECLARE_HW_UNIT(cronus_pib); static struct fsi cronus_fsi = { .target = { .name = "Cronus Client based FSI", - .compatible = "ibm,cronus-fsi", + .compatible = "ibm,power-fsi", .class = "fsi", .probe = cronus_probe, .release = cronus_release, @@ -207,7 +207,7 @@ DECLARE_HW_UNIT(cronus_fsi); static struct sbefifo cronus_sbefifo = { .target = { .name = "Cronus Client based SBE FIFO", - .compatible = "ibm,cronus-sbefifo", + .compatible = "ibm,power-sbefifo", .class = "sbefifo_transport", .probe = cronus_sbefifo_probe, .release = cronus_sbefifo_release, diff --git a/p8-cronus.dts.m4 b/p8-cronus.dts.m4 index 2221a68..61a40a1 100644 --- a/p8-cronus.dts.m4 +++ b/p8-cronus.dts.m4 @@ -2,25 +2,25 @@ / { fsi0 { - compatible = "ibm,cronus-fsi"; + compatible = "ibm,power-fsi"; index = <0x0>; system-path = "/proc0/fsi"; }; pib0 { - compatible = "ibm,cronus-pib"; + compatible = "ibm,power-pib"; index = <0x0>; system-path = "/proc0/pib"; }; fsi1 { - compatible = "ibm,cronus-fsi"; + compatible = "ibm,power-fsi"; index = <0x1>; system-path = "/proc1/fsi"; }; pib1 { - compatible = "ibm,cronus-pib"; + compatible = "ibm,power-pib"; index = <0x1>; system-path = "/proc1/pib"; }; diff --git a/p9-cronus.dts.m4 b/p9-cronus.dts.m4 index b9173b2..29c524c 100644 --- a/p9-cronus.dts.m4 +++ b/p9-cronus.dts.m4 @@ -2,32 +2,32 @@ / { fsi0 { - compatible = "ibm,cronus-fsi"; + compatible = "ibm,power-fsi"; index = <0x0>; system-path = "/proc0/fsi"; }; pib0 { - compatible = "ibm,cronus-pib"; + compatible = "ibm,power-pib"; index = <0x0>; system-path = "/proc0/pib"; }; fsi1 { - compatible = "ibm,cronus-fsi"; + compatible = "ibm,power-fsi"; index = <0x1>; system-path = "/proc1/fsi"; }; pib1 { - compatible = "ibm,cronus-pib"; + compatible = "ibm,power-pib"; index = <0x1>; system-path = "/proc1/pib"; }; sbefifo0 { index = <0x0>; - compatible = "ibm,cronus-sbefifo"; + compatible = "ibm,power-sbefifo"; sbefifo-chipop { compatible = "ibm,sbefifo-chipop"; @@ -47,7 +47,7 @@ sbefifo1 { index = <0x1>; - compatible = "ibm,cronus-sbefifo"; + compatible = "ibm,power-sbefifo"; sbefifo-chipop { compatible = "ibm,sbefifo-chipop"; -- 2.25.2 From amitay at ozlabs.org Tue Apr 14 12:47:45 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 14 Apr 2020 12:47:45 +1000 Subject: [Pdbg] [PATCH 18/23] libpdbg: Rename ibm, power8-opb-hmfsi -> ibm, power8-hmfsi In-Reply-To: <20200414024750.20170-1-amitay@ozlabs.org> References: <20200414024750.20170-1-amitay@ozlabs.org> Message-ID: <20200414024750.20170-19-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/cfam.c | 2 +- p8-i2c.dts.m4 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libpdbg/cfam.c b/libpdbg/cfam.c index 0b0b6f0..5364d5f 100644 --- a/libpdbg/cfam.c +++ b/libpdbg/cfam.c @@ -283,7 +283,7 @@ static int p8_hmfsi_probe(struct pdbg_target *target) static struct fsi p8_opb_hmfsi = { .target = { .name = "POWER8 OPB attached hMFSI", - .compatible = "ibm,power8-opb-hmfsi", + .compatible = "ibm,power8-hmfsi", .class = "fsi", .probe = p8_hmfsi_probe, }, diff --git a/p8-i2c.dts.m4 b/p8-i2c.dts.m4 index 255df72..71b5d27 100644 --- a/p8-i2c.dts.m4 +++ b/p8-i2c.dts.m4 @@ -24,7 +24,7 @@ hmfsi at 100000 { #address-cells = <0x2>; #size-cells = <0x1>; - compatible = "ibm,power8-opb-hmfsi"; + compatible = "ibm,power8-hmfsi"; reg = <0x100000 0x80000>; port = <0x1>; index = <0x1>; @@ -43,7 +43,7 @@ hmfsi at 180000 { #address-cells = <0x2>; #size-cells = <0x1>; - compatible = "ibm,power8-opb-hmfsi"; + compatible = "ibm,power8-hmfsi"; reg = <0x180000 0x80000>; port = <0x2>; index = <0x2>; -- 2.25.2 From amitay at ozlabs.org Tue Apr 14 12:47:42 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 14 Apr 2020 12:47:42 +1000 Subject: [Pdbg] [PATCH 15/23] libpdbg: Register cronus drivers with cronus backend In-Reply-To: <20200414024750.20170-1-amitay@ozlabs.org> References: <20200414024750.20170-1-amitay@ozlabs.org> Message-ID: <20200414024750.20170-16-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/cronus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libpdbg/cronus.c b/libpdbg/cronus.c index 23d555b..eeaedc5 100644 --- a/libpdbg/cronus.c +++ b/libpdbg/cronus.c @@ -219,7 +219,7 @@ DECLARE_HW_UNIT(cronus_sbefifo); __attribute__((constructor)) static void register_cronus(void) { - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_pib_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_fsi_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_sbefifo_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_CRONUS, &cronus_pib_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_CRONUS, &cronus_fsi_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_CRONUS, &cronus_sbefifo_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Tue Apr 14 12:47:44 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 14 Apr 2020 12:47:44 +1000 Subject: [Pdbg] [PATCH 17/23] dts: Backend device trees must use specific driver In-Reply-To: <20200414024750.20170-1-amitay@ozlabs.org> References: <20200414024750.20170-1-amitay@ozlabs.org> Message-ID: <20200414024750.20170-18-amitay@ozlabs.org> Specific backend must always use specific drivers for backend specific devices. All other devices which appear in system device tree can potentially match multiple drivers depending on the backend. Signed-off-by: Amitay Isaacs --- p8-fsi.dts.m4 | 6 +++--- p8-i2c.dts.m4 | 4 ++-- p8-kernel.dts.m4 | 4 ++-- p9-fsi.dtsi.m4 | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/p8-fsi.dts.m4 b/p8-fsi.dts.m4 index f109e77..a5682a2 100644 --- a/p8-fsi.dts.m4 +++ b/p8-fsi.dts.m4 @@ -26,7 +26,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x0>; system-path = "/proc0/pib"; }; @@ -44,7 +44,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x1>; system-path = "/proc1/pib"; }; @@ -64,7 +64,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x2>; system-path = "/proc2/pib"; }; diff --git a/p8-i2c.dts.m4 b/p8-i2c.dts.m4 index a272d62..255df72 100644 --- a/p8-i2c.dts.m4 +++ b/p8-i2c.dts.m4 @@ -34,7 +34,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x1>; system-path = "/proc1/pib"; }; @@ -53,7 +53,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x2>; system-path = "/proc2/pib"; }; diff --git a/p8-kernel.dts.m4 b/p8-kernel.dts.m4 index 6eacb92..b00ed54 100644 --- a/p8-kernel.dts.m4 +++ b/p8-kernel.dts.m4 @@ -18,7 +18,7 @@ #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; index = <0x0>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; system-path = "/proc0/pib"; }; @@ -35,7 +35,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x1>; system-path = "/proc1/pib"; }; diff --git a/p9-fsi.dtsi.m4 b/p9-fsi.dtsi.m4 index 1b74104..a1d6a78 100644 --- a/p9-fsi.dtsi.m4 +++ b/p9-fsi.dtsi.m4 @@ -17,7 +17,7 @@ #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; index = <0x0>; - compatible = "ibm,fsi-pib", "ibm,power9-fsi-pib"; + compatible = "ibm,fsi-pib"; system-path = "/proc0/pib"; }; @@ -35,7 +35,7 @@ #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; index = <0x1>; - compatible = "ibm,fsi-pib", "ibm,power9-fsi-pib"; + compatible = "ibm,fsi-pib"; system-path = "/proc1/pib"; }; }; -- 2.25.2 From amitay at ozlabs.org Tue Apr 14 12:47:46 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 14 Apr 2020 12:47:46 +1000 Subject: [Pdbg] [PATCH 19/23] libpdbg: Rename ibm,fsi-pib -> ibm,power-pib In-Reply-To: <20200414024750.20170-1-amitay@ozlabs.org> References: <20200414024750.20170-1-amitay@ozlabs.org> Message-ID: <20200414024750.20170-20-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/cfam.c | 2 +- p8-fsi.dts.m4 | 6 +++--- p8-i2c.dts.m4 | 4 ++-- p8-kernel.dts.m4 | 4 ++-- p9-fsi.dtsi.m4 | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libpdbg/cfam.c b/libpdbg/cfam.c index 5364d5f..bbaba30 100644 --- a/libpdbg/cfam.c +++ b/libpdbg/cfam.c @@ -118,7 +118,7 @@ static int fsi2pib_reset(struct pdbg_target *target) static struct pib fsi_pib = { .target = { .name = "POWER FSI2PIB", - .compatible = "ibm,fsi-pib", + .compatible = "ibm,power-pib", .class = "pib", .probe = fsi2pib_reset, }, diff --git a/p8-fsi.dts.m4 b/p8-fsi.dts.m4 index a5682a2..0777e8d 100644 --- a/p8-fsi.dts.m4 +++ b/p8-fsi.dts.m4 @@ -26,7 +26,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib"; + compatible = "ibm,power-pib"; index = <0x0>; system-path = "/proc0/pib"; }; @@ -44,7 +44,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib"; + compatible = "ibm,power-pib"; index = <0x1>; system-path = "/proc1/pib"; }; @@ -64,7 +64,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib"; + compatible = "ibm,power-pib"; index = <0x2>; system-path = "/proc2/pib"; }; diff --git a/p8-i2c.dts.m4 b/p8-i2c.dts.m4 index 71b5d27..abbf760 100644 --- a/p8-i2c.dts.m4 +++ b/p8-i2c.dts.m4 @@ -34,7 +34,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib"; + compatible = "ibm,power-pib"; index = <0x1>; system-path = "/proc1/pib"; }; @@ -53,7 +53,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib"; + compatible = "ibm,power-pib"; index = <0x2>; system-path = "/proc2/pib"; }; diff --git a/p8-kernel.dts.m4 b/p8-kernel.dts.m4 index b00ed54..74f2a6e 100644 --- a/p8-kernel.dts.m4 +++ b/p8-kernel.dts.m4 @@ -18,7 +18,7 @@ #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; index = <0x0>; - compatible = "ibm,fsi-pib"; + compatible = "ibm,power-pib"; system-path = "/proc0/pib"; }; @@ -35,7 +35,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib"; + compatible = "ibm,power-pib"; index = <0x1>; system-path = "/proc1/pib"; }; diff --git a/p9-fsi.dtsi.m4 b/p9-fsi.dtsi.m4 index a1d6a78..91cc120 100644 --- a/p9-fsi.dtsi.m4 +++ b/p9-fsi.dtsi.m4 @@ -17,7 +17,7 @@ #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; index = <0x0>; - compatible = "ibm,fsi-pib"; + compatible = "ibm,power-pib"; system-path = "/proc0/pib"; }; @@ -35,7 +35,7 @@ #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; index = <0x1>; - compatible = "ibm,fsi-pib"; + compatible = "ibm,power-pib"; system-path = "/proc1/pib"; }; }; -- 2.25.2 From amitay at ozlabs.org Tue Apr 14 12:47:47 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 14 Apr 2020 12:47:47 +1000 Subject: [Pdbg] [PATCH 20/23] libpdbg: Rename ibm, fsi-hmfsi -> ibm, power-hmfsi In-Reply-To: <20200414024750.20170-1-amitay@ozlabs.org> References: <20200414024750.20170-1-amitay@ozlabs.org> Message-ID: <20200414024750.20170-21-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/cfam.c | 2 +- p8-fsi.dts.m4 | 4 ++-- p8-kernel.dts.m4 | 2 +- p9-fsi.dtsi.m4 | 2 +- p9-kernel.dts.m4 | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libpdbg/cfam.c b/libpdbg/cfam.c index bbaba30..dc4cf2d 100644 --- a/libpdbg/cfam.c +++ b/libpdbg/cfam.c @@ -341,7 +341,7 @@ static int cfam_hmfsi_probe(struct pdbg_target *target) static struct fsi cfam_hmfsi = { .target = { .name = "CFAM hMFSI Port", - .compatible = "ibm,fsi-hmfsi", + .compatible = "ibm,power-hmfsi", .class = "fsi", .probe = cfam_hmfsi_probe, }, diff --git a/p8-fsi.dts.m4 b/p8-fsi.dts.m4 index 0777e8d..9e761eb 100644 --- a/p8-fsi.dts.m4 +++ b/p8-fsi.dts.m4 @@ -34,7 +34,7 @@ hmfsi at 100000 { #address-cells = <0x2>; #size-cells = <0x1>; - compatible = "ibm,fsi-hmfsi"; + compatible = "ibm,power-hmfsi"; reg = <0x0 0x100000 0x8000>; port = <0x1>; index = <0x1>; @@ -54,7 +54,7 @@ hmfsi at 180000 { #address-cells = <0x2>; #size-cells = <0x1>; - compatible = "ibm,fsi-hmfsi"; + compatible = "ibm,power-hmfsi"; reg = <0x0 0x180000 0x80000>; port = <0x2>; index = <0x2>; diff --git a/p8-kernel.dts.m4 b/p8-kernel.dts.m4 index 74f2a6e..92c473f 100644 --- a/p8-kernel.dts.m4 +++ b/p8-kernel.dts.m4 @@ -25,7 +25,7 @@ hmfsi at 100000 { #address-cells = <0x2>; #size-cells = <0x1>; - compatible = "ibm,fsi-hmfsi"; + compatible = "ibm,power-hmfsi"; reg = <0x0 0x100000 0x8000>; port = <0x1>; index = <0x1>; diff --git a/p9-fsi.dtsi.m4 b/p9-fsi.dtsi.m4 index 91cc120..6d64123 100644 --- a/p9-fsi.dtsi.m4 +++ b/p9-fsi.dtsi.m4 @@ -24,7 +24,7 @@ hmfsi at 100000 { #address-cells = <0x2>; #size-cells = <0x1>; - compatible = "ibm,fsi-hmfsi"; + compatible = "ibm,power-hmfsi"; reg = <0x0 0x100000 0x8000>; port = <0x1>; index = <0x1>; diff --git a/p9-kernel.dts.m4 b/p9-kernel.dts.m4 index 0b92289..dd15798 100644 --- a/p9-kernel.dts.m4 +++ b/p9-kernel.dts.m4 @@ -48,7 +48,7 @@ hmfsi at 100000 { #address-cells = <0x2>; #size-cells = <0x1>; - compatible = "ibm,fsi-hmfsi"; + compatible = "ibm,power-hmfsi"; reg = <0x0 0x100000 0x8000>; port = <0x1>; index = <0x1>; -- 2.25.2 From amitay at ozlabs.org Tue Apr 14 12:47:48 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 14 Apr 2020 12:47:48 +1000 Subject: [Pdbg] [PATCH 21/23] libpdbg: Rename ibm, processor -> ibm, power-proc In-Reply-To: <20200414024750.20170-1-amitay@ozlabs.org> References: <20200414024750.20170-1-amitay@ozlabs.org> Message-ID: <20200414024750.20170-22-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/chip.c | 2 +- p8.dts.m4 | 2 +- p9.dts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libpdbg/chip.c b/libpdbg/chip.c index b961e87..848a831 100644 --- a/libpdbg/chip.c +++ b/libpdbg/chip.c @@ -670,7 +670,7 @@ int thread_getregs(struct pdbg_target *thread, struct thread_regs *regs) static struct proc proc = { .target = { .name = "Processor Module", - .compatible = "ibm,processor", + .compatible = "ibm,power-proc", .class = "proc", }, }; diff --git a/p8.dts.m4 b/p8.dts.m4 index a508e02..42e1167 100644 --- a/p8.dts.m4 +++ b/p8.dts.m4 @@ -1,7 +1,7 @@ define(`PROC',` define(`PROC_ID',`$1')dnl proc$1 { - compatible = "ibm,power8-proc", "ibm,processor"; + compatible = "ibm,power8-proc", "ibm,power-proc"; index = <$1>; fsi { diff --git a/p9.dts b/p9.dts index 2d3fed2..4eb910b 100644 --- a/p9.dts +++ b/p9.dts @@ -7,7 +7,7 @@ }; proc0 { - compatible = "ibm,power9-proc", "ibm,processor"; + compatible = "ibm,power9-proc", "ibm,power-proc"; index = < 0x00 >; fsi { @@ -1723,7 +1723,7 @@ }; proc1 { - compatible = "ibm,power9-proc", "ibm,processor"; + compatible = "ibm,power9-proc", "ibm,power-proc"; index = < 0x01 >; fsi { -- 2.25.2 From amitay at ozlabs.org Tue Apr 14 12:47:49 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 14 Apr 2020 12:47:49 +1000 Subject: [Pdbg] [PATCH 22/23] libpdbg: Rename ibm, sbefifo-{mem, mem-pba, chipop} -> ibm, power-{mem, mempba, chipop} In-Reply-To: <20200414024750.20170-1-amitay@ozlabs.org> References: <20200414024750.20170-1-amitay@ozlabs.org> Message-ID: <20200414024750.20170-23-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/sbefifo.c | 6 +++--- p9-cronus.dts.m4 | 12 ++++++------ p9-kernel.dts.m4 | 12 ++++++------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index ce605da..3532086 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -270,7 +270,7 @@ static void sbefifo_release(struct pdbg_target *target) static struct mem sbefifo_mem = { .target = { .name = "SBE FIFO Chip-op based memory access", - .compatible = "ibm,sbefifo-mem", + .compatible = "ibm,power-mem", .class = "mem", }, .read = sbefifo_op_getmem, @@ -281,7 +281,7 @@ DECLARE_HW_UNIT(sbefifo_mem); static struct mem sbefifo_pba = { .target = { .name = "SBE FIFO Chip-op based memory access", - .compatible = "ibm,sbefifo-mem-pba", + .compatible = "ibm,power-mempba", .class = "mem", }, .read = sbefifo_op_getmem_pba, @@ -292,7 +292,7 @@ DECLARE_HW_UNIT(sbefifo_pba); static struct chipop sbefifo_chipop = { .target = { .name = "SBE FIFO Chip-op engine", - .compatible = "ibm,sbefifo-chipop", + .compatible = "ibm,power-chipop", .class = "chipop", }, .ffdc_get = sbefifo_op_ffdc_get, diff --git a/p9-cronus.dts.m4 b/p9-cronus.dts.m4 index 29c524c..2cd5950 100644 --- a/p9-cronus.dts.m4 +++ b/p9-cronus.dts.m4 @@ -30,17 +30,17 @@ compatible = "ibm,power-sbefifo"; sbefifo-chipop { - compatible = "ibm,sbefifo-chipop"; + compatible = "ibm,power-chipop"; index = <0x0>; }; sbefifo-mem { - compatible = "ibm,sbefifo-mem"; + compatible = "ibm,power-mem"; system-path = "/mem0"; }; sbefifo-pba { - compatible = "ibm,sbefifo-mem-pba"; + compatible = "ibm,power-mempba"; system-path = "/mempba0"; }; }; @@ -50,17 +50,17 @@ compatible = "ibm,power-sbefifo"; sbefifo-chipop { - compatible = "ibm,sbefifo-chipop"; + compatible = "ibm,power-chipop"; index = <0x1>; }; sbefifo-mem { - compatible = "ibm,sbefifo-mem"; + compatible = "ibm,power-mem"; system-path = "/mem1"; }; sbefifo-pba { - compatible = "ibm,sbefifo-mem-pba"; + compatible = "ibm,power-mempba"; system-path = "/mempba1"; }; }; diff --git a/p9-kernel.dts.m4 b/p9-kernel.dts.m4 index dd15798..3ac1329 100644 --- a/p9-kernel.dts.m4 +++ b/p9-kernel.dts.m4 @@ -30,17 +30,17 @@ device-path = "/dev/sbefifo1"; sbefifo-mem { - compatible = "ibm,sbefifo-mem"; + compatible = "ibm,power-mem"; system-path = "/mem0"; }; sbefifo-pba { - compatible = "ibm,sbefifo-mem-pba"; + compatible = "ibm,power-mempba"; system-path = "/mempba0"; }; sbefifo-chipop { - compatible = "ibm,sbefifo-chipop"; + compatible = "ibm,power-chipop"; index = <0x0>; }; }; @@ -71,17 +71,17 @@ device-path = "/dev/sbefifo2"; sbefifo-mem { - compatible = "ibm,sbefifo-mem"; + compatible = "ibm,power-mem"; system-path = "/mem1"; }; sbefifo-pba { - compatible = "ibm,sbefifo-mem-pba"; + compatible = "ibm,power-mempba"; system-path = "/mempba1"; }; sbefifo-chipop { - compatible = "ibm,sbefifo-chipop"; + compatible = "ibm,power-chipop"; index = <0x1>; }; }; -- 2.25.2 From amitay at ozlabs.org Tue Apr 14 12:47:50 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 14 Apr 2020 12:47:50 +1000 Subject: [Pdbg] [PATCH 23/23] dts: Add a generic compatible property for core and thread In-Reply-To: <20200414024750.20170-1-amitay@ozlabs.org> References: <20200414024750.20170-1-amitay@ozlabs.org> Message-ID: <20200414024750.20170-24-amitay@ozlabs.org> This allows different drivers to be loaded automatically depending on the specified backend. Signed-off-by: Amitay Isaacs --- p9.dts | 480 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 240 insertions(+), 240 deletions(-) diff --git a/p9.dts b/p9.dts index 4eb910b..968c0f2 100644 --- a/p9.dts +++ b/p9.dts @@ -379,33 +379,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x00 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -423,33 +423,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x01 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -475,33 +475,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x02 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -519,33 +519,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x03 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -587,33 +587,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x04 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -631,33 +631,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x05 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -683,33 +683,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x06 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -727,33 +727,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x07 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -795,33 +795,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x08 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -839,33 +839,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x09 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -891,33 +891,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0a >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -935,33 +935,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0b >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1003,33 +1003,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0c >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1047,33 +1047,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0d >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1099,33 +1099,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0e >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1143,33 +1143,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0f >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1211,33 +1211,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x10 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1255,33 +1255,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x11 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1307,33 +1307,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x12 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1351,33 +1351,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x13 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1419,33 +1419,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x14 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1463,33 +1463,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x15 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1515,33 +1515,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x16 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1559,33 +1559,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x17 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2095,33 +2095,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x00 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2139,33 +2139,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x01 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2191,33 +2191,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x02 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2235,33 +2235,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x03 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2303,33 +2303,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x04 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2347,33 +2347,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x05 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2399,33 +2399,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x06 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2443,33 +2443,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x07 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2511,33 +2511,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x08 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2555,33 +2555,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x09 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2607,33 +2607,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0a >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2651,33 +2651,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0b >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2719,33 +2719,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0c >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2763,33 +2763,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0d >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2815,33 +2815,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0e >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2859,33 +2859,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0f >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2927,33 +2927,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x10 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2971,33 +2971,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x11 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3023,33 +3023,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x12 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3067,33 +3067,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x13 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3135,33 +3135,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x14 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3179,33 +3179,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x15 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3231,33 +3231,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x16 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3275,33 +3275,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x17 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:24 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:24 +1000 Subject: [Pdbg] [PATCH v3 00/25] Add sbefifo backend Message-ID: <20200417070749.276754-1-amitay@ozlabs.org> This patch set adds per backend support of hardware drivers. All hardware drivers are assigned to a specific backend. When looking up a driver for a target in device tree, first lookup the specific backend and then the default backend. All targets in backend device tree, use compatible properties that describe the hardware access (e.g. ibm,bmcfsi). There is only single compatible property assigned to targets in backend device trees. All targets in system device tree, use compatible properties that describe the hardware (ibm,power9-adu) and can have multiple compatible properties (e.g. ibm,power9-thread and ibm,power-thread) to load different drivers based on the backend. For openbmc, all the hardware access is required to go via sbefifo. Currently some of the operations are hacked in to go via sbefifo (e.g. all thread operations). This patchset removes temporary hacks and adds infrastructure to create sbefifo backend. Also fix couple of bugs in libsbefifo. V2 changes: - Rebased on top of latest master (resolved conflicts and add missing code due to upstream changes) V3 changes: - Compatible properties in system device tree updated as per defined convetion (mentioned above) Amitay Isaacs (25): libsbefifo: Fix compilation error for undefined variable libsbefifo: Use the correct sized pointer libpdbg: Add a private api to get current backend libpdbg: Register hwunit drivers per backend libpdbg: Use const char * for filenames libpdbg: Backend device tree cannot be overriden libpdbg: Register fsi drivers with fsi backend libpdbg: Register i2c driver with i2c backend libpdbg: Register kernel drivers with kernel backend libpdbg: Register fake drivers with fake backend libpdbg: Register host drivers with host backend libpdbg: Register cronus drivers with cronus backend dts: Backend device trees must use specific driver libpdbg: Rename ibm,processor -> ibm,power-proc dts: Add a generic compatible property for core and thread libpdbg: Add sbefifo backend libpdbg: Add pib driver using sbefifo libpdbg: Add thread driver using sbefifo libpdbg: Add all thread procedures to pib target libpdbg: Implement all thread procedures using sbefifo libpdbg: Remove special case thread procedures using sbefifo libpdbg: Drop thread procedures from chipop target dts: Add sbefifo backend device tree libpdbg: Enable sbefifo backend main: Add sbefifo backend Makefile.am | 1 + libpdbg/adu.c | 4 +- libpdbg/bmcfsi.c | 2 +- libpdbg/cfam.c | 8 +- libpdbg/chip.c | 64 ++-- libpdbg/cronus.c | 6 +- libpdbg/dtb.c | 56 +++- libpdbg/fake.c | 8 +- libpdbg/host.c | 2 +- libpdbg/htm.c | 6 +- libpdbg/hwunit.c | 31 +- libpdbg/hwunit.h | 10 +- libpdbg/i2c.c | 2 +- libpdbg/kernel.c | 4 +- libpdbg/libpdbg.h | 7 +- libpdbg/p8chip.c | 4 +- libpdbg/p9_fapi_targets.c | 52 ++-- libpdbg/p9chip.c | 4 +- libpdbg/sbefifo.c | 163 ++++++++-- libpdbg/target.h | 1 + libsbefifo/cmd_scom.c | 4 +- libsbefifo/operation.c | 5 +- p8-fsi.dts.m4 | 6 +- p8-i2c.dts.m4 | 4 +- p8-kernel.dts.m4 | 4 +- p8.dts.m4 | 2 +- p9-fsi.dtsi.m4 | 4 +- p9-sbefifo.dts.m4 | 86 ++++++ p9.dts | 484 +++++++++++++++--------------- src/main.c | 3 + tests/test_p9_fapi_translation.sh | 2 +- 31 files changed, 639 insertions(+), 400 deletions(-) create mode 100644 p9-sbefifo.dts.m4 -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:25 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:25 +1000 Subject: [Pdbg] [PATCH v3 01/25] libsbefifo: Fix compilation error for undefined variable In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-2-amitay@ozlabs.org> We didn't hit this because of the LOG() macro which is only enabled with -DLIBSBEFIFO_DEBUG=1. Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libsbefifo/operation.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libsbefifo/operation.c b/libsbefifo/operation.c index 07d9f64..8717f15 100644 --- a/libsbefifo/operation.c +++ b/libsbefifo/operation.c @@ -60,17 +60,18 @@ static int sbefifo_transport(struct sbefifo_context *sctx, uint8_t *msg, uint32_ int rc; size_t buflen; + buflen = msg_len; rc = sbefifo_write(sctx, msg, buflen); if (rc) { - LOG("write: cmd=%08x, rc=%d\n", cmd, rc); + LOG("write: cmd=%08x, rc=%d\n", be32toh(*(uint32_t *)(msg+4)), rc); return rc; } buflen = *out_len; rc = sbefifo_read(sctx, out, &buflen); if (rc) { - LOG("read: cmd=%08x, buflen=%zu, rc=%d\n", cmd, buflen, rc); + LOG("read: cmd=%08x, buflen=%zu, rc=%d\n", be32toh(*(uint32_t *)(msg+4)), buflen, rc); return rc; } -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:27 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:27 +1000 Subject: [Pdbg] [PATCH v3 03/25] libpdbg: Add a private api to get current backend In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-4-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/dtb.c | 5 +++++ libpdbg/target.h | 1 + 2 files changed, 6 insertions(+) diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index b094e34..70b7962 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -293,6 +293,11 @@ bool pdbg_set_backend(enum pdbg_backend backend, const char *backend_option) return true; } +enum pdbg_backend pdbg_get_backend(void) +{ + return pdbg_backend; +} + const char *pdbg_get_backend_option(void) { return pdbg_backend_option; diff --git a/libpdbg/target.h b/libpdbg/target.h index 3b74844..7094b51 100644 --- a/libpdbg/target.h +++ b/libpdbg/target.h @@ -80,6 +80,7 @@ extern struct list_head empty_list; extern struct list_head target_classes; struct pdbg_dtb *pdbg_default_dtb(void *system_fdt); +enum pdbg_backend pdbg_get_backend(void); const char *pdbg_get_backend_option(void); bool pdbg_fdt_is_readonly(void *fdt); -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:26 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:26 +1000 Subject: [Pdbg] [PATCH v3 02/25] libsbefifo: Use the correct sized pointer In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-3-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libsbefifo/cmd_scom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsbefifo/cmd_scom.c b/libsbefifo/cmd_scom.c index bc9b5f9..bb44e5e 100644 --- a/libsbefifo/cmd_scom.c +++ b/libsbefifo/cmd_scom.c @@ -24,7 +24,7 @@ static int sbefifo_scom_get_push(uint64_t addr, uint8_t **buf, uint32_t *buflen) { - uint8_t *msg; + uint32_t *msg; uint32_t nwords, cmd; nwords = 4; @@ -83,7 +83,7 @@ int sbefifo_scom_get(struct sbefifo_context *sctx, uint64_t addr, uint64_t *valu static int sbefifo_scom_put_push(uint64_t addr, uint64_t value, uint8_t **buf, uint32_t *buflen) { - uint8_t *msg; + uint32_t *msg; uint32_t nwords, cmd; nwords = 6; -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:29 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:29 +1000 Subject: [Pdbg] [PATCH v3 05/25] libpdbg: Use const char * for filenames In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-6-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/dtb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index 70b7962..ef51718 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -234,7 +234,7 @@ static void bmc_target(struct pdbg_dtb *dtb) } /* Opens a dtb at the given path */ -static void mmap_dtb(char *file, bool readonly, struct pdbg_mfile *mfile) +static void mmap_dtb(const char *file, bool readonly, struct pdbg_mfile *mfile) { int fd; void *dtb; @@ -308,7 +308,7 @@ const char *pdbg_get_backend_option(void) struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) { struct pdbg_dtb *dtb = &pdbg_dtb; - char *fdt; + const char *fdt; dtb->backend.fdt = NULL; dtb->system.fdt = system_fdt; -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:28 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:28 +1000 Subject: [Pdbg] [PATCH v3 04/25] libpdbg: Register hwunit drivers per backend In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-5-amitay@ozlabs.org> This will allow to load backend specific drivers first. All the drivers are registered with the default backend, so this patch does not change libpdbg behaviour. Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/adu.c | 4 +-- libpdbg/bmcfsi.c | 2 +- libpdbg/cfam.c | 8 +++--- libpdbg/chip.c | 2 +- libpdbg/cronus.c | 6 ++--- libpdbg/fake.c | 8 +++--- libpdbg/host.c | 2 +- libpdbg/htm.c | 6 ++--- libpdbg/hwunit.c | 31 ++++++++++++++++------- libpdbg/hwunit.h | 2 +- libpdbg/i2c.c | 2 +- libpdbg/kernel.c | 4 +-- libpdbg/p8chip.c | 4 +-- libpdbg/p9_fapi_targets.c | 52 +++++++++++++++++++-------------------- libpdbg/p9chip.c | 4 +-- libpdbg/sbefifo.c | 8 +++--- 16 files changed, 79 insertions(+), 66 deletions(-) diff --git a/libpdbg/adu.c b/libpdbg/adu.c index df610a7..fe60118 100644 --- a/libpdbg/adu.c +++ b/libpdbg/adu.c @@ -597,6 +597,6 @@ DECLARE_HW_UNIT(p9_adu); __attribute__((constructor)) static void register_adu(void) { - pdbg_hwunit_register(&p8_adu_hw_unit); - pdbg_hwunit_register(&p9_adu_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_adu_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_adu_hw_unit); } diff --git a/libpdbg/bmcfsi.c b/libpdbg/bmcfsi.c index 1d2e304..2639595 100644 --- a/libpdbg/bmcfsi.c +++ b/libpdbg/bmcfsi.c @@ -519,5 +519,5 @@ DECLARE_HW_UNIT(bmcfsi); __attribute__((constructor)) static void register_bmcfsi(void) { - pdbg_hwunit_register(&bmcfsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &bmcfsi_hw_unit); } diff --git a/libpdbg/cfam.c b/libpdbg/cfam.c index da4c5fc..0b0b6f0 100644 --- a/libpdbg/cfam.c +++ b/libpdbg/cfam.c @@ -353,8 +353,8 @@ DECLARE_HW_UNIT(cfam_hmfsi); __attribute__((constructor)) static void register_cfam(void) { - pdbg_hwunit_register(&fsi_pib_hw_unit); - pdbg_hwunit_register(&p8_opb_hw_unit); - pdbg_hwunit_register(&p8_opb_hmfsi_hw_unit); - pdbg_hwunit_register(&cfam_hmfsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fsi_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_opb_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_opb_hmfsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cfam_hmfsi_hw_unit); } diff --git a/libpdbg/chip.c b/libpdbg/chip.c index b45cffa..b961e87 100644 --- a/libpdbg/chip.c +++ b/libpdbg/chip.c @@ -679,5 +679,5 @@ DECLARE_HW_UNIT(proc); __attribute__((constructor)) static void register_proc(void) { - pdbg_hwunit_register(&proc_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &proc_hw_unit); } diff --git a/libpdbg/cronus.c b/libpdbg/cronus.c index ff8af4c..23d555b 100644 --- a/libpdbg/cronus.c +++ b/libpdbg/cronus.c @@ -219,7 +219,7 @@ DECLARE_HW_UNIT(cronus_sbefifo); __attribute__((constructor)) static void register_cronus(void) { - pdbg_hwunit_register(&cronus_pib_hw_unit); - pdbg_hwunit_register(&cronus_fsi_hw_unit); - pdbg_hwunit_register(&cronus_sbefifo_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_fsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_sbefifo_hw_unit); } diff --git a/libpdbg/fake.c b/libpdbg/fake.c index 82415db..ae02463 100644 --- a/libpdbg/fake.c +++ b/libpdbg/fake.c @@ -90,8 +90,8 @@ DECLARE_HW_UNIT(fake_thread); __attribute__((constructor)) static void register_fake(void) { - pdbg_hwunit_register(&fake_fsi_hw_unit); - pdbg_hwunit_register(&fake_pib_hw_unit); - pdbg_hwunit_register(&fake_core_hw_unit); - pdbg_hwunit_register(&fake_thread_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_fsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_core_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_thread_hw_unit); } diff --git a/libpdbg/host.c b/libpdbg/host.c index 428c18b..d02b53d 100644 --- a/libpdbg/host.c +++ b/libpdbg/host.c @@ -127,5 +127,5 @@ DECLARE_HW_UNIT(host_pib); __attribute__((constructor)) static void register_host(void) { - pdbg_hwunit_register(&host_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &host_pib_hw_unit); } diff --git a/libpdbg/htm.c b/libpdbg/htm.c index 4d23e82..a259478 100644 --- a/libpdbg/htm.c +++ b/libpdbg/htm.c @@ -1158,7 +1158,7 @@ DECLARE_HW_UNIT(p8_chtm); __attribute__((constructor)) static void register_htm(void) { - pdbg_hwunit_register(&p8_nhtm_hw_unit); - pdbg_hwunit_register(&p9_nhtm_hw_unit); - pdbg_hwunit_register(&p8_chtm_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_nhtm_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_nhtm_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_chtm_hw_unit); } diff --git a/libpdbg/hwunit.c b/libpdbg/hwunit.c index c7ec63d..710c78a 100644 --- a/libpdbg/hwunit.c +++ b/libpdbg/hwunit.c @@ -20,26 +20,28 @@ #include "hwunit.h" #define MAX_HW_UNITS 1024 +#define MAX_BACKENDS 16 -static const struct hw_unit_info *g_hw_unit[MAX_HW_UNITS]; -static int g_hw_unit_count; +static const struct hw_unit_info *g_hw_unit[MAX_BACKENDS][MAX_HW_UNITS]; +static int g_hw_unit_count[MAX_BACKENDS]; -void pdbg_hwunit_register(const struct hw_unit_info *hw_unit) +void pdbg_hwunit_register(enum pdbg_backend backend, const struct hw_unit_info *hw_unit) { - assert(g_hw_unit_count < MAX_HW_UNITS); + assert(g_hw_unit_count[backend] < MAX_HW_UNITS); - g_hw_unit[g_hw_unit_count] = hw_unit; - g_hw_unit_count++; + g_hw_unit[backend][g_hw_unit_count[backend]] = hw_unit; + g_hw_unit_count[backend]++; } -const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat) +static const struct hw_unit_info *find_compatible(enum pdbg_backend backend, + const char *compat) { const struct hw_unit_info *p; struct pdbg_target *target; int i; - for (i = 0; i < g_hw_unit_count; i++) { - p = g_hw_unit[i]; + for (i = 0; i < g_hw_unit_count[backend]; i++) { + p = g_hw_unit[backend][i]; target = p->hw_unit; if (!strcmp(target->compatible, compat)) @@ -48,3 +50,14 @@ const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat) return NULL; } + +const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat) +{ + const struct hw_unit_info *p; + + p = find_compatible(pdbg_get_backend(), compat); + if (!p) + p = find_compatible(PDBG_DEFAULT_BACKEND, compat); + + return p; +} diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h index 7165a3c..5bca088 100644 --- a/libpdbg/hwunit.h +++ b/libpdbg/hwunit.h @@ -31,7 +31,7 @@ struct hw_unit_info { size_t size; }; -void pdbg_hwunit_register(const struct hw_unit_info *hw_unit); +void pdbg_hwunit_register(enum pdbg_backend backend, const struct hw_unit_info *hw_unit); const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat); /* diff --git a/libpdbg/i2c.c b/libpdbg/i2c.c index 1a5d089..3d0b80a 100644 --- a/libpdbg/i2c.c +++ b/libpdbg/i2c.c @@ -177,5 +177,5 @@ DECLARE_HW_UNIT(p8_i2c_pib); __attribute__((constructor)) static void register_i2c(void) { - pdbg_hwunit_register(&p8_i2c_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_i2c_pib_hw_unit); } diff --git a/libpdbg/kernel.c b/libpdbg/kernel.c index dbd3586..c4637a7 100644 --- a/libpdbg/kernel.c +++ b/libpdbg/kernel.c @@ -264,6 +264,6 @@ DECLARE_HW_UNIT(kernel_pib); __attribute__((constructor)) static void register_kernel(void) { - pdbg_hwunit_register(&kernel_fsi_hw_unit); - pdbg_hwunit_register(&kernel_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_fsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_pib_hw_unit); } diff --git a/libpdbg/p8chip.c b/libpdbg/p8chip.c index 1bf71e8..484d77c 100644 --- a/libpdbg/p8chip.c +++ b/libpdbg/p8chip.c @@ -738,6 +738,6 @@ DECLARE_HW_UNIT(p8_core); __attribute__((constructor)) static void register_p8chip(void) { - pdbg_hwunit_register(&p8_thread_hw_unit); - pdbg_hwunit_register(&p8_core_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_thread_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_core_hw_unit); } diff --git a/libpdbg/p9_fapi_targets.c b/libpdbg/p9_fapi_targets.c index 1dc7af8..97680d5 100644 --- a/libpdbg/p9_fapi_targets.c +++ b/libpdbg/p9_fapi_targets.c @@ -720,30 +720,30 @@ DECLARE_HW_UNIT(p9_capp); __attribute__((constructor)) static void register_p9_fapi_targets(void) { - pdbg_hwunit_register(&p9_ex_hw_unit); - pdbg_hwunit_register(&p9_mba_hw_unit); - pdbg_hwunit_register(&p9_mcs_hw_unit); - pdbg_hwunit_register(&p9_xbus_hw_unit); - pdbg_hwunit_register(&p9_abus_hw_unit); - pdbg_hwunit_register(&p9_l4_hw_unit); - pdbg_hwunit_register(&p9_eq_hw_unit); - pdbg_hwunit_register(&p9_mca_hw_unit); - pdbg_hwunit_register(&p9_mcbist_hw_unit); - pdbg_hwunit_register(&p9_mi_hw_unit); - pdbg_hwunit_register(&p9_dmi_hw_unit); - pdbg_hwunit_register(&p9_obus_hw_unit); - pdbg_hwunit_register(&p9_obus_brick_hw_unit); - pdbg_hwunit_register(&p9_sbe_hw_unit); - pdbg_hwunit_register(&p9_ppe_hw_unit); - pdbg_hwunit_register(&p9_pec_hw_unit); - pdbg_hwunit_register(&p9_phb_hw_unit); - pdbg_hwunit_register(&p9_mc_hw_unit); - pdbg_hwunit_register(&p9_mem_port_hw_unit); - pdbg_hwunit_register(&p9_nmmu_hw_unit); - pdbg_hwunit_register(&p9_pau_hw_unit); - pdbg_hwunit_register(&p9_iohs_hw_unit); - pdbg_hwunit_register(&p9_fc_hw_unit); - pdbg_hwunit_register(&p9_pauc_hw_unit); - pdbg_hwunit_register(&p9_chiplet_hw_unit); - pdbg_hwunit_register(&p9_capp_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_ex_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mba_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mcs_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_xbus_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_abus_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_l4_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_eq_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mca_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mcbist_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_dmi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_obus_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_obus_brick_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_sbe_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_ppe_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_pec_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_phb_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mc_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mem_port_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_nmmu_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_pau_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_iohs_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_fc_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_pauc_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_chiplet_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_capp_hw_unit); } diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c index 63434ee..6222dc3 100644 --- a/libpdbg/p9chip.c +++ b/libpdbg/p9chip.c @@ -510,6 +510,6 @@ DECLARE_HW_UNIT(p9_core); __attribute__((constructor)) static void register_p9chip(void) { - pdbg_hwunit_register(&p9_thread_hw_unit); - pdbg_hwunit_register(&p9_core_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_thread_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_core_hw_unit); } diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 41e68e9..22f11f1 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -321,8 +321,8 @@ DECLARE_HW_UNIT(kernel_sbefifo); __attribute__((constructor)) static void register_sbefifo(void) { - pdbg_hwunit_register(&kernel_sbefifo_hw_unit); - pdbg_hwunit_register(&sbefifo_chipop_hw_unit); - pdbg_hwunit_register(&sbefifo_mem_hw_unit); - pdbg_hwunit_register(&sbefifo_pba_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_sbefifo_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chipop_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_mem_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pba_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:30 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:30 +1000 Subject: [Pdbg] [PATCH v3 06/25] libpdbg: Backend device tree cannot be overriden In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-7-amitay@ozlabs.org> With drivers getting registered per backend, backend needs to be initialised before any device tree can be parsed. PDBG_BACKEND_DTB allowed to override backend device tree without specifying backend, which cannot work any more. To be able to dynamically update backend introduce PDBG_BACKEND and PDBG_BACKEND_OPTION variables instead of PDBG_BACKEND_DTB. Signed-off-by: Amitay Isaacs --- libpdbg/dtb.c | 30 ++++++++++++++++++++++-------- tests/test_p9_fapi_translation.sh | 2 +- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index ef51718..077bc62 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -308,21 +308,36 @@ const char *pdbg_get_backend_option(void) struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) { struct pdbg_dtb *dtb = &pdbg_dtb; - const char *fdt; + const char *fdt, *backend; dtb->backend.fdt = NULL; dtb->system.fdt = system_fdt; - fdt = getenv("PDBG_BACKEND_DTB"); - if (fdt) - mmap_dtb(fdt, false, &dtb->backend); - fdt = getenv("PDBG_DTB"); if (fdt) mmap_dtb(fdt, false, &dtb->system); - if (dtb->backend.fdt && dtb->system.fdt) - goto done; + backend = getenv("PDBG_BACKEND"); + if (backend) { + const char *arg; + + arg = getenv("PDBG_BACKEND_OPTION"); + + if (!strcmp(backend, "fsi")) + pdbg_set_backend(PDBG_BACKEND_FSI, arg); + else if (!strcmp(backend, "i2c")) + pdbg_set_backend(PDBG_BACKEND_I2C, arg); + else if (!strcmp(backend, "kernel")) + pdbg_set_backend(PDBG_BACKEND_KERNEL, arg); + else if (!strcmp(backend, "fake")) + pdbg_set_backend(PDBG_BACKEND_FAKE, arg); + else if (!strcmp(backend, "host")) + pdbg_set_backend(PDBG_BACKEND_HOST, arg); + else if (!strcmp(backend, "cronus")) + pdbg_set_backend(PDBG_BACKEND_CRONUS, arg); + else + pdbg_log(PDBG_ERROR, "Invalid backend '%s', ignoring\n", backend); + } if (!pdbg_backend) pdbg_backend = default_backend(); @@ -412,7 +427,6 @@ struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) break; } -done: return dtb; } diff --git a/tests/test_p9_fapi_translation.sh b/tests/test_p9_fapi_translation.sh index a5a09b1..9891d39 100755 --- a/tests/test_p9_fapi_translation.sh +++ b/tests/test_p9_fapi_translation.sh @@ -4,7 +4,7 @@ test_group "p9 fapi translation tests" -export PDBG_BACKEND_DTB=p9-kernel.dtb +export PDBG_BACKEND=kernel export PDBG_DTB=p9.dtb test_result 0 < References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-8-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/bmcfsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpdbg/bmcfsi.c b/libpdbg/bmcfsi.c index 2639595..2f199fa 100644 --- a/libpdbg/bmcfsi.c +++ b/libpdbg/bmcfsi.c @@ -519,5 +519,5 @@ DECLARE_HW_UNIT(bmcfsi); __attribute__((constructor)) static void register_bmcfsi(void) { - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &bmcfsi_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_FSI, &bmcfsi_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:32 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:32 +1000 Subject: [Pdbg] [PATCH v3 08/25] libpdbg: Register i2c driver with i2c backend In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-9-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpdbg/i2c.c b/libpdbg/i2c.c index 3d0b80a..e3d508b 100644 --- a/libpdbg/i2c.c +++ b/libpdbg/i2c.c @@ -177,5 +177,5 @@ DECLARE_HW_UNIT(p8_i2c_pib); __attribute__((constructor)) static void register_i2c(void) { - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_i2c_pib_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_I2C, &p8_i2c_pib_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:33 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:33 +1000 Subject: [Pdbg] [PATCH v3 09/25] libpdbg: Register kernel drivers with kernel backend In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-10-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/kernel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libpdbg/kernel.c b/libpdbg/kernel.c index c4637a7..3024736 100644 --- a/libpdbg/kernel.c +++ b/libpdbg/kernel.c @@ -264,6 +264,6 @@ DECLARE_HW_UNIT(kernel_pib); __attribute__((constructor)) static void register_kernel(void) { - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_fsi_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_pib_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_KERNEL, &kernel_fsi_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_KERNEL, &kernel_pib_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:34 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:34 +1000 Subject: [Pdbg] [PATCH v3 10/25] libpdbg: Register fake drivers with fake backend In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-11-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/fake.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libpdbg/fake.c b/libpdbg/fake.c index ae02463..64925d4 100644 --- a/libpdbg/fake.c +++ b/libpdbg/fake.c @@ -90,8 +90,8 @@ DECLARE_HW_UNIT(fake_thread); __attribute__((constructor)) static void register_fake(void) { - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_fsi_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_pib_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_core_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_thread_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_FAKE, &fake_fsi_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_FAKE, &fake_pib_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_FAKE, &fake_core_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_FAKE, &fake_thread_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:35 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:35 +1000 Subject: [Pdbg] [PATCH v3 11/25] libpdbg: Register host drivers with host backend In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-12-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpdbg/host.c b/libpdbg/host.c index d02b53d..63a0d5b 100644 --- a/libpdbg/host.c +++ b/libpdbg/host.c @@ -127,5 +127,5 @@ DECLARE_HW_UNIT(host_pib); __attribute__((constructor)) static void register_host(void) { - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &host_pib_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_HOST, &host_pib_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:36 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:36 +1000 Subject: [Pdbg] [PATCH v3 12/25] libpdbg: Register cronus drivers with cronus backend In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-13-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/cronus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libpdbg/cronus.c b/libpdbg/cronus.c index 23d555b..eeaedc5 100644 --- a/libpdbg/cronus.c +++ b/libpdbg/cronus.c @@ -219,7 +219,7 @@ DECLARE_HW_UNIT(cronus_sbefifo); __attribute__((constructor)) static void register_cronus(void) { - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_pib_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_fsi_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_sbefifo_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_CRONUS, &cronus_pib_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_CRONUS, &cronus_fsi_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_CRONUS, &cronus_sbefifo_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:37 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:37 +1000 Subject: [Pdbg] [PATCH v3 13/25] dts: Backend device trees must use specific driver In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-14-amitay@ozlabs.org> Specific backend must always use specific drivers for backend specific devices. All other devices which appear in system device tree can potentially match multiple drivers depending on the backend. Signed-off-by: Amitay Isaacs --- p8-fsi.dts.m4 | 6 +++--- p8-i2c.dts.m4 | 4 ++-- p8-kernel.dts.m4 | 4 ++-- p9-fsi.dtsi.m4 | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/p8-fsi.dts.m4 b/p8-fsi.dts.m4 index 70fdb14..8d10966 100644 --- a/p8-fsi.dts.m4 +++ b/p8-fsi.dts.m4 @@ -26,7 +26,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x0>; system-path = "/proc0/pib"; }; @@ -44,7 +44,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x1>; system-path = "/proc1/pib"; }; @@ -64,7 +64,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x2>; system-path = "/proc2/pib"; }; diff --git a/p8-i2c.dts.m4 b/p8-i2c.dts.m4 index 3ea4b59..a7a18a2 100644 --- a/p8-i2c.dts.m4 +++ b/p8-i2c.dts.m4 @@ -34,7 +34,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x1>; system-path = "/proc1/pib"; }; @@ -53,7 +53,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x2>; system-path = "/proc2/pib"; }; diff --git a/p8-kernel.dts.m4 b/p8-kernel.dts.m4 index 6eacb92..b00ed54 100644 --- a/p8-kernel.dts.m4 +++ b/p8-kernel.dts.m4 @@ -18,7 +18,7 @@ #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; index = <0x0>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; system-path = "/proc0/pib"; }; @@ -35,7 +35,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x1>; system-path = "/proc1/pib"; }; diff --git a/p9-fsi.dtsi.m4 b/p9-fsi.dtsi.m4 index 3bbe43d..ab3c2e1 100644 --- a/p9-fsi.dtsi.m4 +++ b/p9-fsi.dtsi.m4 @@ -17,7 +17,7 @@ #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; index = <0x0>; - compatible = "ibm,fsi-pib", "ibm,power9-fsi-pib"; + compatible = "ibm,fsi-pib"; system-path = "/proc0/pib"; }; @@ -35,7 +35,7 @@ #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; index = <0x1>; - compatible = "ibm,fsi-pib", "ibm,power9-fsi-pib"; + compatible = "ibm,fsi-pib"; system-path = "/proc1/pib"; }; }; -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:38 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:38 +1000 Subject: [Pdbg] [PATCH v3 14/25] libpdbg: Rename ibm, processor -> ibm, power-proc In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-15-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/chip.c | 2 +- p8.dts.m4 | 2 +- p9.dts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libpdbg/chip.c b/libpdbg/chip.c index b961e87..848a831 100644 --- a/libpdbg/chip.c +++ b/libpdbg/chip.c @@ -670,7 +670,7 @@ int thread_getregs(struct pdbg_target *thread, struct thread_regs *regs) static struct proc proc = { .target = { .name = "Processor Module", - .compatible = "ibm,processor", + .compatible = "ibm,power-proc", .class = "proc", }, }; diff --git a/p8.dts.m4 b/p8.dts.m4 index a508e02..42e1167 100644 --- a/p8.dts.m4 +++ b/p8.dts.m4 @@ -1,7 +1,7 @@ define(`PROC',` define(`PROC_ID',`$1')dnl proc$1 { - compatible = "ibm,power8-proc", "ibm,processor"; + compatible = "ibm,power8-proc", "ibm,power-proc"; index = <$1>; fsi { diff --git a/p9.dts b/p9.dts index 2d3fed2..4eb910b 100644 --- a/p9.dts +++ b/p9.dts @@ -7,7 +7,7 @@ }; proc0 { - compatible = "ibm,power9-proc", "ibm,processor"; + compatible = "ibm,power9-proc", "ibm,power-proc"; index = < 0x00 >; fsi { @@ -1723,7 +1723,7 @@ }; proc1 { - compatible = "ibm,power9-proc", "ibm,processor"; + compatible = "ibm,power9-proc", "ibm,power-proc"; index = < 0x01 >; fsi { -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:39 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:39 +1000 Subject: [Pdbg] [PATCH v3 15/25] dts: Add a generic compatible property for core and thread In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-16-amitay@ozlabs.org> This allows different drivers to be loaded automatically depending on the specified backend. Signed-off-by: Amitay Isaacs --- p9.dts | 480 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 240 insertions(+), 240 deletions(-) diff --git a/p9.dts b/p9.dts index 4eb910b..968c0f2 100644 --- a/p9.dts +++ b/p9.dts @@ -379,33 +379,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x00 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -423,33 +423,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x01 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -475,33 +475,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x02 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -519,33 +519,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x03 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -587,33 +587,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x04 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -631,33 +631,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x05 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -683,33 +683,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x06 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -727,33 +727,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x07 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -795,33 +795,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x08 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -839,33 +839,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x09 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -891,33 +891,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0a >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -935,33 +935,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0b >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1003,33 +1003,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0c >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1047,33 +1047,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0d >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1099,33 +1099,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0e >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1143,33 +1143,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0f >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1211,33 +1211,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x10 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1255,33 +1255,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x11 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1307,33 +1307,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x12 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1351,33 +1351,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x13 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1419,33 +1419,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x14 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1463,33 +1463,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x15 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1515,33 +1515,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x16 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1559,33 +1559,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x17 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2095,33 +2095,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x00 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2139,33 +2139,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x01 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2191,33 +2191,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x02 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2235,33 +2235,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x03 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2303,33 +2303,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x04 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2347,33 +2347,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x05 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2399,33 +2399,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x06 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2443,33 +2443,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x07 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2511,33 +2511,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x08 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2555,33 +2555,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x09 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2607,33 +2607,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0a >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2651,33 +2651,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0b >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2719,33 +2719,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0c >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2763,33 +2763,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0d >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2815,33 +2815,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0e >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2859,33 +2859,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0f >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2927,33 +2927,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x10 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2971,33 +2971,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x11 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3023,33 +3023,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x12 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3067,33 +3067,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x13 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3135,33 +3135,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x14 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3179,33 +3179,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x15 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3231,33 +3231,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x16 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3275,33 +3275,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x17 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:40 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:40 +1000 Subject: [Pdbg] [PATCH v3 16/25] libpdbg: Add sbefifo backend In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-17-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/libpdbg.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h index 1c974f5..bdc6cea 100644 --- a/libpdbg/libpdbg.h +++ b/libpdbg/libpdbg.h @@ -142,7 +142,6 @@ enum pdbg_target_status { PDBG_TARGET_RELEASED, }; - /** * @brief Describes the various methods (referred to as backends) for * accessing hardware depending on where the code is executed. @@ -197,6 +196,12 @@ enum pdbg_backend { * the BMC network address / hostname. For example p9 at spoon2-bmc. */ PDBG_BACKEND_CRONUS, + + /** + * This backend uses sbefifo kernel driver on BMC to access hardware + * via SBE. + */ + PDBG_BACKEND_SBEFIFO, }; /** -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:41 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:41 +1000 Subject: [Pdbg] [PATCH v3 17/25] libpdbg: Add pib driver using sbefifo In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-18-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/sbefifo.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 22f11f1..63b5b9c 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -237,6 +237,22 @@ static int sbefifo_op_thread_sreset(struct chipop *chipop, return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_SRESET); } +static int sbefifo_pib_read(struct pib *pib, uint64_t addr, uint64_t *val) +{ + struct sbefifo *sbefifo = target_to_sbefifo(pib->target.parent); + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); + + return sbefifo_scom_get(sctx, addr, val); +} + +static int sbefifo_pib_write(struct pib *pib, uint64_t addr, uint64_t val) +{ + struct sbefifo *sbefifo = target_to_sbefifo(pib->target.parent); + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); + + return sbefifo_scom_put(sctx, addr, val); +} + static struct sbefifo_context *sbefifo_op_get_context(struct sbefifo *sbefifo) { return sbefifo->sf_ctx; @@ -306,6 +322,18 @@ static struct chipop sbefifo_chipop = { }; DECLARE_HW_UNIT(sbefifo_chipop); +static struct pib sbefifo_pib = { + .target = { + .name = "SBE FIFO Chip-op based PIB", + .compatible = "ibm,sbefifo-pib", + .class = "pib", + }, + .read = sbefifo_pib_read, + .write = sbefifo_pib_write, + .fd = -1, +}; +DECLARE_HW_UNIT(sbefifo_pib); + static struct sbefifo kernel_sbefifo = { .target = { .name = "Kernel based FSI SBE FIFO", @@ -323,6 +351,7 @@ static void register_sbefifo(void) { pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_sbefifo_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chipop_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_SBEFIFO, &sbefifo_pib_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_mem_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pba_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:43 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:43 +1000 Subject: [Pdbg] [PATCH v3 19/25] libpdbg: Add all thread procedures to pib target In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-20-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/hwunit.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h index 5bca088..318a611 100644 --- a/libpdbg/hwunit.h +++ b/libpdbg/hwunit.h @@ -93,6 +93,10 @@ struct pib { struct pdbg_target target; int (*read)(struct pib *, uint64_t, uint64_t *); int (*write)(struct pib *, uint64_t, uint64_t); + int (*thread_start_all)(struct pib *); + int (*thread_stop_all)(struct pib *); + int (*thread_step_all)(struct pib *, int); + int (*thread_sreset_all)(struct pib *); void *priv; int fd; }; -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:42 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:42 +1000 Subject: [Pdbg] [PATCH v3 18/25] libpdbg: Add thread driver using sbefifo In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-19-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/sbefifo.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 63b5b9c..7baade8 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -253,6 +253,67 @@ static int sbefifo_pib_write(struct pib *pib, uint64_t addr, uint64_t val) return sbefifo_scom_put(sctx, addr, val); } +static int sbefifo_thread_probe(struct pdbg_target *target) +{ + struct thread *thread = target_to_thread(target); + uint32_t tid; + + assert(!pdbg_target_u32_property(target, "tid", &tid)); + thread->id = tid; + + return 0; +} + +static void sbefifo_thread_release(struct pdbg_target *target) +{ +} + +static int sbefifo_thread_op(struct thread *thread, uint32_t oper) +{ + struct pdbg_target *chiplet = + pdbg_target_require_parent("chiplet", &thread->target); + struct sbefifo *sbefifo = target_to_sbefifo( + pdbg_target_require_parent("sbefifo", &thread->target)); + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); + uint8_t mode = 0; + + /* Enforce special-wakeup for thread stop and sreset */ + if ((oper & 0xf) == SBEFIFO_INSN_OP_STOP || + (oper & 0xf) == SBEFIFO_INSN_OP_SRESET) + mode = 0x2; + + /* This chip-op requires core-id as pervasive (chiplet) id */ + return sbefifo_control_insn(sctx, + pdbg_target_index(chiplet), + thread->id, + oper, + mode); +} +static int sbefifo_thread_start(struct thread *thread) +{ + return sbefifo_thread_op(thread, SBEFIFO_INSN_OP_START); +} + +static int sbefifo_thread_stop(struct thread *thread) +{ + return sbefifo_thread_op(thread, SBEFIFO_INSN_OP_STOP); +} + +static int sbefifo_thread_step(struct thread *thread, int count) +{ + int i, rc = 0; + + for (i = 0; i < count; i++) + rc |= sbefifo_thread_op(thread, SBEFIFO_INSN_OP_STEP); + + return rc; +} + +static int sbefifo_thread_sreset(struct thread *thread) +{ + return sbefifo_thread_op(thread, SBEFIFO_INSN_OP_SRESET); +} + static struct sbefifo_context *sbefifo_op_get_context(struct sbefifo *sbefifo) { return sbefifo->sf_ctx; @@ -334,6 +395,21 @@ static struct pib sbefifo_pib = { }; DECLARE_HW_UNIT(sbefifo_pib); +static struct thread sbefifo_thread = { + .target = { + .name = "SBE FFIO Chip-op based Thread", + .compatible = "ibm,power-thread", + .class = "thread", + .probe = sbefifo_thread_probe, + .release = sbefifo_thread_release, + }, + .start = sbefifo_thread_start, + .stop = sbefifo_thread_stop, + .step = sbefifo_thread_step, + .sreset = sbefifo_thread_sreset, +}; +DECLARE_HW_UNIT(sbefifo_thread); + static struct sbefifo kernel_sbefifo = { .target = { .name = "Kernel based FSI SBE FIFO", @@ -352,6 +428,7 @@ static void register_sbefifo(void) pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_sbefifo_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chipop_hw_unit); pdbg_hwunit_register(PDBG_BACKEND_SBEFIFO, &sbefifo_pib_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_SBEFIFO, &sbefifo_thread_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_mem_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pba_hw_unit); } -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:44 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:44 +1000 Subject: [Pdbg] [PATCH v3 20/25] libpdbg: Implement all thread procedures using sbefifo In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-21-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/sbefifo.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 7baade8..2d903e7 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -253,6 +253,53 @@ static int sbefifo_pib_write(struct pib *pib, uint64_t addr, uint64_t val) return sbefifo_scom_put(sctx, addr, val); } +static int sbefifo_pib_thread_op(struct pib *pib, uint32_t oper) +{ + struct sbefifo *sbefifo = target_to_sbefifo(pib->target.parent); + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); + uint32_t core_id, thread_id; + uint8_t mode = 0; + + /* + * core_id = 0xff (all SMT4 cores) + * thread_id = 0xf (all 4 threads in the SMT4 core) + */ + core_id = 0xff; + thread_id = 0xf; + + /* Enforce special-wakeup for thread stop and sreset */ + if ((oper & 0xf) == SBEFIFO_INSN_OP_STOP || + (oper & 0xf) == SBEFIFO_INSN_OP_SRESET) + mode = 0x2; + + return sbefifo_control_insn(sctx, core_id, thread_id, oper, mode); +} + +static int sbefifo_pib_thread_start(struct pib *pib) +{ + return sbefifo_pib_thread_op(pib, SBEFIFO_INSN_OP_START); +} + +static int sbefifo_pib_thread_stop(struct pib *pib) +{ + return sbefifo_pib_thread_op(pib, SBEFIFO_INSN_OP_STOP); +} + +static int sbefifo_pib_thread_step(struct pib *pib, int count) +{ + int i, rc = 0; + + for (i = 0; i < count; i++) + rc |= sbefifo_pib_thread_op(pib, SBEFIFO_INSN_OP_STEP); + + return rc; +} + +static int sbefifo_pib_thread_sreset(struct pib *pib) +{ + return sbefifo_pib_thread_op(pib, SBEFIFO_INSN_OP_SRESET); +} + static int sbefifo_thread_probe(struct pdbg_target *target) { struct thread *thread = target_to_thread(target); @@ -391,6 +438,10 @@ static struct pib sbefifo_pib = { }, .read = sbefifo_pib_read, .write = sbefifo_pib_write, + .thread_start_all = sbefifo_pib_thread_start, + .thread_stop_all = sbefifo_pib_thread_stop, + .thread_step_all = sbefifo_pib_thread_step, + .thread_sreset_all = sbefifo_pib_thread_sreset, .fd = -1, }; DECLARE_HW_UNIT(sbefifo_pib); -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:45 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:45 +1000 Subject: [Pdbg] [PATCH v3 21/25] libpdbg: Remove special case thread procedures using sbefifo In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-22-amitay@ozlabs.org> Always check if the all thread procedures are provided by pib. If not, use individual thread operations. Signed-off-by: Amitay Isaacs --- libpdbg/chip.c | 60 +++++++++++++++++--------------------------------- 1 file changed, 20 insertions(+), 40 deletions(-) diff --git a/libpdbg/chip.c b/libpdbg/chip.c index 848a831..86e91bd 100644 --- a/libpdbg/chip.c +++ b/libpdbg/chip.c @@ -156,21 +156,16 @@ int thread_sreset(struct pdbg_target *thread_target) int thread_step_all(void) { - struct pdbg_target *pib, *thread; + struct pdbg_target *target, *thread; int rc = 0, count = 0; - pdbg_for_each_class_target("pib", pib) { - struct chipop *chipop; + pdbg_for_each_class_target("pib", target) { + struct pib *pib = target_to_pib(target); - chipop = pib_to_chipop(pib); - if (!chipop) + if (!pib->thread_step_all) break; - /* - * core_id = 0xff (all SMT4 cores) - * thread_id = 0xf (all 4 threads in the SMT4 core) - */ - rc |= chipop->thread_step(chipop, 0xff, 0xf); + rc |= pib->thread_step_all(pib, 1); count++; } @@ -189,21 +184,16 @@ int thread_step_all(void) int thread_start_all(void) { - struct pdbg_target *pib, *thread; + struct pdbg_target *target, *thread; int rc = 0, count = 0; - pdbg_for_each_class_target("pib", pib) { - struct chipop *chipop; + pdbg_for_each_class_target("pib", target) { + struct pib *pib = target_to_pib(target); - chipop = pib_to_chipop(pib); - if (!chipop) + if (!pib->thread_start_all) break; - /* - * core_id = 0xff (all SMT4 cores) - * thread_id = 0xf (all 4 threads in the SMT4 core) - */ - rc |= chipop->thread_start(chipop, 0xff, 0xf); + rc |= pib->thread_start_all(pib); count++; } @@ -222,21 +212,16 @@ int thread_start_all(void) int thread_stop_all(void) { - struct pdbg_target *pib, *thread; + struct pdbg_target *target, *thread; int rc = 0, count = 0; - pdbg_for_each_class_target("pib", pib) { - struct chipop *chipop; + pdbg_for_each_class_target("pib", target) { + struct pib *pib = target_to_pib(target); - chipop = pib_to_chipop(pib); - if (!chipop) + if (!pib->thread_stop_all) break; - /* - * core_id = 0xff (all SMT4 cores) - * thread_id = 0xf (all 4 threads in the SMT4 core) - */ - rc |= chipop->thread_stop(chipop, 0xff, 0xf); + rc |= pib->thread_stop_all(pib); count++; } @@ -255,21 +240,16 @@ int thread_stop_all(void) int thread_sreset_all(void) { - struct pdbg_target *pib, *thread; + struct pdbg_target *target, *thread; int rc = 0, count = 0; - pdbg_for_each_class_target("pib", pib) { - struct chipop *chipop; + pdbg_for_each_class_target("pib", target) { + struct pib *pib = target_to_pib(target); - chipop = pib_to_chipop(pib); - if (!chipop) + if (!pib->thread_sreset_all) break; - /* - * core_id = 0xff (all SMT4 cores) - * thread_id = 0xf (all 4 threads in the SMT4 core) - */ - rc |= chipop->thread_sreset(chipop, 0xff, 0xf); + rc |= pib->thread_sreset_all(pib); count++; } -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:46 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:46 +1000 Subject: [Pdbg] [PATCH v3 22/25] libpdbg: Drop thread procedures from chipop target In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-23-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/hwunit.h | 4 ---- libpdbg/sbefifo.c | 46 ---------------------------------------------- 2 files changed, 50 deletions(-) diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h index 318a611..de929da 100644 --- a/libpdbg/hwunit.h +++ b/libpdbg/hwunit.h @@ -75,10 +75,6 @@ struct chipop { int (*istep)(struct chipop *, uint32_t major, uint32_t minor); int (*mpipl_enter)(struct chipop *); int (*mpipl_continue)(struct chipop *); - int (*thread_start)(struct chipop *, uint32_t core_id, uint32_t thread_id); - int (*thread_stop)(struct chipop *, uint32_t core_id, uint32_t thread_id); - int (*thread_step)(struct chipop *, uint32_t core_id, uint32_t thread_id); - int (*thread_sreset)(struct chipop *, uint32_t core_id, uint32_t thread_id); }; #define target_to_chipop(x) container_of(x, struct chipop, target) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 2d903e7..77a0f26 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -195,48 +195,6 @@ static int sbefifo_op_mpipl_enter(struct chipop *chipop) return sbefifo_mpipl_enter(sctx); } -static int sbefifo_op_control(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id, - uint32_t oper) -{ - struct sbefifo *sbefifo = target_to_sbefifo(chipop->target.parent); - struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); - uint8_t mode = 0; - - /* Enforce special-wakeup for thread stop and sreset */ - if ((oper & 0xf) == SBEFIFO_INSN_OP_STOP || - (oper & 0xf) == SBEFIFO_INSN_OP_SRESET) - mode = 0x2; - - PR_NOTICE("sbefifo: control c:0x%x, t:0x%x, op:%u mode:%u\n", core_id, thread_id, oper, mode); - - return sbefifo_control_insn(sctx, core_id & 0xff, thread_id & 0xff, oper & 0xff, mode); -} - -static int sbefifo_op_thread_start(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id) -{ - return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_START); -} - -static int sbefifo_op_thread_stop(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id) -{ - return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_STOP); -} - -static int sbefifo_op_thread_step(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id) -{ - return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_STEP); -} - -static int sbefifo_op_thread_sreset(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id) -{ - return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_SRESET); -} - static int sbefifo_pib_read(struct pib *pib, uint64_t addr, uint64_t *val) { struct sbefifo *sbefifo = target_to_sbefifo(pib->target.parent); @@ -423,10 +381,6 @@ static struct chipop sbefifo_chipop = { .istep = sbefifo_op_istep, .mpipl_enter = sbefifo_op_mpipl_enter, .mpipl_continue = sbefifo_op_mpipl_continue, - .thread_start = sbefifo_op_thread_start, - .thread_stop = sbefifo_op_thread_stop, - .thread_step = sbefifo_op_thread_step, - .thread_sreset = sbefifo_op_thread_sreset, }; DECLARE_HW_UNIT(sbefifo_chipop); -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:47 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:47 +1000 Subject: [Pdbg] [PATCH v3 23/25] dts: Add sbefifo backend device tree In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-24-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- Makefile.am | 1 + p9-sbefifo.dts.m4 | 86 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 p9-sbefifo.dts.m4 diff --git a/Makefile.am b/Makefile.am index 10306dc..74ad99f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -80,6 +80,7 @@ endif DT = fake.dts fake2.dts p8-cronus.dts p9-cronus.dts \ p8-fsi.dts p8-i2c.dts p8-kernel.dts \ p9w-fsi.dts p9r-fsi.dts p9z-fsi.dts p9-kernel.dts \ + p9-sbefifo.dts \ p8-host.dts p9-host.dts p8.dts DT_sources = $(DT:.dts=.dtb.S) p9.dtb.S diff --git a/p9-sbefifo.dts.m4 b/p9-sbefifo.dts.m4 new file mode 100644 index 0000000..48b3051 --- /dev/null +++ b/p9-sbefifo.dts.m4 @@ -0,0 +1,86 @@ +/dts-v1/; + +/ { + #address-cells = <0x1>; + #size-cells = <0x0>; + + fsi0: kernelfsi at 0 { + #address-cells = <0x2>; + #size-cells = <0x1>; + compatible = "ibm,kernel-fsi"; + reg = <0x0 0x0 0x0>; + index = <0x0>; + status = "mustexist"; + system-path = "/proc0/fsi"; + + sbefifo at 2400 { /* Bogus address */ + reg = <0x0 0x2400 0x7>; + index = <0x0>; + compatible = "ibm,kernel-sbefifo"; + device-path = "/dev/sbefifo1"; + + sbefifo-pib { + #address-cells = <0x2>; + #size-cells = <0x1>; + index = <0x0>; + compatible = "ibm,sbefifo-pib"; + system-path = "/proc0/pib"; + }; + + sbefifo-mem { + compatible = "ibm,sbefifo-mem"; + system-path = "/mem0"; + }; + + sbefifo-pba { + compatible = "ibm,sbefifo-mem-pba"; + system-path = "/mempba0"; + }; + + sbefifo-chipop { + compatible = "ibm,sbefifo-chipop"; + index = <0x0>; + }; + }; + + hmfsi at 100000 { + #address-cells = <0x2>; + #size-cells = <0x1>; + compatible = "ibm,fsi-hmfsi"; + reg = <0x0 0x100000 0x8000>; + port = <0x1>; + index = <0x1>; + system-path = "/proc1/fsi"; + + sbefifo at 2400 { /* Bogus address */ + reg = <0x0 0x2400 0x7>; + index = <0x1>; + compatible = "ibm,kernel-sbefifo"; + device-path = "/dev/sbefifo2"; + + sbefifo-pib { + #address-cells = <0x2>; + #size-cells = <0x1>; + index = <0x1>; + compatible = "ibm,sbefifo-pib"; + system-path = "/proc1/pib"; + }; + + sbefifo-mem { + compatible = "ibm,sbefifo-mem"; + system-path = "/mem1"; + }; + + sbefifo-pba { + compatible = "ibm,sbefifo-mem-pba"; + system-path = "/mempba1"; + }; + + sbefifo-chipop { + compatible = "ibm,sbefifo-chipop"; + index = <0x1>; + }; + }; + }; + }; +}; -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:48 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:48 +1000 Subject: [Pdbg] [PATCH v3 24/25] libpdbg: Enable sbefifo backend In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-25-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/dtb.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index 077bc62..65d93eb 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -43,6 +43,7 @@ #include "p9-host.dt.h" #include "p8-cronus.dt.h" #include "p9-cronus.dt.h" +#include "p9-sbefifo.dt.h" #include "p8.dt.h" #include "p9.dt.h" @@ -417,6 +418,24 @@ struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) } break; + case PDBG_BACKEND_SBEFIFO: + if (!pdbg_backend_option) { + pdbg_log(PDBG_ERROR, "No system type specified\n"); + pdbg_log(PDBG_ERROR, "Use p9\n"); + return NULL; + } + + if (!strcmp(pdbg_backend_option, "p9")) { + if (!dtb->backend.fdt) + dtb->backend.fdt = &_binary_p9_sbefifo_dtb_o_start; + if (!dtb->system.fdt) + dtb->system.fdt = &_binary_p9_dtb_o_start; + } else { + pdbg_log(PDBG_ERROR, "Invalid system type %s\n", pdbg_backend_option); + pdbg_log(PDBG_ERROR, "Use p9\n"); + } + break; + default: pdbg_log(PDBG_WARNING, "Unable to determine a valid default backend, using fake backend for testing purposes\n"); /* Fall through */ -- 2.25.2 From amitay at ozlabs.org Fri Apr 17 17:07:49 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Fri, 17 Apr 2020 17:07:49 +1000 Subject: [Pdbg] [PATCH v3 25/25] main: Add sbefifo backend In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> Message-ID: <20200417070749.276754-26-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- src/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.c b/src/main.c index 785dc26..5a5616d 100644 --- a/src/main.c +++ b/src/main.c @@ -149,6 +149,7 @@ static void print_usage(void) printf("\t\tRun command on all possible processors/chips/threads (default)\n"); printf("\t-b, --backend=backend\n"); printf("\t\tcronus:\tA backend based on cronus server\n"); + printf("\t\tsbefifo:\tA backend using sbefifo kernel driver\n"); printf("\t\tfsi:\tAn experimental backend that uses\n"); printf("\t\t\tbit-banging to access the host processor\n"); printf("\t\t\tvia the FSI bus.\n"); @@ -392,6 +393,8 @@ static bool parse_options(int argc, char *argv[]) backend = PDBG_BACKEND_HOST; } else if (strcmp(optarg, "cronus") == 0) { backend = PDBG_BACKEND_CRONUS; + } else if (strcmp(optarg, "sbefifo") == 0) { + backend = PDBG_BACKEND_SBEFIFO; } else { fprintf(stderr, "Invalid backend '%s'\n", optarg); opt_error = true; -- 2.25.2 From alistair at popple.id.au Mon Apr 20 12:36:10 2020 From: alistair at popple.id.au (Alistair Popple) Date: Mon, 20 Apr 2020 12:36:10 +1000 Subject: [Pdbg] [PATCH v3 05/25] libpdbg: Use const char * for filenames In-Reply-To: <20200417070749.276754-6-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> <20200417070749.276754-6-amitay@ozlabs.org> Message-ID: <5448943.fN962SW3MQ@townsend> Reviewed-by: Alistair Popple On Friday, 17 April 2020 5:07:29 PM AEST Amitay Isaacs wrote: > Signed-off-by: Amitay Isaacs > --- > libpdbg/dtb.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c > index 70b7962..ef51718 100644 > --- a/libpdbg/dtb.c > +++ b/libpdbg/dtb.c > @@ -234,7 +234,7 @@ static void bmc_target(struct pdbg_dtb *dtb) > } > > /* Opens a dtb at the given path */ > -static void mmap_dtb(char *file, bool readonly, struct pdbg_mfile *mfile) > +static void mmap_dtb(const char *file, bool readonly, struct pdbg_mfile > *mfile) { > int fd; > void *dtb; > @@ -308,7 +308,7 @@ const char *pdbg_get_backend_option(void) > struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) > { > struct pdbg_dtb *dtb = &pdbg_dtb; > - char *fdt; > + const char *fdt; > > dtb->backend.fdt = NULL; > dtb->system.fdt = system_fdt; From alistair at popple.id.au Mon Apr 20 12:46:58 2020 From: alistair at popple.id.au (Alistair Popple) Date: Mon, 20 Apr 2020 12:46:58 +1000 Subject: [Pdbg] [PATCH v3 06/25] libpdbg: Backend device tree cannot be overriden In-Reply-To: <20200417070749.276754-7-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> <20200417070749.276754-7-amitay@ozlabs.org> Message-ID: <26935617.f4RpbUh8X3@townsend> Reviewed-by: Alistair Popple On Friday, 17 April 2020 5:07:30 PM AEST Amitay Isaacs wrote: > With drivers getting registered per backend, backend needs to be > initialised before any device tree can be parsed. PDBG_BACKEND_DTB > allowed to override backend device tree without specifying backend, > which cannot work any more. > > To be able to dynamically update backend introduce PDBG_BACKEND and > PDBG_BACKEND_OPTION variables instead of PDBG_BACKEND_DTB. > > Signed-off-by: Amitay Isaacs > --- > libpdbg/dtb.c | 30 ++++++++++++++++++++++-------- > tests/test_p9_fapi_translation.sh | 2 +- > 2 files changed, 23 insertions(+), 9 deletions(-) > > diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c > index ef51718..077bc62 100644 > --- a/libpdbg/dtb.c > +++ b/libpdbg/dtb.c > @@ -308,21 +308,36 @@ const char *pdbg_get_backend_option(void) > struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) > { > struct pdbg_dtb *dtb = &pdbg_dtb; > - const char *fdt; > + const char *fdt, *backend; > > dtb->backend.fdt = NULL; > dtb->system.fdt = system_fdt; > > - fdt = getenv("PDBG_BACKEND_DTB"); > - if (fdt) > - mmap_dtb(fdt, false, &dtb->backend); > - > fdt = getenv("PDBG_DTB"); > if (fdt) > mmap_dtb(fdt, false, &dtb->system); > > - if (dtb->backend.fdt && dtb->system.fdt) > - goto done; > + backend = getenv("PDBG_BACKEND"); > + if (backend) { > + const char *arg; > + > + arg = getenv("PDBG_BACKEND_OPTION"); > + > + if (!strcmp(backend, "fsi")) > + pdbg_set_backend(PDBG_BACKEND_FSI, arg); > + else if (!strcmp(backend, "i2c")) > + pdbg_set_backend(PDBG_BACKEND_I2C, arg); > + else if (!strcmp(backend, "kernel")) > + pdbg_set_backend(PDBG_BACKEND_KERNEL, arg); > + else if (!strcmp(backend, "fake")) > + pdbg_set_backend(PDBG_BACKEND_FAKE, arg); > + else if (!strcmp(backend, "host")) > + pdbg_set_backend(PDBG_BACKEND_HOST, arg); > + else if (!strcmp(backend, "cronus")) > + pdbg_set_backend(PDBG_BACKEND_CRONUS, arg); > + else > + pdbg_log(PDBG_ERROR, "Invalid backend '%s', ignoring\n", backend); > + } > > if (!pdbg_backend) > pdbg_backend = default_backend(); > @@ -412,7 +427,6 @@ struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) > break; > } > > -done: > return dtb; > } > > diff --git a/tests/test_p9_fapi_translation.sh > b/tests/test_p9_fapi_translation.sh index a5a09b1..9891d39 100755 > --- a/tests/test_p9_fapi_translation.sh > +++ b/tests/test_p9_fapi_translation.sh > @@ -4,7 +4,7 @@ > > test_group "p9 fapi translation tests" > > -export PDBG_BACKEND_DTB=p9-kernel.dtb > +export PDBG_BACKEND=kernel > export PDBG_DTB=p9.dtb > > test_result 0 < References: <20200417070749.276754-1-amitay@ozlabs.org> <20200417070749.276754-19-amitay@ozlabs.org> Message-ID: <3630804.tYZQIfVsnt@townsend> On Friday, 17 April 2020 5:07:42 PM AEST Amitay Isaacs wrote: > +static int sbefifo_thread_op(struct thread *thread, uint32_t oper) > +{ > + struct pdbg_target *chiplet = > + pdbg_target_require_parent("chiplet", &thread->target); > + struct sbefifo *sbefifo = target_to_sbefifo( > + pdbg_target_require_parent("sbefifo", &thread->target)); How does this work? I'm guessing because you're assuming that because the SBEFIFO backend is selected you must have the SBEFIFO PIB driver (and therefore the SBEFIFO) as a parent of the thread target? - Alistair > + struct sbefifo_context *sctx = > sbefifo->get_sbefifo_context(sbefifo); + uint8_t mode = 0; > + From amitay at ozlabs.org Mon Apr 20 14:32:51 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Mon, 20 Apr 2020 14:32:51 +1000 Subject: [Pdbg] [PATCH v3 18/25] libpdbg: Add thread driver using sbefifo In-Reply-To: <3630804.tYZQIfVsnt@townsend> References: <20200417070749.276754-1-amitay@ozlabs.org> <20200417070749.276754-19-amitay@ozlabs.org> <3630804.tYZQIfVsnt@townsend> Message-ID: On Mon, 2020-04-20 at 13:14 +1000, Alistair Popple wrote: > On Friday, 17 April 2020 5:07:42 PM AEST Amitay Isaacs wrote: > > +static int sbefifo_thread_op(struct thread *thread, uint32_t oper) > > +{ > > + struct pdbg_target *chiplet = > > + pdbg_target_require_parent("chiplet", &thread- > > >target); > > + struct sbefifo *sbefifo = target_to_sbefifo( > > + pdbg_target_require_parent("sbefifo", &thread- > > >target)); > > How does this work? I'm guessing because you're assuming that because > the > SBEFIFO backend is selected you must have the SBEFIFO PIB driver > (and > therefore the SBEFIFO) as a parent of the thread target? Correct. We do make such assumptions elsewhere also. I am open to suggestions if you prefer some alternate way. > > - Alistair > > > + struct sbefifo_context *sctx = > > sbefifo->get_sbefifo_context(sbefifo); + uint8_t mode = 0; > > + > > > Amitay. -- In theory there is no difference between theory and practise. In practice, there is. - Yogi Berra From amitay at ozlabs.org Tue Apr 21 14:16:38 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 21 Apr 2020 14:16:38 +1000 Subject: [Pdbg] [PATCH v4 02/19] libsbefifo: Use the correct sized pointer In-Reply-To: <20200421041655.82856-1-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> Message-ID: <20200421041655.82856-3-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libsbefifo/cmd_scom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsbefifo/cmd_scom.c b/libsbefifo/cmd_scom.c index bc9b5f9..bb44e5e 100644 --- a/libsbefifo/cmd_scom.c +++ b/libsbefifo/cmd_scom.c @@ -24,7 +24,7 @@ static int sbefifo_scom_get_push(uint64_t addr, uint8_t **buf, uint32_t *buflen) { - uint8_t *msg; + uint32_t *msg; uint32_t nwords, cmd; nwords = 4; @@ -83,7 +83,7 @@ int sbefifo_scom_get(struct sbefifo_context *sctx, uint64_t addr, uint64_t *valu static int sbefifo_scom_put_push(uint64_t addr, uint64_t value, uint8_t **buf, uint32_t *buflen) { - uint8_t *msg; + uint32_t *msg; uint32_t nwords, cmd; nwords = 6; -- 2.25.3 From amitay at ozlabs.org Tue Apr 21 14:16:37 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 21 Apr 2020 14:16:37 +1000 Subject: [Pdbg] [PATCH v4 01/19] libsbefifo: Fix compilation error for undefined variable In-Reply-To: <20200421041655.82856-1-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> Message-ID: <20200421041655.82856-2-amitay@ozlabs.org> We didn't hit this because of the LOG() macro which is only enabled with -DLIBSBEFIFO_DEBUG=1. Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libsbefifo/operation.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libsbefifo/operation.c b/libsbefifo/operation.c index 07d9f64..8717f15 100644 --- a/libsbefifo/operation.c +++ b/libsbefifo/operation.c @@ -60,17 +60,18 @@ static int sbefifo_transport(struct sbefifo_context *sctx, uint8_t *msg, uint32_ int rc; size_t buflen; + buflen = msg_len; rc = sbefifo_write(sctx, msg, buflen); if (rc) { - LOG("write: cmd=%08x, rc=%d\n", cmd, rc); + LOG("write: cmd=%08x, rc=%d\n", be32toh(*(uint32_t *)(msg+4)), rc); return rc; } buflen = *out_len; rc = sbefifo_read(sctx, out, &buflen); if (rc) { - LOG("read: cmd=%08x, buflen=%zu, rc=%d\n", cmd, buflen, rc); + LOG("read: cmd=%08x, buflen=%zu, rc=%d\n", be32toh(*(uint32_t *)(msg+4)), buflen, rc); return rc; } -- 2.25.3 From amitay at ozlabs.org Tue Apr 21 14:16:40 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 21 Apr 2020 14:16:40 +1000 Subject: [Pdbg] [PATCH v4 04/19] libpdbg: Register hwunit drivers per backend In-Reply-To: <20200421041655.82856-1-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> Message-ID: <20200421041655.82856-5-amitay@ozlabs.org> This will allow to load backend specific drivers first. When searching for drivers, match all compatible strings to backend specific drivers first and then match all compatible strings to default backend. All the drivers are registered with the default backend, so this patch does not change libpdbg behaviour. Signed-off-by: Amitay Isaacs --- libpdbg/adu.c | 4 +-- libpdbg/bmcfsi.c | 2 +- libpdbg/cfam.c | 8 +++--- libpdbg/chip.c | 2 +- libpdbg/cronus.c | 6 ++--- libpdbg/device.c | 15 +++-------- libpdbg/fake.c | 8 +++--- libpdbg/host.c | 2 +- libpdbg/htm.c | 6 ++--- libpdbg/hwunit.c | 51 +++++++++++++++++++++++++++++++------- libpdbg/hwunit.h | 5 ++-- libpdbg/i2c.c | 2 +- libpdbg/kernel.c | 4 +-- libpdbg/p8chip.c | 4 +-- libpdbg/p9_fapi_targets.c | 52 +++++++++++++++++++-------------------- libpdbg/p9chip.c | 4 +-- libpdbg/sbefifo.c | 8 +++--- 17 files changed, 105 insertions(+), 78 deletions(-) diff --git a/libpdbg/adu.c b/libpdbg/adu.c index df610a7..fe60118 100644 --- a/libpdbg/adu.c +++ b/libpdbg/adu.c @@ -597,6 +597,6 @@ DECLARE_HW_UNIT(p9_adu); __attribute__((constructor)) static void register_adu(void) { - pdbg_hwunit_register(&p8_adu_hw_unit); - pdbg_hwunit_register(&p9_adu_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_adu_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_adu_hw_unit); } diff --git a/libpdbg/bmcfsi.c b/libpdbg/bmcfsi.c index 1d2e304..2639595 100644 --- a/libpdbg/bmcfsi.c +++ b/libpdbg/bmcfsi.c @@ -519,5 +519,5 @@ DECLARE_HW_UNIT(bmcfsi); __attribute__((constructor)) static void register_bmcfsi(void) { - pdbg_hwunit_register(&bmcfsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &bmcfsi_hw_unit); } diff --git a/libpdbg/cfam.c b/libpdbg/cfam.c index da4c5fc..0b0b6f0 100644 --- a/libpdbg/cfam.c +++ b/libpdbg/cfam.c @@ -353,8 +353,8 @@ DECLARE_HW_UNIT(cfam_hmfsi); __attribute__((constructor)) static void register_cfam(void) { - pdbg_hwunit_register(&fsi_pib_hw_unit); - pdbg_hwunit_register(&p8_opb_hw_unit); - pdbg_hwunit_register(&p8_opb_hmfsi_hw_unit); - pdbg_hwunit_register(&cfam_hmfsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fsi_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_opb_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_opb_hmfsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cfam_hmfsi_hw_unit); } diff --git a/libpdbg/chip.c b/libpdbg/chip.c index b45cffa..b961e87 100644 --- a/libpdbg/chip.c +++ b/libpdbg/chip.c @@ -679,5 +679,5 @@ DECLARE_HW_UNIT(proc); __attribute__((constructor)) static void register_proc(void) { - pdbg_hwunit_register(&proc_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &proc_hw_unit); } diff --git a/libpdbg/cronus.c b/libpdbg/cronus.c index ff8af4c..23d555b 100644 --- a/libpdbg/cronus.c +++ b/libpdbg/cronus.c @@ -219,7 +219,7 @@ DECLARE_HW_UNIT(cronus_sbefifo); __attribute__((constructor)) static void register_cronus(void) { - pdbg_hwunit_register(&cronus_pib_hw_unit); - pdbg_hwunit_register(&cronus_fsi_hw_unit); - pdbg_hwunit_register(&cronus_sbefifo_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_fsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_sbefifo_hw_unit); } diff --git a/libpdbg/device.c b/libpdbg/device.c index 219569e..8db6572 100644 --- a/libpdbg/device.c +++ b/libpdbg/device.c @@ -60,23 +60,16 @@ static struct pdbg_target *dt_pdbg_target_new(const void *fdt, int node_offset) prop = fdt_get_property(fdt, node_offset, "compatible", NULL); if (prop) { - int i, prop_len = fdt32_to_cpu(prop->len); + uint32_t prop_len = fdt32_to_cpu(prop->len); /* * If I understand correctly, the property we have * here can be a stringlist with a few compatible * strings */ - i = 0; - while (i < prop_len) { - hw_info = pdbg_hwunit_find_compatible(&prop->data[i]); - if (hw_info) { - size = hw_info->size; - break; - } - - i += strlen(&prop->data[i]) + 1; - } + hw_info = pdbg_hwunit_find_compatible(prop->data, prop_len); + if (hw_info) + size = hw_info->size; } if (!hw_info) diff --git a/libpdbg/fake.c b/libpdbg/fake.c index 82415db..ae02463 100644 --- a/libpdbg/fake.c +++ b/libpdbg/fake.c @@ -90,8 +90,8 @@ DECLARE_HW_UNIT(fake_thread); __attribute__((constructor)) static void register_fake(void) { - pdbg_hwunit_register(&fake_fsi_hw_unit); - pdbg_hwunit_register(&fake_pib_hw_unit); - pdbg_hwunit_register(&fake_core_hw_unit); - pdbg_hwunit_register(&fake_thread_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_fsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_core_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_thread_hw_unit); } diff --git a/libpdbg/host.c b/libpdbg/host.c index 428c18b..d02b53d 100644 --- a/libpdbg/host.c +++ b/libpdbg/host.c @@ -127,5 +127,5 @@ DECLARE_HW_UNIT(host_pib); __attribute__((constructor)) static void register_host(void) { - pdbg_hwunit_register(&host_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &host_pib_hw_unit); } diff --git a/libpdbg/htm.c b/libpdbg/htm.c index 4d23e82..a259478 100644 --- a/libpdbg/htm.c +++ b/libpdbg/htm.c @@ -1158,7 +1158,7 @@ DECLARE_HW_UNIT(p8_chtm); __attribute__((constructor)) static void register_htm(void) { - pdbg_hwunit_register(&p8_nhtm_hw_unit); - pdbg_hwunit_register(&p9_nhtm_hw_unit); - pdbg_hwunit_register(&p8_chtm_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_nhtm_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_nhtm_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_chtm_hw_unit); } diff --git a/libpdbg/hwunit.c b/libpdbg/hwunit.c index c7ec63d..074ddef 100644 --- a/libpdbg/hwunit.c +++ b/libpdbg/hwunit.c @@ -20,26 +20,28 @@ #include "hwunit.h" #define MAX_HW_UNITS 1024 +#define MAX_BACKENDS 16 -static const struct hw_unit_info *g_hw_unit[MAX_HW_UNITS]; -static int g_hw_unit_count; +static const struct hw_unit_info *g_hw_unit[MAX_BACKENDS][MAX_HW_UNITS]; +static int g_hw_unit_count[MAX_BACKENDS]; -void pdbg_hwunit_register(const struct hw_unit_info *hw_unit) +void pdbg_hwunit_register(enum pdbg_backend backend, const struct hw_unit_info *hw_unit) { - assert(g_hw_unit_count < MAX_HW_UNITS); + assert(g_hw_unit_count[backend] < MAX_HW_UNITS); - g_hw_unit[g_hw_unit_count] = hw_unit; - g_hw_unit_count++; + g_hw_unit[backend][g_hw_unit_count[backend]] = hw_unit; + g_hw_unit_count[backend]++; } -const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat) +static const struct hw_unit_info *find_driver(enum pdbg_backend backend, + const char *compat) { const struct hw_unit_info *p; struct pdbg_target *target; int i; - for (i = 0; i < g_hw_unit_count; i++) { - p = g_hw_unit[i]; + for (i = 0; i < g_hw_unit_count[backend]; i++) { + p = g_hw_unit[backend][i]; target = p->hw_unit; if (!strcmp(target->compatible, compat)) @@ -48,3 +50,34 @@ const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat) return NULL; } + +static const struct hw_unit_info *find_compatible(enum pdbg_backend backend, + const char *compat_list, + uint32_t len) +{ + const struct hw_unit_info *p; + uint32_t i; + + i = 0; + while (i < len) { + p = find_driver(backend, &compat_list[i]); + if (p) + return p; + + i += strlen(&compat_list[i]) + 1; + } + + return NULL; +} + +const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat_list, + uint32_t len) +{ + const struct hw_unit_info *p; + + p = find_compatible(pdbg_get_backend(), compat_list, len); + if (!p) + p = find_compatible(PDBG_DEFAULT_BACKEND, compat_list, len); + + return p; +} diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h index 7165a3c..dd41da7 100644 --- a/libpdbg/hwunit.h +++ b/libpdbg/hwunit.h @@ -31,8 +31,9 @@ struct hw_unit_info { size_t size; }; -void pdbg_hwunit_register(const struct hw_unit_info *hw_unit); -const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat); +void pdbg_hwunit_register(enum pdbg_backend backend, const struct hw_unit_info *hw_unit); +const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat_list, + uint32_t len); /* * If this macro fails to compile for you, you've probably not diff --git a/libpdbg/i2c.c b/libpdbg/i2c.c index 1a5d089..3d0b80a 100644 --- a/libpdbg/i2c.c +++ b/libpdbg/i2c.c @@ -177,5 +177,5 @@ DECLARE_HW_UNIT(p8_i2c_pib); __attribute__((constructor)) static void register_i2c(void) { - pdbg_hwunit_register(&p8_i2c_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_i2c_pib_hw_unit); } diff --git a/libpdbg/kernel.c b/libpdbg/kernel.c index dbd3586..c4637a7 100644 --- a/libpdbg/kernel.c +++ b/libpdbg/kernel.c @@ -264,6 +264,6 @@ DECLARE_HW_UNIT(kernel_pib); __attribute__((constructor)) static void register_kernel(void) { - pdbg_hwunit_register(&kernel_fsi_hw_unit); - pdbg_hwunit_register(&kernel_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_fsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_pib_hw_unit); } diff --git a/libpdbg/p8chip.c b/libpdbg/p8chip.c index 1bf71e8..484d77c 100644 --- a/libpdbg/p8chip.c +++ b/libpdbg/p8chip.c @@ -738,6 +738,6 @@ DECLARE_HW_UNIT(p8_core); __attribute__((constructor)) static void register_p8chip(void) { - pdbg_hwunit_register(&p8_thread_hw_unit); - pdbg_hwunit_register(&p8_core_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_thread_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_core_hw_unit); } diff --git a/libpdbg/p9_fapi_targets.c b/libpdbg/p9_fapi_targets.c index 1dc7af8..97680d5 100644 --- a/libpdbg/p9_fapi_targets.c +++ b/libpdbg/p9_fapi_targets.c @@ -720,30 +720,30 @@ DECLARE_HW_UNIT(p9_capp); __attribute__((constructor)) static void register_p9_fapi_targets(void) { - pdbg_hwunit_register(&p9_ex_hw_unit); - pdbg_hwunit_register(&p9_mba_hw_unit); - pdbg_hwunit_register(&p9_mcs_hw_unit); - pdbg_hwunit_register(&p9_xbus_hw_unit); - pdbg_hwunit_register(&p9_abus_hw_unit); - pdbg_hwunit_register(&p9_l4_hw_unit); - pdbg_hwunit_register(&p9_eq_hw_unit); - pdbg_hwunit_register(&p9_mca_hw_unit); - pdbg_hwunit_register(&p9_mcbist_hw_unit); - pdbg_hwunit_register(&p9_mi_hw_unit); - pdbg_hwunit_register(&p9_dmi_hw_unit); - pdbg_hwunit_register(&p9_obus_hw_unit); - pdbg_hwunit_register(&p9_obus_brick_hw_unit); - pdbg_hwunit_register(&p9_sbe_hw_unit); - pdbg_hwunit_register(&p9_ppe_hw_unit); - pdbg_hwunit_register(&p9_pec_hw_unit); - pdbg_hwunit_register(&p9_phb_hw_unit); - pdbg_hwunit_register(&p9_mc_hw_unit); - pdbg_hwunit_register(&p9_mem_port_hw_unit); - pdbg_hwunit_register(&p9_nmmu_hw_unit); - pdbg_hwunit_register(&p9_pau_hw_unit); - pdbg_hwunit_register(&p9_iohs_hw_unit); - pdbg_hwunit_register(&p9_fc_hw_unit); - pdbg_hwunit_register(&p9_pauc_hw_unit); - pdbg_hwunit_register(&p9_chiplet_hw_unit); - pdbg_hwunit_register(&p9_capp_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_ex_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mba_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mcs_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_xbus_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_abus_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_l4_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_eq_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mca_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mcbist_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_dmi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_obus_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_obus_brick_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_sbe_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_ppe_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_pec_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_phb_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mc_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mem_port_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_nmmu_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_pau_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_iohs_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_fc_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_pauc_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_chiplet_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_capp_hw_unit); } diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c index 63434ee..6222dc3 100644 --- a/libpdbg/p9chip.c +++ b/libpdbg/p9chip.c @@ -510,6 +510,6 @@ DECLARE_HW_UNIT(p9_core); __attribute__((constructor)) static void register_p9chip(void) { - pdbg_hwunit_register(&p9_thread_hw_unit); - pdbg_hwunit_register(&p9_core_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_thread_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_core_hw_unit); } diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 41e68e9..22f11f1 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -321,8 +321,8 @@ DECLARE_HW_UNIT(kernel_sbefifo); __attribute__((constructor)) static void register_sbefifo(void) { - pdbg_hwunit_register(&kernel_sbefifo_hw_unit); - pdbg_hwunit_register(&sbefifo_chipop_hw_unit); - pdbg_hwunit_register(&sbefifo_mem_hw_unit); - pdbg_hwunit_register(&sbefifo_pba_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_sbefifo_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chipop_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_mem_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pba_hw_unit); } -- 2.25.3 From amitay at ozlabs.org Tue Apr 21 14:16:41 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 21 Apr 2020 14:16:41 +1000 Subject: [Pdbg] [PATCH v4 05/19] libpdbg: Use PDBG_BACKEND_DRIVER to specify drivers to load In-Reply-To: <20200421041655.82856-1-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> Message-ID: <20200421041655.82856-6-amitay@ozlabs.org> When PDBG_BACKEND_DTB is specified, backend may not be set. This means only the drivers registered with PDBG_DEFAULT_BACKEND will be loaded. To be able to match backend specific drivers for targets in system tree, use the backend specified in PDBG_BACKEND_DRIVER environment variable. Signed-off-by: Amitay Isaacs --- libpdbg/hwunit.c | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/libpdbg/hwunit.c b/libpdbg/hwunit.c index 074ddef..3d6a05d 100644 --- a/libpdbg/hwunit.c +++ b/libpdbg/hwunit.c @@ -14,6 +14,7 @@ * limitations under the License. */ +#include #include #include @@ -70,12 +71,44 @@ static const struct hw_unit_info *find_compatible(enum pdbg_backend backend, return NULL; } +static enum pdbg_backend get_backend_driver(void) +{ + const char *tmp; + enum pdbg_backend backend = PDBG_DEFAULT_BACKEND; + + tmp = getenv("PDBG_BACKEND_DRIVER"); + if (tmp) { + if (!strcmp(tmp, "fsi")) + backend = PDBG_BACKEND_FSI; + else if (!strcmp(tmp, "i2c")) + backend = PDBG_BACKEND_I2C; + else if (!strcmp(tmp, "kernel")) + backend = PDBG_BACKEND_KERNEL; + else if (!strcmp(tmp, "fake")) + backend = PDBG_BACKEND_FAKE; + else if (!strcmp(tmp, "host")) + backend = PDBG_BACKEND_HOST; + else if (!strcmp(tmp, "cronus")) + backend = PDBG_BACKEND_CRONUS; + } + + return backend; +} + const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat_list, uint32_t len) { - const struct hw_unit_info *p; + const struct hw_unit_info *p = NULL; + enum pdbg_backend backend = pdbg_get_backend(); + + if (backend == PDBG_DEFAULT_BACKEND) { + backend = get_backend_driver(); + if (backend != PDBG_DEFAULT_BACKEND) + p = find_compatible(backend, compat_list, len); + } else { + p = find_compatible(backend, compat_list, len); + } - p = find_compatible(pdbg_get_backend(), compat_list, len); if (!p) p = find_compatible(PDBG_DEFAULT_BACKEND, compat_list, len); -- 2.25.3 From amitay at ozlabs.org Tue Apr 21 14:16:42 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 21 Apr 2020 14:16:42 +1000 Subject: [Pdbg] [PATCH v4 06/19] libpdbg: Use const char * for filenames In-Reply-To: <20200421041655.82856-1-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> Message-ID: <20200421041655.82856-7-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/dtb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index 70b7962..ef51718 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -234,7 +234,7 @@ static void bmc_target(struct pdbg_dtb *dtb) } /* Opens a dtb at the given path */ -static void mmap_dtb(char *file, bool readonly, struct pdbg_mfile *mfile) +static void mmap_dtb(const char *file, bool readonly, struct pdbg_mfile *mfile) { int fd; void *dtb; @@ -308,7 +308,7 @@ const char *pdbg_get_backend_option(void) struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) { struct pdbg_dtb *dtb = &pdbg_dtb; - char *fdt; + const char *fdt; dtb->backend.fdt = NULL; dtb->system.fdt = system_fdt; -- 2.25.3 From amitay at ozlabs.org Tue Apr 21 14:16:36 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 21 Apr 2020 14:16:36 +1000 Subject: [Pdbg] [PATCH v4 00/19] Add sbefifo backend Message-ID: <20200421041655.82856-1-amitay@ozlabs.org> This patch set adds per backend support of hardware drivers. The drivers for targets in the system device tree which can be matched to the same compatible string (e.g. ibm,power-thread) are assigned to specific backend. When looking up a driver for a target in device tree, first lookup the specific backend and then the default backend. All targets in backend device tree, use compatible properties that describe the hardware access (e.g. ibm,bmcfsi). There must be only single compatible string assigned to targets in backend device trees. All targets in system device tree, use compatible properties that describe the hardware (ibm,power9-adu) and can have multiple compatible properties (e.g. ibm,power-thread and ibm,power9-thread) to load different drivers based on the backend. For openbmc, all the hardware access is required to go via sbefifo. Currently some of the operations are hacked in to go via sbefifo (e.g. all thread operations). This patchset removes temporary hacks and adds infrastructure to create sbefifo backend. Also fix couple of bugs in libsbefifo. V2 changes: - Rebased on top of latest master (resolved conflicts and add missing code due to upstream changes) V3 changes: - Compatible properties in system device tree updated as per defined convetion (mentioned above) V4 changes: - When matching compatible property, search all strings at once - All backend drivers are registered to default backend - All system drivers with specific compatible string (e.g. ibm,power9-thread) are registered to default backend - Only system drivers with generic compatible string (e.g. ibm,power-thread) are registered to specific backend - Do not assume specific parent/child relationship for sbefifo, find the sbefifo target based on pib index Amitay Isaacs (19): libsbefifo: Fix compilation error for undefined variable libsbefifo: Use the correct sized pointer libpdbg: Add a private api to get current backend libpdbg: Register hwunit drivers per backend libpdbg: Use PDBG_BACKEND_DRIVER to specify drivers to load libpdbg: Use const char * for filenames dts: Backend device trees must use specific driver dts: Rename ibm,processor -> ibm,power-proc dts: Add a generic compatible string for core and thread libpdbg: Add sbefifo backend libpdbg: Add pib driver using sbefifo libpdbg: Add thread driver using sbefifo libpdbg: Add all thread procedures to pib target libpdbg: Implement all thread procedures using sbefifo libpdbg: Remove special case thread procedures using sbefifo libpdbg: Drop thread procedures from chipop target dts: Add sbefifo backend device tree libpdbg: Enable sbefifo backend main: Add sbefifo backend Makefile.am | 1 + libpdbg/adu.c | 4 +- libpdbg/bmcfsi.c | 2 +- libpdbg/cfam.c | 8 +- libpdbg/chip.c | 64 ++--- libpdbg/cronus.c | 6 +- libpdbg/device.c | 15 +- libpdbg/dtb.c | 28 ++- libpdbg/fake.c | 8 +- libpdbg/host.c | 2 +- libpdbg/htm.c | 6 +- libpdbg/hwunit.c | 86 ++++++- libpdbg/hwunit.h | 13 +- libpdbg/i2c.c | 2 +- libpdbg/kernel.c | 4 +- libpdbg/libpdbg.h | 7 +- libpdbg/p8chip.c | 4 +- libpdbg/p9_fapi_targets.c | 52 ++-- libpdbg/p9chip.c | 4 +- libpdbg/sbefifo.c | 181 ++++++++++++-- libpdbg/target.h | 1 + libsbefifo/cmd_scom.c | 4 +- libsbefifo/operation.c | 5 +- p8-fsi.dts.m4 | 6 +- p8-i2c.dts.m4 | 4 +- p8-kernel.dts.m4 | 4 +- p8.dts.m4 | 2 +- p9-fsi.dtsi.m4 | 4 +- p9-sbefifo.dts.m4 | 86 +++++++ p9.dts | 484 +++++++++++++++++++------------------- src/main.c | 3 + 31 files changed, 696 insertions(+), 404 deletions(-) create mode 100644 p9-sbefifo.dts.m4 -- 2.25.3 From amitay at ozlabs.org Tue Apr 21 14:16:39 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 21 Apr 2020 14:16:39 +1000 Subject: [Pdbg] [PATCH v4 03/19] libpdbg: Add a private api to get current backend In-Reply-To: <20200421041655.82856-1-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> Message-ID: <20200421041655.82856-4-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/dtb.c | 5 +++++ libpdbg/target.h | 1 + 2 files changed, 6 insertions(+) diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index b094e34..70b7962 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -293,6 +293,11 @@ bool pdbg_set_backend(enum pdbg_backend backend, const char *backend_option) return true; } +enum pdbg_backend pdbg_get_backend(void) +{ + return pdbg_backend; +} + const char *pdbg_get_backend_option(void) { return pdbg_backend_option; diff --git a/libpdbg/target.h b/libpdbg/target.h index 3b74844..7094b51 100644 --- a/libpdbg/target.h +++ b/libpdbg/target.h @@ -80,6 +80,7 @@ extern struct list_head empty_list; extern struct list_head target_classes; struct pdbg_dtb *pdbg_default_dtb(void *system_fdt); +enum pdbg_backend pdbg_get_backend(void); const char *pdbg_get_backend_option(void); bool pdbg_fdt_is_readonly(void *fdt); -- 2.25.3 From amitay at ozlabs.org Tue Apr 21 14:16:43 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 21 Apr 2020 14:16:43 +1000 Subject: [Pdbg] [PATCH v4 07/19] dts: Backend device trees must use specific driver In-Reply-To: <20200421041655.82856-1-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> Message-ID: <20200421041655.82856-8-amitay@ozlabs.org> Specific backend must always use specific drivers for backend specific devices. All other devices which appear in system device tree can potentially match multiple drivers depending on the backend. Signed-off-by: Amitay Isaacs --- p8-fsi.dts.m4 | 6 +++--- p8-i2c.dts.m4 | 4 ++-- p8-kernel.dts.m4 | 4 ++-- p9-fsi.dtsi.m4 | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/p8-fsi.dts.m4 b/p8-fsi.dts.m4 index 70fdb14..8d10966 100644 --- a/p8-fsi.dts.m4 +++ b/p8-fsi.dts.m4 @@ -26,7 +26,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x0>; system-path = "/proc0/pib"; }; @@ -44,7 +44,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x1>; system-path = "/proc1/pib"; }; @@ -64,7 +64,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x2>; system-path = "/proc2/pib"; }; diff --git a/p8-i2c.dts.m4 b/p8-i2c.dts.m4 index 3ea4b59..a7a18a2 100644 --- a/p8-i2c.dts.m4 +++ b/p8-i2c.dts.m4 @@ -34,7 +34,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x1>; system-path = "/proc1/pib"; }; @@ -53,7 +53,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x2>; system-path = "/proc2/pib"; }; diff --git a/p8-kernel.dts.m4 b/p8-kernel.dts.m4 index 6eacb92..b00ed54 100644 --- a/p8-kernel.dts.m4 +++ b/p8-kernel.dts.m4 @@ -18,7 +18,7 @@ #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; index = <0x0>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; system-path = "/proc0/pib"; }; @@ -35,7 +35,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x1>; system-path = "/proc1/pib"; }; diff --git a/p9-fsi.dtsi.m4 b/p9-fsi.dtsi.m4 index 3bbe43d..ab3c2e1 100644 --- a/p9-fsi.dtsi.m4 +++ b/p9-fsi.dtsi.m4 @@ -17,7 +17,7 @@ #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; index = <0x0>; - compatible = "ibm,fsi-pib", "ibm,power9-fsi-pib"; + compatible = "ibm,fsi-pib"; system-path = "/proc0/pib"; }; @@ -35,7 +35,7 @@ #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; index = <0x1>; - compatible = "ibm,fsi-pib", "ibm,power9-fsi-pib"; + compatible = "ibm,fsi-pib"; system-path = "/proc1/pib"; }; }; -- 2.25.3 From amitay at ozlabs.org Tue Apr 21 14:16:44 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 21 Apr 2020 14:16:44 +1000 Subject: [Pdbg] [PATCH v4 08/19] dts: Rename ibm, processor -> ibm, power-proc In-Reply-To: <20200421041655.82856-1-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> Message-ID: <20200421041655.82856-9-amitay@ozlabs.org> When using multiple compatible strings, use the generic compatible string first and specific later. Signed-off-by: Amitay Isaacs --- libpdbg/chip.c | 2 +- p8.dts.m4 | 2 +- p9.dts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libpdbg/chip.c b/libpdbg/chip.c index b961e87..848a831 100644 --- a/libpdbg/chip.c +++ b/libpdbg/chip.c @@ -670,7 +670,7 @@ int thread_getregs(struct pdbg_target *thread, struct thread_regs *regs) static struct proc proc = { .target = { .name = "Processor Module", - .compatible = "ibm,processor", + .compatible = "ibm,power-proc", .class = "proc", }, }; diff --git a/p8.dts.m4 b/p8.dts.m4 index a508e02..754987a 100644 --- a/p8.dts.m4 +++ b/p8.dts.m4 @@ -1,7 +1,7 @@ define(`PROC',` define(`PROC_ID',`$1')dnl proc$1 { - compatible = "ibm,power8-proc", "ibm,processor"; + compatible = "ibm,power-proc", "ibm,power8-proc"; index = <$1>; fsi { diff --git a/p9.dts b/p9.dts index 2d3fed2..6620b54 100644 --- a/p9.dts +++ b/p9.dts @@ -7,7 +7,7 @@ }; proc0 { - compatible = "ibm,power9-proc", "ibm,processor"; + compatible = "ibm,power-proc", "ibm,power9-proc"; index = < 0x00 >; fsi { @@ -1723,7 +1723,7 @@ }; proc1 { - compatible = "ibm,power9-proc", "ibm,processor"; + compatible = "ibm,power-proc", "ibm,power9-proc"; index = < 0x01 >; fsi { -- 2.25.3 From amitay at ozlabs.org Tue Apr 21 14:16:45 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 21 Apr 2020 14:16:45 +1000 Subject: [Pdbg] [PATCH v4 09/19] dts: Add a generic compatible string for core and thread In-Reply-To: <20200421041655.82856-1-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> Message-ID: <20200421041655.82856-10-amitay@ozlabs.org> This allows different drivers to be loaded automatically depending on the specified backend. Signed-off-by: Amitay Isaacs --- p9.dts | 480 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 240 insertions(+), 240 deletions(-) diff --git a/p9.dts b/p9.dts index 6620b54..1e99937 100644 --- a/p9.dts +++ b/p9.dts @@ -379,33 +379,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x00 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -423,33 +423,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x01 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -475,33 +475,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x02 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -519,33 +519,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x03 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -587,33 +587,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x04 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -631,33 +631,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x05 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -683,33 +683,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x06 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -727,33 +727,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x07 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -795,33 +795,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x08 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -839,33 +839,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x09 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -891,33 +891,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x0a >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -935,33 +935,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x0b >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1003,33 +1003,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x0c >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1047,33 +1047,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x0d >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1099,33 +1099,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x0e >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1143,33 +1143,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x0f >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1211,33 +1211,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x10 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1255,33 +1255,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x11 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1307,33 +1307,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x12 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1351,33 +1351,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x13 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1419,33 +1419,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x14 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1463,33 +1463,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x15 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1515,33 +1515,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x16 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1559,33 +1559,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x17 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2095,33 +2095,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x00 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2139,33 +2139,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x01 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2191,33 +2191,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x02 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2235,33 +2235,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x03 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2303,33 +2303,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x04 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2347,33 +2347,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x05 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2399,33 +2399,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x06 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2443,33 +2443,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x07 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2511,33 +2511,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x08 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2555,33 +2555,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x09 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2607,33 +2607,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x0a >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2651,33 +2651,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x0b >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2719,33 +2719,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x0c >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2763,33 +2763,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x0d >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2815,33 +2815,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x0e >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2859,33 +2859,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x0f >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2927,33 +2927,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x10 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2971,33 +2971,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x11 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3023,33 +3023,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x12 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3067,33 +3067,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x13 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3135,33 +3135,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x14 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3179,33 +3179,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x15 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3231,33 +3231,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x16 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3275,33 +3275,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x17 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; -- 2.25.3 From amitay at ozlabs.org Tue Apr 21 14:16:46 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 21 Apr 2020 14:16:46 +1000 Subject: [Pdbg] [PATCH v4 10/19] libpdbg: Add sbefifo backend In-Reply-To: <20200421041655.82856-1-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> Message-ID: <20200421041655.82856-11-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/libpdbg.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h index 1c974f5..bdc6cea 100644 --- a/libpdbg/libpdbg.h +++ b/libpdbg/libpdbg.h @@ -142,7 +142,6 @@ enum pdbg_target_status { PDBG_TARGET_RELEASED, }; - /** * @brief Describes the various methods (referred to as backends) for * accessing hardware depending on where the code is executed. @@ -197,6 +196,12 @@ enum pdbg_backend { * the BMC network address / hostname. For example p9 at spoon2-bmc. */ PDBG_BACKEND_CRONUS, + + /** + * This backend uses sbefifo kernel driver on BMC to access hardware + * via SBE. + */ + PDBG_BACKEND_SBEFIFO, }; /** -- 2.25.3 From amitay at ozlabs.org Tue Apr 21 14:16:47 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 21 Apr 2020 14:16:47 +1000 Subject: [Pdbg] [PATCH v4 11/19] libpdbg: Add pib driver using sbefifo In-Reply-To: <20200421041655.82856-1-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> Message-ID: <20200421041655.82856-12-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/sbefifo.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 22f11f1..ca3a43d 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -237,6 +237,40 @@ static int sbefifo_op_thread_sreset(struct chipop *chipop, return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_SRESET); } +static struct sbefifo *pib_to_sbefifo(struct pdbg_target *pib) +{ + struct pdbg_target *target; + struct sbefifo *sbefifo = NULL; + + pdbg_for_each_class_target("sbefifo", target) { + if (pdbg_target_index(target) == pdbg_target_index(pib)) { + sbefifo = target_to_sbefifo(target); + break; + } + } + + if (sbefifo == NULL) + assert(sbefifo); + + return sbefifo; +} + +static int sbefifo_pib_read(struct pib *pib, uint64_t addr, uint64_t *val) +{ + struct sbefifo *sbefifo = pib_to_sbefifo(&pib->target); + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); + + return sbefifo_scom_get(sctx, addr, val); +} + +static int sbefifo_pib_write(struct pib *pib, uint64_t addr, uint64_t val) +{ + struct sbefifo *sbefifo = pib_to_sbefifo(&pib->target); + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); + + return sbefifo_scom_put(sctx, addr, val); +} + static struct sbefifo_context *sbefifo_op_get_context(struct sbefifo *sbefifo) { return sbefifo->sf_ctx; @@ -306,6 +340,18 @@ static struct chipop sbefifo_chipop = { }; DECLARE_HW_UNIT(sbefifo_chipop); +static struct pib sbefifo_pib = { + .target = { + .name = "SBE FIFO Chip-op based PIB", + .compatible = "ibm,sbefifo-pib", + .class = "pib", + }, + .read = sbefifo_pib_read, + .write = sbefifo_pib_write, + .fd = -1, +}; +DECLARE_HW_UNIT(sbefifo_pib); + static struct sbefifo kernel_sbefifo = { .target = { .name = "Kernel based FSI SBE FIFO", @@ -323,6 +369,7 @@ static void register_sbefifo(void) { pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_sbefifo_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chipop_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pib_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_mem_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pba_hw_unit); } -- 2.25.3 From amitay at ozlabs.org Tue Apr 21 14:16:48 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 21 Apr 2020 14:16:48 +1000 Subject: [Pdbg] [PATCH v4 12/19] libpdbg: Add thread driver using sbefifo In-Reply-To: <20200421041655.82856-1-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> Message-ID: <20200421041655.82856-13-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/sbefifo.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index ca3a43d..eeb8d5c 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -271,6 +271,67 @@ static int sbefifo_pib_write(struct pib *pib, uint64_t addr, uint64_t val) return sbefifo_scom_put(sctx, addr, val); } +static int sbefifo_thread_probe(struct pdbg_target *target) +{ + struct thread *thread = target_to_thread(target); + uint32_t tid; + + assert(!pdbg_target_u32_property(target, "tid", &tid)); + thread->id = tid; + + return 0; +} + +static void sbefifo_thread_release(struct pdbg_target *target) +{ +} + +static int sbefifo_thread_op(struct thread *thread, uint32_t oper) +{ + struct pdbg_target *chiplet = + pdbg_target_require_parent("chiplet", &thread->target); + struct pdbg_target *pib = pdbg_target_require_parent("pib", chiplet); + struct sbefifo *sbefifo = pib_to_sbefifo(pib); + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); + uint8_t mode = 0; + + /* Enforce special-wakeup for thread stop and sreset */ + if ((oper & 0xf) == SBEFIFO_INSN_OP_STOP || + (oper & 0xf) == SBEFIFO_INSN_OP_SRESET) + mode = 0x2; + + /* This chip-op requires core-id as pervasive (chiplet) id */ + return sbefifo_control_insn(sctx, + pdbg_target_index(chiplet), + thread->id, + oper, + mode); +} +static int sbefifo_thread_start(struct thread *thread) +{ + return sbefifo_thread_op(thread, SBEFIFO_INSN_OP_START); +} + +static int sbefifo_thread_stop(struct thread *thread) +{ + return sbefifo_thread_op(thread, SBEFIFO_INSN_OP_STOP); +} + +static int sbefifo_thread_step(struct thread *thread, int count) +{ + int i, rc = 0; + + for (i = 0; i < count; i++) + rc |= sbefifo_thread_op(thread, SBEFIFO_INSN_OP_STEP); + + return rc; +} + +static int sbefifo_thread_sreset(struct thread *thread) +{ + return sbefifo_thread_op(thread, SBEFIFO_INSN_OP_SRESET); +} + static struct sbefifo_context *sbefifo_op_get_context(struct sbefifo *sbefifo) { return sbefifo->sf_ctx; @@ -352,6 +413,21 @@ static struct pib sbefifo_pib = { }; DECLARE_HW_UNIT(sbefifo_pib); +static struct thread sbefifo_thread = { + .target = { + .name = "SBE FFIO Chip-op based Thread", + .compatible = "ibm,power-thread", + .class = "thread", + .probe = sbefifo_thread_probe, + .release = sbefifo_thread_release, + }, + .start = sbefifo_thread_start, + .stop = sbefifo_thread_stop, + .step = sbefifo_thread_step, + .sreset = sbefifo_thread_sreset, +}; +DECLARE_HW_UNIT(sbefifo_thread); + static struct sbefifo kernel_sbefifo = { .target = { .name = "Kernel based FSI SBE FIFO", @@ -370,6 +446,7 @@ static void register_sbefifo(void) pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_sbefifo_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chipop_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pib_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_SBEFIFO, &sbefifo_thread_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_mem_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pba_hw_unit); } -- 2.25.3 From amitay at ozlabs.org Tue Apr 21 14:16:49 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 21 Apr 2020 14:16:49 +1000 Subject: [Pdbg] [PATCH v4 13/19] libpdbg: Add all thread procedures to pib target In-Reply-To: <20200421041655.82856-1-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> Message-ID: <20200421041655.82856-14-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/hwunit.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h index dd41da7..f5a7dff 100644 --- a/libpdbg/hwunit.h +++ b/libpdbg/hwunit.h @@ -94,6 +94,10 @@ struct pib { struct pdbg_target target; int (*read)(struct pib *, uint64_t, uint64_t *); int (*write)(struct pib *, uint64_t, uint64_t); + int (*thread_start_all)(struct pib *); + int (*thread_stop_all)(struct pib *); + int (*thread_step_all)(struct pib *, int); + int (*thread_sreset_all)(struct pib *); void *priv; int fd; }; -- 2.25.3 From amitay at ozlabs.org Tue Apr 21 14:16:50 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 21 Apr 2020 14:16:50 +1000 Subject: [Pdbg] [PATCH v4 14/19] libpdbg: Implement all thread procedures using sbefifo In-Reply-To: <20200421041655.82856-1-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> Message-ID: <20200421041655.82856-15-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/sbefifo.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index eeb8d5c..935a891 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -271,6 +271,53 @@ static int sbefifo_pib_write(struct pib *pib, uint64_t addr, uint64_t val) return sbefifo_scom_put(sctx, addr, val); } +static int sbefifo_pib_thread_op(struct pib *pib, uint32_t oper) +{ + struct sbefifo *sbefifo = target_to_sbefifo(pib->target.parent); + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); + uint32_t core_id, thread_id; + uint8_t mode = 0; + + /* + * core_id = 0xff (all SMT4 cores) + * thread_id = 0xf (all 4 threads in the SMT4 core) + */ + core_id = 0xff; + thread_id = 0xf; + + /* Enforce special-wakeup for thread stop and sreset */ + if ((oper & 0xf) == SBEFIFO_INSN_OP_STOP || + (oper & 0xf) == SBEFIFO_INSN_OP_SRESET) + mode = 0x2; + + return sbefifo_control_insn(sctx, core_id, thread_id, oper, mode); +} + +static int sbefifo_pib_thread_start(struct pib *pib) +{ + return sbefifo_pib_thread_op(pib, SBEFIFO_INSN_OP_START); +} + +static int sbefifo_pib_thread_stop(struct pib *pib) +{ + return sbefifo_pib_thread_op(pib, SBEFIFO_INSN_OP_STOP); +} + +static int sbefifo_pib_thread_step(struct pib *pib, int count) +{ + int i, rc = 0; + + for (i = 0; i < count; i++) + rc |= sbefifo_pib_thread_op(pib, SBEFIFO_INSN_OP_STEP); + + return rc; +} + +static int sbefifo_pib_thread_sreset(struct pib *pib) +{ + return sbefifo_pib_thread_op(pib, SBEFIFO_INSN_OP_SRESET); +} + static int sbefifo_thread_probe(struct pdbg_target *target) { struct thread *thread = target_to_thread(target); @@ -409,6 +456,10 @@ static struct pib sbefifo_pib = { }, .read = sbefifo_pib_read, .write = sbefifo_pib_write, + .thread_start_all = sbefifo_pib_thread_start, + .thread_stop_all = sbefifo_pib_thread_stop, + .thread_step_all = sbefifo_pib_thread_step, + .thread_sreset_all = sbefifo_pib_thread_sreset, .fd = -1, }; DECLARE_HW_UNIT(sbefifo_pib); -- 2.25.3 From amitay at ozlabs.org Tue Apr 21 14:16:51 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 21 Apr 2020 14:16:51 +1000 Subject: [Pdbg] [PATCH v4 15/19] libpdbg: Remove special case thread procedures using sbefifo In-Reply-To: <20200421041655.82856-1-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> Message-ID: <20200421041655.82856-16-amitay@ozlabs.org> Always check if the all thread procedures are provided by pib. If not, use individual thread operations. Signed-off-by: Amitay Isaacs --- libpdbg/chip.c | 60 +++++++++++++++++--------------------------------- 1 file changed, 20 insertions(+), 40 deletions(-) diff --git a/libpdbg/chip.c b/libpdbg/chip.c index 848a831..86e91bd 100644 --- a/libpdbg/chip.c +++ b/libpdbg/chip.c @@ -156,21 +156,16 @@ int thread_sreset(struct pdbg_target *thread_target) int thread_step_all(void) { - struct pdbg_target *pib, *thread; + struct pdbg_target *target, *thread; int rc = 0, count = 0; - pdbg_for_each_class_target("pib", pib) { - struct chipop *chipop; + pdbg_for_each_class_target("pib", target) { + struct pib *pib = target_to_pib(target); - chipop = pib_to_chipop(pib); - if (!chipop) + if (!pib->thread_step_all) break; - /* - * core_id = 0xff (all SMT4 cores) - * thread_id = 0xf (all 4 threads in the SMT4 core) - */ - rc |= chipop->thread_step(chipop, 0xff, 0xf); + rc |= pib->thread_step_all(pib, 1); count++; } @@ -189,21 +184,16 @@ int thread_step_all(void) int thread_start_all(void) { - struct pdbg_target *pib, *thread; + struct pdbg_target *target, *thread; int rc = 0, count = 0; - pdbg_for_each_class_target("pib", pib) { - struct chipop *chipop; + pdbg_for_each_class_target("pib", target) { + struct pib *pib = target_to_pib(target); - chipop = pib_to_chipop(pib); - if (!chipop) + if (!pib->thread_start_all) break; - /* - * core_id = 0xff (all SMT4 cores) - * thread_id = 0xf (all 4 threads in the SMT4 core) - */ - rc |= chipop->thread_start(chipop, 0xff, 0xf); + rc |= pib->thread_start_all(pib); count++; } @@ -222,21 +212,16 @@ int thread_start_all(void) int thread_stop_all(void) { - struct pdbg_target *pib, *thread; + struct pdbg_target *target, *thread; int rc = 0, count = 0; - pdbg_for_each_class_target("pib", pib) { - struct chipop *chipop; + pdbg_for_each_class_target("pib", target) { + struct pib *pib = target_to_pib(target); - chipop = pib_to_chipop(pib); - if (!chipop) + if (!pib->thread_stop_all) break; - /* - * core_id = 0xff (all SMT4 cores) - * thread_id = 0xf (all 4 threads in the SMT4 core) - */ - rc |= chipop->thread_stop(chipop, 0xff, 0xf); + rc |= pib->thread_stop_all(pib); count++; } @@ -255,21 +240,16 @@ int thread_stop_all(void) int thread_sreset_all(void) { - struct pdbg_target *pib, *thread; + struct pdbg_target *target, *thread; int rc = 0, count = 0; - pdbg_for_each_class_target("pib", pib) { - struct chipop *chipop; + pdbg_for_each_class_target("pib", target) { + struct pib *pib = target_to_pib(target); - chipop = pib_to_chipop(pib); - if (!chipop) + if (!pib->thread_sreset_all) break; - /* - * core_id = 0xff (all SMT4 cores) - * thread_id = 0xf (all 4 threads in the SMT4 core) - */ - rc |= chipop->thread_sreset(chipop, 0xff, 0xf); + rc |= pib->thread_sreset_all(pib); count++; } -- 2.25.3 From amitay at ozlabs.org Tue Apr 21 14:16:52 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 21 Apr 2020 14:16:52 +1000 Subject: [Pdbg] [PATCH v4 16/19] libpdbg: Drop thread procedures from chipop target In-Reply-To: <20200421041655.82856-1-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> Message-ID: <20200421041655.82856-17-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/hwunit.h | 4 ---- libpdbg/sbefifo.c | 46 ---------------------------------------------- 2 files changed, 50 deletions(-) diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h index f5a7dff..c30c048 100644 --- a/libpdbg/hwunit.h +++ b/libpdbg/hwunit.h @@ -76,10 +76,6 @@ struct chipop { int (*istep)(struct chipop *, uint32_t major, uint32_t minor); int (*mpipl_enter)(struct chipop *); int (*mpipl_continue)(struct chipop *); - int (*thread_start)(struct chipop *, uint32_t core_id, uint32_t thread_id); - int (*thread_stop)(struct chipop *, uint32_t core_id, uint32_t thread_id); - int (*thread_step)(struct chipop *, uint32_t core_id, uint32_t thread_id); - int (*thread_sreset)(struct chipop *, uint32_t core_id, uint32_t thread_id); }; #define target_to_chipop(x) container_of(x, struct chipop, target) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 935a891..3b2a786 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -195,48 +195,6 @@ static int sbefifo_op_mpipl_enter(struct chipop *chipop) return sbefifo_mpipl_enter(sctx); } -static int sbefifo_op_control(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id, - uint32_t oper) -{ - struct sbefifo *sbefifo = target_to_sbefifo(chipop->target.parent); - struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); - uint8_t mode = 0; - - /* Enforce special-wakeup for thread stop and sreset */ - if ((oper & 0xf) == SBEFIFO_INSN_OP_STOP || - (oper & 0xf) == SBEFIFO_INSN_OP_SRESET) - mode = 0x2; - - PR_NOTICE("sbefifo: control c:0x%x, t:0x%x, op:%u mode:%u\n", core_id, thread_id, oper, mode); - - return sbefifo_control_insn(sctx, core_id & 0xff, thread_id & 0xff, oper & 0xff, mode); -} - -static int sbefifo_op_thread_start(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id) -{ - return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_START); -} - -static int sbefifo_op_thread_stop(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id) -{ - return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_STOP); -} - -static int sbefifo_op_thread_step(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id) -{ - return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_STEP); -} - -static int sbefifo_op_thread_sreset(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id) -{ - return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_SRESET); -} - static struct sbefifo *pib_to_sbefifo(struct pdbg_target *pib) { struct pdbg_target *target; @@ -441,10 +399,6 @@ static struct chipop sbefifo_chipop = { .istep = sbefifo_op_istep, .mpipl_enter = sbefifo_op_mpipl_enter, .mpipl_continue = sbefifo_op_mpipl_continue, - .thread_start = sbefifo_op_thread_start, - .thread_stop = sbefifo_op_thread_stop, - .thread_step = sbefifo_op_thread_step, - .thread_sreset = sbefifo_op_thread_sreset, }; DECLARE_HW_UNIT(sbefifo_chipop); -- 2.25.3 From amitay at ozlabs.org Tue Apr 21 14:16:53 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 21 Apr 2020 14:16:53 +1000 Subject: [Pdbg] [PATCH v4 17/19] dts: Add sbefifo backend device tree In-Reply-To: <20200421041655.82856-1-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> Message-ID: <20200421041655.82856-18-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- Makefile.am | 1 + p9-sbefifo.dts.m4 | 86 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 p9-sbefifo.dts.m4 diff --git a/Makefile.am b/Makefile.am index 10306dc..74ad99f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -80,6 +80,7 @@ endif DT = fake.dts fake2.dts p8-cronus.dts p9-cronus.dts \ p8-fsi.dts p8-i2c.dts p8-kernel.dts \ p9w-fsi.dts p9r-fsi.dts p9z-fsi.dts p9-kernel.dts \ + p9-sbefifo.dts \ p8-host.dts p9-host.dts p8.dts DT_sources = $(DT:.dts=.dtb.S) p9.dtb.S diff --git a/p9-sbefifo.dts.m4 b/p9-sbefifo.dts.m4 new file mode 100644 index 0000000..48b3051 --- /dev/null +++ b/p9-sbefifo.dts.m4 @@ -0,0 +1,86 @@ +/dts-v1/; + +/ { + #address-cells = <0x1>; + #size-cells = <0x0>; + + fsi0: kernelfsi at 0 { + #address-cells = <0x2>; + #size-cells = <0x1>; + compatible = "ibm,kernel-fsi"; + reg = <0x0 0x0 0x0>; + index = <0x0>; + status = "mustexist"; + system-path = "/proc0/fsi"; + + sbefifo at 2400 { /* Bogus address */ + reg = <0x0 0x2400 0x7>; + index = <0x0>; + compatible = "ibm,kernel-sbefifo"; + device-path = "/dev/sbefifo1"; + + sbefifo-pib { + #address-cells = <0x2>; + #size-cells = <0x1>; + index = <0x0>; + compatible = "ibm,sbefifo-pib"; + system-path = "/proc0/pib"; + }; + + sbefifo-mem { + compatible = "ibm,sbefifo-mem"; + system-path = "/mem0"; + }; + + sbefifo-pba { + compatible = "ibm,sbefifo-mem-pba"; + system-path = "/mempba0"; + }; + + sbefifo-chipop { + compatible = "ibm,sbefifo-chipop"; + index = <0x0>; + }; + }; + + hmfsi at 100000 { + #address-cells = <0x2>; + #size-cells = <0x1>; + compatible = "ibm,fsi-hmfsi"; + reg = <0x0 0x100000 0x8000>; + port = <0x1>; + index = <0x1>; + system-path = "/proc1/fsi"; + + sbefifo at 2400 { /* Bogus address */ + reg = <0x0 0x2400 0x7>; + index = <0x1>; + compatible = "ibm,kernel-sbefifo"; + device-path = "/dev/sbefifo2"; + + sbefifo-pib { + #address-cells = <0x2>; + #size-cells = <0x1>; + index = <0x1>; + compatible = "ibm,sbefifo-pib"; + system-path = "/proc1/pib"; + }; + + sbefifo-mem { + compatible = "ibm,sbefifo-mem"; + system-path = "/mem1"; + }; + + sbefifo-pba { + compatible = "ibm,sbefifo-mem-pba"; + system-path = "/mempba1"; + }; + + sbefifo-chipop { + compatible = "ibm,sbefifo-chipop"; + index = <0x1>; + }; + }; + }; + }; +}; -- 2.25.3 From amitay at ozlabs.org Tue Apr 21 14:16:54 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 21 Apr 2020 14:16:54 +1000 Subject: [Pdbg] [PATCH v4 18/19] libpdbg: Enable sbefifo backend In-Reply-To: <20200421041655.82856-1-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> Message-ID: <20200421041655.82856-19-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/dtb.c | 19 +++++++++++++++++++ libpdbg/hwunit.c | 2 ++ 2 files changed, 21 insertions(+) diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index ef51718..1380ef4 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -43,6 +43,7 @@ #include "p9-host.dt.h" #include "p8-cronus.dt.h" #include "p9-cronus.dt.h" +#include "p9-sbefifo.dt.h" #include "p8.dt.h" #include "p9.dt.h" @@ -402,6 +403,24 @@ struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) } break; + case PDBG_BACKEND_SBEFIFO: + if (!pdbg_backend_option) { + pdbg_log(PDBG_ERROR, "No system type specified\n"); + pdbg_log(PDBG_ERROR, "Use p9\n"); + return NULL; + } + + if (!strcmp(pdbg_backend_option, "p9")) { + if (!dtb->backend.fdt) + dtb->backend.fdt = &_binary_p9_sbefifo_dtb_o_start; + if (!dtb->system.fdt) + dtb->system.fdt = &_binary_p9_dtb_o_start; + } else { + pdbg_log(PDBG_ERROR, "Invalid system type %s\n", pdbg_backend_option); + pdbg_log(PDBG_ERROR, "Use p9\n"); + } + break; + default: pdbg_log(PDBG_WARNING, "Unable to determine a valid default backend, using fake backend for testing purposes\n"); /* Fall through */ diff --git a/libpdbg/hwunit.c b/libpdbg/hwunit.c index 3d6a05d..7b16747 100644 --- a/libpdbg/hwunit.c +++ b/libpdbg/hwunit.c @@ -90,6 +90,8 @@ static enum pdbg_backend get_backend_driver(void) backend = PDBG_BACKEND_HOST; else if (!strcmp(tmp, "cronus")) backend = PDBG_BACKEND_CRONUS; + else if (!strcmp(tmp, "sbefifo")) + backend = PDBG_BACKEND_SBEFIFO; } return backend; -- 2.25.3 From amitay at ozlabs.org Tue Apr 21 14:16:55 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Tue, 21 Apr 2020 14:16:55 +1000 Subject: [Pdbg] [PATCH v4 19/19] main: Add sbefifo backend In-Reply-To: <20200421041655.82856-1-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> Message-ID: <20200421041655.82856-20-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- src/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.c b/src/main.c index 785dc26..5a5616d 100644 --- a/src/main.c +++ b/src/main.c @@ -149,6 +149,7 @@ static void print_usage(void) printf("\t\tRun command on all possible processors/chips/threads (default)\n"); printf("\t-b, --backend=backend\n"); printf("\t\tcronus:\tA backend based on cronus server\n"); + printf("\t\tsbefifo:\tA backend using sbefifo kernel driver\n"); printf("\t\tfsi:\tAn experimental backend that uses\n"); printf("\t\t\tbit-banging to access the host processor\n"); printf("\t\t\tvia the FSI bus.\n"); @@ -392,6 +393,8 @@ static bool parse_options(int argc, char *argv[]) backend = PDBG_BACKEND_HOST; } else if (strcmp(optarg, "cronus") == 0) { backend = PDBG_BACKEND_CRONUS; + } else if (strcmp(optarg, "sbefifo") == 0) { + backend = PDBG_BACKEND_SBEFIFO; } else { fprintf(stderr, "Invalid backend '%s'\n", optarg); opt_error = true; -- 2.25.3 From amitay at ozlabs.org Wed Apr 22 12:17:31 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Wed, 22 Apr 2020 12:17:31 +1000 Subject: [Pdbg] [PATCH 2/2] libpdbg: Add explicit check for library initialisation In-Reply-To: <20200422021731.112666-1-amitay@ozlabs.org> References: <20200422021731.112666-1-amitay@ozlabs.org> Message-ID: <20200422021731.112666-2-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/device.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libpdbg/device.c b/libpdbg/device.c index 219569e..80a8287 100644 --- a/libpdbg/device.c +++ b/libpdbg/device.c @@ -709,6 +709,11 @@ bool pdbg_targets_init(void *fdt) { struct pdbg_dtb *dtb; + if (pdbg_dt_root) { + pdbg_log(PDBG_ERROR, "pdbg_targets_init() must be called only once\n"); + return false; + } + dtb = pdbg_default_dtb(fdt); if (!dtb) { -- 2.25.3 From amitay at ozlabs.org Wed Apr 22 12:17:30 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Wed, 22 Apr 2020 12:17:30 +1000 Subject: [Pdbg] [PATCH 1/2] libpdbg: Update documentation for pdbg_targets_init() Message-ID: <20200422021731.112666-1-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- libpdbg/libpdbg.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h index 1c974f5..3078bc5 100644 --- a/libpdbg/libpdbg.h +++ b/libpdbg/libpdbg.h @@ -490,11 +490,9 @@ bool pdbg_set_backend(enum pdbg_backend backend, const char *backend_option); * Must be called prior to using any other libpdbg functions. * * Device tree can also be specified using PDBG_DTB environment variable - * pointing to system device tree. - * - * If the argument is NULL, then PDBG_DTB will override the default device - * tree. If the argument is not NULL, then that will override the default - * device tree and device tree pointed by PDBG_DTB. + * pointing to system device tree. If system device tree is specified using + * PDBG_DTB, then it will override the default device tree or the specified + * device tree. * * @note This function can only be called once. */ -- 2.25.3 From alistair at popple.id.au Thu Apr 30 09:53:18 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 30 Apr 2020 09:53:18 +1000 Subject: [Pdbg] [PATCH v4 04/19] libpdbg: Register hwunit drivers per backend In-Reply-To: <20200421041655.82856-5-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> <20200421041655.82856-5-amitay@ozlabs.org> Message-ID: <7553887.pDCl0atk7J@townsend> Looks ok to me. Reviewed-by: Alistair Popple On Tuesday, 21 April 2020 2:16:40 PM AEST Amitay Isaacs wrote: > This will allow to load backend specific drivers first. When searching > for drivers, match all compatible strings to backend specific drivers > first and then match all compatible strings to default backend. > > All the drivers are registered with the default backend, so this patch > does not change libpdbg behaviour. > > Signed-off-by: Amitay Isaacs > --- > libpdbg/adu.c | 4 +-- > libpdbg/bmcfsi.c | 2 +- > libpdbg/cfam.c | 8 +++--- > libpdbg/chip.c | 2 +- > libpdbg/cronus.c | 6 ++--- > libpdbg/device.c | 15 +++-------- > libpdbg/fake.c | 8 +++--- > libpdbg/host.c | 2 +- > libpdbg/htm.c | 6 ++--- > libpdbg/hwunit.c | 51 +++++++++++++++++++++++++++++++------- > libpdbg/hwunit.h | 5 ++-- > libpdbg/i2c.c | 2 +- > libpdbg/kernel.c | 4 +-- > libpdbg/p8chip.c | 4 +-- > libpdbg/p9_fapi_targets.c | 52 +++++++++++++++++++-------------------- > libpdbg/p9chip.c | 4 +-- > libpdbg/sbefifo.c | 8 +++--- > 17 files changed, 105 insertions(+), 78 deletions(-) > > diff --git a/libpdbg/adu.c b/libpdbg/adu.c > index df610a7..fe60118 100644 > --- a/libpdbg/adu.c > +++ b/libpdbg/adu.c > @@ -597,6 +597,6 @@ DECLARE_HW_UNIT(p9_adu); > __attribute__((constructor)) > static void register_adu(void) > { > - pdbg_hwunit_register(&p8_adu_hw_unit); > - pdbg_hwunit_register(&p9_adu_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_adu_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_adu_hw_unit); > } > diff --git a/libpdbg/bmcfsi.c b/libpdbg/bmcfsi.c > index 1d2e304..2639595 100644 > --- a/libpdbg/bmcfsi.c > +++ b/libpdbg/bmcfsi.c > @@ -519,5 +519,5 @@ DECLARE_HW_UNIT(bmcfsi); > __attribute__((constructor)) > static void register_bmcfsi(void) > { > - pdbg_hwunit_register(&bmcfsi_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &bmcfsi_hw_unit); > } > diff --git a/libpdbg/cfam.c b/libpdbg/cfam.c > index da4c5fc..0b0b6f0 100644 > --- a/libpdbg/cfam.c > +++ b/libpdbg/cfam.c > @@ -353,8 +353,8 @@ DECLARE_HW_UNIT(cfam_hmfsi); > __attribute__((constructor)) > static void register_cfam(void) > { > - pdbg_hwunit_register(&fsi_pib_hw_unit); > - pdbg_hwunit_register(&p8_opb_hw_unit); > - pdbg_hwunit_register(&p8_opb_hmfsi_hw_unit); > - pdbg_hwunit_register(&cfam_hmfsi_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fsi_pib_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_opb_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_opb_hmfsi_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cfam_hmfsi_hw_unit); > } > diff --git a/libpdbg/chip.c b/libpdbg/chip.c > index b45cffa..b961e87 100644 > --- a/libpdbg/chip.c > +++ b/libpdbg/chip.c > @@ -679,5 +679,5 @@ DECLARE_HW_UNIT(proc); > __attribute__((constructor)) > static void register_proc(void) > { > - pdbg_hwunit_register(&proc_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &proc_hw_unit); > } > diff --git a/libpdbg/cronus.c b/libpdbg/cronus.c > index ff8af4c..23d555b 100644 > --- a/libpdbg/cronus.c > +++ b/libpdbg/cronus.c > @@ -219,7 +219,7 @@ DECLARE_HW_UNIT(cronus_sbefifo); > __attribute__((constructor)) > static void register_cronus(void) > { > - pdbg_hwunit_register(&cronus_pib_hw_unit); > - pdbg_hwunit_register(&cronus_fsi_hw_unit); > - pdbg_hwunit_register(&cronus_sbefifo_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_pib_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_fsi_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_sbefifo_hw_unit); > } > diff --git a/libpdbg/device.c b/libpdbg/device.c > index 219569e..8db6572 100644 > --- a/libpdbg/device.c > +++ b/libpdbg/device.c > @@ -60,23 +60,16 @@ static struct pdbg_target *dt_pdbg_target_new(const void > *fdt, int node_offset) > > prop = fdt_get_property(fdt, node_offset, "compatible", NULL); > if (prop) { > - int i, prop_len = fdt32_to_cpu(prop->len); > + uint32_t prop_len = fdt32_to_cpu(prop->len); > > /* > * If I understand correctly, the property we have > * here can be a stringlist with a few compatible > * strings > */ > - i = 0; > - while (i < prop_len) { > - hw_info = pdbg_hwunit_find_compatible(&prop->data[i]); > - if (hw_info) { > - size = hw_info->size; > - break; > - } > - > - i += strlen(&prop->data[i]) + 1; > - } > + hw_info = pdbg_hwunit_find_compatible(prop->data, prop_len); > + if (hw_info) > + size = hw_info->size; > } > > if (!hw_info) > diff --git a/libpdbg/fake.c b/libpdbg/fake.c > index 82415db..ae02463 100644 > --- a/libpdbg/fake.c > +++ b/libpdbg/fake.c > @@ -90,8 +90,8 @@ DECLARE_HW_UNIT(fake_thread); > __attribute__((constructor)) > static void register_fake(void) > { > - pdbg_hwunit_register(&fake_fsi_hw_unit); > - pdbg_hwunit_register(&fake_pib_hw_unit); > - pdbg_hwunit_register(&fake_core_hw_unit); > - pdbg_hwunit_register(&fake_thread_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_fsi_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_pib_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_core_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_thread_hw_unit); > } > diff --git a/libpdbg/host.c b/libpdbg/host.c > index 428c18b..d02b53d 100644 > --- a/libpdbg/host.c > +++ b/libpdbg/host.c > @@ -127,5 +127,5 @@ DECLARE_HW_UNIT(host_pib); > __attribute__((constructor)) > static void register_host(void) > { > - pdbg_hwunit_register(&host_pib_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &host_pib_hw_unit); > } > diff --git a/libpdbg/htm.c b/libpdbg/htm.c > index 4d23e82..a259478 100644 > --- a/libpdbg/htm.c > +++ b/libpdbg/htm.c > @@ -1158,7 +1158,7 @@ DECLARE_HW_UNIT(p8_chtm); > __attribute__((constructor)) > static void register_htm(void) > { > - pdbg_hwunit_register(&p8_nhtm_hw_unit); > - pdbg_hwunit_register(&p9_nhtm_hw_unit); > - pdbg_hwunit_register(&p8_chtm_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_nhtm_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_nhtm_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_chtm_hw_unit); > } > diff --git a/libpdbg/hwunit.c b/libpdbg/hwunit.c > index c7ec63d..074ddef 100644 > --- a/libpdbg/hwunit.c > +++ b/libpdbg/hwunit.c > @@ -20,26 +20,28 @@ > #include "hwunit.h" > > #define MAX_HW_UNITS 1024 > +#define MAX_BACKENDS 16 > > -static const struct hw_unit_info *g_hw_unit[MAX_HW_UNITS]; > -static int g_hw_unit_count; > +static const struct hw_unit_info *g_hw_unit[MAX_BACKENDS][MAX_HW_UNITS]; > +static int g_hw_unit_count[MAX_BACKENDS]; > > -void pdbg_hwunit_register(const struct hw_unit_info *hw_unit) > +void pdbg_hwunit_register(enum pdbg_backend backend, const struct > hw_unit_info *hw_unit) { > - assert(g_hw_unit_count < MAX_HW_UNITS); > + assert(g_hw_unit_count[backend] < MAX_HW_UNITS); > > - g_hw_unit[g_hw_unit_count] = hw_unit; > - g_hw_unit_count++; > + g_hw_unit[backend][g_hw_unit_count[backend]] = hw_unit; > + g_hw_unit_count[backend]++; > } > > -const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat) > +static const struct hw_unit_info *find_driver(enum pdbg_backend backend, > + const char *compat) > { > const struct hw_unit_info *p; > struct pdbg_target *target; > int i; > > - for (i = 0; i < g_hw_unit_count; i++) { > - p = g_hw_unit[i]; > + for (i = 0; i < g_hw_unit_count[backend]; i++) { > + p = g_hw_unit[backend][i]; > target = p->hw_unit; > > if (!strcmp(target->compatible, compat)) > @@ -48,3 +50,34 @@ const struct hw_unit_info > *pdbg_hwunit_find_compatible(const char *compat) > > return NULL; > } > + > +static const struct hw_unit_info *find_compatible(enum pdbg_backend > backend, + const char *compat_list, > + uint32_t len) > +{ > + const struct hw_unit_info *p; > + uint32_t i; > + > + i = 0; > + while (i < len) { > + p = find_driver(backend, &compat_list[i]); > + if (p) > + return p; > + > + i += strlen(&compat_list[i]) + 1; > + } > + > + return NULL; > +} > + > +const struct hw_unit_info *pdbg_hwunit_find_compatible(const char > *compat_list, + uint32_t len) > +{ > + const struct hw_unit_info *p; > + > + p = find_compatible(pdbg_get_backend(), compat_list, len); > + if (!p) > + p = find_compatible(PDBG_DEFAULT_BACKEND, compat_list, len); > + > + return p; > +} > diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h > index 7165a3c..dd41da7 100644 > --- a/libpdbg/hwunit.h > +++ b/libpdbg/hwunit.h > @@ -31,8 +31,9 @@ struct hw_unit_info { > size_t size; > }; > > -void pdbg_hwunit_register(const struct hw_unit_info *hw_unit); > -const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat); > +void pdbg_hwunit_register(enum pdbg_backend backend, const struct > hw_unit_info *hw_unit); +const struct hw_unit_info > *pdbg_hwunit_find_compatible(const char *compat_list, + > uint32_t len); > > /* > * If this macro fails to compile for you, you've probably not > diff --git a/libpdbg/i2c.c b/libpdbg/i2c.c > index 1a5d089..3d0b80a 100644 > --- a/libpdbg/i2c.c > +++ b/libpdbg/i2c.c > @@ -177,5 +177,5 @@ DECLARE_HW_UNIT(p8_i2c_pib); > __attribute__((constructor)) > static void register_i2c(void) > { > - pdbg_hwunit_register(&p8_i2c_pib_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_i2c_pib_hw_unit); > } > diff --git a/libpdbg/kernel.c b/libpdbg/kernel.c > index dbd3586..c4637a7 100644 > --- a/libpdbg/kernel.c > +++ b/libpdbg/kernel.c > @@ -264,6 +264,6 @@ DECLARE_HW_UNIT(kernel_pib); > __attribute__((constructor)) > static void register_kernel(void) > { > - pdbg_hwunit_register(&kernel_fsi_hw_unit); > - pdbg_hwunit_register(&kernel_pib_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_fsi_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_pib_hw_unit); > } > diff --git a/libpdbg/p8chip.c b/libpdbg/p8chip.c > index 1bf71e8..484d77c 100644 > --- a/libpdbg/p8chip.c > +++ b/libpdbg/p8chip.c > @@ -738,6 +738,6 @@ DECLARE_HW_UNIT(p8_core); > __attribute__((constructor)) > static void register_p8chip(void) > { > - pdbg_hwunit_register(&p8_thread_hw_unit); > - pdbg_hwunit_register(&p8_core_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_thread_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_core_hw_unit); > } > diff --git a/libpdbg/p9_fapi_targets.c b/libpdbg/p9_fapi_targets.c > index 1dc7af8..97680d5 100644 > --- a/libpdbg/p9_fapi_targets.c > +++ b/libpdbg/p9_fapi_targets.c > @@ -720,30 +720,30 @@ DECLARE_HW_UNIT(p9_capp); > __attribute__((constructor)) > static void register_p9_fapi_targets(void) > { > - pdbg_hwunit_register(&p9_ex_hw_unit); > - pdbg_hwunit_register(&p9_mba_hw_unit); > - pdbg_hwunit_register(&p9_mcs_hw_unit); > - pdbg_hwunit_register(&p9_xbus_hw_unit); > - pdbg_hwunit_register(&p9_abus_hw_unit); > - pdbg_hwunit_register(&p9_l4_hw_unit); > - pdbg_hwunit_register(&p9_eq_hw_unit); > - pdbg_hwunit_register(&p9_mca_hw_unit); > - pdbg_hwunit_register(&p9_mcbist_hw_unit); > - pdbg_hwunit_register(&p9_mi_hw_unit); > - pdbg_hwunit_register(&p9_dmi_hw_unit); > - pdbg_hwunit_register(&p9_obus_hw_unit); > - pdbg_hwunit_register(&p9_obus_brick_hw_unit); > - pdbg_hwunit_register(&p9_sbe_hw_unit); > - pdbg_hwunit_register(&p9_ppe_hw_unit); > - pdbg_hwunit_register(&p9_pec_hw_unit); > - pdbg_hwunit_register(&p9_phb_hw_unit); > - pdbg_hwunit_register(&p9_mc_hw_unit); > - pdbg_hwunit_register(&p9_mem_port_hw_unit); > - pdbg_hwunit_register(&p9_nmmu_hw_unit); > - pdbg_hwunit_register(&p9_pau_hw_unit); > - pdbg_hwunit_register(&p9_iohs_hw_unit); > - pdbg_hwunit_register(&p9_fc_hw_unit); > - pdbg_hwunit_register(&p9_pauc_hw_unit); > - pdbg_hwunit_register(&p9_chiplet_hw_unit); > - pdbg_hwunit_register(&p9_capp_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_ex_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mba_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mcs_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_xbus_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_abus_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_l4_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_eq_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mca_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mcbist_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mi_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_dmi_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_obus_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_obus_brick_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_sbe_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_ppe_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_pec_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_phb_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mc_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mem_port_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_nmmu_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_pau_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_iohs_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_fc_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_pauc_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_chiplet_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_capp_hw_unit); > } > diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c > index 63434ee..6222dc3 100644 > --- a/libpdbg/p9chip.c > +++ b/libpdbg/p9chip.c > @@ -510,6 +510,6 @@ DECLARE_HW_UNIT(p9_core); > __attribute__((constructor)) > static void register_p9chip(void) > { > - pdbg_hwunit_register(&p9_thread_hw_unit); > - pdbg_hwunit_register(&p9_core_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_thread_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_core_hw_unit); > } > diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c > index 41e68e9..22f11f1 100644 > --- a/libpdbg/sbefifo.c > +++ b/libpdbg/sbefifo.c > @@ -321,8 +321,8 @@ DECLARE_HW_UNIT(kernel_sbefifo); > __attribute__((constructor)) > static void register_sbefifo(void) > { > - pdbg_hwunit_register(&kernel_sbefifo_hw_unit); > - pdbg_hwunit_register(&sbefifo_chipop_hw_unit); > - pdbg_hwunit_register(&sbefifo_mem_hw_unit); > - pdbg_hwunit_register(&sbefifo_pba_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_sbefifo_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chipop_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_mem_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pba_hw_unit); > } From alistair at popple.id.au Thu Apr 30 10:07:46 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 30 Apr 2020 10:07:46 +1000 Subject: [Pdbg] [PATCH v4 05/19] libpdbg: Use PDBG_BACKEND_DRIVER to specify drivers to load In-Reply-To: <20200421041655.82856-6-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> <20200421041655.82856-6-amitay@ozlabs.org> Message-ID: <5739820.c1tfsbD2DM@townsend> On Tuesday, 21 April 2020 2:16:41 PM AEST Amitay Isaacs wrote: > When PDBG_BACKEND_DTB is specified, backend may not be set. This means > only the drivers registered with PDBG_DEFAULT_BACKEND will be loaded. > To be able to match backend specific drivers for targets in system tree, > use the backend specified in PDBG_BACKEND_DRIVER environment variable. > > Signed-off-by: Amitay Isaacs > --- > libpdbg/hwunit.c | 37 +++++++++++++++++++++++++++++++++++-- > 1 file changed, 35 insertions(+), 2 deletions(-) > > diff --git a/libpdbg/hwunit.c b/libpdbg/hwunit.c > index 074ddef..3d6a05d 100644 > --- a/libpdbg/hwunit.c > +++ b/libpdbg/hwunit.c > @@ -14,6 +14,7 @@ > * limitations under the License. > */ > > +#include > #include > #include > > @@ -70,12 +71,44 @@ static const struct hw_unit_info *find_compatible(enum > pdbg_backend backend, return NULL; > } > > +static enum pdbg_backend get_backend_driver(void) > +{ > + const char *tmp; > + enum pdbg_backend backend = PDBG_DEFAULT_BACKEND; > + > + tmp = getenv("PDBG_BACKEND_DRIVER"); > + if (tmp) { > + if (!strcmp(tmp, "fsi")) > + backend = PDBG_BACKEND_FSI; > + else if (!strcmp(tmp, "i2c")) > + backend = PDBG_BACKEND_I2C; > + else if (!strcmp(tmp, "kernel")) > + backend = PDBG_BACKEND_KERNEL; > + else if (!strcmp(tmp, "fake")) > + backend = PDBG_BACKEND_FAKE; > + else if (!strcmp(tmp, "host")) > + backend = PDBG_BACKEND_HOST; > + else if (!strcmp(tmp, "cronus")) > + backend = PDBG_BACKEND_CRONUS; > + } > + > + return backend; > +} > + > const struct hw_unit_info *pdbg_hwunit_find_compatible(const char > *compat_list, uint32_t len) > { > - const struct hw_unit_info *p; > + const struct hw_unit_info *p = NULL; > + enum pdbg_backend backend = pdbg_get_backend(); > + > + if (backend == PDBG_DEFAULT_BACKEND) { > + backend = get_backend_driver(); The flow here was initially a little confusing for me to figure out what was going on here and why, although I understand now - you hit this case when an external backend DTB is specified and you need to figure out the driver collection to use. That makes sense but I think this code belongs with the rest of the initialisation code in libpdbg/dtb.c. Can we initialise the backend correctly with the rest of the environment variables in pdbg_default_dtb() such that pdbg_get_backend() just returns the "correct" thing? - Alistair > + if (backend != PDBG_DEFAULT_BACKEND) > + p = find_compatible(backend, compat_list, len); > + } else { > + p = find_compatible(backend, compat_list, len); > + } > > - p = find_compatible(pdbg_get_backend(), compat_list, len); > if (!p) > p = find_compatible(PDBG_DEFAULT_BACKEND, compat_list, len); From alistair at popple.id.au Thu Apr 30 10:09:00 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 30 Apr 2020 10:09:00 +1000 Subject: [Pdbg] [PATCH v4 07/19] dts: Backend device trees must use specific driver In-Reply-To: <20200421041655.82856-8-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> <20200421041655.82856-8-amitay@ozlabs.org> Message-ID: <2338650.khIPxb09dE@townsend> Reviewed-by: Alistair Popple On Tuesday, 21 April 2020 2:16:43 PM AEST Amitay Isaacs wrote: > Specific backend must always use specific drivers for backend specific > devices. All other devices which appear in system device tree can > potentially match multiple drivers depending on the backend. > > Signed-off-by: Amitay Isaacs > --- > p8-fsi.dts.m4 | 6 +++--- > p8-i2c.dts.m4 | 4 ++-- > p8-kernel.dts.m4 | 4 ++-- > p9-fsi.dtsi.m4 | 4 ++-- > 4 files changed, 9 insertions(+), 9 deletions(-) > > diff --git a/p8-fsi.dts.m4 b/p8-fsi.dts.m4 > index 70fdb14..8d10966 100644 > --- a/p8-fsi.dts.m4 > +++ b/p8-fsi.dts.m4 > @@ -26,7 +26,7 @@ > #address-cells = <0x2>; > #size-cells = <0x1>; > reg = <0x0 0x1000 0x7>; > - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; > + compatible = "ibm,fsi-pib"; > index = <0x0>; > system-path = "/proc0/pib"; > }; > @@ -44,7 +44,7 @@ > #address-cells = <0x2>; > #size-cells = <0x1>; > reg = <0x0 0x1000 0x7>; > - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; > + compatible = "ibm,fsi-pib"; > index = <0x1>; > system-path = "/proc1/pib"; > }; > @@ -64,7 +64,7 @@ > #address-cells = <0x2>; > #size-cells = <0x1>; > reg = <0x0 0x1000 0x7>; > - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; > + compatible = "ibm,fsi-pib"; > index = <0x2>; > system-path = "/proc2/pib"; > }; > diff --git a/p8-i2c.dts.m4 b/p8-i2c.dts.m4 > index 3ea4b59..a7a18a2 100644 > --- a/p8-i2c.dts.m4 > +++ b/p8-i2c.dts.m4 > @@ -34,7 +34,7 @@ > #address-cells = <0x2>; > #size-cells = <0x1>; > reg = <0x0 0x1000 0x7>; > - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; > + compatible = "ibm,fsi-pib"; > index = <0x1>; > system-path = "/proc1/pib"; > }; > @@ -53,7 +53,7 @@ > #address-cells = <0x2>; > #size-cells = <0x1>; > reg = <0x0 0x1000 0x7>; > - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; > + compatible = "ibm,fsi-pib"; > index = <0x2>; > system-path = "/proc2/pib"; > }; > diff --git a/p8-kernel.dts.m4 b/p8-kernel.dts.m4 > index 6eacb92..b00ed54 100644 > --- a/p8-kernel.dts.m4 > +++ b/p8-kernel.dts.m4 > @@ -18,7 +18,7 @@ > #size-cells = <0x1>; > reg = <0x0 0x1000 0x7>; > index = <0x0>; > - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; > + compatible = "ibm,fsi-pib"; > system-path = "/proc0/pib"; > }; > > @@ -35,7 +35,7 @@ > #address-cells = <0x2>; > #size-cells = <0x1>; > reg = <0x0 0x1000 0x7>; > - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; > + compatible = "ibm,fsi-pib"; > index = <0x1>; > system-path = "/proc1/pib"; > }; > diff --git a/p9-fsi.dtsi.m4 b/p9-fsi.dtsi.m4 > index 3bbe43d..ab3c2e1 100644 > --- a/p9-fsi.dtsi.m4 > +++ b/p9-fsi.dtsi.m4 > @@ -17,7 +17,7 @@ > #size-cells = <0x1>; > reg = <0x0 0x1000 0x7>; > index = <0x0>; > - compatible = "ibm,fsi-pib", "ibm,power9-fsi-pib"; > + compatible = "ibm,fsi-pib"; > system-path = "/proc0/pib"; > }; > > @@ -35,7 +35,7 @@ > #size-cells = <0x1>; > reg = <0x0 0x1000 0x7>; > index = <0x1>; > - compatible = "ibm,fsi-pib", "ibm,power9-fsi-pib"; > + compatible = "ibm,fsi-pib"; > system-path = "/proc1/pib"; > }; > }; From alistair at popple.id.au Thu Apr 30 10:11:05 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 30 Apr 2020 10:11:05 +1000 Subject: [Pdbg] [PATCH v4 08/19] dts: Rename ibm, processor -> ibm, power-proc In-Reply-To: <20200421041655.82856-9-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> <20200421041655.82856-9-amitay@ozlabs.org> Message-ID: <1871457.v18eRGpRQE@townsend> Reviewed-by: Alistair Popple On Tuesday, 21 April 2020 2:16:44 PM AEST Amitay Isaacs wrote: > When using multiple compatible strings, use the generic compatible > string first and specific later. > > Signed-off-by: Amitay Isaacs > --- > libpdbg/chip.c | 2 +- > p8.dts.m4 | 2 +- > p9.dts | 4 ++-- > 3 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/libpdbg/chip.c b/libpdbg/chip.c > index b961e87..848a831 100644 > --- a/libpdbg/chip.c > +++ b/libpdbg/chip.c > @@ -670,7 +670,7 @@ int thread_getregs(struct pdbg_target *thread, struct > thread_regs *regs) static struct proc proc = { > .target = { > .name = "Processor Module", > - .compatible = "ibm,processor", > + .compatible = "ibm,power-proc", > .class = "proc", > }, > }; > diff --git a/p8.dts.m4 b/p8.dts.m4 > index a508e02..754987a 100644 > --- a/p8.dts.m4 > +++ b/p8.dts.m4 > @@ -1,7 +1,7 @@ > define(`PROC',` > define(`PROC_ID',`$1')dnl > proc$1 { > - compatible = "ibm,power8-proc", "ibm,processor"; > + compatible = "ibm,power-proc", "ibm,power8-proc"; > index = <$1>; > > fsi { > diff --git a/p9.dts b/p9.dts > index 2d3fed2..6620b54 100644 > --- a/p9.dts > +++ b/p9.dts > @@ -7,7 +7,7 @@ > }; > > proc0 { > - compatible = "ibm,power9-proc", "ibm,processor"; > + compatible = "ibm,power-proc", "ibm,power9-proc"; > index = < 0x00 >; > > fsi { > @@ -1723,7 +1723,7 @@ > }; > > proc1 { > - compatible = "ibm,power9-proc", "ibm,processor"; > + compatible = "ibm,power-proc", "ibm,power9-proc"; > index = < 0x01 >; > > fsi { From alistair at popple.id.au Thu Apr 30 10:12:27 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 30 Apr 2020 10:12:27 +1000 Subject: [Pdbg] [PATCH v4 09/19] dts: Add a generic compatible string for core and thread In-Reply-To: <20200421041655.82856-10-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> <20200421041655.82856-10-amitay@ozlabs.org> Message-ID: <1667560.MUZV8RBzJq@townsend> Reviewed-by: Alistair Popple On Tuesday, 21 April 2020 2:16:45 PM AEST Amitay Isaacs wrote: > This allows different drivers to be loaded automatically depending on > the specified backend. > > Signed-off-by: Amitay Isaacs > --- > p9.dts | 480 ++++++++++++++++++++++++++++----------------------------- > 1 file changed, 240 insertions(+), 240 deletions(-) > > diff --git a/p9.dts b/p9.dts > index 6620b54..1e99937 100644 > --- a/p9.dts > +++ b/p9.dts > @@ -379,33 +379,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x00 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -423,33 +423,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x01 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -475,33 +475,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x02 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -519,33 +519,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x03 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -587,33 +587,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x04 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -631,33 +631,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x05 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -683,33 +683,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x06 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -727,33 +727,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x07 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -795,33 +795,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x08 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -839,33 +839,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x09 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -891,33 +891,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x0a >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -935,33 +935,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x0b >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -1003,33 +1003,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x0c >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -1047,33 +1047,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x0d >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -1099,33 +1099,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x0e >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -1143,33 +1143,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x0f >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -1211,33 +1211,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x10 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -1255,33 +1255,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x11 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -1307,33 +1307,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x12 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -1351,33 +1351,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x13 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -1419,33 +1419,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x14 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -1463,33 +1463,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x15 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -1515,33 +1515,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x16 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -1559,33 +1559,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x17 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -2095,33 +2095,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x00 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -2139,33 +2139,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x01 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -2191,33 +2191,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x02 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -2235,33 +2235,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x03 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -2303,33 +2303,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x04 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -2347,33 +2347,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x05 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -2399,33 +2399,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x06 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -2443,33 +2443,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x07 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -2511,33 +2511,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x08 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -2555,33 +2555,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x09 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -2607,33 +2607,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x0a >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -2651,33 +2651,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x0b >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -2719,33 +2719,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x0c >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -2763,33 +2763,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x0d >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -2815,33 +2815,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x0e >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -2859,33 +2859,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x0f >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -2927,33 +2927,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x10 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -2971,33 +2971,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x11 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -3023,33 +3023,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x12 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -3067,33 +3067,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x13 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -3135,33 +3135,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x14 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -3179,33 +3179,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x15 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -3231,33 +3231,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x16 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; > @@ -3275,33 +3275,33 @@ > core at 0 { > #address-cells = < 0x01 >; > #size-cells = < 0x00 >; > - compatible = "ibm,power9-core"; > + compatible = "ibm,power-core", "ibm,power9- core"; > index = < 0x17 >; > reg = < 0x00 0x00 0xfffff >; > > thread at 0 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x00 >; > index = < 0x00 >; > }; > > thread at 1 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x01 >; > index = < 0x01 >; > }; > > thread at 2 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x02 >; > index = < 0x02 >; > }; > > thread at 3 { > - compatible = "ibm,power9-thread"; > + compatible = "ibm,power-thread", "ibm,power9-thread"; > reg = < 0x00 >; > tid = < 0x03 >; > index = < 0x03 >; From alistair at popple.id.au Thu Apr 30 11:17:40 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 30 Apr 2020 11:17:40 +1000 Subject: [Pdbg] [PATCH v4 10/19] libpdbg: Add sbefifo backend In-Reply-To: <20200421041655.82856-11-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> <20200421041655.82856-11-amitay@ozlabs.org> Message-ID: <1831635.PiNPdWGPuo@townsend> Reviewed-by: Alistair Popple On Tuesday, 21 April 2020 2:16:46 PM AEST Amitay Isaacs wrote: > Signed-off-by: Amitay Isaacs > --- > libpdbg/libpdbg.h | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h > index 1c974f5..bdc6cea 100644 > --- a/libpdbg/libpdbg.h > +++ b/libpdbg/libpdbg.h > @@ -142,7 +142,6 @@ enum pdbg_target_status { > PDBG_TARGET_RELEASED, > }; > > - > /** > * @brief Describes the various methods (referred to as backends) for > * accessing hardware depending on where the code is executed. > @@ -197,6 +196,12 @@ enum pdbg_backend { > * the BMC network address / hostname. For example p9 at spoon2-bmc. > */ > PDBG_BACKEND_CRONUS, > + > + /** > + * This backend uses sbefifo kernel driver on BMC to access hardware > + * via SBE. > + */ > + PDBG_BACKEND_SBEFIFO, > }; > > /** From amitay at ozlabs.org Thu Apr 30 11:22:22 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 11:22:22 +1000 Subject: [Pdbg] [PATCH v4 05/19] libpdbg: Use PDBG_BACKEND_DRIVER to specify drivers to load In-Reply-To: <5739820.c1tfsbD2DM@townsend> References: <20200421041655.82856-1-amitay@ozlabs.org> <20200421041655.82856-6-amitay@ozlabs.org> <5739820.c1tfsbD2DM@townsend> Message-ID: <36cba29698575278e7762d958b7246499cf8d690.camel@ozlabs.org> On Thu, 2020-04-30 at 10:07 +1000, Alistair Popple wrote: > On Tuesday, 21 April 2020 2:16:41 PM AEST Amitay Isaacs wrote: > > When PDBG_BACKEND_DTB is specified, backend may not be set. This > > means > > only the drivers registered with PDBG_DEFAULT_BACKEND will be > > loaded. > > To be able to match backend specific drivers for targets in system > > tree, > > use the backend specified in PDBG_BACKEND_DRIVER environment > > variable. > > > > Signed-off-by: Amitay Isaacs > > --- > > libpdbg/hwunit.c | 37 +++++++++++++++++++++++++++++++++++-- > > 1 file changed, 35 insertions(+), 2 deletions(-) > > > > diff --git a/libpdbg/hwunit.c b/libpdbg/hwunit.c > > index 074ddef..3d6a05d 100644 > > --- a/libpdbg/hwunit.c > > +++ b/libpdbg/hwunit.c > > @@ -14,6 +14,7 @@ > > * limitations under the License. > > */ > > > > +#include > > #include > > #include > > > > @@ -70,12 +71,44 @@ static const struct hw_unit_info > > *find_compatible(enum > > pdbg_backend backend, return NULL; > > } > > > > +static enum pdbg_backend get_backend_driver(void) > > +{ > > + const char *tmp; > > + enum pdbg_backend backend = PDBG_DEFAULT_BACKEND; > > + > > + tmp = getenv("PDBG_BACKEND_DRIVER"); > > + if (tmp) { > > + if (!strcmp(tmp, "fsi")) > > + backend = PDBG_BACKEND_FSI; > > + else if (!strcmp(tmp, "i2c")) > > + backend = PDBG_BACKEND_I2C; > > + else if (!strcmp(tmp, "kernel")) > > + backend = PDBG_BACKEND_KERNEL; > > + else if (!strcmp(tmp, "fake")) > > + backend = PDBG_BACKEND_FAKE; > > + else if (!strcmp(tmp, "host")) > > + backend = PDBG_BACKEND_HOST; > > + else if (!strcmp(tmp, "cronus")) > > + backend = PDBG_BACKEND_CRONUS; > > + } > > + > > + return backend; > > +} > > + > > const struct hw_unit_info *pdbg_hwunit_find_compatible(const char > > *compat_list, uint32_t len) > > { > > - const struct hw_unit_info *p; > > + const struct hw_unit_info *p = NULL; > > + enum pdbg_backend backend = pdbg_get_backend(); > > + > > + if (backend == PDBG_DEFAULT_BACKEND) { > > + backend = get_backend_driver(); > > The flow here was initially a little confusing for me to figure out > what was > going on here and why, although I understand now - you hit this case > when an > external backend DTB is specified and you need to figure out the > driver > collection to use. > > That makes sense but I think this code belongs with the rest of the > initialisation code in libpdbg/dtb.c. Can we initialise the backend > correctly > with the rest of the environment variables in pdbg_default_dtb() such > that > pdbg_get_backend() just returns the "correct" thing? Sure. I was also not happy about having to do separate checks elsewhere in the code. Are you ok with the environment variable PDBG_BACKEND_DRIVER? I thought of using PDBG_BACKEND earlier, but we are specifying the backend device tree, so that seemed odd to also specify PDBG_BACKEND. That's why PDBG_BACKEND_DRIVER, which is backend setting for selecting a collection of drivers. Let me know what you prefer. > > - Alistair > > > + if (backend != PDBG_DEFAULT_BACKEND) > > + p = find_compatible(backend, compat_list, len); > > + } else { > > + p = find_compatible(backend, compat_list, len); > > + } > > > > - p = find_compatible(pdbg_get_backend(), compat_list, len); > > if (!p) > > p = find_compatible(PDBG_DEFAULT_BACKEND, compat_list, > > len); > > > Amitay. -- The secret is to become wise before you get old. From alistair at popple.id.au Thu Apr 30 11:24:31 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 30 Apr 2020 11:24:31 +1000 Subject: [Pdbg] [PATCH v4 11/19] libpdbg: Add pib driver using sbefifo In-Reply-To: <20200421041655.82856-12-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> <20200421041655.82856-12-amitay@ozlabs.org> Message-ID: <2539842.1bWP1aLHZg@townsend> Reviewed-by: Alistair Popple On Tuesday, 21 April 2020 2:16:47 PM AEST Amitay Isaacs wrote: > Signed-off-by: Amitay Isaacs > --- > libpdbg/sbefifo.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 47 insertions(+) > > diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c > index 22f11f1..ca3a43d 100644 > --- a/libpdbg/sbefifo.c > +++ b/libpdbg/sbefifo.c > @@ -237,6 +237,40 @@ static int sbefifo_op_thread_sreset(struct chipop > *chipop, return sbefifo_op_control(chipop, core_id, thread_id, > SBEFIFO_INSN_OP_SRESET); } > > +static struct sbefifo *pib_to_sbefifo(struct pdbg_target *pib) > +{ > + struct pdbg_target *target; > + struct sbefifo *sbefifo = NULL; > + > + pdbg_for_each_class_target("sbefifo", target) { > + if (pdbg_target_index(target) == pdbg_target_index(pib)) { > + sbefifo = target_to_sbefifo(target); > + break; > + } > + } > + > + if (sbefifo == NULL) > + assert(sbefifo); > + > + return sbefifo; > +} > + > +static int sbefifo_pib_read(struct pib *pib, uint64_t addr, uint64_t *val) > +{ > + struct sbefifo *sbefifo = pib_to_sbefifo(&pib->target); > + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); > + > + return sbefifo_scom_get(sctx, addr, val); > +} > + > +static int sbefifo_pib_write(struct pib *pib, uint64_t addr, uint64_t val) > +{ > + struct sbefifo *sbefifo = pib_to_sbefifo(&pib->target); > + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); > + > + return sbefifo_scom_put(sctx, addr, val); > +} > + > static struct sbefifo_context *sbefifo_op_get_context(struct sbefifo > *sbefifo) { > return sbefifo->sf_ctx; > @@ -306,6 +340,18 @@ static struct chipop sbefifo_chipop = { > }; > DECLARE_HW_UNIT(sbefifo_chipop); > > +static struct pib sbefifo_pib = { > + .target = { > + .name = "SBE FIFO Chip-op based PIB", > + .compatible = "ibm,sbefifo-pib", > + .class = "pib", > + }, > + .read = sbefifo_pib_read, > + .write = sbefifo_pib_write, > + .fd = -1, > +}; > +DECLARE_HW_UNIT(sbefifo_pib); > + > static struct sbefifo kernel_sbefifo = { > .target = { > .name = "Kernel based FSI SBE FIFO", > @@ -323,6 +369,7 @@ static void register_sbefifo(void) > { > pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_sbefifo_hw_unit); > pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chipop_hw_unit); > + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pib_hw_unit); > pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_mem_hw_unit); > pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pba_hw_unit); > } From alistair at popple.id.au Thu Apr 30 11:26:51 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 30 Apr 2020 11:26:51 +1000 Subject: [Pdbg] [PATCH v4 12/19] libpdbg: Add thread driver using sbefifo In-Reply-To: <20200421041655.82856-13-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> <20200421041655.82856-13-amitay@ozlabs.org> Message-ID: <24090640.LzfHngR9YR@townsend> Reviewed-by: Alistair Popple On Tuesday, 21 April 2020 2:16:48 PM AEST Amitay Isaacs wrote: > Signed-off-by: Amitay Isaacs > --- > libpdbg/sbefifo.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 77 insertions(+) > > diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c > index ca3a43d..eeb8d5c 100644 > --- a/libpdbg/sbefifo.c > +++ b/libpdbg/sbefifo.c > @@ -271,6 +271,67 @@ static int sbefifo_pib_write(struct pib *pib, uint64_t > addr, uint64_t val) return sbefifo_scom_put(sctx, addr, val); > } > > +static int sbefifo_thread_probe(struct pdbg_target *target) > +{ > + struct thread *thread = target_to_thread(target); > + uint32_t tid; > + > + assert(!pdbg_target_u32_property(target, "tid", &tid)); > + thread->id = tid; > + > + return 0; > +} > + > +static void sbefifo_thread_release(struct pdbg_target *target) > +{ > +} > + > +static int sbefifo_thread_op(struct thread *thread, uint32_t oper) > +{ > + struct pdbg_target *chiplet = > + pdbg_target_require_parent("chiplet", &thread->target); > + struct pdbg_target *pib = pdbg_target_require_parent("pib", chiplet); > + struct sbefifo *sbefifo = pib_to_sbefifo(pib); > + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); > + uint8_t mode = 0; > + > + /* Enforce special-wakeup for thread stop and sreset */ > + if ((oper & 0xf) == SBEFIFO_INSN_OP_STOP || > + (oper & 0xf) == SBEFIFO_INSN_OP_SRESET) > + mode = 0x2; > + > + /* This chip-op requires core-id as pervasive (chiplet) id */ > + return sbefifo_control_insn(sctx, > + pdbg_target_index(chiplet), > + thread->id, > + oper, > + mode); > +} > +static int sbefifo_thread_start(struct thread *thread) > +{ > + return sbefifo_thread_op(thread, SBEFIFO_INSN_OP_START); > +} > + > +static int sbefifo_thread_stop(struct thread *thread) > +{ > + return sbefifo_thread_op(thread, SBEFIFO_INSN_OP_STOP); > +} > + > +static int sbefifo_thread_step(struct thread *thread, int count) > +{ > + int i, rc = 0; > + > + for (i = 0; i < count; i++) > + rc |= sbefifo_thread_op(thread, SBEFIFO_INSN_OP_STEP); > + > + return rc; > +} > + > +static int sbefifo_thread_sreset(struct thread *thread) > +{ > + return sbefifo_thread_op(thread, SBEFIFO_INSN_OP_SRESET); > +} > + > static struct sbefifo_context *sbefifo_op_get_context(struct sbefifo > *sbefifo) { > return sbefifo->sf_ctx; > @@ -352,6 +413,21 @@ static struct pib sbefifo_pib = { > }; > DECLARE_HW_UNIT(sbefifo_pib); > > +static struct thread sbefifo_thread = { > + .target = { > + .name = "SBE FFIO Chip-op based Thread", > + .compatible = "ibm,power-thread", > + .class = "thread", > + .probe = sbefifo_thread_probe, > + .release = sbefifo_thread_release, > + }, > + .start = sbefifo_thread_start, > + .stop = sbefifo_thread_stop, > + .step = sbefifo_thread_step, > + .sreset = sbefifo_thread_sreset, > +}; > +DECLARE_HW_UNIT(sbefifo_thread); > + > static struct sbefifo kernel_sbefifo = { > .target = { > .name = "Kernel based FSI SBE FIFO", > @@ -370,6 +446,7 @@ static void register_sbefifo(void) > pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_sbefifo_hw_unit); > pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chipop_hw_unit); > pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pib_hw_unit); > + pdbg_hwunit_register(PDBG_BACKEND_SBEFIFO, &sbefifo_thread_hw_unit); > pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_mem_hw_unit); > pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pba_hw_unit); > } From alistair at popple.id.au Thu Apr 30 11:27:19 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 30 Apr 2020 11:27:19 +1000 Subject: [Pdbg] [PATCH v4 13/19] libpdbg: Add all thread procedures to pib target In-Reply-To: <20200421041655.82856-14-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> <20200421041655.82856-14-amitay@ozlabs.org> Message-ID: <1789571.ufsLWR1O0Z@townsend> Reviewed-by: Alistair Popple On Tuesday, 21 April 2020 2:16:49 PM AEST Amitay Isaacs wrote: > Signed-off-by: Amitay Isaacs > --- > libpdbg/hwunit.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h > index dd41da7..f5a7dff 100644 > --- a/libpdbg/hwunit.h > +++ b/libpdbg/hwunit.h > @@ -94,6 +94,10 @@ struct pib { > struct pdbg_target target; > int (*read)(struct pib *, uint64_t, uint64_t *); > int (*write)(struct pib *, uint64_t, uint64_t); > + int (*thread_start_all)(struct pib *); > + int (*thread_stop_all)(struct pib *); > + int (*thread_step_all)(struct pib *, int); > + int (*thread_sreset_all)(struct pib *); > void *priv; > int fd; > }; From alistair at popple.id.au Thu Apr 30 11:28:04 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 30 Apr 2020 11:28:04 +1000 Subject: [Pdbg] [PATCH v4 14/19] libpdbg: Implement all thread procedures using sbefifo In-Reply-To: <20200421041655.82856-15-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> <20200421041655.82856-15-amitay@ozlabs.org> Message-ID: <31168226.E9i6UeYW3Z@townsend> Reviewed-by: Alistair Popple On Tuesday, 21 April 2020 2:16:50 PM AEST Amitay Isaacs wrote: > Signed-off-by: Amitay Isaacs > --- > libpdbg/sbefifo.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 51 insertions(+) > > diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c > index eeb8d5c..935a891 100644 > --- a/libpdbg/sbefifo.c > +++ b/libpdbg/sbefifo.c > @@ -271,6 +271,53 @@ static int sbefifo_pib_write(struct pib *pib, uint64_t > addr, uint64_t val) return sbefifo_scom_put(sctx, addr, val); > } > > +static int sbefifo_pib_thread_op(struct pib *pib, uint32_t oper) > +{ > + struct sbefifo *sbefifo = target_to_sbefifo(pib->target.parent); > + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); > + uint32_t core_id, thread_id; > + uint8_t mode = 0; > + > + /* > + * core_id = 0xff (all SMT4 cores) > + * thread_id = 0xf (all 4 threads in the SMT4 core) > + */ > + core_id = 0xff; > + thread_id = 0xf; > + > + /* Enforce special-wakeup for thread stop and sreset */ > + if ((oper & 0xf) == SBEFIFO_INSN_OP_STOP || > + (oper & 0xf) == SBEFIFO_INSN_OP_SRESET) > + mode = 0x2; > + > + return sbefifo_control_insn(sctx, core_id, thread_id, oper, mode); > +} > + > +static int sbefifo_pib_thread_start(struct pib *pib) > +{ > + return sbefifo_pib_thread_op(pib, SBEFIFO_INSN_OP_START); > +} > + > +static int sbefifo_pib_thread_stop(struct pib *pib) > +{ > + return sbefifo_pib_thread_op(pib, SBEFIFO_INSN_OP_STOP); > +} > + > +static int sbefifo_pib_thread_step(struct pib *pib, int count) > +{ > + int i, rc = 0; > + > + for (i = 0; i < count; i++) > + rc |= sbefifo_pib_thread_op(pib, SBEFIFO_INSN_OP_STEP); > + > + return rc; > +} > + > +static int sbefifo_pib_thread_sreset(struct pib *pib) > +{ > + return sbefifo_pib_thread_op(pib, SBEFIFO_INSN_OP_SRESET); > +} > + > static int sbefifo_thread_probe(struct pdbg_target *target) > { > struct thread *thread = target_to_thread(target); > @@ -409,6 +456,10 @@ static struct pib sbefifo_pib = { > }, > .read = sbefifo_pib_read, > .write = sbefifo_pib_write, > + .thread_start_all = sbefifo_pib_thread_start, > + .thread_stop_all = sbefifo_pib_thread_stop, > + .thread_step_all = sbefifo_pib_thread_step, > + .thread_sreset_all = sbefifo_pib_thread_sreset, > .fd = -1, > }; > DECLARE_HW_UNIT(sbefifo_pib); From alistair at popple.id.au Thu Apr 30 11:29:01 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 30 Apr 2020 11:29:01 +1000 Subject: [Pdbg] [PATCH v4 15/19] libpdbg: Remove special case thread procedures using sbefifo In-Reply-To: <20200421041655.82856-16-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> <20200421041655.82856-16-amitay@ozlabs.org> Message-ID: <3165607.X9Fffzuduy@townsend> Reviewed-by: Alistair Popple On Tuesday, 21 April 2020 2:16:51 PM AEST Amitay Isaacs wrote: > Always check if the all thread procedures are provided by pib. If not, > use individual thread operations. > > Signed-off-by: Amitay Isaacs > --- > libpdbg/chip.c | 60 +++++++++++++++++--------------------------------- > 1 file changed, 20 insertions(+), 40 deletions(-) > > diff --git a/libpdbg/chip.c b/libpdbg/chip.c > index 848a831..86e91bd 100644 > --- a/libpdbg/chip.c > +++ b/libpdbg/chip.c > @@ -156,21 +156,16 @@ int thread_sreset(struct pdbg_target *thread_target) > > int thread_step_all(void) > { > - struct pdbg_target *pib, *thread; > + struct pdbg_target *target, *thread; > int rc = 0, count = 0; > > - pdbg_for_each_class_target("pib", pib) { > - struct chipop *chipop; > + pdbg_for_each_class_target("pib", target) { > + struct pib *pib = target_to_pib(target); > > - chipop = pib_to_chipop(pib); > - if (!chipop) > + if (!pib->thread_step_all) > break; > > - /* > - * core_id = 0xff (all SMT4 cores) > - * thread_id = 0xf (all 4 threads in the SMT4 core) > - */ > - rc |= chipop->thread_step(chipop, 0xff, 0xf); > + rc |= pib->thread_step_all(pib, 1); > count++; > } > > @@ -189,21 +184,16 @@ int thread_step_all(void) > > int thread_start_all(void) > { > - struct pdbg_target *pib, *thread; > + struct pdbg_target *target, *thread; > int rc = 0, count = 0; > > - pdbg_for_each_class_target("pib", pib) { > - struct chipop *chipop; > + pdbg_for_each_class_target("pib", target) { > + struct pib *pib = target_to_pib(target); > > - chipop = pib_to_chipop(pib); > - if (!chipop) > + if (!pib->thread_start_all) > break; > > - /* > - * core_id = 0xff (all SMT4 cores) > - * thread_id = 0xf (all 4 threads in the SMT4 core) > - */ > - rc |= chipop->thread_start(chipop, 0xff, 0xf); > + rc |= pib->thread_start_all(pib); > count++; > } > > @@ -222,21 +212,16 @@ int thread_start_all(void) > > int thread_stop_all(void) > { > - struct pdbg_target *pib, *thread; > + struct pdbg_target *target, *thread; > int rc = 0, count = 0; > > - pdbg_for_each_class_target("pib", pib) { > - struct chipop *chipop; > + pdbg_for_each_class_target("pib", target) { > + struct pib *pib = target_to_pib(target); > > - chipop = pib_to_chipop(pib); > - if (!chipop) > + if (!pib->thread_stop_all) > break; > > - /* > - * core_id = 0xff (all SMT4 cores) > - * thread_id = 0xf (all 4 threads in the SMT4 core) > - */ > - rc |= chipop->thread_stop(chipop, 0xff, 0xf); > + rc |= pib->thread_stop_all(pib); > count++; > } > > @@ -255,21 +240,16 @@ int thread_stop_all(void) > > int thread_sreset_all(void) > { > - struct pdbg_target *pib, *thread; > + struct pdbg_target *target, *thread; > int rc = 0, count = 0; > > - pdbg_for_each_class_target("pib", pib) { > - struct chipop *chipop; > + pdbg_for_each_class_target("pib", target) { > + struct pib *pib = target_to_pib(target); > > - chipop = pib_to_chipop(pib); > - if (!chipop) > + if (!pib->thread_sreset_all) > break; > > - /* > - * core_id = 0xff (all SMT4 cores) > - * thread_id = 0xf (all 4 threads in the SMT4 core) > - */ > - rc |= chipop->thread_sreset(chipop, 0xff, 0xf); > + rc |= pib->thread_sreset_all(pib); > count++; > } From alistair at popple.id.au Thu Apr 30 11:29:26 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 30 Apr 2020 11:29:26 +1000 Subject: [Pdbg] [PATCH v4 16/19] libpdbg: Drop thread procedures from chipop target In-Reply-To: <20200421041655.82856-17-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> <20200421041655.82856-17-amitay@ozlabs.org> Message-ID: <1670961.bx7QNmphBV@townsend> Reviewed-by: Alistair Popple On Tuesday, 21 April 2020 2:16:52 PM AEST Amitay Isaacs wrote: > Signed-off-by: Amitay Isaacs > --- > libpdbg/hwunit.h | 4 ---- > libpdbg/sbefifo.c | 46 ---------------------------------------------- > 2 files changed, 50 deletions(-) > > diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h > index f5a7dff..c30c048 100644 > --- a/libpdbg/hwunit.h > +++ b/libpdbg/hwunit.h > @@ -76,10 +76,6 @@ struct chipop { > int (*istep)(struct chipop *, uint32_t major, uint32_t minor); > int (*mpipl_enter)(struct chipop *); > int (*mpipl_continue)(struct chipop *); > - int (*thread_start)(struct chipop *, uint32_t core_id, uint32_t > thread_id); - int (*thread_stop)(struct chipop *, uint32_t core_id, > uint32_t thread_id); - int (*thread_step)(struct chipop *, uint32_t > core_id, uint32_t thread_id); - int (*thread_sreset)(struct chipop *, > uint32_t core_id, uint32_t thread_id); }; > #define target_to_chipop(x) container_of(x, struct chipop, target) > > diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c > index 935a891..3b2a786 100644 > --- a/libpdbg/sbefifo.c > +++ b/libpdbg/sbefifo.c > @@ -195,48 +195,6 @@ static int sbefifo_op_mpipl_enter(struct chipop > *chipop) return sbefifo_mpipl_enter(sctx); > } > > -static int sbefifo_op_control(struct chipop *chipop, > - uint32_t core_id, uint32_t thread_id, > - uint32_t oper) > -{ > - struct sbefifo *sbefifo = target_to_sbefifo(chipop->target.parent); > - struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); > - uint8_t mode = 0; > - > - /* Enforce special-wakeup for thread stop and sreset */ > - if ((oper & 0xf) == SBEFIFO_INSN_OP_STOP || > - (oper & 0xf) == SBEFIFO_INSN_OP_SRESET) > - mode = 0x2; > - > - PR_NOTICE("sbefifo: control c:0x%x, t:0x%x, op:%u mode:%u\n", core_id, > thread_id, oper, mode); - > - return sbefifo_control_insn(sctx, core_id & 0xff, thread_id & 0xff, oper & > 0xff, mode); -} > - > -static int sbefifo_op_thread_start(struct chipop *chipop, > - uint32_t core_id, uint32_t thread_id) > -{ > - return sbefifo_op_control(chipop, core_id, thread_id, > SBEFIFO_INSN_OP_START); -} > - > -static int sbefifo_op_thread_stop(struct chipop *chipop, > - uint32_t core_id, uint32_t thread_id) > -{ > - return sbefifo_op_control(chipop, core_id, thread_id, > SBEFIFO_INSN_OP_STOP); -} > - > -static int sbefifo_op_thread_step(struct chipop *chipop, > - uint32_t core_id, uint32_t thread_id) > -{ > - return sbefifo_op_control(chipop, core_id, thread_id, > SBEFIFO_INSN_OP_STEP); -} > - > -static int sbefifo_op_thread_sreset(struct chipop *chipop, > - uint32_t core_id, uint32_t thread_id) > -{ > - return sbefifo_op_control(chipop, core_id, thread_id, > SBEFIFO_INSN_OP_SRESET); -} > - > static struct sbefifo *pib_to_sbefifo(struct pdbg_target *pib) > { > struct pdbg_target *target; > @@ -441,10 +399,6 @@ static struct chipop sbefifo_chipop = { > .istep = sbefifo_op_istep, > .mpipl_enter = sbefifo_op_mpipl_enter, > .mpipl_continue = sbefifo_op_mpipl_continue, > - .thread_start = sbefifo_op_thread_start, > - .thread_stop = sbefifo_op_thread_stop, > - .thread_step = sbefifo_op_thread_step, > - .thread_sreset = sbefifo_op_thread_sreset, > }; > DECLARE_HW_UNIT(sbefifo_chipop); From alistair at popple.id.au Thu Apr 30 11:38:16 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 30 Apr 2020 11:38:16 +1000 Subject: [Pdbg] [PATCH v4 17/19] dts: Add sbefifo backend device tree In-Reply-To: <20200421041655.82856-18-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> <20200421041655.82856-18-amitay@ozlabs.org> Message-ID: <16570713.vQDDHp07IC@townsend> Reviewed-by: Alistair Popple On Tuesday, 21 April 2020 2:16:53 PM AEST Amitay Isaacs wrote: > Signed-off-by: Amitay Isaacs > --- > Makefile.am | 1 + > p9-sbefifo.dts.m4 | 86 +++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 87 insertions(+) > create mode 100644 p9-sbefifo.dts.m4 > > diff --git a/Makefile.am b/Makefile.am > index 10306dc..74ad99f 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -80,6 +80,7 @@ endif > DT = fake.dts fake2.dts p8-cronus.dts p9-cronus.dts \ > p8-fsi.dts p8-i2c.dts p8-kernel.dts \ > p9w-fsi.dts p9r-fsi.dts p9z-fsi.dts p9-kernel.dts \ > + p9-sbefifo.dts \ > p8-host.dts p9-host.dts p8.dts > > DT_sources = $(DT:.dts=.dtb.S) p9.dtb.S > diff --git a/p9-sbefifo.dts.m4 b/p9-sbefifo.dts.m4 > new file mode 100644 > index 0000000..48b3051 > --- /dev/null > +++ b/p9-sbefifo.dts.m4 > @@ -0,0 +1,86 @@ > +/dts-v1/; > + > +/ { > + #address-cells = <0x1>; > + #size-cells = <0x0>; > + > + fsi0: kernelfsi at 0 { > + #address-cells = <0x2>; > + #size-cells = <0x1>; > + compatible = "ibm,kernel-fsi"; > + reg = <0x0 0x0 0x0>; > + index = <0x0>; > + status = "mustexist"; > + system-path = "/proc0/fsi"; > + > + sbefifo at 2400 { /* Bogus address */ > + reg = <0x0 0x2400 0x7>; > + index = <0x0>; > + compatible = "ibm,kernel-sbefifo"; > + device-path = "/dev/sbefifo1"; > + > + sbefifo-pib { > + #address-cells = <0x2>; > + #size-cells = <0x1>; > + index = <0x0>; > + compatible = "ibm,sbefifo-pib"; > + system-path = "/proc0/pib"; > + }; > + > + sbefifo-mem { > + compatible = "ibm,sbefifo-mem"; > + system-path = "/mem0"; > + }; > + > + sbefifo-pba { > + compatible = "ibm,sbefifo-mem-pba"; > + system-path = "/mempba0"; > + }; > + > + sbefifo-chipop { > + compatible = "ibm,sbefifo-chipop"; > + index = <0x0>; > + }; > + }; > + > + hmfsi at 100000 { > + #address-cells = <0x2>; > + #size-cells = <0x1>; > + compatible = "ibm,fsi-hmfsi"; > + reg = <0x0 0x100000 0x8000>; > + port = <0x1>; > + index = <0x1>; > + system-path = "/proc1/fsi"; > + > + sbefifo at 2400 { /* Bogus address */ > + reg = <0x0 0x2400 0x7>; > + index = <0x1>; > + compatible = "ibm,kernel-sbefifo"; > + device-path = "/dev/sbefifo2"; > + > + sbefifo-pib { > + #address-cells = <0x2>; > + #size-cells = <0x1>; > + index = <0x1>; > + compatible = "ibm,sbefifo-pib"; > + system-path = "/proc1/pib"; > + }; > + > + sbefifo-mem { > + compatible = "ibm,sbefifo-mem"; > + system-path = "/mem1"; > + }; > + > + sbefifo-pba { > + compatible = "ibm,sbefifo-mem-pba"; > + system-path = "/mempba1"; > + }; > + > + sbefifo-chipop { > + compatible = "ibm,sbefifo-chipop"; > + index = <0x1>; > + }; > + }; > + }; > + }; > +}; From alistair at popple.id.au Thu Apr 30 11:45:02 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 30 Apr 2020 11:45:02 +1000 Subject: [Pdbg] [PATCH v4 18/19] libpdbg: Enable sbefifo backend In-Reply-To: <20200421041655.82856-19-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> <20200421041655.82856-19-amitay@ozlabs.org> Message-ID: <4643744.8VbLzTbz0T@townsend> Reviewed-by: Alistair Popple On Tuesday, 21 April 2020 2:16:54 PM AEST Amitay Isaacs wrote: > Signed-off-by: Amitay Isaacs > --- > libpdbg/dtb.c | 19 +++++++++++++++++++ > libpdbg/hwunit.c | 2 ++ > 2 files changed, 21 insertions(+) > > diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c > index ef51718..1380ef4 100644 > --- a/libpdbg/dtb.c > +++ b/libpdbg/dtb.c > @@ -43,6 +43,7 @@ > #include "p9-host.dt.h" > #include "p8-cronus.dt.h" > #include "p9-cronus.dt.h" > +#include "p9-sbefifo.dt.h" > > #include "p8.dt.h" > #include "p9.dt.h" > @@ -402,6 +403,24 @@ struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) > } > break; > > + case PDBG_BACKEND_SBEFIFO: > + if (!pdbg_backend_option) { > + pdbg_log(PDBG_ERROR, "No system type specified\n"); > + pdbg_log(PDBG_ERROR, "Use p9\n"); > + return NULL; > + } > + > + if (!strcmp(pdbg_backend_option, "p9")) { > + if (!dtb->backend.fdt) > + dtb->backend.fdt = &_binary_p9_sbefifo_dtb_o_start; > + if (!dtb->system.fdt) > + dtb->system.fdt = &_binary_p9_dtb_o_start; > + } else { > + pdbg_log(PDBG_ERROR, "Invalid system type %s\n", pdbg_backend_option); > + pdbg_log(PDBG_ERROR, "Use p9\n"); > + } > + break; > + > default: > pdbg_log(PDBG_WARNING, "Unable to determine a valid default backend, > using fake backend for testing purposes\n"); /* Fall through */ > diff --git a/libpdbg/hwunit.c b/libpdbg/hwunit.c > index 3d6a05d..7b16747 100644 > --- a/libpdbg/hwunit.c > +++ b/libpdbg/hwunit.c > @@ -90,6 +90,8 @@ static enum pdbg_backend get_backend_driver(void) > backend = PDBG_BACKEND_HOST; > else if (!strcmp(tmp, "cronus")) > backend = PDBG_BACKEND_CRONUS; > + else if (!strcmp(tmp, "sbefifo")) > + backend = PDBG_BACKEND_SBEFIFO; > } > > return backend; From alistair at popple.id.au Thu Apr 30 11:45:17 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 30 Apr 2020 11:45:17 +1000 Subject: [Pdbg] [PATCH v4 19/19] main: Add sbefifo backend In-Reply-To: <20200421041655.82856-20-amitay@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> <20200421041655.82856-20-amitay@ozlabs.org> Message-ID: <1647475.14TdQs6117@townsend> Reviewed-by: Alistair Popple On Tuesday, 21 April 2020 2:16:55 PM AEST Amitay Isaacs wrote: > Signed-off-by: Amitay Isaacs > --- > src/main.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/main.c b/src/main.c > index 785dc26..5a5616d 100644 > --- a/src/main.c > +++ b/src/main.c > @@ -149,6 +149,7 @@ static void print_usage(void) > printf("\t\tRun command on all possible processors/chips/threads > (default)\n"); printf("\t-b, --backend=backend\n"); > printf("\t\tcronus:\tA backend based on cronus server\n"); > + printf("\t\tsbefifo:\tA backend using sbefifo kernel driver\n"); > printf("\t\tfsi:\tAn experimental backend that uses\n"); > printf("\t\t\tbit-banging to access the host processor\n"); > printf("\t\t\tvia the FSI bus.\n"); > @@ -392,6 +393,8 @@ static bool parse_options(int argc, char *argv[]) > backend = PDBG_BACKEND_HOST; > } else if (strcmp(optarg, "cronus") == 0) { > backend = PDBG_BACKEND_CRONUS; > + } else if (strcmp(optarg, "sbefifo") == 0) { > + backend = PDBG_BACKEND_SBEFIFO; > } else { > fprintf(stderr, "Invalid backend '%s'\n", optarg); > opt_error = true; From alistair at popple.id.au Thu Apr 30 12:17:33 2020 From: alistair at popple.id.au (Alistair Popple) Date: Thu, 30 Apr 2020 12:17:33 +1000 Subject: [Pdbg] [PATCH v4 05/19] libpdbg: Use PDBG_BACKEND_DRIVER to specify drivers to load In-Reply-To: <36cba29698575278e7762d958b7246499cf8d690.camel@ozlabs.org> References: <20200421041655.82856-1-amitay@ozlabs.org> <5739820.c1tfsbD2DM@townsend> <36cba29698575278e7762d958b7246499cf8d690.camel@ozlabs.org> Message-ID: <3826404.EIGLpeUIo8@townsend> On Thursday, 30 April 2020 11:22:22 AM AEST Amitay Isaacs wrote: > On Thu, 2020-04-30 at 10:07 +1000, Alistair Popple wrote: > > On Tuesday, 21 April 2020 2:16:41 PM AEST Amitay Isaacs wrote: > > > When PDBG_BACKEND_DTB is specified, backend may not be set. This > > > means > > > only the drivers registered with PDBG_DEFAULT_BACKEND will be > > > loaded. > > > To be able to match backend specific drivers for targets in system > > > tree, > > > use the backend specified in PDBG_BACKEND_DRIVER environment > > > variable. > > > > > > Signed-off-by: Amitay Isaacs > > > --- > > > > > > libpdbg/hwunit.c | 37 +++++++++++++++++++++++++++++++++++-- > > > 1 file changed, 35 insertions(+), 2 deletions(-) > > > > > > diff --git a/libpdbg/hwunit.c b/libpdbg/hwunit.c > > > index 074ddef..3d6a05d 100644 > > > --- a/libpdbg/hwunit.c > > > +++ b/libpdbg/hwunit.c > > > @@ -14,6 +14,7 @@ > > > > > > * limitations under the License. > > > */ > > > > > > +#include > > > > > > #include > > > #include > > > > > > @@ -70,12 +71,44 @@ static const struct hw_unit_info > > > *find_compatible(enum > > > pdbg_backend backend, return NULL; > > > > > > } > > > > > > +static enum pdbg_backend get_backend_driver(void) > > > +{ > > > + const char *tmp; > > > + enum pdbg_backend backend = PDBG_DEFAULT_BACKEND; > > > + > > > + tmp = getenv("PDBG_BACKEND_DRIVER"); > > > + if (tmp) { > > > + if (!strcmp(tmp, "fsi")) > > > + backend = PDBG_BACKEND_FSI; > > > + else if (!strcmp(tmp, "i2c")) > > > + backend = PDBG_BACKEND_I2C; > > > + else if (!strcmp(tmp, "kernel")) > > > + backend = PDBG_BACKEND_KERNEL; > > > + else if (!strcmp(tmp, "fake")) > > > + backend = PDBG_BACKEND_FAKE; > > > + else if (!strcmp(tmp, "host")) > > > + backend = PDBG_BACKEND_HOST; > > > + else if (!strcmp(tmp, "cronus")) > > > + backend = PDBG_BACKEND_CRONUS; > > > + } > > > + > > > + return backend; > > > +} > > > + > > > > > > const struct hw_unit_info *pdbg_hwunit_find_compatible(const char > > > > > > *compat_list, uint32_t len) > > > > > > { > > > > > > - const struct hw_unit_info *p; > > > + const struct hw_unit_info *p = NULL; > > > + enum pdbg_backend backend = pdbg_get_backend(); > > > + > > > + if (backend == PDBG_DEFAULT_BACKEND) { > > > + backend = get_backend_driver(); > > > > The flow here was initially a little confusing for me to figure out > > what was > > going on here and why, although I understand now - you hit this case > > when an > > external backend DTB is specified and you need to figure out the > > driver > > collection to use. > > > > That makes sense but I think this code belongs with the rest of the > > initialisation code in libpdbg/dtb.c. Can we initialise the backend > > correctly > > with the rest of the environment variables in pdbg_default_dtb() such > > that > > pdbg_get_backend() just returns the "correct" thing? > > Sure. I was also not happy about having to do separate checks > elsewhere in the code. > > Are you ok with the environment variable PDBG_BACKEND_DRIVER? I > thought of using PDBG_BACKEND earlier, but we are specifying the > backend device tree, so that seemed odd to also specify PDBG_BACKEND. > That's why PDBG_BACKEND_DRIVER, which is backend setting for selecting > a collection of drivers. Yeah, I think PDBG_BACKEND_DRIVER makes the most sense. Thanks. - Alistair > Let me know what you prefer. > > > - Alistair > > > > > + if (backend != PDBG_DEFAULT_BACKEND) > > > + p = find_compatible(backend, compat_list, len); > > > + } else { > > > + p = find_compatible(backend, compat_list, len); > > > + } > > > > > > - p = find_compatible(pdbg_get_backend(), compat_list, len); > > > > > > if (!p) > > > > > > p = find_compatible(PDBG_DEFAULT_BACKEND, compat_list, > > > > > > len); > > Amitay. From amitay at ozlabs.org Thu Apr 30 12:34:23 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 12:34:23 +1000 Subject: [Pdbg] [PATCH v5 02/19] libsbefifo: Use the correct sized pointer In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> Message-ID: <20200430023440.225504-3-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libsbefifo/cmd_scom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsbefifo/cmd_scom.c b/libsbefifo/cmd_scom.c index bc9b5f9..bb44e5e 100644 --- a/libsbefifo/cmd_scom.c +++ b/libsbefifo/cmd_scom.c @@ -24,7 +24,7 @@ static int sbefifo_scom_get_push(uint64_t addr, uint8_t **buf, uint32_t *buflen) { - uint8_t *msg; + uint32_t *msg; uint32_t nwords, cmd; nwords = 4; @@ -83,7 +83,7 @@ int sbefifo_scom_get(struct sbefifo_context *sctx, uint64_t addr, uint64_t *valu static int sbefifo_scom_put_push(uint64_t addr, uint64_t value, uint8_t **buf, uint32_t *buflen) { - uint8_t *msg; + uint32_t *msg; uint32_t nwords, cmd; nwords = 6; -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 12:34:24 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 12:34:24 +1000 Subject: [Pdbg] [PATCH v5 03/19] libpdbg: Add a private api to get current backend In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> Message-ID: <20200430023440.225504-4-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/dtb.c | 5 +++++ libpdbg/target.h | 1 + 2 files changed, 6 insertions(+) diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index b094e34..70b7962 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -293,6 +293,11 @@ bool pdbg_set_backend(enum pdbg_backend backend, const char *backend_option) return true; } +enum pdbg_backend pdbg_get_backend(void) +{ + return pdbg_backend; +} + const char *pdbg_get_backend_option(void) { return pdbg_backend_option; diff --git a/libpdbg/target.h b/libpdbg/target.h index 3b74844..7094b51 100644 --- a/libpdbg/target.h +++ b/libpdbg/target.h @@ -80,6 +80,7 @@ extern struct list_head empty_list; extern struct list_head target_classes; struct pdbg_dtb *pdbg_default_dtb(void *system_fdt); +enum pdbg_backend pdbg_get_backend(void); const char *pdbg_get_backend_option(void); bool pdbg_fdt_is_readonly(void *fdt); -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 12:34:25 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 12:34:25 +1000 Subject: [Pdbg] [PATCH v5 04/19] libpdbg: Register hwunit drivers per backend In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> Message-ID: <20200430023440.225504-5-amitay@ozlabs.org> This will allow to load backend specific drivers first. When searching for drivers, match all compatible strings to backend specific drivers first and then match all compatible strings to default backend. All the drivers are registered with the default backend, so this patch does not change libpdbg behaviour. Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/adu.c | 4 +-- libpdbg/bmcfsi.c | 2 +- libpdbg/cfam.c | 8 +++--- libpdbg/chip.c | 2 +- libpdbg/cronus.c | 6 ++--- libpdbg/device.c | 15 +++-------- libpdbg/fake.c | 8 +++--- libpdbg/host.c | 2 +- libpdbg/htm.c | 6 ++--- libpdbg/hwunit.c | 51 +++++++++++++++++++++++++++++++------- libpdbg/hwunit.h | 5 ++-- libpdbg/i2c.c | 2 +- libpdbg/kernel.c | 4 +-- libpdbg/p8chip.c | 4 +-- libpdbg/p9_fapi_targets.c | 52 +++++++++++++++++++-------------------- libpdbg/p9chip.c | 4 +-- libpdbg/sbefifo.c | 8 +++--- 17 files changed, 105 insertions(+), 78 deletions(-) diff --git a/libpdbg/adu.c b/libpdbg/adu.c index df610a7..fe60118 100644 --- a/libpdbg/adu.c +++ b/libpdbg/adu.c @@ -597,6 +597,6 @@ DECLARE_HW_UNIT(p9_adu); __attribute__((constructor)) static void register_adu(void) { - pdbg_hwunit_register(&p8_adu_hw_unit); - pdbg_hwunit_register(&p9_adu_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_adu_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_adu_hw_unit); } diff --git a/libpdbg/bmcfsi.c b/libpdbg/bmcfsi.c index 1d2e304..2639595 100644 --- a/libpdbg/bmcfsi.c +++ b/libpdbg/bmcfsi.c @@ -519,5 +519,5 @@ DECLARE_HW_UNIT(bmcfsi); __attribute__((constructor)) static void register_bmcfsi(void) { - pdbg_hwunit_register(&bmcfsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &bmcfsi_hw_unit); } diff --git a/libpdbg/cfam.c b/libpdbg/cfam.c index da4c5fc..0b0b6f0 100644 --- a/libpdbg/cfam.c +++ b/libpdbg/cfam.c @@ -353,8 +353,8 @@ DECLARE_HW_UNIT(cfam_hmfsi); __attribute__((constructor)) static void register_cfam(void) { - pdbg_hwunit_register(&fsi_pib_hw_unit); - pdbg_hwunit_register(&p8_opb_hw_unit); - pdbg_hwunit_register(&p8_opb_hmfsi_hw_unit); - pdbg_hwunit_register(&cfam_hmfsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fsi_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_opb_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_opb_hmfsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cfam_hmfsi_hw_unit); } diff --git a/libpdbg/chip.c b/libpdbg/chip.c index b45cffa..b961e87 100644 --- a/libpdbg/chip.c +++ b/libpdbg/chip.c @@ -679,5 +679,5 @@ DECLARE_HW_UNIT(proc); __attribute__((constructor)) static void register_proc(void) { - pdbg_hwunit_register(&proc_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &proc_hw_unit); } diff --git a/libpdbg/cronus.c b/libpdbg/cronus.c index ff8af4c..23d555b 100644 --- a/libpdbg/cronus.c +++ b/libpdbg/cronus.c @@ -219,7 +219,7 @@ DECLARE_HW_UNIT(cronus_sbefifo); __attribute__((constructor)) static void register_cronus(void) { - pdbg_hwunit_register(&cronus_pib_hw_unit); - pdbg_hwunit_register(&cronus_fsi_hw_unit); - pdbg_hwunit_register(&cronus_sbefifo_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_fsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_sbefifo_hw_unit); } diff --git a/libpdbg/device.c b/libpdbg/device.c index 219569e..8db6572 100644 --- a/libpdbg/device.c +++ b/libpdbg/device.c @@ -60,23 +60,16 @@ static struct pdbg_target *dt_pdbg_target_new(const void *fdt, int node_offset) prop = fdt_get_property(fdt, node_offset, "compatible", NULL); if (prop) { - int i, prop_len = fdt32_to_cpu(prop->len); + uint32_t prop_len = fdt32_to_cpu(prop->len); /* * If I understand correctly, the property we have * here can be a stringlist with a few compatible * strings */ - i = 0; - while (i < prop_len) { - hw_info = pdbg_hwunit_find_compatible(&prop->data[i]); - if (hw_info) { - size = hw_info->size; - break; - } - - i += strlen(&prop->data[i]) + 1; - } + hw_info = pdbg_hwunit_find_compatible(prop->data, prop_len); + if (hw_info) + size = hw_info->size; } if (!hw_info) diff --git a/libpdbg/fake.c b/libpdbg/fake.c index 82415db..ae02463 100644 --- a/libpdbg/fake.c +++ b/libpdbg/fake.c @@ -90,8 +90,8 @@ DECLARE_HW_UNIT(fake_thread); __attribute__((constructor)) static void register_fake(void) { - pdbg_hwunit_register(&fake_fsi_hw_unit); - pdbg_hwunit_register(&fake_pib_hw_unit); - pdbg_hwunit_register(&fake_core_hw_unit); - pdbg_hwunit_register(&fake_thread_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_fsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_core_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_thread_hw_unit); } diff --git a/libpdbg/host.c b/libpdbg/host.c index 428c18b..d02b53d 100644 --- a/libpdbg/host.c +++ b/libpdbg/host.c @@ -127,5 +127,5 @@ DECLARE_HW_UNIT(host_pib); __attribute__((constructor)) static void register_host(void) { - pdbg_hwunit_register(&host_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &host_pib_hw_unit); } diff --git a/libpdbg/htm.c b/libpdbg/htm.c index 4d23e82..a259478 100644 --- a/libpdbg/htm.c +++ b/libpdbg/htm.c @@ -1158,7 +1158,7 @@ DECLARE_HW_UNIT(p8_chtm); __attribute__((constructor)) static void register_htm(void) { - pdbg_hwunit_register(&p8_nhtm_hw_unit); - pdbg_hwunit_register(&p9_nhtm_hw_unit); - pdbg_hwunit_register(&p8_chtm_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_nhtm_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_nhtm_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_chtm_hw_unit); } diff --git a/libpdbg/hwunit.c b/libpdbg/hwunit.c index c7ec63d..074ddef 100644 --- a/libpdbg/hwunit.c +++ b/libpdbg/hwunit.c @@ -20,26 +20,28 @@ #include "hwunit.h" #define MAX_HW_UNITS 1024 +#define MAX_BACKENDS 16 -static const struct hw_unit_info *g_hw_unit[MAX_HW_UNITS]; -static int g_hw_unit_count; +static const struct hw_unit_info *g_hw_unit[MAX_BACKENDS][MAX_HW_UNITS]; +static int g_hw_unit_count[MAX_BACKENDS]; -void pdbg_hwunit_register(const struct hw_unit_info *hw_unit) +void pdbg_hwunit_register(enum pdbg_backend backend, const struct hw_unit_info *hw_unit) { - assert(g_hw_unit_count < MAX_HW_UNITS); + assert(g_hw_unit_count[backend] < MAX_HW_UNITS); - g_hw_unit[g_hw_unit_count] = hw_unit; - g_hw_unit_count++; + g_hw_unit[backend][g_hw_unit_count[backend]] = hw_unit; + g_hw_unit_count[backend]++; } -const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat) +static const struct hw_unit_info *find_driver(enum pdbg_backend backend, + const char *compat) { const struct hw_unit_info *p; struct pdbg_target *target; int i; - for (i = 0; i < g_hw_unit_count; i++) { - p = g_hw_unit[i]; + for (i = 0; i < g_hw_unit_count[backend]; i++) { + p = g_hw_unit[backend][i]; target = p->hw_unit; if (!strcmp(target->compatible, compat)) @@ -48,3 +50,34 @@ const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat) return NULL; } + +static const struct hw_unit_info *find_compatible(enum pdbg_backend backend, + const char *compat_list, + uint32_t len) +{ + const struct hw_unit_info *p; + uint32_t i; + + i = 0; + while (i < len) { + p = find_driver(backend, &compat_list[i]); + if (p) + return p; + + i += strlen(&compat_list[i]) + 1; + } + + return NULL; +} + +const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat_list, + uint32_t len) +{ + const struct hw_unit_info *p; + + p = find_compatible(pdbg_get_backend(), compat_list, len); + if (!p) + p = find_compatible(PDBG_DEFAULT_BACKEND, compat_list, len); + + return p; +} diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h index 7165a3c..dd41da7 100644 --- a/libpdbg/hwunit.h +++ b/libpdbg/hwunit.h @@ -31,8 +31,9 @@ struct hw_unit_info { size_t size; }; -void pdbg_hwunit_register(const struct hw_unit_info *hw_unit); -const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat); +void pdbg_hwunit_register(enum pdbg_backend backend, const struct hw_unit_info *hw_unit); +const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat_list, + uint32_t len); /* * If this macro fails to compile for you, you've probably not diff --git a/libpdbg/i2c.c b/libpdbg/i2c.c index 1a5d089..3d0b80a 100644 --- a/libpdbg/i2c.c +++ b/libpdbg/i2c.c @@ -177,5 +177,5 @@ DECLARE_HW_UNIT(p8_i2c_pib); __attribute__((constructor)) static void register_i2c(void) { - pdbg_hwunit_register(&p8_i2c_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_i2c_pib_hw_unit); } diff --git a/libpdbg/kernel.c b/libpdbg/kernel.c index dbd3586..c4637a7 100644 --- a/libpdbg/kernel.c +++ b/libpdbg/kernel.c @@ -264,6 +264,6 @@ DECLARE_HW_UNIT(kernel_pib); __attribute__((constructor)) static void register_kernel(void) { - pdbg_hwunit_register(&kernel_fsi_hw_unit); - pdbg_hwunit_register(&kernel_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_fsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_pib_hw_unit); } diff --git a/libpdbg/p8chip.c b/libpdbg/p8chip.c index 1bf71e8..484d77c 100644 --- a/libpdbg/p8chip.c +++ b/libpdbg/p8chip.c @@ -738,6 +738,6 @@ DECLARE_HW_UNIT(p8_core); __attribute__((constructor)) static void register_p8chip(void) { - pdbg_hwunit_register(&p8_thread_hw_unit); - pdbg_hwunit_register(&p8_core_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_thread_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_core_hw_unit); } diff --git a/libpdbg/p9_fapi_targets.c b/libpdbg/p9_fapi_targets.c index 1dc7af8..97680d5 100644 --- a/libpdbg/p9_fapi_targets.c +++ b/libpdbg/p9_fapi_targets.c @@ -720,30 +720,30 @@ DECLARE_HW_UNIT(p9_capp); __attribute__((constructor)) static void register_p9_fapi_targets(void) { - pdbg_hwunit_register(&p9_ex_hw_unit); - pdbg_hwunit_register(&p9_mba_hw_unit); - pdbg_hwunit_register(&p9_mcs_hw_unit); - pdbg_hwunit_register(&p9_xbus_hw_unit); - pdbg_hwunit_register(&p9_abus_hw_unit); - pdbg_hwunit_register(&p9_l4_hw_unit); - pdbg_hwunit_register(&p9_eq_hw_unit); - pdbg_hwunit_register(&p9_mca_hw_unit); - pdbg_hwunit_register(&p9_mcbist_hw_unit); - pdbg_hwunit_register(&p9_mi_hw_unit); - pdbg_hwunit_register(&p9_dmi_hw_unit); - pdbg_hwunit_register(&p9_obus_hw_unit); - pdbg_hwunit_register(&p9_obus_brick_hw_unit); - pdbg_hwunit_register(&p9_sbe_hw_unit); - pdbg_hwunit_register(&p9_ppe_hw_unit); - pdbg_hwunit_register(&p9_pec_hw_unit); - pdbg_hwunit_register(&p9_phb_hw_unit); - pdbg_hwunit_register(&p9_mc_hw_unit); - pdbg_hwunit_register(&p9_mem_port_hw_unit); - pdbg_hwunit_register(&p9_nmmu_hw_unit); - pdbg_hwunit_register(&p9_pau_hw_unit); - pdbg_hwunit_register(&p9_iohs_hw_unit); - pdbg_hwunit_register(&p9_fc_hw_unit); - pdbg_hwunit_register(&p9_pauc_hw_unit); - pdbg_hwunit_register(&p9_chiplet_hw_unit); - pdbg_hwunit_register(&p9_capp_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_ex_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mba_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mcs_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_xbus_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_abus_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_l4_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_eq_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mca_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mcbist_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_dmi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_obus_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_obus_brick_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_sbe_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_ppe_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_pec_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_phb_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mc_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mem_port_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_nmmu_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_pau_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_iohs_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_fc_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_pauc_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_chiplet_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_capp_hw_unit); } diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c index 63434ee..6222dc3 100644 --- a/libpdbg/p9chip.c +++ b/libpdbg/p9chip.c @@ -510,6 +510,6 @@ DECLARE_HW_UNIT(p9_core); __attribute__((constructor)) static void register_p9chip(void) { - pdbg_hwunit_register(&p9_thread_hw_unit); - pdbg_hwunit_register(&p9_core_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_thread_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_core_hw_unit); } diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 41e68e9..22f11f1 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -321,8 +321,8 @@ DECLARE_HW_UNIT(kernel_sbefifo); __attribute__((constructor)) static void register_sbefifo(void) { - pdbg_hwunit_register(&kernel_sbefifo_hw_unit); - pdbg_hwunit_register(&sbefifo_chipop_hw_unit); - pdbg_hwunit_register(&sbefifo_mem_hw_unit); - pdbg_hwunit_register(&sbefifo_pba_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_sbefifo_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chipop_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_mem_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pba_hw_unit); } -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 12:34:26 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 12:34:26 +1000 Subject: [Pdbg] [PATCH v5 05/19] libpdbg: Use PDBG_BACKEND_DRIVER to specify drivers to load In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> Message-ID: <20200430023440.225504-6-amitay@ozlabs.org> When PDBG_BACKEND_DTB is specified, backend may not be set. This means only the drivers registered with PDBG_DEFAULT_BACKEND will be loaded. To be able to match backend specific drivers for targets in system tree, use the backend specified in PDBG_BACKEND_DRIVER environment variable. Signed-off-by: Amitay Isaacs --- libpdbg/dtb.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index 70b7962..3b7a597 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -76,8 +76,25 @@ static struct pdbg_dtb pdbg_dtb = { * running on. */ static enum pdbg_backend default_backend(void) { + const char *tmp; int rc; + tmp = getenv("PDBG_BACKEND_DRIVER"); + if (tmp) { + if (!strcmp(tmp, "fsi")) + return PDBG_BACKEND_FSI; + else if (!strcmp(tmp, "i2c")) + return PDBG_BACKEND_I2C; + else if (!strcmp(tmp, "kernel")) + return PDBG_BACKEND_KERNEL; + else if (!strcmp(tmp, "fake")) + return PDBG_BACKEND_FAKE; + else if (!strcmp(tmp, "host")) + return PDBG_BACKEND_HOST; + else if (!strcmp(tmp, "cronus")) + return PDBG_BACKEND_CRONUS; + } + rc = access(XSCOM_BASE_PATH, F_OK); if (rc == 0) /* PowerPC Host System */ return PDBG_BACKEND_HOST; @@ -313,6 +330,9 @@ struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) dtb->backend.fdt = NULL; dtb->system.fdt = system_fdt; + if (!pdbg_backend) + pdbg_backend = default_backend(); + fdt = getenv("PDBG_BACKEND_DTB"); if (fdt) mmap_dtb(fdt, false, &dtb->backend); @@ -324,9 +344,6 @@ struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) if (dtb->backend.fdt && dtb->system.fdt) goto done; - if (!pdbg_backend) - pdbg_backend = default_backend(); - switch(pdbg_backend) { case PDBG_BACKEND_HOST: ppc_target(dtb); -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 12:34:21 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 12:34:21 +1000 Subject: [Pdbg] [PATCH v5 00/19] Add sbefifo backend Message-ID: <20200430023440.225504-1-amitay@ozlabs.org> This patch set adds per backend support of hardware drivers. The drivers for targets in the system device tree which can be matched to the same compatible string (e.g. ibm,power-thread) are assigned to specific backend. When looking up a driver for a target in device tree, first lookup the specific backend and then the default backend. All targets in backend device tree, use compatible properties that describe the hardware access (e.g. ibm,bmcfsi). There must be only single compatible string assigned to targets in backend device trees. All targets in system device tree, use compatible properties that describe the hardware (ibm,power9-adu) and can have multiple compatible properties (e.g. ibm,power-thread and ibm,power9-thread) to load different drivers based on the backend. For openbmc, all the hardware access is required to go via sbefifo. Currently some of the operations are hacked in to go via sbefifo (e.g. all thread operations). This patchset removes temporary hacks and adds infrastructure to create sbefifo backend. Also fix couple of bugs in libsbefifo. V2 changes: - Rebased on top of latest master (resolved conflicts and add missing code due to upstream changes) V3 changes: - Compatible properties in system device tree updated as per defined convetion (mentioned above) V4 changes: - When matching compatible property, search all strings at once - All backend drivers are registered to default backend - All system drivers with specific compatible string (e.g. ibm,power9-thread) are registered to default backend - Only system drivers with generic compatible string (e.g. ibm,power-thread) are registered to specific backend - Do not assume specific parent/child relationship for sbefifo, find the sbefifo target based on pib index V5 changes: - Move parsing of PDBG_BACKEND_DRIVER along with backend detection Amitay Isaacs (19): libsbefifo: Fix compilation error for undefined variable libsbefifo: Use the correct sized pointer libpdbg: Add a private api to get current backend libpdbg: Register hwunit drivers per backend libpdbg: Use PDBG_BACKEND_DRIVER to specify drivers to load libpdbg: Use const char * for filenames dts: Backend device trees must use specific driver dts: Rename ibm,processor -> ibm,power-proc dts: Add a generic compatible string for core and thread libpdbg: Add sbefifo backend libpdbg: Add pib driver using sbefifo libpdbg: Add thread driver using sbefifo libpdbg: Add all thread procedures to pib target libpdbg: Implement all thread procedures using sbefifo libpdbg: Remove special case thread procedures using sbefifo libpdbg: Drop thread procedures from chipop target dts: Add sbefifo backend device tree libpdbg: Enable sbefifo backend main: Add sbefifo backend Makefile.am | 1 + libpdbg/adu.c | 4 +- libpdbg/bmcfsi.c | 2 +- libpdbg/cfam.c | 8 +- libpdbg/chip.c | 64 ++--- libpdbg/cronus.c | 6 +- libpdbg/device.c | 15 +- libpdbg/dtb.c | 53 ++++- libpdbg/fake.c | 8 +- libpdbg/host.c | 2 +- libpdbg/htm.c | 6 +- libpdbg/hwunit.c | 51 +++- libpdbg/hwunit.h | 13 +- libpdbg/i2c.c | 2 +- libpdbg/kernel.c | 4 +- libpdbg/libpdbg.h | 7 +- libpdbg/p8chip.c | 4 +- libpdbg/p9_fapi_targets.c | 52 ++-- libpdbg/p9chip.c | 4 +- libpdbg/sbefifo.c | 181 ++++++++++++-- libpdbg/target.h | 1 + libsbefifo/cmd_scom.c | 4 +- libsbefifo/operation.c | 5 +- p8-fsi.dts.m4 | 6 +- p8-i2c.dts.m4 | 4 +- p8-kernel.dts.m4 | 4 +- p8.dts.m4 | 2 +- p9-fsi.dtsi.m4 | 4 +- p9-sbefifo.dts.m4 | 86 +++++++ p9.dts | 484 +++++++++++++++++++------------------- src/main.c | 3 + 31 files changed, 683 insertions(+), 407 deletions(-) create mode 100644 p9-sbefifo.dts.m4 -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 12:34:22 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 12:34:22 +1000 Subject: [Pdbg] [PATCH v5 01/19] libsbefifo: Fix compilation error for undefined variable In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> Message-ID: <20200430023440.225504-2-amitay@ozlabs.org> We didn't hit this because of the LOG() macro which is only enabled with -DLIBSBEFIFO_DEBUG=1. Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libsbefifo/operation.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libsbefifo/operation.c b/libsbefifo/operation.c index 07d9f64..8717f15 100644 --- a/libsbefifo/operation.c +++ b/libsbefifo/operation.c @@ -60,17 +60,18 @@ static int sbefifo_transport(struct sbefifo_context *sctx, uint8_t *msg, uint32_ int rc; size_t buflen; + buflen = msg_len; rc = sbefifo_write(sctx, msg, buflen); if (rc) { - LOG("write: cmd=%08x, rc=%d\n", cmd, rc); + LOG("write: cmd=%08x, rc=%d\n", be32toh(*(uint32_t *)(msg+4)), rc); return rc; } buflen = *out_len; rc = sbefifo_read(sctx, out, &buflen); if (rc) { - LOG("read: cmd=%08x, buflen=%zu, rc=%d\n", cmd, buflen, rc); + LOG("read: cmd=%08x, buflen=%zu, rc=%d\n", be32toh(*(uint32_t *)(msg+4)), buflen, rc); return rc; } -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 12:34:30 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 12:34:30 +1000 Subject: [Pdbg] [PATCH v5 09/19] dts: Add a generic compatible string for core and thread In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> Message-ID: <20200430023440.225504-10-amitay@ozlabs.org> This allows different drivers to be loaded automatically depending on the specified backend. Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- p9.dts | 480 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 240 insertions(+), 240 deletions(-) diff --git a/p9.dts b/p9.dts index 6620b54..1e99937 100644 --- a/p9.dts +++ b/p9.dts @@ -379,33 +379,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x00 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -423,33 +423,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x01 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -475,33 +475,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x02 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -519,33 +519,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x03 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -587,33 +587,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x04 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -631,33 +631,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x05 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -683,33 +683,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x06 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -727,33 +727,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x07 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -795,33 +795,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x08 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -839,33 +839,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x09 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -891,33 +891,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x0a >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -935,33 +935,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x0b >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1003,33 +1003,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x0c >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1047,33 +1047,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x0d >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1099,33 +1099,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x0e >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1143,33 +1143,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x0f >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1211,33 +1211,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x10 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1255,33 +1255,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x11 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1307,33 +1307,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x12 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1351,33 +1351,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x13 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1419,33 +1419,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x14 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1463,33 +1463,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x15 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1515,33 +1515,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x16 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1559,33 +1559,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x17 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2095,33 +2095,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x00 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2139,33 +2139,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x01 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2191,33 +2191,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x02 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2235,33 +2235,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x03 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2303,33 +2303,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x04 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2347,33 +2347,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x05 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2399,33 +2399,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x06 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2443,33 +2443,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x07 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2511,33 +2511,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x08 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2555,33 +2555,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x09 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2607,33 +2607,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x0a >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2651,33 +2651,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x0b >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2719,33 +2719,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x0c >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2763,33 +2763,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x0d >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2815,33 +2815,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x0e >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2859,33 +2859,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x0f >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2927,33 +2927,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x10 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2971,33 +2971,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x11 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3023,33 +3023,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x12 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3067,33 +3067,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x13 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3135,33 +3135,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x14 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3179,33 +3179,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x15 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3231,33 +3231,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x16 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3275,33 +3275,33 @@ core at 0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power-core", "ibm,power9-core"; index = < 0x17 >; reg = < 0x00 0x00 0xfffff >; thread at 0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread at 1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread at 2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread at 3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 12:34:27 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 12:34:27 +1000 Subject: [Pdbg] [PATCH v5 06/19] libpdbg: Use const char * for filenames In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> Message-ID: <20200430023440.225504-7-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/dtb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index 3b7a597..6a75de4 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -251,7 +251,7 @@ static void bmc_target(struct pdbg_dtb *dtb) } /* Opens a dtb at the given path */ -static void mmap_dtb(char *file, bool readonly, struct pdbg_mfile *mfile) +static void mmap_dtb(const char *file, bool readonly, struct pdbg_mfile *mfile) { int fd; void *dtb; @@ -325,7 +325,7 @@ const char *pdbg_get_backend_option(void) struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) { struct pdbg_dtb *dtb = &pdbg_dtb; - char *fdt; + const char *fdt; dtb->backend.fdt = NULL; dtb->system.fdt = system_fdt; -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 12:34:29 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 12:34:29 +1000 Subject: [Pdbg] [PATCH v5 08/19] dts: Rename ibm, processor -> ibm, power-proc In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> Message-ID: <20200430023440.225504-9-amitay@ozlabs.org> When using multiple compatible strings, use the generic compatible string first and specific later. Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/chip.c | 2 +- p8.dts.m4 | 2 +- p9.dts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libpdbg/chip.c b/libpdbg/chip.c index b961e87..848a831 100644 --- a/libpdbg/chip.c +++ b/libpdbg/chip.c @@ -670,7 +670,7 @@ int thread_getregs(struct pdbg_target *thread, struct thread_regs *regs) static struct proc proc = { .target = { .name = "Processor Module", - .compatible = "ibm,processor", + .compatible = "ibm,power-proc", .class = "proc", }, }; diff --git a/p8.dts.m4 b/p8.dts.m4 index a508e02..754987a 100644 --- a/p8.dts.m4 +++ b/p8.dts.m4 @@ -1,7 +1,7 @@ define(`PROC',` define(`PROC_ID',`$1')dnl proc$1 { - compatible = "ibm,power8-proc", "ibm,processor"; + compatible = "ibm,power-proc", "ibm,power8-proc"; index = <$1>; fsi { diff --git a/p9.dts b/p9.dts index 2d3fed2..6620b54 100644 --- a/p9.dts +++ b/p9.dts @@ -7,7 +7,7 @@ }; proc0 { - compatible = "ibm,power9-proc", "ibm,processor"; + compatible = "ibm,power-proc", "ibm,power9-proc"; index = < 0x00 >; fsi { @@ -1723,7 +1723,7 @@ }; proc1 { - compatible = "ibm,power9-proc", "ibm,processor"; + compatible = "ibm,power-proc", "ibm,power9-proc"; index = < 0x01 >; fsi { -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 12:34:31 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 12:34:31 +1000 Subject: [Pdbg] [PATCH v5 10/19] libpdbg: Add sbefifo backend In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> Message-ID: <20200430023440.225504-11-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/libpdbg.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h index 1c974f5..bdc6cea 100644 --- a/libpdbg/libpdbg.h +++ b/libpdbg/libpdbg.h @@ -142,7 +142,6 @@ enum pdbg_target_status { PDBG_TARGET_RELEASED, }; - /** * @brief Describes the various methods (referred to as backends) for * accessing hardware depending on where the code is executed. @@ -197,6 +196,12 @@ enum pdbg_backend { * the BMC network address / hostname. For example p9 at spoon2-bmc. */ PDBG_BACKEND_CRONUS, + + /** + * This backend uses sbefifo kernel driver on BMC to access hardware + * via SBE. + */ + PDBG_BACKEND_SBEFIFO, }; /** -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 12:34:28 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 12:34:28 +1000 Subject: [Pdbg] [PATCH v5 07/19] dts: Backend device trees must use specific driver In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> Message-ID: <20200430023440.225504-8-amitay@ozlabs.org> Specific backend must always use specific drivers for backend specific devices. All other devices which appear in system device tree can potentially match multiple drivers depending on the backend. Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- p8-fsi.dts.m4 | 6 +++--- p8-i2c.dts.m4 | 4 ++-- p8-kernel.dts.m4 | 4 ++-- p9-fsi.dtsi.m4 | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/p8-fsi.dts.m4 b/p8-fsi.dts.m4 index 70fdb14..8d10966 100644 --- a/p8-fsi.dts.m4 +++ b/p8-fsi.dts.m4 @@ -26,7 +26,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x0>; system-path = "/proc0/pib"; }; @@ -44,7 +44,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x1>; system-path = "/proc1/pib"; }; @@ -64,7 +64,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x2>; system-path = "/proc2/pib"; }; diff --git a/p8-i2c.dts.m4 b/p8-i2c.dts.m4 index 3ea4b59..a7a18a2 100644 --- a/p8-i2c.dts.m4 +++ b/p8-i2c.dts.m4 @@ -34,7 +34,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x1>; system-path = "/proc1/pib"; }; @@ -53,7 +53,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x2>; system-path = "/proc2/pib"; }; diff --git a/p8-kernel.dts.m4 b/p8-kernel.dts.m4 index 6eacb92..b00ed54 100644 --- a/p8-kernel.dts.m4 +++ b/p8-kernel.dts.m4 @@ -18,7 +18,7 @@ #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; index = <0x0>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; system-path = "/proc0/pib"; }; @@ -35,7 +35,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x1>; system-path = "/proc1/pib"; }; diff --git a/p9-fsi.dtsi.m4 b/p9-fsi.dtsi.m4 index 3bbe43d..ab3c2e1 100644 --- a/p9-fsi.dtsi.m4 +++ b/p9-fsi.dtsi.m4 @@ -17,7 +17,7 @@ #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; index = <0x0>; - compatible = "ibm,fsi-pib", "ibm,power9-fsi-pib"; + compatible = "ibm,fsi-pib"; system-path = "/proc0/pib"; }; @@ -35,7 +35,7 @@ #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; index = <0x1>; - compatible = "ibm,fsi-pib", "ibm,power9-fsi-pib"; + compatible = "ibm,fsi-pib"; system-path = "/proc1/pib"; }; }; -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 12:34:32 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 12:34:32 +1000 Subject: [Pdbg] [PATCH v5 11/19] libpdbg: Add pib driver using sbefifo In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> Message-ID: <20200430023440.225504-12-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/sbefifo.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 22f11f1..ca3a43d 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -237,6 +237,40 @@ static int sbefifo_op_thread_sreset(struct chipop *chipop, return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_SRESET); } +static struct sbefifo *pib_to_sbefifo(struct pdbg_target *pib) +{ + struct pdbg_target *target; + struct sbefifo *sbefifo = NULL; + + pdbg_for_each_class_target("sbefifo", target) { + if (pdbg_target_index(target) == pdbg_target_index(pib)) { + sbefifo = target_to_sbefifo(target); + break; + } + } + + if (sbefifo == NULL) + assert(sbefifo); + + return sbefifo; +} + +static int sbefifo_pib_read(struct pib *pib, uint64_t addr, uint64_t *val) +{ + struct sbefifo *sbefifo = pib_to_sbefifo(&pib->target); + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); + + return sbefifo_scom_get(sctx, addr, val); +} + +static int sbefifo_pib_write(struct pib *pib, uint64_t addr, uint64_t val) +{ + struct sbefifo *sbefifo = pib_to_sbefifo(&pib->target); + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); + + return sbefifo_scom_put(sctx, addr, val); +} + static struct sbefifo_context *sbefifo_op_get_context(struct sbefifo *sbefifo) { return sbefifo->sf_ctx; @@ -306,6 +340,18 @@ static struct chipop sbefifo_chipop = { }; DECLARE_HW_UNIT(sbefifo_chipop); +static struct pib sbefifo_pib = { + .target = { + .name = "SBE FIFO Chip-op based PIB", + .compatible = "ibm,sbefifo-pib", + .class = "pib", + }, + .read = sbefifo_pib_read, + .write = sbefifo_pib_write, + .fd = -1, +}; +DECLARE_HW_UNIT(sbefifo_pib); + static struct sbefifo kernel_sbefifo = { .target = { .name = "Kernel based FSI SBE FIFO", @@ -323,6 +369,7 @@ static void register_sbefifo(void) { pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_sbefifo_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chipop_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pib_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_mem_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pba_hw_unit); } -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 12:34:33 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 12:34:33 +1000 Subject: [Pdbg] [PATCH v5 12/19] libpdbg: Add thread driver using sbefifo In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> Message-ID: <20200430023440.225504-13-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/sbefifo.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index ca3a43d..eeb8d5c 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -271,6 +271,67 @@ static int sbefifo_pib_write(struct pib *pib, uint64_t addr, uint64_t val) return sbefifo_scom_put(sctx, addr, val); } +static int sbefifo_thread_probe(struct pdbg_target *target) +{ + struct thread *thread = target_to_thread(target); + uint32_t tid; + + assert(!pdbg_target_u32_property(target, "tid", &tid)); + thread->id = tid; + + return 0; +} + +static void sbefifo_thread_release(struct pdbg_target *target) +{ +} + +static int sbefifo_thread_op(struct thread *thread, uint32_t oper) +{ + struct pdbg_target *chiplet = + pdbg_target_require_parent("chiplet", &thread->target); + struct pdbg_target *pib = pdbg_target_require_parent("pib", chiplet); + struct sbefifo *sbefifo = pib_to_sbefifo(pib); + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); + uint8_t mode = 0; + + /* Enforce special-wakeup for thread stop and sreset */ + if ((oper & 0xf) == SBEFIFO_INSN_OP_STOP || + (oper & 0xf) == SBEFIFO_INSN_OP_SRESET) + mode = 0x2; + + /* This chip-op requires core-id as pervasive (chiplet) id */ + return sbefifo_control_insn(sctx, + pdbg_target_index(chiplet), + thread->id, + oper, + mode); +} +static int sbefifo_thread_start(struct thread *thread) +{ + return sbefifo_thread_op(thread, SBEFIFO_INSN_OP_START); +} + +static int sbefifo_thread_stop(struct thread *thread) +{ + return sbefifo_thread_op(thread, SBEFIFO_INSN_OP_STOP); +} + +static int sbefifo_thread_step(struct thread *thread, int count) +{ + int i, rc = 0; + + for (i = 0; i < count; i++) + rc |= sbefifo_thread_op(thread, SBEFIFO_INSN_OP_STEP); + + return rc; +} + +static int sbefifo_thread_sreset(struct thread *thread) +{ + return sbefifo_thread_op(thread, SBEFIFO_INSN_OP_SRESET); +} + static struct sbefifo_context *sbefifo_op_get_context(struct sbefifo *sbefifo) { return sbefifo->sf_ctx; @@ -352,6 +413,21 @@ static struct pib sbefifo_pib = { }; DECLARE_HW_UNIT(sbefifo_pib); +static struct thread sbefifo_thread = { + .target = { + .name = "SBE FFIO Chip-op based Thread", + .compatible = "ibm,power-thread", + .class = "thread", + .probe = sbefifo_thread_probe, + .release = sbefifo_thread_release, + }, + .start = sbefifo_thread_start, + .stop = sbefifo_thread_stop, + .step = sbefifo_thread_step, + .sreset = sbefifo_thread_sreset, +}; +DECLARE_HW_UNIT(sbefifo_thread); + static struct sbefifo kernel_sbefifo = { .target = { .name = "Kernel based FSI SBE FIFO", @@ -370,6 +446,7 @@ static void register_sbefifo(void) pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_sbefifo_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chipop_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pib_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_SBEFIFO, &sbefifo_thread_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_mem_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pba_hw_unit); } -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 12:34:34 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 12:34:34 +1000 Subject: [Pdbg] [PATCH v5 13/19] libpdbg: Add all thread procedures to pib target In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> Message-ID: <20200430023440.225504-14-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/hwunit.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h index dd41da7..f5a7dff 100644 --- a/libpdbg/hwunit.h +++ b/libpdbg/hwunit.h @@ -94,6 +94,10 @@ struct pib { struct pdbg_target target; int (*read)(struct pib *, uint64_t, uint64_t *); int (*write)(struct pib *, uint64_t, uint64_t); + int (*thread_start_all)(struct pib *); + int (*thread_stop_all)(struct pib *); + int (*thread_step_all)(struct pib *, int); + int (*thread_sreset_all)(struct pib *); void *priv; int fd; }; -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 12:34:35 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 12:34:35 +1000 Subject: [Pdbg] [PATCH v5 14/19] libpdbg: Implement all thread procedures using sbefifo In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> Message-ID: <20200430023440.225504-15-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/sbefifo.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index eeb8d5c..935a891 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -271,6 +271,53 @@ static int sbefifo_pib_write(struct pib *pib, uint64_t addr, uint64_t val) return sbefifo_scom_put(sctx, addr, val); } +static int sbefifo_pib_thread_op(struct pib *pib, uint32_t oper) +{ + struct sbefifo *sbefifo = target_to_sbefifo(pib->target.parent); + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); + uint32_t core_id, thread_id; + uint8_t mode = 0; + + /* + * core_id = 0xff (all SMT4 cores) + * thread_id = 0xf (all 4 threads in the SMT4 core) + */ + core_id = 0xff; + thread_id = 0xf; + + /* Enforce special-wakeup for thread stop and sreset */ + if ((oper & 0xf) == SBEFIFO_INSN_OP_STOP || + (oper & 0xf) == SBEFIFO_INSN_OP_SRESET) + mode = 0x2; + + return sbefifo_control_insn(sctx, core_id, thread_id, oper, mode); +} + +static int sbefifo_pib_thread_start(struct pib *pib) +{ + return sbefifo_pib_thread_op(pib, SBEFIFO_INSN_OP_START); +} + +static int sbefifo_pib_thread_stop(struct pib *pib) +{ + return sbefifo_pib_thread_op(pib, SBEFIFO_INSN_OP_STOP); +} + +static int sbefifo_pib_thread_step(struct pib *pib, int count) +{ + int i, rc = 0; + + for (i = 0; i < count; i++) + rc |= sbefifo_pib_thread_op(pib, SBEFIFO_INSN_OP_STEP); + + return rc; +} + +static int sbefifo_pib_thread_sreset(struct pib *pib) +{ + return sbefifo_pib_thread_op(pib, SBEFIFO_INSN_OP_SRESET); +} + static int sbefifo_thread_probe(struct pdbg_target *target) { struct thread *thread = target_to_thread(target); @@ -409,6 +456,10 @@ static struct pib sbefifo_pib = { }, .read = sbefifo_pib_read, .write = sbefifo_pib_write, + .thread_start_all = sbefifo_pib_thread_start, + .thread_stop_all = sbefifo_pib_thread_stop, + .thread_step_all = sbefifo_pib_thread_step, + .thread_sreset_all = sbefifo_pib_thread_sreset, .fd = -1, }; DECLARE_HW_UNIT(sbefifo_pib); -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 12:34:36 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 12:34:36 +1000 Subject: [Pdbg] [PATCH v5 15/19] libpdbg: Remove special case thread procedures using sbefifo In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> Message-ID: <20200430023440.225504-16-amitay@ozlabs.org> Always check if the all thread procedures are provided by pib. If not, use individual thread operations. Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/chip.c | 60 +++++++++++++++++--------------------------------- 1 file changed, 20 insertions(+), 40 deletions(-) diff --git a/libpdbg/chip.c b/libpdbg/chip.c index 848a831..86e91bd 100644 --- a/libpdbg/chip.c +++ b/libpdbg/chip.c @@ -156,21 +156,16 @@ int thread_sreset(struct pdbg_target *thread_target) int thread_step_all(void) { - struct pdbg_target *pib, *thread; + struct pdbg_target *target, *thread; int rc = 0, count = 0; - pdbg_for_each_class_target("pib", pib) { - struct chipop *chipop; + pdbg_for_each_class_target("pib", target) { + struct pib *pib = target_to_pib(target); - chipop = pib_to_chipop(pib); - if (!chipop) + if (!pib->thread_step_all) break; - /* - * core_id = 0xff (all SMT4 cores) - * thread_id = 0xf (all 4 threads in the SMT4 core) - */ - rc |= chipop->thread_step(chipop, 0xff, 0xf); + rc |= pib->thread_step_all(pib, 1); count++; } @@ -189,21 +184,16 @@ int thread_step_all(void) int thread_start_all(void) { - struct pdbg_target *pib, *thread; + struct pdbg_target *target, *thread; int rc = 0, count = 0; - pdbg_for_each_class_target("pib", pib) { - struct chipop *chipop; + pdbg_for_each_class_target("pib", target) { + struct pib *pib = target_to_pib(target); - chipop = pib_to_chipop(pib); - if (!chipop) + if (!pib->thread_start_all) break; - /* - * core_id = 0xff (all SMT4 cores) - * thread_id = 0xf (all 4 threads in the SMT4 core) - */ - rc |= chipop->thread_start(chipop, 0xff, 0xf); + rc |= pib->thread_start_all(pib); count++; } @@ -222,21 +212,16 @@ int thread_start_all(void) int thread_stop_all(void) { - struct pdbg_target *pib, *thread; + struct pdbg_target *target, *thread; int rc = 0, count = 0; - pdbg_for_each_class_target("pib", pib) { - struct chipop *chipop; + pdbg_for_each_class_target("pib", target) { + struct pib *pib = target_to_pib(target); - chipop = pib_to_chipop(pib); - if (!chipop) + if (!pib->thread_stop_all) break; - /* - * core_id = 0xff (all SMT4 cores) - * thread_id = 0xf (all 4 threads in the SMT4 core) - */ - rc |= chipop->thread_stop(chipop, 0xff, 0xf); + rc |= pib->thread_stop_all(pib); count++; } @@ -255,21 +240,16 @@ int thread_stop_all(void) int thread_sreset_all(void) { - struct pdbg_target *pib, *thread; + struct pdbg_target *target, *thread; int rc = 0, count = 0; - pdbg_for_each_class_target("pib", pib) { - struct chipop *chipop; + pdbg_for_each_class_target("pib", target) { + struct pib *pib = target_to_pib(target); - chipop = pib_to_chipop(pib); - if (!chipop) + if (!pib->thread_sreset_all) break; - /* - * core_id = 0xff (all SMT4 cores) - * thread_id = 0xf (all 4 threads in the SMT4 core) - */ - rc |= chipop->thread_sreset(chipop, 0xff, 0xf); + rc |= pib->thread_sreset_all(pib); count++; } -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 12:34:37 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 12:34:37 +1000 Subject: [Pdbg] [PATCH v5 16/19] libpdbg: Drop thread procedures from chipop target In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> Message-ID: <20200430023440.225504-17-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/hwunit.h | 4 ---- libpdbg/sbefifo.c | 46 ---------------------------------------------- 2 files changed, 50 deletions(-) diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h index f5a7dff..c30c048 100644 --- a/libpdbg/hwunit.h +++ b/libpdbg/hwunit.h @@ -76,10 +76,6 @@ struct chipop { int (*istep)(struct chipop *, uint32_t major, uint32_t minor); int (*mpipl_enter)(struct chipop *); int (*mpipl_continue)(struct chipop *); - int (*thread_start)(struct chipop *, uint32_t core_id, uint32_t thread_id); - int (*thread_stop)(struct chipop *, uint32_t core_id, uint32_t thread_id); - int (*thread_step)(struct chipop *, uint32_t core_id, uint32_t thread_id); - int (*thread_sreset)(struct chipop *, uint32_t core_id, uint32_t thread_id); }; #define target_to_chipop(x) container_of(x, struct chipop, target) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 935a891..3b2a786 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -195,48 +195,6 @@ static int sbefifo_op_mpipl_enter(struct chipop *chipop) return sbefifo_mpipl_enter(sctx); } -static int sbefifo_op_control(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id, - uint32_t oper) -{ - struct sbefifo *sbefifo = target_to_sbefifo(chipop->target.parent); - struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); - uint8_t mode = 0; - - /* Enforce special-wakeup for thread stop and sreset */ - if ((oper & 0xf) == SBEFIFO_INSN_OP_STOP || - (oper & 0xf) == SBEFIFO_INSN_OP_SRESET) - mode = 0x2; - - PR_NOTICE("sbefifo: control c:0x%x, t:0x%x, op:%u mode:%u\n", core_id, thread_id, oper, mode); - - return sbefifo_control_insn(sctx, core_id & 0xff, thread_id & 0xff, oper & 0xff, mode); -} - -static int sbefifo_op_thread_start(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id) -{ - return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_START); -} - -static int sbefifo_op_thread_stop(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id) -{ - return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_STOP); -} - -static int sbefifo_op_thread_step(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id) -{ - return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_STEP); -} - -static int sbefifo_op_thread_sreset(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id) -{ - return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_SRESET); -} - static struct sbefifo *pib_to_sbefifo(struct pdbg_target *pib) { struct pdbg_target *target; @@ -441,10 +399,6 @@ static struct chipop sbefifo_chipop = { .istep = sbefifo_op_istep, .mpipl_enter = sbefifo_op_mpipl_enter, .mpipl_continue = sbefifo_op_mpipl_continue, - .thread_start = sbefifo_op_thread_start, - .thread_stop = sbefifo_op_thread_stop, - .thread_step = sbefifo_op_thread_step, - .thread_sreset = sbefifo_op_thread_sreset, }; DECLARE_HW_UNIT(sbefifo_chipop); -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 12:34:38 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 12:34:38 +1000 Subject: [Pdbg] [PATCH v5 17/19] dts: Add sbefifo backend device tree In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> Message-ID: <20200430023440.225504-18-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- Makefile.am | 1 + p9-sbefifo.dts.m4 | 86 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 p9-sbefifo.dts.m4 diff --git a/Makefile.am b/Makefile.am index 10306dc..74ad99f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -80,6 +80,7 @@ endif DT = fake.dts fake2.dts p8-cronus.dts p9-cronus.dts \ p8-fsi.dts p8-i2c.dts p8-kernel.dts \ p9w-fsi.dts p9r-fsi.dts p9z-fsi.dts p9-kernel.dts \ + p9-sbefifo.dts \ p8-host.dts p9-host.dts p8.dts DT_sources = $(DT:.dts=.dtb.S) p9.dtb.S diff --git a/p9-sbefifo.dts.m4 b/p9-sbefifo.dts.m4 new file mode 100644 index 0000000..48b3051 --- /dev/null +++ b/p9-sbefifo.dts.m4 @@ -0,0 +1,86 @@ +/dts-v1/; + +/ { + #address-cells = <0x1>; + #size-cells = <0x0>; + + fsi0: kernelfsi at 0 { + #address-cells = <0x2>; + #size-cells = <0x1>; + compatible = "ibm,kernel-fsi"; + reg = <0x0 0x0 0x0>; + index = <0x0>; + status = "mustexist"; + system-path = "/proc0/fsi"; + + sbefifo at 2400 { /* Bogus address */ + reg = <0x0 0x2400 0x7>; + index = <0x0>; + compatible = "ibm,kernel-sbefifo"; + device-path = "/dev/sbefifo1"; + + sbefifo-pib { + #address-cells = <0x2>; + #size-cells = <0x1>; + index = <0x0>; + compatible = "ibm,sbefifo-pib"; + system-path = "/proc0/pib"; + }; + + sbefifo-mem { + compatible = "ibm,sbefifo-mem"; + system-path = "/mem0"; + }; + + sbefifo-pba { + compatible = "ibm,sbefifo-mem-pba"; + system-path = "/mempba0"; + }; + + sbefifo-chipop { + compatible = "ibm,sbefifo-chipop"; + index = <0x0>; + }; + }; + + hmfsi at 100000 { + #address-cells = <0x2>; + #size-cells = <0x1>; + compatible = "ibm,fsi-hmfsi"; + reg = <0x0 0x100000 0x8000>; + port = <0x1>; + index = <0x1>; + system-path = "/proc1/fsi"; + + sbefifo at 2400 { /* Bogus address */ + reg = <0x0 0x2400 0x7>; + index = <0x1>; + compatible = "ibm,kernel-sbefifo"; + device-path = "/dev/sbefifo2"; + + sbefifo-pib { + #address-cells = <0x2>; + #size-cells = <0x1>; + index = <0x1>; + compatible = "ibm,sbefifo-pib"; + system-path = "/proc1/pib"; + }; + + sbefifo-mem { + compatible = "ibm,sbefifo-mem"; + system-path = "/mem1"; + }; + + sbefifo-pba { + compatible = "ibm,sbefifo-mem-pba"; + system-path = "/mempba1"; + }; + + sbefifo-chipop { + compatible = "ibm,sbefifo-chipop"; + index = <0x1>; + }; + }; + }; + }; +}; -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 12:34:39 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 12:34:39 +1000 Subject: [Pdbg] [PATCH v5 18/19] libpdbg: Enable sbefifo backend In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> Message-ID: <20200430023440.225504-19-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/dtb.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index 6a75de4..a549c2f 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -43,6 +43,7 @@ #include "p9-host.dt.h" #include "p8-cronus.dt.h" #include "p9-cronus.dt.h" +#include "p9-sbefifo.dt.h" #include "p8.dt.h" #include "p9.dt.h" @@ -93,6 +94,8 @@ static enum pdbg_backend default_backend(void) return PDBG_BACKEND_HOST; else if (!strcmp(tmp, "cronus")) return PDBG_BACKEND_CRONUS; + else if (!strcmp(tmp, "sbefifo")) + return PDBG_BACKEND_SBEFIFO; } rc = access(XSCOM_BASE_PATH, F_OK); @@ -419,6 +422,24 @@ struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) } break; + case PDBG_BACKEND_SBEFIFO: + if (!pdbg_backend_option) { + pdbg_log(PDBG_ERROR, "No system type specified\n"); + pdbg_log(PDBG_ERROR, "Use p9\n"); + return NULL; + } + + if (!strcmp(pdbg_backend_option, "p9")) { + if (!dtb->backend.fdt) + dtb->backend.fdt = &_binary_p9_sbefifo_dtb_o_start; + if (!dtb->system.fdt) + dtb->system.fdt = &_binary_p9_dtb_o_start; + } else { + pdbg_log(PDBG_ERROR, "Invalid system type %s\n", pdbg_backend_option); + pdbg_log(PDBG_ERROR, "Use p9\n"); + } + break; + default: pdbg_log(PDBG_WARNING, "Unable to determine a valid default backend, using fake backend for testing purposes\n"); /* Fall through */ -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 12:34:40 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 12:34:40 +1000 Subject: [Pdbg] [PATCH v5 19/19] main: Add sbefifo backend In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> Message-ID: <20200430023440.225504-20-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- src/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.c b/src/main.c index 785dc26..5a5616d 100644 --- a/src/main.c +++ b/src/main.c @@ -149,6 +149,7 @@ static void print_usage(void) printf("\t\tRun command on all possible processors/chips/threads (default)\n"); printf("\t-b, --backend=backend\n"); printf("\t\tcronus:\tA backend based on cronus server\n"); + printf("\t\tsbefifo:\tA backend using sbefifo kernel driver\n"); printf("\t\tfsi:\tAn experimental backend that uses\n"); printf("\t\t\tbit-banging to access the host processor\n"); printf("\t\t\tvia the FSI bus.\n"); @@ -392,6 +393,8 @@ static bool parse_options(int argc, char *argv[]) backend = PDBG_BACKEND_HOST; } else if (strcmp(optarg, "cronus") == 0) { backend = PDBG_BACKEND_CRONUS; + } else if (strcmp(optarg, "sbefifo") == 0) { + backend = PDBG_BACKEND_SBEFIFO; } else { fprintf(stderr, "Invalid backend '%s'\n", optarg); opt_error = true; -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 13:05:34 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 13:05:34 +1000 Subject: [Pdbg] [PATCH 01/11] dts: Rename p9-kernel to bmc-kernel In-Reply-To: <20200430030544.234289-1-amitay@ozlabs.org> References: <20200430030544.234289-1-amitay@ozlabs.org> Message-ID: <20200430030544.234289-2-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- Makefile.am | 6 +++--- p9-kernel.dts.m4 => bmc-kernel.dts.m4 | 0 libpdbg/dtb.c | 6 +++--- tests/test_p9_fapi_translation.sh | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) rename p9-kernel.dts.m4 => bmc-kernel.dts.m4 (100%) diff --git a/Makefile.am b/Makefile.am index 74ad99f..041ec01 100644 --- a/Makefile.am +++ b/Makefile.am @@ -36,7 +36,7 @@ TESTS = $(libpdbg_tests) optcmd_test $(PDBG_TESTS) tests/test_tree2.sh: fake2.dtb tests/test_prop.sh: fake.dtb -tests/test_p9_fapi_translation.sh: p9.dtb p9-kernel.dtb +tests/test_p9_fapi_translation.sh: p9.dtb bmc-kernel.dtb test: $(libpdbg_tests) @@ -56,7 +56,7 @@ EXTRA_DIST = \ p8-pib.dts.m4 \ p9-fsi.dtsi.m4 \ p9-host.dts.m4 \ - p9-kernel.dts.m4 \ + bmc-kernel.dts.m4 \ p9-pib.dts.m4 \ p9r-fsi.dts.m4 \ p9w-fsi.dts.m4 \ @@ -79,7 +79,7 @@ endif DT = fake.dts fake2.dts p8-cronus.dts p9-cronus.dts \ p8-fsi.dts p8-i2c.dts p8-kernel.dts \ - p9w-fsi.dts p9r-fsi.dts p9z-fsi.dts p9-kernel.dts \ + p9w-fsi.dts p9r-fsi.dts p9z-fsi.dts bmc-kernel.dts \ p9-sbefifo.dts \ p8-host.dts p9-host.dts p8.dts diff --git a/p9-kernel.dts.m4 b/bmc-kernel.dts.m4 similarity index 100% rename from p9-kernel.dts.m4 rename to bmc-kernel.dts.m4 diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index a549c2f..f9573a6 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -38,7 +38,7 @@ #include "p9w-fsi.dt.h" #include "p9r-fsi.dt.h" #include "p9z-fsi.dt.h" -#include "p9-kernel.dt.h" +#include "bmc-kernel.dt.h" #include "p8-host.dt.h" #include "p9-host.dt.h" #include "p8-cronus.dt.h" @@ -195,7 +195,7 @@ static void bmc_target(struct pdbg_dtb *dtb) dtb->system.fdt = &_binary_p8_dtb_o_start; } else if (!strcmp(pdbg_backend_option, "p9")) { if (!dtb->backend.fdt) - dtb->backend.fdt = &_binary_p9_kernel_dtb_o_start; + dtb->backend.fdt = &_binary_bmc_kernel_dtb_o_start; if (!dtb->system.fdt) dtb->system.fdt = &_binary_p9_dtb_o_start; } else { @@ -234,7 +234,7 @@ static void bmc_target(struct pdbg_dtb *dtb) case CHIP_ID_P9P: pdbg_log(PDBG_INFO, "Found a POWER9 OpenBMC based system\n"); if (!dtb->backend.fdt) - dtb->backend.fdt = &_binary_p9_kernel_dtb_o_start; + dtb->backend.fdt = &_binary_bmc_kernel_dtb_o_start; if (!dtb->system.fdt) dtb->system.fdt = &_binary_p9_dtb_o_start; break; diff --git a/tests/test_p9_fapi_translation.sh b/tests/test_p9_fapi_translation.sh index a5a09b1..fbb194d 100755 --- a/tests/test_p9_fapi_translation.sh +++ b/tests/test_p9_fapi_translation.sh @@ -4,7 +4,7 @@ test_group "p9 fapi translation tests" -export PDBG_BACKEND_DTB=p9-kernel.dtb +export PDBG_BACKEND_DTB=bmc-kernel.dtb export PDBG_DTB=p9.dtb test_result 0 < References: <20200430030544.234289-1-amitay@ozlabs.org> Message-ID: <20200430030544.234289-3-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- bmc-kernel.dts.m4 | 166 ++++++++++++++++++++++++++-------------------- 1 file changed, 93 insertions(+), 73 deletions(-) diff --git a/bmc-kernel.dts.m4 b/bmc-kernel.dts.m4 index 5c8010f..7cf43cf 100644 --- a/bmc-kernel.dts.m4 +++ b/bmc-kernel.dts.m4 @@ -1,90 +1,110 @@ -/dts-v1/; +dnl +dnl PIB([addr], [index], [path-index]) +dnl +define(`PIB', +` + pib@$1 { + #address-cells = <0x2>; + #size-cells = <0x1>; + reg = <0x0 0x$1 0x7>; + compatible = "ibm,kernel-pib"; + index = <0x$2>; + device-path = "/dev/scom$3"; + system-path = "/proc$2/pib"; + }; +')dnl -/ { - #address-cells = <0x1>; - #size-cells = <0x0>; +dnl +dnl SBEFIFO([index], [path-index]) +dnl +define(`SBEFIFO', +` + sbefifo at 2400 { /* Bogus address */ + reg = <0x0 0x2400 0x7>; + compatible = "ibm,kernel-sbefifo"; + index = <0x$1>; + device-path = "/dev/sbefifo$2"; + + sbefifo-mem { + compatible = "ibm,sbefifo-mem"; + index = <0x$1>; + system-path = "/mem$1"; + }; + + sbefifo-pba { + compatible = "ibm,sbefifo-mem-pba"; + index = <0x$1>; + system-path = "/mempba$1"; + }; + + sbefifo-chipop { + compatible = "ibm,sbefifo-chipop"; + index = <0x$1>; + }; + }; +')dnl - fsi0: kernelfsi at 0 { +dnl +dnl FSI_PRE([addr], [index], [path-index]) +dnl +define(`FSI_PRE', +` + fsi@$1 { #address-cells = <0x2>; #size-cells = <0x1>; + reg = <0x0 0x$1 0x8000>; compatible = "ibm,kernel-fsi"; - reg = <0x0 0x0 0x0>; - index = <0x0>; + index = <0x$2>; + system-path = "/proc$2/fsi"; status = "mustexist"; - system-path = "/proc0/fsi"; - pib at 1000 { - #address-cells = <0x2>; - #size-cells = <0x1>; - reg = <0x0 0x1000 0x7>; - index = <0x0>; - compatible = "ibm,kernel-pib"; - device-path = "/dev/scom1"; - system-path = "/proc0/pib"; - }; - - sbefifo at 2400 { /* Bogus address */ - reg = <0x0 0x2400 0x7>; - index = <0x0>; - compatible = "ibm,kernel-sbefifo"; - device-path = "/dev/sbefifo1"; + PIB(1000, $2, $3) + SBEFIFO($2, $3) +')dnl - sbefifo-mem { - compatible = "ibm,sbefifo-mem"; - system-path = "/mem0"; - }; +dnl +dnl FSI_POST() +dnl +define(`FSI_POST', +` + }; +')dnl - sbefifo-pba { - compatible = "ibm,sbefifo-mem-pba"; - system-path = "/mempba0"; - }; +dnl +dnl HMFSI([addr], [port], [index], [path-index]) +dnl +define(`HMFSI', +` + hmfsi@$1 { + #address-cells = <0x2>; + #size-cells = <0x1>; + reg = <0x0 0x$1 0x8000>; + compatible = "ibm,fsi-hmfsi"; + port = <0x$2>; + index = <0x$3>; + system-path = "/proc$3/fsi"; - sbefifo-chipop { - compatible = "ibm,sbefifo-chipop"; - index = <0x0>; - }; - }; + PIB(1000, $3, $4) + SBEFIFO($3, $4) + }; +')dnl - hmfsi at 100000 { - #address-cells = <0x2>; - #size-cells = <0x1>; - compatible = "ibm,fsi-hmfsi"; - reg = <0x0 0x100000 0x8000>; - port = <0x1>; - index = <0x1>; - system-path = "/proc1/fsi"; - pib at 1000 { - #address-cells = <0x2>; - #size-cells = <0x1>; - reg = <0x0 0x1000 0x7>; - index = <0x1>; - compatible = "ibm,kernel-pib"; - device-path = "/dev/scom2"; - system-path = "/proc1/pib"; - }; +/dts-v1/; - sbefifo at 2400 { /* Bogus address */ - reg = <0x0 0x2400 0x7>; - index = <0x1>; - compatible = "ibm,kernel-sbefifo"; - device-path = "/dev/sbefifo2"; +/ { + #address-cells = <0x1>; + #size-cells = <0x0>; - sbefifo-mem { - compatible = "ibm,sbefifo-mem"; - system-path = "/mem1"; - }; + FSI_PRE(0, 0, 1) - sbefifo-pba { - compatible = "ibm,sbefifo-mem-pba"; - system-path = "/mempba1"; - }; + HMFSI(100000, 1, 1, 2) + HMFSI(180000, 2, 2, 3) + HMFSI(200000, 3, 3, 4) + HMFSI(280000, 4, 4, 5) + HMFSI(300000, 5, 5, 6) + HMFSI(380000, 6, 6, 7) + HMFSI(400000, 7, 7, 8) - sbefifo-chipop { - compatible = "ibm,sbefifo-chipop"; - index = <0x1>; - }; - }; - }; - }; + FSI_POST() }; -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 13:05:36 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 13:05:36 +1000 Subject: [Pdbg] [PATCH 03/11] dts: Rename p9-cronus to bmc-cronus In-Reply-To: <20200430030544.234289-1-amitay@ozlabs.org> References: <20200430030544.234289-1-amitay@ozlabs.org> Message-ID: <20200430030544.234289-4-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- Makefile.am | 2 +- p9-cronus.dts.m4 => bmc-cronus.dts.m4 | 0 libpdbg/dtb.c | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) rename p9-cronus.dts.m4 => bmc-cronus.dts.m4 (100%) diff --git a/Makefile.am b/Makefile.am index 041ec01..4b53c80 100644 --- a/Makefile.am +++ b/Makefile.am @@ -77,7 +77,7 @@ if TARGET_PPC ARCH_FLAGS="-DTARGET_PPC=1" endif -DT = fake.dts fake2.dts p8-cronus.dts p9-cronus.dts \ +DT = fake.dts fake2.dts p8-cronus.dts bmc-cronus.dts \ p8-fsi.dts p8-i2c.dts p8-kernel.dts \ p9w-fsi.dts p9r-fsi.dts p9z-fsi.dts bmc-kernel.dts \ p9-sbefifo.dts \ diff --git a/p9-cronus.dts.m4 b/bmc-cronus.dts.m4 similarity index 100% rename from p9-cronus.dts.m4 rename to bmc-cronus.dts.m4 diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index f9573a6..6a9fc73 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -42,7 +42,7 @@ #include "p8-host.dt.h" #include "p9-host.dt.h" #include "p8-cronus.dt.h" -#include "p9-cronus.dt.h" +#include "bmc-cronus.dt.h" #include "p9-sbefifo.dt.h" #include "p8.dt.h" @@ -413,7 +413,7 @@ struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) dtb->system.fdt = &_binary_p8_dtb_o_start; } else if (!strncmp(pdbg_backend_option, "p9", 2)) { if (!dtb->backend.fdt) - dtb->backend.fdt = &_binary_p9_cronus_dtb_o_start; + dtb->backend.fdt = &_binary_bmc_cronus_dtb_o_start; if (!dtb->system.fdt) dtb->system.fdt = &_binary_p9_dtb_o_start; } else { -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 13:05:37 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 13:05:37 +1000 Subject: [Pdbg] [PATCH 04/11] dts: Populate all possible chips in bmc-cronus device tree In-Reply-To: <20200430030544.234289-1-amitay@ozlabs.org> References: <20200430030544.234289-1-amitay@ozlabs.org> Message-ID: <20200430030544.234289-5-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- bmc-cronus.dts.m4 | 73 +++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 44 deletions(-) diff --git a/bmc-cronus.dts.m4 b/bmc-cronus.dts.m4 index b9173b2..1ec49b5 100644 --- a/bmc-cronus.dts.m4 +++ b/bmc-cronus.dts.m4 @@ -1,67 +1,52 @@ -/dts-v1/; - -/ { - fsi0 { - compatible = "ibm,cronus-fsi"; - index = <0x0>; - system-path = "/proc0/fsi"; - }; - - pib0 { - compatible = "ibm,cronus-pib"; - index = <0x0>; - system-path = "/proc0/pib"; - }; - - fsi1 { +dnl +dnl CHIP([index]) +dnl +define(`CHIP', +` + fsi$1 { compatible = "ibm,cronus-fsi"; - index = <0x1>; - system-path = "/proc1/fsi"; + index = <0x$1>; + system-path = "/proc$1/fsi"; }; - pib1 { + pib$1 { compatible = "ibm,cronus-pib"; - index = <0x1>; - system-path = "/proc1/pib"; + index = <0x$1>; + system-path = "/proc$1/pib"; }; - sbefifo0 { - index = <0x0>; + sbefifo$1 { compatible = "ibm,cronus-sbefifo"; + index = <0x$1>; sbefifo-chipop { compatible = "ibm,sbefifo-chipop"; - index = <0x0>; + index = <0x$1>; }; sbefifo-mem { compatible = "ibm,sbefifo-mem"; - system-path = "/mem0"; + index = <0x$1>; + system-path = "/mem$1"; }; sbefifo-pba { compatible = "ibm,sbefifo-mem-pba"; - system-path = "/mempba0"; + index = <0x$1>; + system-path = "/mempba$1"; }; }; +')dnl - sbefifo1 { - index = <0x1>; - compatible = "ibm,cronus-sbefifo"; - - sbefifo-chipop { - compatible = "ibm,sbefifo-chipop"; - index = <0x1>; - }; - - sbefifo-mem { - compatible = "ibm,sbefifo-mem"; - system-path = "/mem1"; - }; +/dts-v1/; - sbefifo-pba { - compatible = "ibm,sbefifo-mem-pba"; - system-path = "/mempba1"; - }; - }; +/ { + CHIP(0) + CHIP(1) + CHIP(2) + CHIP(3) + CHIP(4) + CHIP(5) + CHIP(6) + CHIP(7) }; -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 13:05:33 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 13:05:33 +1000 Subject: [Pdbg] [PATCH 00/11] Reorganization of device trees Message-ID: <20200430030544.234289-1-amitay@ozlabs.org> Rename backend device trees that are independent of processor. Allow for maximum possible chips in each backend and the p9 system tree. Convert p9 system tree to use m4 macros, to avoid errors. Also, split fake device trees used for testing. This patchset is depedant on sbefifo patchset. Amitay Isaacs (11): dts: Rename p9-kernel to bmc-kernel dts: Populate all possible chips in bmc-kernel device tree dts: Rename p9-cronus to bmc-cronus dts: Populate all possible chips in bmc-cronus device tree dts: Rename p9-sbefifo to bmc-sbefifo dts: Populate all possible chips in bmc-sbefifo device tree dts: Generate p9.dts dts: Populate all possible chips in p9 system tree tests: Remove unnecessary include and dependency dts: Split fake backend and system trees dts: Split fake2 into backend and system trees Makefile.am | 19 +- bmc-cronus.dts.m4 | 52 + bmc-kernel.dts.m4 | 110 + bmc-sbefifo.dts.m4 | 100 + fake-backend.dts.m4 | 52 + fake.dts.m4 | 31 +- fake2-backend.dts.m4 | 104 + fake2.dts.m4 | 80 +- libpdbg/dtb.c | 17 +- p9-cronus.dts.m4 | 67 - p9-kernel.dts.m4 | 90 - p9-sbefifo.dts.m4 | 86 - p9.dts | 3436 ----------------------------- p9.dts.m4 | 653 ++++++ src/tests/libpdbg_probe_test.c | 2 - src/tests/libpdbg_target_test.c | 2 - tests/test_p9_fapi_translation.sh | 776 ++++++- tests/test_prop.sh | 4 + tests/test_tree2.sh | 1 + 19 files changed, 1871 insertions(+), 3811 deletions(-) create mode 100644 bmc-cronus.dts.m4 create mode 100644 bmc-kernel.dts.m4 create mode 100644 bmc-sbefifo.dts.m4 create mode 100644 fake-backend.dts.m4 create mode 100644 fake2-backend.dts.m4 delete mode 100644 p9-cronus.dts.m4 delete mode 100644 p9-kernel.dts.m4 delete mode 100644 p9-sbefifo.dts.m4 delete mode 100644 p9.dts create mode 100644 p9.dts.m4 -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 13:05:38 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 13:05:38 +1000 Subject: [Pdbg] [PATCH 05/11] dts: Rename p9-sbefifo to bmc-sbefifo In-Reply-To: <20200430030544.234289-1-amitay@ozlabs.org> References: <20200430030544.234289-1-amitay@ozlabs.org> Message-ID: <20200430030544.234289-6-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- Makefile.am | 2 +- p9-sbefifo.dts.m4 => bmc-sbefifo.dts.m4 | 0 libpdbg/dtb.c | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) rename p9-sbefifo.dts.m4 => bmc-sbefifo.dts.m4 (100%) diff --git a/Makefile.am b/Makefile.am index 4b53c80..64f3e0b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -80,7 +80,7 @@ endif DT = fake.dts fake2.dts p8-cronus.dts bmc-cronus.dts \ p8-fsi.dts p8-i2c.dts p8-kernel.dts \ p9w-fsi.dts p9r-fsi.dts p9z-fsi.dts bmc-kernel.dts \ - p9-sbefifo.dts \ + bmc-sbefifo.dts \ p8-host.dts p9-host.dts p8.dts DT_sources = $(DT:.dts=.dtb.S) p9.dtb.S diff --git a/p9-sbefifo.dts.m4 b/bmc-sbefifo.dts.m4 similarity index 100% rename from p9-sbefifo.dts.m4 rename to bmc-sbefifo.dts.m4 diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index 6a9fc73..5013d96 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -43,7 +43,7 @@ #include "p9-host.dt.h" #include "p8-cronus.dt.h" #include "bmc-cronus.dt.h" -#include "p9-sbefifo.dt.h" +#include "bmc-sbefifo.dt.h" #include "p8.dt.h" #include "p9.dt.h" @@ -431,7 +431,7 @@ struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) if (!strcmp(pdbg_backend_option, "p9")) { if (!dtb->backend.fdt) - dtb->backend.fdt = &_binary_p9_sbefifo_dtb_o_start; + dtb->backend.fdt = &_binary_bmc_sbefifo_dtb_o_start; if (!dtb->system.fdt) dtb->system.fdt = &_binary_p9_dtb_o_start; } else { -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 13:05:39 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 13:05:39 +1000 Subject: [Pdbg] [PATCH 06/11] dts: Populate all possible chips in bmc-sbefifo device tree In-Reply-To: <20200430030544.234289-1-amitay@ozlabs.org> References: <20200430030544.234289-1-amitay@ozlabs.org> Message-ID: <20200430030544.234289-7-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- bmc-sbefifo.dts.m4 | 152 +++++++++++++++++++++++++-------------------- 1 file changed, 83 insertions(+), 69 deletions(-) diff --git a/bmc-sbefifo.dts.m4 b/bmc-sbefifo.dts.m4 index 48b3051..f4ec4ab 100644 --- a/bmc-sbefifo.dts.m4 +++ b/bmc-sbefifo.dts.m4 @@ -1,86 +1,100 @@ -/dts-v1/; +dnl +dnl SBEFIFO([index], [path-index]) +dnl +define(`SBEFIFO', +` + sbefifo at 2400 { /* Bogus address */ + reg = <0x0 0x2400 0x7>; + compatible = "ibm,kernel-sbefifo"; + index = <0x$1>; + device-path = "/dev/sbefifo$2"; -/ { - #address-cells = <0x1>; - #size-cells = <0x0>; + sbefifo-pib { + #address-cells = <0x2>; + #size-cells = <0x1>; + compatible = "ibm,sbefifo-pib"; + index = <0x$1>; + system-path = "/proc$1/pib"; + }; + + sbefifo-mem { + compatible = "ibm,sbefifo-mem"; + index = <0x$1>; + system-path = "/mem$1"; + }; + + sbefifo-pba { + compatible = "ibm,sbefifo-mem-pba"; + index = <0x$1>; + system-path = "/mempba$1"; + }; + + sbefifo-chipop { + compatible = "ibm,sbefifo-chipop"; + index = <0x$1>; + }; + }; +')dnl - fsi0: kernelfsi at 0 { +dnl +dnl FSI_PRE([addr], [index], [path-index]) +dnl +define(`FSI_PRE', +` + fsi@$1 { #address-cells = <0x2>; #size-cells = <0x1>; compatible = "ibm,kernel-fsi"; - reg = <0x0 0x0 0x0>; - index = <0x0>; + reg = <0x0 0x$1 0x8000>; + index = <0x$2>; status = "mustexist"; - system-path = "/proc0/fsi"; + system-path = "/proc$2/fsi"; - sbefifo at 2400 { /* Bogus address */ - reg = <0x0 0x2400 0x7>; - index = <0x0>; - compatible = "ibm,kernel-sbefifo"; - device-path = "/dev/sbefifo1"; + SBEFIFO($2, $3) +')dnl - sbefifo-pib { - #address-cells = <0x2>; - #size-cells = <0x1>; - index = <0x0>; - compatible = "ibm,sbefifo-pib"; - system-path = "/proc0/pib"; - }; - - sbefifo-mem { - compatible = "ibm,sbefifo-mem"; - system-path = "/mem0"; - }; +dnl +dnl FSI_POST() +dnl +define(`FSI_POST', +` + }; +')dnl - sbefifo-pba { - compatible = "ibm,sbefifo-mem-pba"; - system-path = "/mempba0"; - }; +dnl +dnl HMFSI([addr], [port], [index], [path-index]) +dnl +define(`HMFSI', +` + hmfsi@$1 { + #address-cells = <0x2>; + #size-cells = <0x1>; + compatible = "ibm,fsi-hmfsi"; + reg = <0x0 0x$1 0x8000>; + port = <0x$2>; + index = <0x$3>; + system-path = "/proc$3/fsi"; - sbefifo-chipop { - compatible = "ibm,sbefifo-chipop"; - index = <0x0>; - }; - }; + SBEFIFO($3, $4) + }; +')dnl - hmfsi at 100000 { - #address-cells = <0x2>; - #size-cells = <0x1>; - compatible = "ibm,fsi-hmfsi"; - reg = <0x0 0x100000 0x8000>; - port = <0x1>; - index = <0x1>; - system-path = "/proc1/fsi"; - sbefifo at 2400 { /* Bogus address */ - reg = <0x0 0x2400 0x7>; - index = <0x1>; - compatible = "ibm,kernel-sbefifo"; - device-path = "/dev/sbefifo2"; +/dts-v1/; - sbefifo-pib { - #address-cells = <0x2>; - #size-cells = <0x1>; - index = <0x1>; - compatible = "ibm,sbefifo-pib"; - system-path = "/proc1/pib"; - }; +/ { + #address-cells = <0x1>; + #size-cells = <0x0>; - sbefifo-mem { - compatible = "ibm,sbefifo-mem"; - system-path = "/mem1"; - }; + FSI_PRE(0, 0, 1) - sbefifo-pba { - compatible = "ibm,sbefifo-mem-pba"; - system-path = "/mempba1"; - }; + HMFSI(100000, 1, 1, 2) + HMFSI(180000, 2, 2, 3) + HMFSI(200000, 3, 3, 4) + HMFSI(280000, 4, 4, 5) + HMFSI(300000, 5, 5, 6) + HMFSI(380000, 6, 6, 7) + HMFSI(400000, 7, 7, 8) - sbefifo-chipop { - compatible = "ibm,sbefifo-chipop"; - index = <0x1>; - }; - }; - }; - }; + FSI_POST() }; -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 13:05:40 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 13:05:40 +1000 Subject: [Pdbg] [PATCH 07/11] dts: Generate p9.dts In-Reply-To: <20200430030544.234289-1-amitay@ozlabs.org> References: <20200430030544.234289-1-amitay@ozlabs.org> Message-ID: <20200430030544.234289-8-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- p9.dts => p9.dts.m4 | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename p9.dts => p9.dts.m4 (100%) diff --git a/p9.dts b/p9.dts.m4 similarity index 100% rename from p9.dts rename to p9.dts.m4 -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 13:05:42 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 13:05:42 +1000 Subject: [Pdbg] [PATCH 09/11] tests: Remove unnecessary include and dependency In-Reply-To: <20200430030544.234289-1-amitay@ozlabs.org> References: <20200430030544.234289-1-amitay@ozlabs.org> Message-ID: <20200430030544.234289-10-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- Makefile.am | 4 ---- src/tests/libpdbg_probe_test.c | 2 -- src/tests/libpdbg_target_test.c | 2 -- 3 files changed, 8 deletions(-) diff --git a/Makefile.am b/Makefile.am index 64f3e0b..babb82c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -243,8 +243,6 @@ libpdbg_target_test_CFLAGS = $(libpdbg_test_cflags) libpdbg_target_test_LDFLAGS = $(libpdbg_test_ldflags) libpdbg_target_test_LDADD = $(libpdbg_test_ldadd) -src/tests/libpdbg_target_test.c: fake.dt.h - libpdbg_probe_test1_SOURCES = src/tests/libpdbg_probe_test.c libpdbg_probe_test1_CFLAGS = $(libpdbg_test_cflags) -DTEST_ID=1 libpdbg_probe_test1_LDFLAGS = $(libpdbg_test_ldflags) @@ -260,8 +258,6 @@ libpdbg_probe_test3_CFLAGS = $(libpdbg_test_cflags) -DTEST_ID=3 libpdbg_probe_test3_LDFLAGS = $(libpdbg_test_ldflags) libpdbg_probe_test3_LDADD = $(libpdbg_test_ldadd) -src/tests/libpdbg_probe_test.c: fake.dt.h - libpdbg_dtree_test_SOURCES = src/tests/libpdbg_dtree_test.c libpdbg_dtree_test_CFLAGS = $(libpdbg_test_cflags) libpdbg_dtree_test_LDFLAGS = $(libpdbg_test_ldflags) diff --git a/src/tests/libpdbg_probe_test.c b/src/tests/libpdbg_probe_test.c index c76f77f..cdefddd 100644 --- a/src/tests/libpdbg_probe_test.c +++ b/src/tests/libpdbg_probe_test.c @@ -20,8 +20,6 @@ #include -#include "fake.dt.h" - static void for_each_target(struct pdbg_target *parent, void (*callback)(struct pdbg_target *target, enum pdbg_target_status status), diff --git a/src/tests/libpdbg_target_test.c b/src/tests/libpdbg_target_test.c index 36e6891..d7ffbd2 100644 --- a/src/tests/libpdbg_target_test.c +++ b/src/tests/libpdbg_target_test.c @@ -21,8 +21,6 @@ #include -#include "fake.dt.h" - static int count_target(struct pdbg_target *parent, const char *classname) { struct pdbg_target *target; -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 13:05:43 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 13:05:43 +1000 Subject: [Pdbg] [PATCH 10/11] dts: Split fake backend and system trees In-Reply-To: <20200430030544.234289-1-amitay@ozlabs.org> References: <20200430030544.234289-1-amitay@ozlabs.org> Message-ID: <20200430030544.234289-11-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- Makefile.am | 4 ++-- fake-backend.dts.m4 | 52 +++++++++++++++++++++++++++++++++++++++++++++ fake.dts.m4 | 31 +-------------------------- libpdbg/dtb.c | 3 +++ tests/test_prop.sh | 4 ++++ 5 files changed, 62 insertions(+), 32 deletions(-) create mode 100644 fake-backend.dts.m4 diff --git a/Makefile.am b/Makefile.am index babb82c..e0b0954 100644 --- a/Makefile.am +++ b/Makefile.am @@ -35,7 +35,7 @@ PDBG_TESTS = \ TESTS = $(libpdbg_tests) optcmd_test $(PDBG_TESTS) tests/test_tree2.sh: fake2.dtb -tests/test_prop.sh: fake.dtb +tests/test_prop.sh: fake.dtb fake-backend.dtb tests/test_p9_fapi_translation.sh: p9.dtb bmc-kernel.dtb test: $(libpdbg_tests) @@ -77,7 +77,7 @@ if TARGET_PPC ARCH_FLAGS="-DTARGET_PPC=1" endif -DT = fake.dts fake2.dts p8-cronus.dts bmc-cronus.dts \ +DT = fake.dts fake-backend.dts fake2.dts p8-cronus.dts bmc-cronus.dts \ p8-fsi.dts p8-i2c.dts p8-kernel.dts \ p9w-fsi.dts p9r-fsi.dts p9z-fsi.dts bmc-kernel.dts \ bmc-sbefifo.dts \ diff --git a/fake-backend.dts.m4 b/fake-backend.dts.m4 new file mode 100644 index 0000000..2686c4e --- /dev/null +++ b/fake-backend.dts.m4 @@ -0,0 +1,52 @@ +define(`CONCAT', `$1$2')dnl + +dnl +dnl forloop([var], [start], [end], [iterator]) +dnl +divert(`-1') +define(`forloop', `pushdef(`$1', `$2')_forloop($@)popdef(`$1')') +define(`_forloop', + `$4`'ifelse($1, `$3', `', `define(`$1', incr($1))$0($@)')') + +dnl +dnl dump_backend([index], [addr]) +dnl +define(`dump_backend',dnl +`define(`pib_addr', eval(`$2+100'))dnl + + fsi@$2 { + #address-cells = <0x1>; + #size-cells = <0x1>; + compatible = "ibm,fake-fsi"; + system-path = "/proc$1/fsi"; + reg = <0x0 0x0>; + index = <0x$1>; + + CONCAT(pib@,pib_addr) { + #address-cells = <0x1>; + #size-cells = <0x1>; + compatible = "ibm,fake-pib"; + system-path = "/proc$1/pib"; + reg = ; + index = <0x$1>; + ATTR1 = <0xc0ffee>; + }; + }; + +')dnl + +dnl +dnl dump_system([num_processors], [num_cores], [num_threads]) +dnl +define(`dump_system', +`forloop(`i', `0', eval(`$1-1'), `dump_backend(i, eval(20000+i*1000))') +') +divert`'dnl + +/dts-v1/; + +/ { + #address-cells = <0x1>; + #size-cells = <0x1>; +dump_system(8, 4, 2) +}; diff --git a/fake.dts.m4 b/fake.dts.m4 index 3824738..190597a 100644 --- a/fake.dts.m4 +++ b/fake.dts.m4 @@ -71,40 +71,11 @@ define(`dump_processor',dnl forloop(`i', `0', eval(`$2-1'), `dump_core(i, eval(10000+(i+1)*10), $3)') dump_processor_post()') -dnl -dnl dump_backend([index], [addr]) -dnl -define(`dump_backend',dnl -`define(`pib_addr', eval(`$2+100'))dnl - - fsi@$2 { - #address-cells = <0x1>; - #size-cells = <0x1>; - compatible = "ibm,fake-fsi"; - system-path = "/proc$1/fsi"; - reg = <0x0 0x0>; - index = <0x$1>; - - CONCAT(pib@,pib_addr) { - #address-cells = <0x1>; - #size-cells = <0x1>; - compatible = "ibm,fake-pib"; - system-path = "/proc$1/pib"; - reg = ; - index = <0x$1>; - ATTR1 = <0xc0ffee>; - }; - }; - -')dnl - - dnl dnl dump_system([num_processors], [num_cores], [num_threads]) dnl define(`dump_system', -`forloop(`i', `0', eval(`$1-1'), `dump_backend(i, eval(20000+i*1000))') -forloop(`i', `0', eval(`$1-1'),dnl +`forloop(`i', `0', eval(`$1-1'),dnl ` CONCAT(proc,i) { index = < CONCAT(0x,i) >; diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index 5013d96..09f039f 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -31,6 +31,7 @@ #include "target.h" #include "fake.dt.h" +#include "fake-backend.dt.h" #include "p8-i2c.dt.h" #include "p8-fsi.dt.h" @@ -447,6 +448,8 @@ struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) case PDBG_BACKEND_FAKE: if (!dtb->system.fdt) dtb->system.fdt = &_binary_fake_dtb_o_start; + if (!dtb->backend.fdt) + dtb->backend.fdt = &_binary_fake_backend_dtb_o_start; break; } diff --git a/tests/test_prop.sh b/tests/test_prop.sh index 5511a75..ba7eaac 100755 --- a/tests/test_prop.sh +++ b/tests/test_prop.sh @@ -39,7 +39,11 @@ test_run libpdbg_prop_test /proc0/pib write ATTR2 char PROCESSOR0 cp fake.dtb fake-prop.dtb test_cleanup rm -f fake-prop.dtb +cp fake-backend.dtb fake-backend-prop.dtb +test_cleanup rm -f fake-backend-prop.dtb + export PDBG_DTB=fake-prop.dtb +export PDBG_BACKEND_DTB=fake-backend-prop.dtb test_result 0 -- test_run libpdbg_prop_test /proc1/pib write ATTR1 int 0xdeadbeef -- 2.25.4 From amitay at ozlabs.org Thu Apr 30 13:05:44 2020 From: amitay at ozlabs.org (Amitay Isaacs) Date: Thu, 30 Apr 2020 13:05:44 +1000 Subject: [Pdbg] [PATCH 11/11] dts: Split fake2 into backend and system trees In-Reply-To: <20200430030544.234289-1-amitay@ozlabs.org> References: <20200430030544.234289-1-amitay@ozlabs.org> Message-ID: <20200430030544.234289-12-amitay@ozlabs.org> Signed-off-by: Amitay Isaacs --- Makefile.am | 5 ++- fake2-backend.dts.m4 | 104 +++++++++++++++++++++++++++++++++++++++++++ fake2.dts.m4 | 80 +-------------------------------- tests/test_tree2.sh | 1 + 4 files changed, 109 insertions(+), 81 deletions(-) create mode 100644 fake2-backend.dts.m4 diff --git a/Makefile.am b/Makefile.am index e0b0954..f9c0adc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -34,7 +34,7 @@ PDBG_TESTS = \ TESTS = $(libpdbg_tests) optcmd_test $(PDBG_TESTS) -tests/test_tree2.sh: fake2.dtb +tests/test_tree2.sh: fake2.dtb fake2-backend.dtb tests/test_prop.sh: fake.dtb fake-backend.dtb tests/test_p9_fapi_translation.sh: p9.dtb bmc-kernel.dtb @@ -77,7 +77,8 @@ if TARGET_PPC ARCH_FLAGS="-DTARGET_PPC=1" endif -DT = fake.dts fake-backend.dts fake2.dts p8-cronus.dts bmc-cronus.dts \ +DT = fake.dts fake-backend.dts fake2.dts fake2-backend.dts \ + p8-cronus.dts bmc-cronus.dts \ p8-fsi.dts p8-i2c.dts p8-kernel.dts \ p9w-fsi.dts p9r-fsi.dts p9z-fsi.dts bmc-kernel.dts \ bmc-sbefifo.dts \ diff --git a/fake2-backend.dts.m4 b/fake2-backend.dts.m4 new file mode 100644 index 0000000..36c1140 --- /dev/null +++ b/fake2-backend.dts.m4 @@ -0,0 +1,104 @@ +define(`CONCAT', `$1$2')dnl + +dnl +dnl forloop([var], [start], [end], [iterator]) +dnl +divert(`-1') +define(`forloop', `pushdef(`$1', `$2')_forloop($@)popdef(`$1')') +define(`_forloop', + `$4`'ifelse($1, `$3', `', `define(`$1', incr($1))$0($@)')') + +dnl +dnl dump_thread([index]) +dnl +define(`dump_thread', +` + thread@$1 { + #address-cells = <0x0>; + #size-cells = <0x0>; + compatible = "ibm,fake-thread"; + reg = <0x$1 0x0>; + index = <0x$1>; + }; +')dnl + +dnl +dnl dump_core_pre([index], [addr]) +dnl +define(`dump_core_pre', +` + core@$2 { + #address-cells = <0x1>; + #size-cells = <0x1>; + compatible = "ibm,fake-core"; + reg = <0x$2 0x0>; + index = <0x$1>;') + +dnl +dnl dump_core_post() +dnl +define(`dump_core_post', ` }; +')dnl + +dnl +dnl dump_core([index], [addr], [num_threads]) +dnl +define(`dump_core', +`dump_core_pre(`$1', `$2') +forloop(`i', `0', eval(`$3-1'), `dump_thread(i)') +dump_core_post()') + +dnl +dnl dump_processor_pre([index], [addr]) +dnl +define(`dump_processor_pre', +`define(`pib_addr', eval(`$2+100'))dnl + fsi@$2 { + #address-cells = <0x1>; + #size-cells = <0x1>; + compatible = "ibm,fake-fsi"; + system-path = "/proc$1/fsi"; + reg = <0x0 0x0>; + index = <0x$1>; + + CONCAT(pib@,pib_addr) { + #address-cells = <0x1>; + #size-cells = <0x1>; + compatible = "ibm,fake-pib"; + system-path = "/proc$1/pib"; + reg = ; + index = <0x$1>;') + +dnl +dnl dump_processor_post() +dnl +define(`dump_processor_post', ` }; + + }; + +')dnl + +dnl +dnl dump_processor([index], [addr], [num_cores], [num_threads]) +dnl +define(`dump_processor',dnl +`dump_processor_pre(`$1', `$2') +forloop(`i', `0', eval(`$3-1'), `dump_core(i, eval(10000+(i+1)*10), $4)') +dump_processor_post()') + +dnl +dnl dump_system([num_processors], [num_cores], [num_threads]) +dnl +define(`dump_system', +`forloop(`i', `0', eval(`$1-1'), `dump_processor(i, eval(20000+i*1000), $2, $3)') +') +divert`'dnl + +/dts-v1/; + +/ { + #address-cells = <0x1>; + #size-cells = <0x1>; +dump_system(8, 4, 2) +}; + diff --git a/fake2.dts.m4 b/fake2.dts.m4 index 8c7b21a..f71caa2 100644 --- a/fake2.dts.m4 +++ b/fake2.dts.m4 @@ -8,84 +8,6 @@ define(`forloop', `pushdef(`$1', `$2')_forloop($@)popdef(`$1')') define(`_forloop', `$4`'ifelse($1, `$3', `', `define(`$1', incr($1))$0($@)')') -dnl -dnl dump_thread([index]) -dnl -define(`dump_thread', -` - thread@$1 { - #address-cells = <0x0>; - #size-cells = <0x0>; - compatible = "ibm,fake-thread"; - reg = <0x$1 0x0>; - index = <0x$1>; - }; -')dnl - -dnl -dnl dump_core_pre([index], [addr]) -dnl -define(`dump_core_pre', -` - core@$2 { - #address-cells = <0x1>; - #size-cells = <0x1>; - compatible = "ibm,fake-core"; - reg = <0x$2 0x0>; - index = <0x$1>;') - -dnl -dnl dump_core_post() -dnl -define(`dump_core_post', ` }; -')dnl - -dnl -dnl dump_core([index], [addr], [num_threads]) -dnl -define(`dump_core', -`dump_core_pre(`$1', `$2') -forloop(`i', `0', eval(`$3-1'), `dump_thread(i)') -dump_core_post()') - -dnl -dnl dump_processor_pre([index], [addr]) -dnl -define(`dump_processor_pre', -`define(`pib_addr', eval(`$2+100'))dnl - fsi@$2 { - #address-cells = <0x1>; - #size-cells = <0x1>; - compatible = "ibm,fake-fsi"; - system-path = "/proc$1/fsi"; - reg = <0x0 0x0>; - index = <0x$1>; - - CONCAT(pib@,pib_addr) { - #address-cells = <0x1>; - #size-cells = <0x1>; - compatible = "ibm,fake-pib"; - system-path = "/proc$1/pib"; - reg = ; - index = <0x$1>;') - -dnl -dnl dump_processor_post() -dnl -define(`dump_processor_post', ` }; - - }; - -')dnl - -dnl -dnl dump_processor([index], [addr], [num_cores], [num_threads]) -dnl -define(`dump_processor',dnl -`dump_processor_pre(`$1', `$2') -forloop(`i', `0', eval(`$3-1'), `dump_core(i, eval(10000+(i+1)*10), $4)') -dump_processor_post()') - dnl dnl dump_system([num_processors], [num_cores], [num_threads]) dnl @@ -96,7 +18,7 @@ define(`dump_system', index = < CONCAT(0x,i) >; }; ') -forloop(`i', `0', eval(`$1-1'), `dump_processor(i, eval(20000+i*1000), $2, $3)')') +') divert`'dnl /dts-v1/; diff --git a/tests/test_tree2.sh b/tests/test_tree2.sh index 7b8ccc8..3b475eb 100755 --- a/tests/test_tree2.sh +++ b/tests/test_tree2.sh @@ -5,6 +5,7 @@ test_group "tree tests for fake2.dts" export PDBG_DTB="fake2.dtb" +export PDBG_BACKEND_DTB="fake2-backend.dtb" test_result 0 < References: <20200430030544.234289-1-amitay@ozlabs.org> Message-ID: <20200430030544.234289-9-amitay@ozlabs.org> Convert repeated patterns to m4 macros to avoid errors. Signed-off-by: Amitay Isaacs --- p9.dts.m4 | 3211 ++--------------------------- tests/test_p9_fapi_translation.sh | 774 +++++++ 2 files changed, 988 insertions(+), 2997 deletions(-) diff --git a/p9.dts.m4 b/p9.dts.m4 index 1e99937..6cdfba4 100644 --- a/p9.dts.m4 +++ b/p9.dts.m4 @@ -1,61 +1,146 @@ -/dts-v1/; - -/ { - - mem0 { - index = < 0x00 >; +define(`CONCAT', `$1$2')dnl + +dnl +dnl CORE([index]) +dnl +define(`THREAD', +` + thread@$1 { + reg = <0x00>; + compatible = "ibm,power-thread", "ibm,power9-thread"; + tid = <0x$1>; + index = <0x$1>; + }; +')dnl + +dnl +dnl CORE([index]) +dnl +define(`CORE', +` + core at 0 { + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x00 0x00 0xfffff>; + compatible = "ibm,power-core", "ibm,power9-core"; + index = <0x$1>; + + THREAD(0) + THREAD(1) + THREAD(2) + THREAD(3) + }; +')dnl + +dnl +dnl CHIPLET__([index]) +dnl +define(`CHIPLET__', +`define(`addr', CONCAT($1, 000000))dnl + + CONCAT(chiplet@, addr) { + reg = <0x00 CONCAT(0x,addr) 0xfffff>; + compatible = "ibm,power9-chiplet"; + index = <0x$1>; + +')dnl + +dnl +dnl CHIPLET_([index]) +dnl +define(`CHIPLET_', +`define(`addr', CONCAT($1, 000000))dnl + + CONCAT(chiplet@, addr) { + #address-cells = <0x02>; + #size-cells = <0x01>; + reg = <0x00 CONCAT(0x,addr) 0xfffff>; + compatible = "ibm,power9-chiplet"; + index = <0x$1>; + +')dnl + +dnl +dnl EQ_([index]) +dnl +define(`EQ_', +`define(`chiplet_id', CONCAT(1, $1))dnl +define(`addr', CONCAT(chiplet_id, 000000))dnl + + eq@$1 { + #address-cells = <0x02>; + #size-cells = <0x01>; + reg = <0x00 CONCAT(0x,addr) 0xfffff>; + compatible = "ibm,power9-eq"; + index = <$1>; + +')dnl + +dnl +dnl EX_([eq_index, ex_index]) +dnl +define(`EX_', +`define(`chiplet_id', CONCAT(1, $1))dnl +define(`addr', CONCAT(chiplet_id, 000000))dnl + + ex@$2 { + #address-cells = <0x02>; + #size-cells = <0x01>; + reg = <0x00 CONCAT(0x,addr) 0xfffff>; + compatible = "ibm,power9-ex"; + index = <$2>; + +')dnl + +dnl +dnl CHIP([index]) +dnl +define(`CHIP', +` + mem$1 { + index = < 0x$1 >; }; - proc0 { + proc$1 { compatible = "ibm,power-proc", "ibm,power9-proc"; - index = < 0x00 >; + index = < 0x$1 >; fsi { - index = < 0x00 >; + index = < 0x$1 >; }; pib { #address-cells = < 0x02 >; #size-cells = < 0x01 >; - index = < 0x00 >; + index = < 0x$1 >; adu at 90000 { compatible = "ibm,power9-adu"; reg = < 0x00 0x90000 0x50 >; - system-path = "/mem0"; + system-path = "/mem$1"; }; htm at 5012880 { compatible = "ibm,power9-nhtm"; reg = < 0x00 0x5012880 0x40 >; - index = < 0x00 >; + index = < 0x$1 >; }; htm at 50128C0 { compatible = "ibm,power9-nhtm"; reg = < 0x00 0x50128c0 0x40 >; - index = < 0x01 >; + index = < 0x$1 >; }; - chiplet at 1000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x01 >; - reg = < 0x00 0x1000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - + CHIPLET_(1) tp at 0 { + reg = < 0x00 0x1000000 0xfffff >; compatible = "ibm,power9-tp"; index = < 0x00 >; - reg = < 0x00 0x1000000 0xffffff >; }; }; - chiplet at 2000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x02 >; - reg = < 0x00 0x2000000 0xfffff >; - + CHIPLET__(2) n0 { compatible = "ibm,power9-nest"; index = < 0x00 >; @@ -67,11 +152,7 @@ }; }; - chiplet at 3000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x03 >; - reg = < 0x00 0x3000000 0xfffff >; - + CHIPLET__(3) n1 { compatible = "ibm,power9-nest"; index = < 0x01 >; @@ -88,11 +169,7 @@ }; }; - chiplet at 4000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x04 >; - reg = < 0x00 0x4000000 0xfffff >; - + CHIPLET__(4) n2 { compatible = "ibm,power9-nest"; index = < 0x02 >; @@ -104,11 +181,7 @@ }; }; - chiplet at 5000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x05 >; - reg = < 0x00 0x5000000 0xfffff >; - + CHIPLET__(5) n3 { compatible = "ibm,power9-nest"; index = < 0x03 >; @@ -125,32 +198,19 @@ }; }; - chiplet at 6000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x06 >; - reg = < 0x00 0x6000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - xbus at 0 { + CHIPLET_(6) + xbus$1_0: xbus at 0 { compatible = "ibm,power9-xbus"; index = < 0x01 >; - reg = < 0x00 0x6000000 0xffffff >; - other-end = "/proc1/pib/chiplet at 6000000/xbus at 1"; + reg = < 0x00 0x6000000 0xfffff >; }; }; - chiplet at 7000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x07 >; - reg = < 0x00 0x7000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - + CHIPLET_(7) mc at 0 { + reg = < 0x00 0x7000000 0xfffff >; compatible = "ibm,power9-mc"; index = < 0x00 >; - reg = < 0x00 0x7000000 0xffffff >; mca0 { compatible = "ibm,power9-mca"; @@ -179,17 +239,11 @@ }; }; - chiplet at 8000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x08 >; - reg = < 0x00 0x8000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - + CHIPLET_(8) mc at 1 { + reg = < 0x00 0x8000000 0xfffff >; compatible = "ibm,power9-mc"; index = < 0x01 >; - reg = < 0x00 0x8000000 0xffffff >; mca0 { compatible = "ibm,power9-mca"; @@ -218,17 +272,11 @@ }; }; - chiplet at 9000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x09 >; - reg = < 0x00 0x9000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - + CHIPLET_(9) obus at 0 { + reg = < 0x00 0x9000000 0xfffff >; compatible = "ibm,power9-obus"; index = < 0x00 >; - reg = < 0x00 0x9000000 0xffffff >; }; obrick0 { @@ -247,17 +295,11 @@ }; }; - chiplet at c000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x0c >; - reg = < 0x00 0xc000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - + CHIPLET_(c) obus at 3 { + reg = < 0x00 0xc000000 0xfffff >; compatible = "ibm,power9-obus"; index = < 0x03 >; - reg = < 0x00 0xc000000 0xffffff >; }; obrick0 { @@ -276,17 +318,11 @@ }; }; - chiplet at d000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x0d >; - reg = < 0x00 0xd000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - + CHIPLET_(d) pec at d000000 { + reg = < 0x00 0xd000000 0xfffff >; compatible = "ibm,power9-pec"; index = < 0x00 >; - reg = < 0x00 0xd000000 0xfffff >; }; phb0 { @@ -300,17 +336,11 @@ }; }; - chiplet at e000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x0e >; - reg = < 0x00 0xe000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - + CHIPLET_(e) pec at e000000 { + reg = < 0x00 0xe000000 0xfffff >; compatible = "ibm,power9-pec"; index = < 0x01 >; - reg = < 0x00 0xe000000 0xfffff >; }; phb0 { @@ -324,17 +354,11 @@ }; }; - chiplet at f000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x0f >; - reg = < 0x00 0xf000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - + CHIPLET_(f) pec at f000000 { + reg = < 0x00 0xf000000 0xfffff >; compatible = "ibm,power9-pec"; index = < 0x02 >; - reg = < 0x00 0xf000000 0xfffff >; }; phb0 { @@ -348,1249 +372,145 @@ }; }; - chiplet at 10000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x10 >; - reg = < 0x00 0x10000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - eq at 0 { - compatible = "ibm,power9-eq"; - index = < 0x00 >; - reg = < 0x00 0x10000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - ex at 0 { - compatible = "ibm,power9-ex"; - index = < 0x00 >; - reg = < 0x00 0x10000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - chiplet at 20000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x20 >; - reg = < 0x00 0x20000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x00 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; + CHIPLET_(10) + EQ_(0) + EX_(0,0) + CHIPLET_(20) + CORE(00) }; - chiplet at 21000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x21 >; - reg = < 0x00 0x21000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x01 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; + CHIPLET_(21) + CORE(01) }; }; - ex at 1 { - compatible = "ibm,power9-ex"; - index = < 0x01 >; - reg = < 0x00 0x10000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - chiplet at 22000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x22 >; - reg = < 0x00 0x22000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x02 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; + EX_(0,1) + CHIPLET_(22) + CORE(02) }; - chiplet at 23000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x23 >; - reg = < 0x00 0x23000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x03 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; + CHIPLET_(23) + CORE(03) }; }; }; }; - chiplet at 11000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x11 >; - reg = < 0x00 0x11000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - eq at 1 { - compatible = "ibm,power9-eq"; - index = < 0x01 >; - reg = < 0x00 0x11000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - ex at 0 { - compatible = "ibm,power9-ex"; - index = < 0x00 >; - reg = < 0x00 0x10000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - chiplet at 24000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x24 >; - reg = < 0x00 0x24000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x04 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; + CHIPLET_(11) + EQ_(1) + EX_(1,0) + CHIPLET_(24) + CORE(04) }; - chiplet at 25000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x25 >; - reg = < 0x00 0x25000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x05 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; + CHIPLET_(25) + CORE(05) }; }; - ex at 1 { - compatible = "ibm,power9-ex"; - index = < 0x01 >; - reg = < 0x00 0x10000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - chiplet at 26000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x26 >; - reg = < 0x00 0x26000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x06 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; + EX_(1,1) + CHIPLET_(26) + CORE(06) }; - chiplet at 27000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x27 >; - reg = < 0x00 0x27000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x07 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; + CHIPLET_(27) + CORE(07) }; }; }; }; - chiplet at 12000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x12 >; - reg = < 0x00 0x12000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - eq at 2 { - compatible = "ibm,power9-eq"; - index = < 0x02 >; - reg = < 0x00 0x12000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - ex at 0 { - compatible = "ibm,power9-ex"; - index = < 0x00 >; - reg = < 0x00 0x12000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - chiplet at 28000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x28 >; - reg = < 0x00 0x28000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x08 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; + CHIPLET_(12) + EQ_(2) + EX_(2,0) + CHIPLET_(28) + CORE(08) }; - chiplet at 29000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x29 >; - reg = < 0x00 0x29000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x09 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; + CHIPLET_(29) + CORE(09) }; }; - ex at 1 { - compatible = "ibm,power9-ex"; - index = < 0x01 >; - reg = < 0x00 0x12000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - chiplet at 2a000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x2a >; - reg = < 0x00 0x2a000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x0a >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; + EX_(2,1) + CHIPLET_(2a) + CORE(0a) }; - chiplet at 2b000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x2b >; - reg = < 0x00 0x2b000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x0b >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; + CHIPLET_(2b) + CORE(0b) }; }; }; }; - chiplet at 13000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x13 >; - reg = < 0x00 0x13000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - eq at 3 { - compatible = "ibm,power9-eq"; - index = < 0x03 >; - reg = < 0x00 0x13000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - ex at 0 { - compatible = "ibm,power9-ex"; - index = < 0x00 >; - reg = < 0x00 0x13000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - chiplet at 2c000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x2c >; - reg = < 0x00 0x2c000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x0c >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; + CHIPLET_(13) + EQ_(3) + EX_(3,0) + CHIPLET_(2c) + CORE(0c) }; - chiplet at 2d000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x2d >; - reg = < 0x00 0x2d000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x0d >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; + CHIPLET_(2d) + CORE(0d) }; }; - ex at 1 { - compatible = "ibm,power9-ex"; - index = < 0x01 >; - reg = < 0x00 0x13000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - chiplet at 2e000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x2e >; - reg = < 0x00 0x2e000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x0e >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; + EX_(3,1) + CHIPLET_(2e) + CORE(0e) }; - chiplet at 2f000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x2f >; - reg = < 0x00 0x2f000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x0f >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; + CHIPLET_(2f) + CORE(0f) }; }; }; }; - chiplet at 14000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x14 >; - reg = < 0x00 0x14000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - eq at 4 { - compatible = "ibm,power9-eq"; - index = < 0x04 >; - reg = < 0x00 0x13000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - ex at 0 { - compatible = "ibm,power9-ex"; - index = < 0x00 >; - reg = < 0x00 0x14000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - chiplet at 30000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x30 >; - reg = < 0x00 0x30000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x10 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; + CHIPLET_(14) + EQ_(4) + EX_(4,0) + CHIPLET_(30) + CORE(10) }; - chiplet at 31000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x31 >; - reg = < 0x00 0x31000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x11 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; + CHIPLET_(31) + CORE(11) }; }; - ex at 1 { - compatible = "ibm,power9-ex"; - index = < 0x01 >; - reg = < 0x00 0x14000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - chiplet at 32000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x32 >; - reg = < 0x00 0x32000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x12 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; + EX_(4,1) + CHIPLET_(32) + CORE(12) }; - chiplet at 33000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x33 >; - reg = < 0x00 0x33000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x13 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; + CHIPLET_(33) + CORE(13) }; }; }; }; - chiplet at 15000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x15 >; - reg = < 0x00 0x15000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - eq at 5 { - compatible = "ibm,power9-eq"; - index = < 0x05 >; - reg = < 0x00 0x13000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - ex at 0 { - compatible = "ibm,power9-ex"; - index = < 0x00 >; - reg = < 0x00 0x15000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - chiplet at 34000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x34 >; - reg = < 0x00 0x34000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x14 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; + CHIPLET_(15) + EQ_(5) + EX_(5,0) + CHIPLET_(34) + CORE(14) }; - chiplet at 35000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x35 >; - reg = < 0x00 0x35000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x15 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; + CHIPLET_(35) + CORE(15) }; }; - ex at 1 { - compatible = "ibm,power9-ex"; - index = < 0x01 >; - reg = < 0x00 0x15000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - chiplet at 36000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x36 >; - reg = < 0x00 0x36000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x16 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; + EX_(5,1) + CHIPLET_(36) + CORE(16) }; - chiplet at 37000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x37 >; - reg = < 0x00 0x37000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x17 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; + CHIPLET_(37) + CORE(17) }; }; }; @@ -1717,1720 +637,17 @@ }; }; }; +')dnl - mem1 { - index = < 0x01 >; - }; - - proc1 { - compatible = "ibm,power-proc", "ibm,power9-proc"; - index = < 0x01 >; - - fsi { - index = < 0x00 >; - }; - - pib { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - index = < 0x00 >; - - adu at 90000 { - compatible = "ibm,power9-adu"; - reg = < 0x00 0x90000 0x50 >; - system-path = "/mem1"; - }; - - htm at 5012880 { - compatible = "ibm,power9-nhtm"; - reg = < 0x00 0x5012880 0x40 >; - index = < 0x00 >; - }; - - htm at 50128C0 { - compatible = "ibm,power9-nhtm"; - reg = < 0x00 0x50128c0 0x40 >; - index = < 0x01 >; - }; - - chiplet at 1000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x01 >; - reg = < 0x00 0x1000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - tp at 0 { - compatible = "ibm,power9-tp"; - index = < 0x00 >; - reg = < 0x00 0x1000000 0xffffff >; - }; - }; - - chiplet at 2000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x02 >; - reg = < 0x00 0x2000000 0xfffff >; - - n0 { - compatible = "ibm,power9-nest"; - index = < 0x00 >; - - capp0 { - compatible = "ibm,power9-capp"; - index = < 0x00 >; - }; - }; - }; - - chiplet at 3000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x03 >; - reg = < 0x00 0x3000000 0xfffff >; - - n1 { - compatible = "ibm,power9-nest"; - index = < 0x01 >; - - mcs2 { - compatible = "ibm,power9-mcs"; - index = < 0x02 >; - }; - - mcs3 { - compatible = "ibm,power9-mcs"; - index = < 0x03 >; - }; - }; - }; - - chiplet at 4000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x04 >; - reg = < 0x00 0x4000000 0xfffff >; - - n2 { - compatible = "ibm,power9-nest"; - index = < 0x02 >; - - capp1 { - compatible = "ibm,power9-capp"; - index = < 0x01 >; - }; - }; - }; - - chiplet at 5000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x05 >; - reg = < 0x00 0x5000000 0xfffff >; - - n3 { - compatible = "ibm,power9-nest"; - index = < 0x03 >; - - mcs0 { - compatible = "ibm,power9-mcs"; - index = < 0x00 >; - }; - - mcs1 { - compatible = "ibm,power9-mcs"; - index = < 0x01 >; - }; - }; - }; - - chiplet at 6000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x06 >; - reg = < 0x00 0x6000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - xbus at 0 { - compatible = "ibm,power9-xbus"; - index = < 0x01 >; - reg = < 0x00 0x6000000 0xffffff >; - other-end = "/proc0/pib/chiplet at 6000000/xbus at 1"; - }; - }; - - chiplet at 7000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x07 >; - reg = < 0x00 0x7000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - mc at 0 { - compatible = "ibm,power9-mc"; - index = < 0x00 >; - reg = < 0x00 0x7000000 0xffffff >; - - mca0 { - compatible = "ibm,power9-mca"; - index = < 0x00 >; - }; - - mca1 { - compatible = "ibm,power9-mca"; - index = < 0x01 >; - }; - - mca2 { - compatible = "ibm,power9-mca"; - index = < 0x02 >; - }; - - mca3 { - compatible = "ibm,power9-mca"; - index = < 0x03 >; - }; - - mcbist { - compatible = "ibm,power9-mcbist"; - index = < 0x00 >; - }; - }; - }; - - chiplet at 8000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x08 >; - reg = < 0x00 0x8000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - mc at 1 { - compatible = "ibm,power9-mc"; - index = < 0x01 >; - reg = < 0x00 0x8000000 0xffffff >; - - mca0 { - compatible = "ibm,power9-mca"; - index = < 0x04 >; - }; - - mca1 { - compatible = "ibm,power9-mca"; - index = < 0x05 >; - }; - - mca2 { - compatible = "ibm,power9-mca"; - index = < 0x06 >; - }; - - mca3 { - compatible = "ibm,power9-mca"; - index = < 0x07 >; - }; - - mcbist { - compatible = "ibm,power9-mcbist"; - index = < 0x01 >; - }; - }; - }; - - chiplet at 9000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x09 >; - reg = < 0x00 0x9000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - obus at 0 { - compatible = "ibm,power9-obus"; - index = < 0x00 >; - reg = < 0x00 0x9000000 0xffffff >; - }; - - obrick0 { - compatible = "ibm,power9-obus_brick"; - index = < 0x00 >; - }; - - obrick1 { - compatible = "ibm,power9-obus_brick"; - index = < 0x01 >; - }; - - obrick2 { - compatible = "ibm,power9-obus_brick"; - index = < 0x02 >; - }; - }; - - chiplet at c000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x0c >; - reg = < 0x00 0xc000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; +/dts-v1/; - obus at 3 { - compatible = "ibm,power9-obus"; - index = < 0x03 >; - reg = < 0x00 0xc000000 0xffffff >; - }; - - obrick0 { - compatible = "ibm,power9-obus_brick"; - index = < 0x09 >; - }; - - obrick1 { - compatible = "ibm,power9-obus_brick"; - index = < 0x0a >; - }; - - obrick2 { - compatible = "ibm,power9-obus_brick"; - index = < 0x0b >; - }; - }; - - chiplet at d000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x0d >; - reg = < 0x00 0xd000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - pec at d000000 { - compatible = "ibm,power9-pec"; - index = < 0x00 >; - reg = < 0x00 0xd000000 0xfffff >; - }; - - phb0 { - compatible = "ibm,power9-phb"; - index = < 0x00 >; - }; - - phb1 { - compatible = "ibm,power9-phb"; - index = < 0x01 >; - }; - }; - - chiplet at e000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x0e >; - reg = < 0x00 0xe000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - pec at e000000 { - compatible = "ibm,power9-pec"; - index = < 0x01 >; - reg = < 0x00 0xe000000 0xfffff >; - }; - - phb0 { - compatible = "ibm,power9-phb"; - index = < 0x02 >; - }; - - phb1 { - compatible = "ibm,power9-phb"; - index = < 0x03 >; - }; - }; - - chiplet at f000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x0f >; - reg = < 0x00 0xf000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - pec at f000000 { - compatible = "ibm,power9-pec"; - index = < 0x02 >; - reg = < 0x00 0xf000000 0xfffff >; - }; - - phb0 { - compatible = "ibm,power9-phb"; - index = < 0x04 >; - }; - - phb1 { - compatible = "ibm,power9-phb"; - index = < 0x05 >; - }; - }; - - chiplet at 10000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x10 >; - reg = < 0x00 0x10000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - eq at 0 { - compatible = "ibm,power9-eq"; - index = < 0x00 >; - reg = < 0x00 0x10000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - ex at 0 { - compatible = "ibm,power9-ex"; - index = < 0x00 >; - reg = < 0x00 0x10000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - chiplet at 20000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x20 >; - reg = < 0x00 0x20000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x00 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; - }; - - chiplet at 21000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x21 >; - reg = < 0x00 0x21000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x01 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; - }; - }; - - ex at 1 { - compatible = "ibm,power9-ex"; - index = < 0x01 >; - reg = < 0x00 0x10000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - chiplet at 22000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x22 >; - reg = < 0x00 0x22000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x02 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; - }; - - chiplet at 23000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x23 >; - reg = < 0x00 0x23000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x03 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; - }; - }; - }; - }; - - chiplet at 11000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x11 >; - reg = < 0x00 0x11000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - eq at 1 { - compatible = "ibm,power9-eq"; - index = < 0x01 >; - reg = < 0x00 0x11000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - ex at 0 { - compatible = "ibm,power9-ex"; - index = < 0x00 >; - reg = < 0x00 0x10000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - chiplet at 24000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x24 >; - reg = < 0x00 0x24000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x04 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; - }; - - chiplet at 25000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x25 >; - reg = < 0x00 0x25000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x05 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; - }; - }; - - ex at 1 { - compatible = "ibm,power9-ex"; - index = < 0x01 >; - reg = < 0x00 0x10000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - chiplet at 26000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x26 >; - reg = < 0x00 0x26000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x06 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; - }; - - chiplet at 27000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x27 >; - reg = < 0x00 0x27000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x07 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; - }; - }; - }; - }; - - chiplet at 12000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x12 >; - reg = < 0x00 0x12000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - eq at 2 { - compatible = "ibm,power9-eq"; - index = < 0x02 >; - reg = < 0x00 0x12000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - ex at 0 { - compatible = "ibm,power9-ex"; - index = < 0x00 >; - reg = < 0x00 0x12000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - chiplet at 28000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x28 >; - reg = < 0x00 0x28000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x08 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; - }; - - chiplet at 29000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x29 >; - reg = < 0x00 0x29000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x09 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; - }; - }; - - ex at 1 { - compatible = "ibm,power9-ex"; - index = < 0x01 >; - reg = < 0x00 0x12000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - chiplet at 2a000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x2a >; - reg = < 0x00 0x2a000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x0a >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; - }; - - chiplet at 2b000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x2b >; - reg = < 0x00 0x2b000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x0b >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; - }; - }; - }; - }; - - chiplet at 13000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x13 >; - reg = < 0x00 0x13000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - eq at 3 { - compatible = "ibm,power9-eq"; - index = < 0x03 >; - reg = < 0x00 0x13000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - ex at 0 { - compatible = "ibm,power9-ex"; - index = < 0x00 >; - reg = < 0x00 0x13000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - chiplet at 2c000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x2c >; - reg = < 0x00 0x2c000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x0c >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; - }; - - chiplet at 2d000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x2d >; - reg = < 0x00 0x2d000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x0d >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; - }; - }; - - ex at 1 { - compatible = "ibm,power9-ex"; - index = < 0x01 >; - reg = < 0x00 0x13000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - chiplet at 2e000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x2e >; - reg = < 0x00 0x2e000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x0e >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; - }; - - chiplet at 2f000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x2f >; - reg = < 0x00 0x2f000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x0f >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; - }; - }; - }; - }; - - chiplet at 14000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x14 >; - reg = < 0x00 0x14000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - eq at 4 { - compatible = "ibm,power9-eq"; - index = < 0x04 >; - reg = < 0x00 0x13000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - ex at 0 { - compatible = "ibm,power9-ex"; - index = < 0x00 >; - reg = < 0x00 0x14000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - chiplet at 30000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x30 >; - reg = < 0x00 0x30000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x10 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; - }; - - chiplet at 31000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x31 >; - reg = < 0x00 0x31000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x11 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; - }; - }; - - ex at 1 { - compatible = "ibm,power9-ex"; - index = < 0x01 >; - reg = < 0x00 0x14000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - chiplet at 32000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x32 >; - reg = < 0x00 0x32000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x12 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; - }; - - chiplet at 33000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x33 >; - reg = < 0x00 0x33000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x13 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; - }; - }; - }; - }; - - chiplet at 15000000 { - compatible = "ibm,power9-chiplet"; - index = < 0x15 >; - reg = < 0x00 0x15000000 0xfffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - eq at 5 { - compatible = "ibm,power9-eq"; - index = < 0x05 >; - reg = < 0x00 0x13000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - ex at 0 { - compatible = "ibm,power9-ex"; - index = < 0x00 >; - reg = < 0x00 0x15000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - chiplet at 34000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x34 >; - reg = < 0x00 0x34000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x14 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; - }; - - chiplet at 35000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x35 >; - reg = < 0x00 0x35000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x15 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; - }; - }; - - ex at 1 { - compatible = "ibm,power9-ex"; - index = < 0x01 >; - reg = < 0x00 0x15000000 0xffffff >; - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - - chiplet at 36000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x36 >; - reg = < 0x00 0x36000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x16 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; - }; - - chiplet at 37000000 { - #address-cells = < 0x02 >; - #size-cells = < 0x01 >; - compatible = "ibm,power9-chiplet"; - index = < 0x37 >; - reg = < 0x00 0x37000000 0xfffff >; - - core at 0 { - #address-cells = < 0x01 >; - #size-cells = < 0x00 >; - compatible = "ibm,power-core", "ibm,power9-core"; - index = < 0x17 >; - reg = < 0x00 0x00 0xfffff >; - - thread at 0 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x00 >; - index = < 0x00 >; - }; - - thread at 1 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x01 >; - index = < 0x01 >; - }; - - thread at 2 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x02 >; - index = < 0x02 >; - }; - - thread at 3 { - compatible = "ibm,power-thread", "ibm,power9-thread"; - reg = < 0x00 >; - tid = < 0x03 >; - index = < 0x03 >; - }; - }; - }; - }; - }; - }; - - nv0 { - compatible = "ibm,power9-nv"; - index = < 0x00 >; - }; - - nv1 { - compatible = "ibm,power9-nv"; - index = < 0x01 >; - }; - - nv2 { - compatible = "ibm,power9-nv"; - index = < 0x02 >; - }; - - nv3 { - compatible = "ibm,power9-nv"; - index = < 0x03 >; - }; - - nv4 { - compatible = "ibm,power9-nv"; - index = < 0x04 >; - }; - - nv5 { - compatible = "ibm,power9-nv"; - index = < 0x05 >; - }; - - occ0 { - compatible = "ibm,power9-occ"; - index = < 0x00 >; - }; - - sbe0 { - compatible = "ibm,power9-sbe"; - index = < 0x00 >; - }; - - ppe0 { - compatible = "ibm,power9-ppe"; - index = < 0x00 >; - }; - - ppe1 { - compatible = "ibm,power9-ppe"; - index = < 0x0a >; - }; - - ppe2 { - compatible = "ibm,power9-ppe"; - index = < 0x0d >; - }; - - ppe3 { - compatible = "ibm,power9-ppe"; - index = < 0x14 >; - }; - - ppe4 { - compatible = "ibm,power9-ppe"; - index = < 0x19 >; - }; - - ppe5 { - compatible = "ibm,power9-ppe"; - index = < 0x1e >; - }; - - ppe6 { - compatible = "ibm,power9-ppe"; - index = < 0x28 >; - }; - - ppe7 { - compatible = "ibm,power9-ppe"; - index = < 0x29 >; - }; - - ppe8 { - compatible = "ibm,power9-ppe"; - index = < 0x2a >; - }; - - ppe9 { - compatible = "ibm,power9-ppe"; - index = < 0x2b >; - }; - - ppe10 { - compatible = "ibm,power9-ppe"; - index = < 0x2c >; - }; - - ppe11 { - compatible = "ibm,power9-ppe"; - index = < 0x2d >; - }; - - ppe12 { - compatible = "ibm,power9-ppe"; - index = < 0x2e >; - }; - - ppe13 { - compatible = "ibm,power9-ppe"; - index = < 0x32 >; - }; - - ppe14 { - compatible = "ibm,power9-ppe"; - index = < 0x34 >; - }; - - ppe15 { - compatible = "ibm,power9-ppe"; - index = < 0x38 >; - }; - }; - }; +/ { + CHIP(0) + CHIP(1) + CHIP(2) + CHIP(3) + CHIP(4) + CHIP(5) + CHIP(6) + CHIP(7) }; diff --git a/tests/test_p9_fapi_translation.sh b/tests/test_p9_fapi_translation.sh index fbb194d..8f44953 100755 --- a/tests/test_p9_fapi_translation.sh +++ b/tests/test_p9_fapi_translation.sh @@ -56,6 +56,150 @@ Testing /proc1/pib/chiplet at 15000000/eq at 5/ex at 0/chiplet at 34000000/core at 0 20 Testing /proc1/pib/chiplet at 15000000/eq at 5/ex at 0/chiplet at 35000000/core at 0 21 Testing /proc1/pib/chiplet at 15000000/eq at 5/ex at 1/chiplet at 36000000/core at 0 22 Testing /proc1/pib/chiplet at 15000000/eq at 5/ex at 1/chiplet at 37000000/core at 0 23 +Testing /proc2/pib/chiplet at 10000000/eq at 0/ex at 0/chiplet at 20000000/core at 0 0 +Testing /proc2/pib/chiplet at 10000000/eq at 0/ex at 0/chiplet at 21000000/core at 0 1 +Testing /proc2/pib/chiplet at 10000000/eq at 0/ex at 1/chiplet at 22000000/core at 0 2 +Testing /proc2/pib/chiplet at 10000000/eq at 0/ex at 1/chiplet at 23000000/core at 0 3 +Testing /proc2/pib/chiplet at 11000000/eq at 1/ex at 0/chiplet at 24000000/core at 0 4 +Testing /proc2/pib/chiplet at 11000000/eq at 1/ex at 0/chiplet at 25000000/core at 0 5 +Testing /proc2/pib/chiplet at 11000000/eq at 1/ex at 1/chiplet at 26000000/core at 0 6 +Testing /proc2/pib/chiplet at 11000000/eq at 1/ex at 1/chiplet at 27000000/core at 0 7 +Testing /proc2/pib/chiplet at 12000000/eq at 2/ex at 0/chiplet at 28000000/core at 0 8 +Testing /proc2/pib/chiplet at 12000000/eq at 2/ex at 0/chiplet at 29000000/core at 0 9 +Testing /proc2/pib/chiplet at 12000000/eq at 2/ex at 1/chiplet at 2a000000/core at 0 10 +Testing /proc2/pib/chiplet at 12000000/eq at 2/ex at 1/chiplet at 2b000000/core at 0 11 +Testing /proc2/pib/chiplet at 13000000/eq at 3/ex at 0/chiplet at 2c000000/core at 0 12 +Testing /proc2/pib/chiplet at 13000000/eq at 3/ex at 0/chiplet at 2d000000/core at 0 13 +Testing /proc2/pib/chiplet at 13000000/eq at 3/ex at 1/chiplet at 2e000000/core at 0 14 +Testing /proc2/pib/chiplet at 13000000/eq at 3/ex at 1/chiplet at 2f000000/core at 0 15 +Testing /proc2/pib/chiplet at 14000000/eq at 4/ex at 0/chiplet at 30000000/core at 0 16 +Testing /proc2/pib/chiplet at 14000000/eq at 4/ex at 0/chiplet at 31000000/core at 0 17 +Testing /proc2/pib/chiplet at 14000000/eq at 4/ex at 1/chiplet at 32000000/core at 0 18 +Testing /proc2/pib/chiplet at 14000000/eq at 4/ex at 1/chiplet at 33000000/core at 0 19 +Testing /proc2/pib/chiplet at 15000000/eq at 5/ex at 0/chiplet at 34000000/core at 0 20 +Testing /proc2/pib/chiplet at 15000000/eq at 5/ex at 0/chiplet at 35000000/core at 0 21 +Testing /proc2/pib/chiplet at 15000000/eq at 5/ex at 1/chiplet at 36000000/core at 0 22 +Testing /proc2/pib/chiplet at 15000000/eq at 5/ex at 1/chiplet at 37000000/core at 0 23 +Testing /proc3/pib/chiplet at 10000000/eq at 0/ex at 0/chiplet at 20000000/core at 0 0 +Testing /proc3/pib/chiplet at 10000000/eq at 0/ex at 0/chiplet at 21000000/core at 0 1 +Testing /proc3/pib/chiplet at 10000000/eq at 0/ex at 1/chiplet at 22000000/core at 0 2 +Testing /proc3/pib/chiplet at 10000000/eq at 0/ex at 1/chiplet at 23000000/core at 0 3 +Testing /proc3/pib/chiplet at 11000000/eq at 1/ex at 0/chiplet at 24000000/core at 0 4 +Testing /proc3/pib/chiplet at 11000000/eq at 1/ex at 0/chiplet at 25000000/core at 0 5 +Testing /proc3/pib/chiplet at 11000000/eq at 1/ex at 1/chiplet at 26000000/core at 0 6 +Testing /proc3/pib/chiplet at 11000000/eq at 1/ex at 1/chiplet at 27000000/core at 0 7 +Testing /proc3/pib/chiplet at 12000000/eq at 2/ex at 0/chiplet at 28000000/core at 0 8 +Testing /proc3/pib/chiplet at 12000000/eq at 2/ex at 0/chiplet at 29000000/core at 0 9 +Testing /proc3/pib/chiplet at 12000000/eq at 2/ex at 1/chiplet at 2a000000/core at 0 10 +Testing /proc3/pib/chiplet at 12000000/eq at 2/ex at 1/chiplet at 2b000000/core at 0 11 +Testing /proc3/pib/chiplet at 13000000/eq at 3/ex at 0/chiplet at 2c000000/core at 0 12 +Testing /proc3/pib/chiplet at 13000000/eq at 3/ex at 0/chiplet at 2d000000/core at 0 13 +Testing /proc3/pib/chiplet at 13000000/eq at 3/ex at 1/chiplet at 2e000000/core at 0 14 +Testing /proc3/pib/chiplet at 13000000/eq at 3/ex at 1/chiplet at 2f000000/core at 0 15 +Testing /proc3/pib/chiplet at 14000000/eq at 4/ex at 0/chiplet at 30000000/core at 0 16 +Testing /proc3/pib/chiplet at 14000000/eq at 4/ex at 0/chiplet at 31000000/core at 0 17 +Testing /proc3/pib/chiplet at 14000000/eq at 4/ex at 1/chiplet at 32000000/core at 0 18 +Testing /proc3/pib/chiplet at 14000000/eq at 4/ex at 1/chiplet at 33000000/core at 0 19 +Testing /proc3/pib/chiplet at 15000000/eq at 5/ex at 0/chiplet at 34000000/core at 0 20 +Testing /proc3/pib/chiplet at 15000000/eq at 5/ex at 0/chiplet at 35000000/core at 0 21 +Testing /proc3/pib/chiplet at 15000000/eq at 5/ex at 1/chiplet at 36000000/core at 0 22 +Testing /proc3/pib/chiplet at 15000000/eq at 5/ex at 1/chiplet at 37000000/core at 0 23 +Testing /proc4/pib/chiplet at 10000000/eq at 0/ex at 0/chiplet at 20000000/core at 0 0 +Testing /proc4/pib/chiplet at 10000000/eq at 0/ex at 0/chiplet at 21000000/core at 0 1 +Testing /proc4/pib/chiplet at 10000000/eq at 0/ex at 1/chiplet at 22000000/core at 0 2 +Testing /proc4/pib/chiplet at 10000000/eq at 0/ex at 1/chiplet at 23000000/core at 0 3 +Testing /proc4/pib/chiplet at 11000000/eq at 1/ex at 0/chiplet at 24000000/core at 0 4 +Testing /proc4/pib/chiplet at 11000000/eq at 1/ex at 0/chiplet at 25000000/core at 0 5 +Testing /proc4/pib/chiplet at 11000000/eq at 1/ex at 1/chiplet at 26000000/core at 0 6 +Testing /proc4/pib/chiplet at 11000000/eq at 1/ex at 1/chiplet at 27000000/core at 0 7 +Testing /proc4/pib/chiplet at 12000000/eq at 2/ex at 0/chiplet at 28000000/core at 0 8 +Testing /proc4/pib/chiplet at 12000000/eq at 2/ex at 0/chiplet at 29000000/core at 0 9 +Testing /proc4/pib/chiplet at 12000000/eq at 2/ex at 1/chiplet at 2a000000/core at 0 10 +Testing /proc4/pib/chiplet at 12000000/eq at 2/ex at 1/chiplet at 2b000000/core at 0 11 +Testing /proc4/pib/chiplet at 13000000/eq at 3/ex at 0/chiplet at 2c000000/core at 0 12 +Testing /proc4/pib/chiplet at 13000000/eq at 3/ex at 0/chiplet at 2d000000/core at 0 13 +Testing /proc4/pib/chiplet at 13000000/eq at 3/ex at 1/chiplet at 2e000000/core at 0 14 +Testing /proc4/pib/chiplet at 13000000/eq at 3/ex at 1/chiplet at 2f000000/core at 0 15 +Testing /proc4/pib/chiplet at 14000000/eq at 4/ex at 0/chiplet at 30000000/core at 0 16 +Testing /proc4/pib/chiplet at 14000000/eq at 4/ex at 0/chiplet at 31000000/core at 0 17 +Testing /proc4/pib/chiplet at 14000000/eq at 4/ex at 1/chiplet at 32000000/core at 0 18 +Testing /proc4/pib/chiplet at 14000000/eq at 4/ex at 1/chiplet at 33000000/core at 0 19 +Testing /proc4/pib/chiplet at 15000000/eq at 5/ex at 0/chiplet at 34000000/core at 0 20 +Testing /proc4/pib/chiplet at 15000000/eq at 5/ex at 0/chiplet at 35000000/core at 0 21 +Testing /proc4/pib/chiplet at 15000000/eq at 5/ex at 1/chiplet at 36000000/core at 0 22 +Testing /proc4/pib/chiplet at 15000000/eq at 5/ex at 1/chiplet at 37000000/core at 0 23 +Testing /proc5/pib/chiplet at 10000000/eq at 0/ex at 0/chiplet at 20000000/core at 0 0 +Testing /proc5/pib/chiplet at 10000000/eq at 0/ex at 0/chiplet at 21000000/core at 0 1 +Testing /proc5/pib/chiplet at 10000000/eq at 0/ex at 1/chiplet at 22000000/core at 0 2 +Testing /proc5/pib/chiplet at 10000000/eq at 0/ex at 1/chiplet at 23000000/core at 0 3 +Testing /proc5/pib/chiplet at 11000000/eq at 1/ex at 0/chiplet at 24000000/core at 0 4 +Testing /proc5/pib/chiplet at 11000000/eq at 1/ex at 0/chiplet at 25000000/core at 0 5 +Testing /proc5/pib/chiplet at 11000000/eq at 1/ex at 1/chiplet at 26000000/core at 0 6 +Testing /proc5/pib/chiplet at 11000000/eq at 1/ex at 1/chiplet at 27000000/core at 0 7 +Testing /proc5/pib/chiplet at 12000000/eq at 2/ex at 0/chiplet at 28000000/core at 0 8 +Testing /proc5/pib/chiplet at 12000000/eq at 2/ex at 0/chiplet at 29000000/core at 0 9 +Testing /proc5/pib/chiplet at 12000000/eq at 2/ex at 1/chiplet at 2a000000/core at 0 10 +Testing /proc5/pib/chiplet at 12000000/eq at 2/ex at 1/chiplet at 2b000000/core at 0 11 +Testing /proc5/pib/chiplet at 13000000/eq at 3/ex at 0/chiplet at 2c000000/core at 0 12 +Testing /proc5/pib/chiplet at 13000000/eq at 3/ex at 0/chiplet at 2d000000/core at 0 13 +Testing /proc5/pib/chiplet at 13000000/eq at 3/ex at 1/chiplet at 2e000000/core at 0 14 +Testing /proc5/pib/chiplet at 13000000/eq at 3/ex at 1/chiplet at 2f000000/core at 0 15 +Testing /proc5/pib/chiplet at 14000000/eq at 4/ex at 0/chiplet at 30000000/core at 0 16 +Testing /proc5/pib/chiplet at 14000000/eq at 4/ex at 0/chiplet at 31000000/core at 0 17 +Testing /proc5/pib/chiplet at 14000000/eq at 4/ex at 1/chiplet at 32000000/core at 0 18 +Testing /proc5/pib/chiplet at 14000000/eq at 4/ex at 1/chiplet at 33000000/core at 0 19 +Testing /proc5/pib/chiplet at 15000000/eq at 5/ex at 0/chiplet at 34000000/core at 0 20 +Testing /proc5/pib/chiplet at 15000000/eq at 5/ex at 0/chiplet at 35000000/core at 0 21 +Testing /proc5/pib/chiplet at 15000000/eq at 5/ex at 1/chiplet at 36000000/core at 0 22 +Testing /proc5/pib/chiplet at 15000000/eq at 5/ex at 1/chiplet at 37000000/core at 0 23 +Testing /proc6/pib/chiplet at 10000000/eq at 0/ex at 0/chiplet at 20000000/core at 0 0 +Testing /proc6/pib/chiplet at 10000000/eq at 0/ex at 0/chiplet at 21000000/core at 0 1 +Testing /proc6/pib/chiplet at 10000000/eq at 0/ex at 1/chiplet at 22000000/core at 0 2 +Testing /proc6/pib/chiplet at 10000000/eq at 0/ex at 1/chiplet at 23000000/core at 0 3 +Testing /proc6/pib/chiplet at 11000000/eq at 1/ex at 0/chiplet at 24000000/core at 0 4 +Testing /proc6/pib/chiplet at 11000000/eq at 1/ex at 0/chiplet at 25000000/core at 0 5 +Testing /proc6/pib/chiplet at 11000000/eq at 1/ex at 1/chiplet at 26000000/core at 0 6 +Testing /proc6/pib/chiplet at 11000000/eq at 1/ex at 1/chiplet at 27000000/core at 0 7 +Testing /proc6/pib/chiplet at 12000000/eq at 2/ex at 0/chiplet at 28000000/core at 0 8 +Testing /proc6/pib/chiplet at 12000000/eq at 2/ex at 0/chiplet at 29000000/core at 0 9 +Testing /proc6/pib/chiplet at 12000000/eq at 2/ex at 1/chiplet at 2a000000/core at 0 10 +Testing /proc6/pib/chiplet at 12000000/eq at 2/ex at 1/chiplet at 2b000000/core at 0 11 +Testing /proc6/pib/chiplet at 13000000/eq at 3/ex at 0/chiplet at 2c000000/core at 0 12 +Testing /proc6/pib/chiplet at 13000000/eq at 3/ex at 0/chiplet at 2d000000/core at 0 13 +Testing /proc6/pib/chiplet at 13000000/eq at 3/ex at 1/chiplet at 2e000000/core at 0 14 +Testing /proc6/pib/chiplet at 13000000/eq at 3/ex at 1/chiplet at 2f000000/core at 0 15 +Testing /proc6/pib/chiplet at 14000000/eq at 4/ex at 0/chiplet at 30000000/core at 0 16 +Testing /proc6/pib/chiplet at 14000000/eq at 4/ex at 0/chiplet at 31000000/core at 0 17 +Testing /proc6/pib/chiplet at 14000000/eq at 4/ex at 1/chiplet at 32000000/core at 0 18 +Testing /proc6/pib/chiplet at 14000000/eq at 4/ex at 1/chiplet at 33000000/core at 0 19 +Testing /proc6/pib/chiplet at 15000000/eq at 5/ex at 0/chiplet at 34000000/core at 0 20 +Testing /proc6/pib/chiplet at 15000000/eq at 5/ex at 0/chiplet at 35000000/core at 0 21 +Testing /proc6/pib/chiplet at 15000000/eq at 5/ex at 1/chiplet at 36000000/core at 0 22 +Testing /proc6/pib/chiplet at 15000000/eq at 5/ex at 1/chiplet at 37000000/core at 0 23 +Testing /proc7/pib/chiplet at 10000000/eq at 0/ex at 0/chiplet at 20000000/core at 0 0 +Testing /proc7/pib/chiplet at 10000000/eq at 0/ex at 0/chiplet at 21000000/core at 0 1 +Testing /proc7/pib/chiplet at 10000000/eq at 0/ex at 1/chiplet at 22000000/core at 0 2 +Testing /proc7/pib/chiplet at 10000000/eq at 0/ex at 1/chiplet at 23000000/core at 0 3 +Testing /proc7/pib/chiplet at 11000000/eq at 1/ex at 0/chiplet at 24000000/core at 0 4 +Testing /proc7/pib/chiplet at 11000000/eq at 1/ex at 0/chiplet at 25000000/core at 0 5 +Testing /proc7/pib/chiplet at 11000000/eq at 1/ex at 1/chiplet at 26000000/core at 0 6 +Testing /proc7/pib/chiplet at 11000000/eq at 1/ex at 1/chiplet at 27000000/core at 0 7 +Testing /proc7/pib/chiplet at 12000000/eq at 2/ex at 0/chiplet at 28000000/core at 0 8 +Testing /proc7/pib/chiplet at 12000000/eq at 2/ex at 0/chiplet at 29000000/core at 0 9 +Testing /proc7/pib/chiplet at 12000000/eq at 2/ex at 1/chiplet at 2a000000/core at 0 10 +Testing /proc7/pib/chiplet at 12000000/eq at 2/ex at 1/chiplet at 2b000000/core at 0 11 +Testing /proc7/pib/chiplet at 13000000/eq at 3/ex at 0/chiplet at 2c000000/core at 0 12 +Testing /proc7/pib/chiplet at 13000000/eq at 3/ex at 0/chiplet at 2d000000/core at 0 13 +Testing /proc7/pib/chiplet at 13000000/eq at 3/ex at 1/chiplet at 2e000000/core at 0 14 +Testing /proc7/pib/chiplet at 13000000/eq at 3/ex at 1/chiplet at 2f000000/core at 0 15 +Testing /proc7/pib/chiplet at 14000000/eq at 4/ex at 0/chiplet at 30000000/core at 0 16 +Testing /proc7/pib/chiplet at 14000000/eq at 4/ex at 0/chiplet at 31000000/core at 0 17 +Testing /proc7/pib/chiplet at 14000000/eq at 4/ex at 1/chiplet at 32000000/core at 0 18 +Testing /proc7/pib/chiplet at 14000000/eq at 4/ex at 1/chiplet at 33000000/core at 0 19 +Testing /proc7/pib/chiplet at 15000000/eq at 5/ex at 0/chiplet at 34000000/core at 0 20 +Testing /proc7/pib/chiplet at 15000000/eq at 5/ex at 0/chiplet at 35000000/core at 0 21 +Testing /proc7/pib/chiplet at 15000000/eq at 5/ex at 1/chiplet at 36000000/core at 0 22 +Testing /proc7/pib/chiplet at 15000000/eq at 5/ex at 1/chiplet at 37000000/core at 0 23 EOF test_run libpdbg_p9_fapi_translation_test core @@ -74,6 +218,42 @@ Testing /proc1/pib/chiplet at 12000000/eq at 2 2 Testing /proc1/pib/chiplet at 13000000/eq at 3 3 Testing /proc1/pib/chiplet at 14000000/eq at 4 4 Testing /proc1/pib/chiplet at 15000000/eq at 5 5 +Testing /proc2/pib/chiplet at 10000000/eq at 0 0 +Testing /proc2/pib/chiplet at 11000000/eq at 1 1 +Testing /proc2/pib/chiplet at 12000000/eq at 2 2 +Testing /proc2/pib/chiplet at 13000000/eq at 3 3 +Testing /proc2/pib/chiplet at 14000000/eq at 4 4 +Testing /proc2/pib/chiplet at 15000000/eq at 5 5 +Testing /proc3/pib/chiplet at 10000000/eq at 0 0 +Testing /proc3/pib/chiplet at 11000000/eq at 1 1 +Testing /proc3/pib/chiplet at 12000000/eq at 2 2 +Testing /proc3/pib/chiplet at 13000000/eq at 3 3 +Testing /proc3/pib/chiplet at 14000000/eq at 4 4 +Testing /proc3/pib/chiplet at 15000000/eq at 5 5 +Testing /proc4/pib/chiplet at 10000000/eq at 0 0 +Testing /proc4/pib/chiplet at 11000000/eq at 1 1 +Testing /proc4/pib/chiplet at 12000000/eq at 2 2 +Testing /proc4/pib/chiplet at 13000000/eq at 3 3 +Testing /proc4/pib/chiplet at 14000000/eq at 4 4 +Testing /proc4/pib/chiplet at 15000000/eq at 5 5 +Testing /proc5/pib/chiplet at 10000000/eq at 0 0 +Testing /proc5/pib/chiplet at 11000000/eq at 1 1 +Testing /proc5/pib/chiplet at 12000000/eq at 2 2 +Testing /proc5/pib/chiplet at 13000000/eq at 3 3 +Testing /proc5/pib/chiplet at 14000000/eq at 4 4 +Testing /proc5/pib/chiplet at 15000000/eq at 5 5 +Testing /proc6/pib/chiplet at 10000000/eq at 0 0 +Testing /proc6/pib/chiplet at 11000000/eq at 1 1 +Testing /proc6/pib/chiplet at 12000000/eq at 2 2 +Testing /proc6/pib/chiplet at 13000000/eq at 3 3 +Testing /proc6/pib/chiplet at 14000000/eq at 4 4 +Testing /proc6/pib/chiplet at 15000000/eq at 5 5 +Testing /proc7/pib/chiplet at 10000000/eq at 0 0 +Testing /proc7/pib/chiplet at 11000000/eq at 1 1 +Testing /proc7/pib/chiplet at 12000000/eq at 2 2 +Testing /proc7/pib/chiplet at 13000000/eq at 3 3 +Testing /proc7/pib/chiplet at 14000000/eq at 4 4 +Testing /proc7/pib/chiplet at 15000000/eq at 5 5 EOF test_run libpdbg_p9_fapi_translation_test eq @@ -104,6 +284,78 @@ Testing /proc1/pib/chiplet at 14000000/eq at 4/ex at 0 0 Testing /proc1/pib/chiplet at 14000000/eq at 4/ex at 1 1 Testing /proc1/pib/chiplet at 15000000/eq at 5/ex at 0 0 Testing /proc1/pib/chiplet at 15000000/eq at 5/ex at 1 1 +Testing /proc2/pib/chiplet at 10000000/eq at 0/ex at 0 0 +Testing /proc2/pib/chiplet at 10000000/eq at 0/ex at 1 1 +Testing /proc2/pib/chiplet at 11000000/eq at 1/ex at 0 0 +Testing /proc2/pib/chiplet at 11000000/eq at 1/ex at 1 1 +Testing /proc2/pib/chiplet at 12000000/eq at 2/ex at 0 0 +Testing /proc2/pib/chiplet at 12000000/eq at 2/ex at 1 1 +Testing /proc2/pib/chiplet at 13000000/eq at 3/ex at 0 0 +Testing /proc2/pib/chiplet at 13000000/eq at 3/ex at 1 1 +Testing /proc2/pib/chiplet at 14000000/eq at 4/ex at 0 0 +Testing /proc2/pib/chiplet at 14000000/eq at 4/ex at 1 1 +Testing /proc2/pib/chiplet at 15000000/eq at 5/ex at 0 0 +Testing /proc2/pib/chiplet at 15000000/eq at 5/ex at 1 1 +Testing /proc3/pib/chiplet at 10000000/eq at 0/ex at 0 0 +Testing /proc3/pib/chiplet at 10000000/eq at 0/ex at 1 1 +Testing /proc3/pib/chiplet at 11000000/eq at 1/ex at 0 0 +Testing /proc3/pib/chiplet at 11000000/eq at 1/ex at 1 1 +Testing /proc3/pib/chiplet at 12000000/eq at 2/ex at 0 0 +Testing /proc3/pib/chiplet at 12000000/eq at 2/ex at 1 1 +Testing /proc3/pib/chiplet at 13000000/eq at 3/ex at 0 0 +Testing /proc3/pib/chiplet at 13000000/eq at 3/ex at 1 1 +Testing /proc3/pib/chiplet at 14000000/eq at 4/ex at 0 0 +Testing /proc3/pib/chiplet at 14000000/eq at 4/ex at 1 1 +Testing /proc3/pib/chiplet at 15000000/eq at 5/ex at 0 0 +Testing /proc3/pib/chiplet at 15000000/eq at 5/ex at 1 1 +Testing /proc4/pib/chiplet at 10000000/eq at 0/ex at 0 0 +Testing /proc4/pib/chiplet at 10000000/eq at 0/ex at 1 1 +Testing /proc4/pib/chiplet at 11000000/eq at 1/ex at 0 0 +Testing /proc4/pib/chiplet at 11000000/eq at 1/ex at 1 1 +Testing /proc4/pib/chiplet at 12000000/eq at 2/ex at 0 0 +Testing /proc4/pib/chiplet at 12000000/eq at 2/ex at 1 1 +Testing /proc4/pib/chiplet at 13000000/eq at 3/ex at 0 0 +Testing /proc4/pib/chiplet at 13000000/eq at 3/ex at 1 1 +Testing /proc4/pib/chiplet at 14000000/eq at 4/ex at 0 0 +Testing /proc4/pib/chiplet at 14000000/eq at 4/ex at 1 1 +Testing /proc4/pib/chiplet at 15000000/eq at 5/ex at 0 0 +Testing /proc4/pib/chiplet at 15000000/eq at 5/ex at 1 1 +Testing /proc5/pib/chiplet at 10000000/eq at 0/ex at 0 0 +Testing /proc5/pib/chiplet at 10000000/eq at 0/ex at 1 1 +Testing /proc5/pib/chiplet at 11000000/eq at 1/ex at 0 0 +Testing /proc5/pib/chiplet at 11000000/eq at 1/ex at 1 1 +Testing /proc5/pib/chiplet at 12000000/eq at 2/ex at 0 0 +Testing /proc5/pib/chiplet at 12000000/eq at 2/ex at 1 1 +Testing /proc5/pib/chiplet at 13000000/eq at 3/ex at 0 0 +Testing /proc5/pib/chiplet at 13000000/eq at 3/ex at 1 1 +Testing /proc5/pib/chiplet at 14000000/eq at 4/ex at 0 0 +Testing /proc5/pib/chiplet at 14000000/eq at 4/ex at 1 1 +Testing /proc5/pib/chiplet at 15000000/eq at 5/ex at 0 0 +Testing /proc5/pib/chiplet at 15000000/eq at 5/ex at 1 1 +Testing /proc6/pib/chiplet at 10000000/eq at 0/ex at 0 0 +Testing /proc6/pib/chiplet at 10000000/eq at 0/ex at 1 1 +Testing /proc6/pib/chiplet at 11000000/eq at 1/ex at 0 0 +Testing /proc6/pib/chiplet at 11000000/eq at 1/ex at 1 1 +Testing /proc6/pib/chiplet at 12000000/eq at 2/ex at 0 0 +Testing /proc6/pib/chiplet at 12000000/eq at 2/ex at 1 1 +Testing /proc6/pib/chiplet at 13000000/eq at 3/ex at 0 0 +Testing /proc6/pib/chiplet at 13000000/eq at 3/ex at 1 1 +Testing /proc6/pib/chiplet at 14000000/eq at 4/ex at 0 0 +Testing /proc6/pib/chiplet at 14000000/eq at 4/ex at 1 1 +Testing /proc6/pib/chiplet at 15000000/eq at 5/ex at 0 0 +Testing /proc6/pib/chiplet at 15000000/eq at 5/ex at 1 1 +Testing /proc7/pib/chiplet at 10000000/eq at 0/ex at 0 0 +Testing /proc7/pib/chiplet at 10000000/eq at 0/ex at 1 1 +Testing /proc7/pib/chiplet at 11000000/eq at 1/ex at 0 0 +Testing /proc7/pib/chiplet at 11000000/eq at 1/ex at 1 1 +Testing /proc7/pib/chiplet at 12000000/eq at 2/ex at 0 0 +Testing /proc7/pib/chiplet at 12000000/eq at 2/ex at 1 1 +Testing /proc7/pib/chiplet at 13000000/eq at 3/ex at 0 0 +Testing /proc7/pib/chiplet at 13000000/eq at 3/ex at 1 1 +Testing /proc7/pib/chiplet at 14000000/eq at 4/ex at 0 0 +Testing /proc7/pib/chiplet at 14000000/eq at 4/ex at 1 1 +Testing /proc7/pib/chiplet at 15000000/eq at 5/ex at 0 0 +Testing /proc7/pib/chiplet at 15000000/eq at 5/ex at 1 1 EOF test_run libpdbg_p9_fapi_translation_test ex @@ -112,6 +364,12 @@ test_run libpdbg_p9_fapi_translation_test ex test_result 0 < References: <20200430023440.225504-1-amitay@ozlabs.org> <20200430023440.225504-6-amitay@ozlabs.org> Message-ID: <48154779.5ZFShEmHLU@townsend> Thanks. Reviewed-by: Alistair Popple On Thursday, 30 April 2020 12:34:26 PM AEST Amitay Isaacs wrote: > When PDBG_BACKEND_DTB is specified, backend may not be set. This means > only the drivers registered with PDBG_DEFAULT_BACKEND will be loaded. > To be able to match backend specific drivers for targets in system tree, > use the backend specified in PDBG_BACKEND_DRIVER environment variable. > > Signed-off-by: Amitay Isaacs > --- > libpdbg/dtb.c | 23 ++++++++++++++++++++--- > 1 file changed, 20 insertions(+), 3 deletions(-) > > diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c > index 70b7962..3b7a597 100644 > --- a/libpdbg/dtb.c > +++ b/libpdbg/dtb.c > @@ -76,8 +76,25 @@ static struct pdbg_dtb pdbg_dtb = { > * running on. */ > static enum pdbg_backend default_backend(void) > { > + const char *tmp; > int rc; > > + tmp = getenv("PDBG_BACKEND_DRIVER"); > + if (tmp) { > + if (!strcmp(tmp, "fsi")) > + return PDBG_BACKEND_FSI; > + else if (!strcmp(tmp, "i2c")) > + return PDBG_BACKEND_I2C; > + else if (!strcmp(tmp, "kernel")) > + return PDBG_BACKEND_KERNEL; > + else if (!strcmp(tmp, "fake")) > + return PDBG_BACKEND_FAKE; > + else if (!strcmp(tmp, "host")) > + return PDBG_BACKEND_HOST; > + else if (!strcmp(tmp, "cronus")) > + return PDBG_BACKEND_CRONUS; > + } > + > rc = access(XSCOM_BASE_PATH, F_OK); > if (rc == 0) /* PowerPC Host System */ > return PDBG_BACKEND_HOST; > @@ -313,6 +330,9 @@ struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) > dtb->backend.fdt = NULL; > dtb->system.fdt = system_fdt; > > + if (!pdbg_backend) > + pdbg_backend = default_backend(); > + > fdt = getenv("PDBG_BACKEND_DTB"); > if (fdt) > mmap_dtb(fdt, false, &dtb->backend); > @@ -324,9 +344,6 @@ struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) > if (dtb->backend.fdt && dtb->system.fdt) > goto done; > > - if (!pdbg_backend) > - pdbg_backend = default_backend(); > - > switch(pdbg_backend) { > case PDBG_BACKEND_HOST: > ppc_target(dtb);