aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWesley W. Terpstra <wesley@sifive.com>2017-04-05 17:42:26 -0700
committerWesley W. Terpstra <wesley@sifive.com>2017-04-05 17:44:02 -0700
commit31eab7e4dd7856d48ee352fc941490257840a87c (patch)
treea8f51d69d2a70337a2381309e835f3c926a2c859
parent8b4421bacba28f97da2ddeb6a6fba9e184e91bee (diff)
downloadpk-31eab7e4dd7856d48ee352fc941490257840a87c.zip
pk-31eab7e4dd7856d48ee352fc941490257840a87c.tar.gz
pk-31eab7e4dd7856d48ee352fc941490257840a87c.tar.bz2
fdt: update the status length when masking cpus
-rw-r--r--machine/fdt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/machine/fdt.c b/machine/fdt.c
index 908b2ea..34ff87b 100644
--- a/machine/fdt.c
+++ b/machine/fdt.c
@@ -569,8 +569,11 @@ static void hart_filter_done(const struct fdt_scan_node *node, void *extra)
assert (filter->status);
assert (filter->hart >= 0);
- if (((filter->mask >> filter->hart) & 1))
+ if (((filter->mask >> filter->hart) & 1) && !strcmp(filter->status, "okay")) {
strcpy(filter->status, "masked");
+ uint32_t *len = (uint32_t*)filter->status;
+ len[-2] = bswap(strlen("masked")+1);
+ }
}
void filter_harts(uintptr_t fdt, unsigned long hart_mask)