summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <tpearson@raptorengineering.com>2018-03-25 14:57:49 -0500
committerRaptor Engineering Development Team <support@raptorengineering.com>2019-04-24 08:01:52 +0000
commit22eb531025f87d53d611b8b42efc2c6147023f3f (patch)
tree7fd0601e9522dc3b90f590aef1f40f8d6acbfc14
parentdc112ca4acc18bf714fabacb1f804257fd22e564 (diff)
downloadblackbird-skiboot-22eb531025f87d53d611b8b42efc2c6147023f3f.tar.gz
blackbird-skiboot-22eb531025f87d53d611b8b42efc2c6147023f3f.zip
Mark all partitions except full PNOR and boot kernel firmware read only
Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com>
-rw-r--r--core/flash.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/flash.c b/core/flash.c
index e775dd16..3da6d4a4 100644
--- a/core/flash.c
+++ b/core/flash.c
@@ -279,6 +279,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