summaryrefslogtreecommitdiff
path: root/test/boot/bootstd_common.h
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2022-10-11 09:47:13 -0600
committerSimon Glass <[email protected]>2022-10-17 21:17:13 -0600
commitbfdfc5d85398fba50e5e2b1e571df53f189f565a (patch)
treec8b0807a8ff513049afaf5936082b6f2c347e85b /test/boot/bootstd_common.h
parentbaf4141079aa18e5f40fcecaa9dabaeaa9437bee (diff)
bootstd: Move VBE setup into a shared function
This information needs to be set up by the bootstd tests as well. Move it into a common function and ensure it is executed before any bootstd test is run. Make sure the 'images' parameter is set correctly for fixups. Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'test/boot/bootstd_common.h')
-rw-r--r--test/boot/bootstd_common.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/boot/bootstd_common.h b/test/boot/bootstd_common.h
index 676ef0a57f9..c5e0fd1ceab 100644
--- a/test/boot/bootstd_common.h
+++ b/test/boot/bootstd_common.h
@@ -9,10 +9,17 @@
#ifndef __bootstd_common_h
#define __bootstd_common_h
+#include <version_string.h>
+
/* Declare a new bootdev test */
#define BOOTSTD_TEST(_name, _flags) \
UNIT_TEST(_name, _flags, bootstd_test)
+#define NVDATA_START_BLK ((0x400 + 0x400) / MMC_MAX_BLOCK_LEN)
+#define VERSION_START_BLK ((0x400 + 0x800) / MMC_MAX_BLOCK_LEN)
+#define TEST_VERSION "U-Boot v2022.04-local2"
+#define TEST_VERNUM 0x00010002
+
struct unit_test_state;
/**
@@ -24,4 +31,13 @@ struct unit_test_state;
*/
int bootstd_test_drop_bootdev_order(struct unit_test_state *uts);
+/**
+ * bootstd_setup_for_tests() - Set up MMC data for VBE tests
+ *
+ * Some data is needed for VBE tests to work. This function sets that up.
+ *
+ * @return 0 if OK, -ve on error
+ */
+int bootstd_setup_for_tests(void);
+
#endif