feat(gpt): add test to corrupt gpt entries
Corrupt the GPT entries by adding entries parameter to corrupt_gpt_bin(),
which will empty the entries in LBA2 through LBA34. This will force
the use of backup gpt at the last LBA.
Add header parameter to corrupt_gpt_bin() for header option.
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: Ie2ba6d9a081b7f705f7ee689e52bf23bfbb4e5dc
diff --git a/run_config/fvp-tftf.backup_gpt b/run_config/fvp-tftf.entries_backup_gpt
similarity index 68%
copy from run_config/fvp-tftf.backup_gpt
copy to run_config/fvp-tftf.entries_backup_gpt
index 780697d..51df98e 100644
--- a/run_config/fvp-tftf.backup_gpt
+++ b/run_config/fvp-tftf.entries_backup_gpt
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2023-2024, Arm Limited. All rights reserved.
+# Copyright (c) 2024, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -13,8 +13,8 @@
# Maximum FIP size is 2MiB = 2097152
gen_gpt_bin "$archive/fip.bin" 2097152
- # Corrupt primary GPT header to force TF-A to use the backup one
- corrupt_gpt_bin "$archive/fip_gpt.bin"
+ # Corrupt primary GPT entries to force TF-A to use the backup
+ corrupt_gpt_bin "$archive/fip_gpt.bin" "partition-entries"
}
generate_lava_job_template() {
diff --git a/run_config/fvp-tftf.backup_gpt b/run_config/fvp-tftf.header_backup_gpt
similarity index 91%
rename from run_config/fvp-tftf.backup_gpt
rename to run_config/fvp-tftf.header_backup_gpt
index 780697d..b54084c 100644
--- a/run_config/fvp-tftf.backup_gpt
+++ b/run_config/fvp-tftf.header_backup_gpt
@@ -14,7 +14,7 @@
gen_gpt_bin "$archive/fip.bin" 2097152
# Corrupt primary GPT header to force TF-A to use the backup one
- corrupt_gpt_bin "$archive/fip_gpt.bin"
+ corrupt_gpt_bin "$archive/fip_gpt.bin" "header"
}
generate_lava_job_template() {