From aef488824917caa31d8b611192e816d2fc28f54f Mon Sep 17 00:00:00 2001 From: Megan Wachs Date: Tue, 17 Apr 2018 11:55:50 -0700 Subject: [PATCH] riscv-compliance: Fix writing hartsello --- src/target/riscv/riscv-013.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c index 202408846..c062de134 100644 --- a/src/target/riscv/riscv-013.c +++ b/src/target/riscv/riscv-013.c @@ -2964,7 +2964,7 @@ int riscv013_test_compliance(struct target *target) RISCV013_INFO(info); /* TODO: Support HARTSELLHI as well */ - dmcontrol = set_field(dmcontrol_orig, DMI_DMCONTROL_HARTSELLO, RISCV_MAX_HARTS-1); + dmcontrol = dmcontrol_orig | DMI_DMCONTROL_HARTSELLO; dmi_write(target, DMI_DMCONTROL, dmcontrol); dmi_read(target, &dmcontrol, DMI_DMCONTROL); COMPLIANCE_TEST(get_field(dmcontrol, DMI_DMCONTROL_HARTSELLO) == (uint32_t) ((1 << info->hartsellen) - 1),