[flash_ctrl] Add plain text integrity in flash
- Fixes https://github.com/lowRISC/opentitan/issues/8984
- Takes the spare storage bits of flash and store a de-scrambled
integrity. This allows flash to emulate the behavior of end-to-end
storage despite its need for ECC reliability checks.
Signed-off-by: Timothy Chen <timothytim@google.com>
[sw, util] Add support for flash image generation
- only supports the plain text ECC at the moment
- scrambled will be added in the future
Signed-off-by: Timothy Chen <timothytim@google.com>
[test] update verilator CI test pathing
flash now uses vmem instead of elf
Signed-off-by: Timothy Chen <timothytim@google.com>
[flash_ctrl] python updates per comments
Signed-off-by: Timothy Chen <timothytim@google.com>
[flash_ctrl] fix typo
Signed-off-by: Timothy Chen <timothytim@google.com>
diff --git a/sw/device/examples/hello_usbdev/meson.build b/sw/device/examples/hello_usbdev/meson.build
index 1e673bb..750ed4f 100644
--- a/sw/device/examples/hello_usbdev/meson.build
+++ b/sw/device/examples/hello_usbdev/meson.build
@@ -53,6 +53,15 @@
kwargs: bin_to_vmem64_custom_target_args,
)
+ hello_usbdev_scr_vmem64 = custom_target(
+ target_name.format('scrambled'),
+ input: hello_usbdev_vmem64,
+ output: flash_image_outputs,
+ command: flash_image_command,
+ depend_files: flash_image_depend_files,
+ build_by_default: true,
+ )
+
custom_target(
target_name.format('export'),
command: export_target_command,
@@ -63,6 +72,7 @@
hello_usbdev_bin,
hello_usbdev_vmem32,
hello_usbdev_vmem64,
+ hello_usbdev_scr_vmem64,
],
output: target_name.format('export'),
build_always_stale: true,
diff --git a/sw/device/examples/hello_world/meson.build b/sw/device/examples/hello_world/meson.build
index a644745..903a581 100644
--- a/sw/device/examples/hello_world/meson.build
+++ b/sw/device/examples/hello_world/meson.build
@@ -50,6 +50,15 @@
kwargs: bin_to_vmem64_custom_target_args,
)
+ hello_world_scr_vmem64 = custom_target(
+ target_name.format('scrambled'),
+ input: hello_world_vmem64,
+ output: flash_image_outputs,
+ command: flash_image_command,
+ depend_files: flash_image_depend_files,
+ build_by_default: true,
+ )
+
custom_target(
target_name.format('export'),
command: export_target_command,
@@ -60,6 +69,7 @@
hello_world_bin,
hello_world_vmem32,
hello_world_vmem64,
+ hello_world_scr_vmem64,
],
output: target_name.format('export'),
build_always_stale: true,