From fca6341636bee6750ecd6e3f69845a470e1c9c05 Mon Sep 17 00:00:00 2001 From: Alex Forencich Date: Thu, 18 Nov 2021 16:23:37 -0800 Subject: [PATCH] Add flash size check for Alveo boards --- utils/mqnic-fw.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/utils/mqnic-fw.c b/utils/mqnic-fw.c index a6c20d525..673a22b29 100644 --- a/utils/mqnic-fw.c +++ b/utils/mqnic-fw.c @@ -712,6 +712,13 @@ int main(int argc, char *argv[]) break; case 0x81: // Alveo boards + if (flash_size < 0x01002000) + { + fprintf(stderr, "Invalid flash size\n"); + ret = -1; + goto skip_flash; + } + flash_segment_count = 2; flash_segment_start[0] = 0; flash_segment_length[0] = 0x01002000;