summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaptor Engineering Development Team <support@raptorengineering.com>2018-03-25 14:57:49 -0500
committerRaptor Engineering Development Team <support@raptorengineering.com>2018-04-12 13:21:31 -0500
commitc0b786b306526a0d6f066a262b8bbc105f113eba (patch)
treeb443241dfac0d09849c82075fea71e5ee68d3237
parente89e6af1f06f8beda7bfc203c7adf2ea1fab5ef6 (diff)
downloadtalos-skiboot-04-15-2018.tar.gz
talos-skiboot-04-15-2018.zip
Mark all partitions except full PNOR and boot kernel firmware read only04-15-2018
-rw-r--r--core/flash.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/flash.c b/core/flash.c
index d44035e6..fac4ef6a 100644
--- a/core/flash.c
+++ b/core/flash.c
@@ -393,6 +393,13 @@ static struct dt_node *flash_add_dt_node(struct flash *flash, int id)
partition_node = dt_new_addr(partition_container_node, "partition", ffs_part_start);
dt_add_property_strings(partition_node, "label", name);
dt_add_property_cells(partition_node, "reg", ffs_part_start, ffs_part_size);
+ if (part_name_map[i].id != RESOURCE_ID_KERNEL_FW) {
+ /* Mark all partitions other than the full PNOR and the boot kernel
+ * firmware as read only. These two partitions are the only partitions
+ * that are properly erase block aligned at this time.
+ */
+ dt_add_property(partition_node, "read-only", NULL, 0);
+ }
}
partition_node = dt_new_addr(partition_container_node, "partition", 0);
OpenPOWER on IntegriCloud