aboutsummaryrefslogtreecommitdiff
path: root/include/drivers
diff options
context:
space:
mode:
authorPaul Beesley <paul.beesley@arm.com>2019-09-26 13:40:38 +0000
committerTrustedFirmware Code Review <review@review.trustedfirmware.org>2019-09-26 13:40:38 +0000
commit69ef7b7ffe66b64bdffee0a387774e7088022503 (patch)
tree976b35b009ee6f13cfcc0a00267b47de7f4b348e /include/drivers
parent80a624d1a3d7e052df1c7848aa275f1ac09a743b (diff)
parentdeb330cb3837cddf251cea5d804634ad75d48c19 (diff)
downloadtrusted-firmware-a-69ef7b7ffe66b64bdffee0a387774e7088022503.tar.gz
Merge changes I0283fc2e,Ib476d024,Iada05f7c into integration
* changes: hikey: fix to load FIP by partition table. hikey960: fix to load FIP by partition table drivers: partition: support different block size
Diffstat (limited to 'include/drivers')
-rw-r--r--include/drivers/partition/gpt.h4
-rw-r--r--include/drivers/partition/partition.h10
2 files changed, 11 insertions, 3 deletions
diff --git a/include/drivers/partition/gpt.h b/include/drivers/partition/gpt.h
index 3ae160fdc1..d923e9535f 100644
--- a/include/drivers/partition/gpt.h
+++ b/include/drivers/partition/gpt.h
@@ -10,9 +10,9 @@
#include <drivers/partition/partition.h>
#define PARTITION_TYPE_GPT 0xee
-#define GPT_HEADER_OFFSET PARTITION_BLOCK_SIZE
+#define GPT_HEADER_OFFSET PLAT_PARTITION_BLOCK_SIZE
#define GPT_ENTRY_OFFSET (GPT_HEADER_OFFSET + \
- PARTITION_BLOCK_SIZE)
+ PLAT_PARTITION_BLOCK_SIZE)
#define GUID_LEN 16
#define GPT_SIGNATURE "EFI PART"
diff --git a/include/drivers/partition/partition.h b/include/drivers/partition/partition.h
index d94c7824a6..5f6483373f 100644
--- a/include/drivers/partition/partition.h
+++ b/include/drivers/partition/partition.h
@@ -17,7 +17,15 @@
CASSERT(PLAT_PARTITION_MAX_ENTRIES <= 128, assert_plat_partition_max_entries);
-#define PARTITION_BLOCK_SIZE 512
+#if !PLAT_PARTITION_BLOCK_SIZE
+# define PLAT_PARTITION_BLOCK_SIZE 512
+#endif /* PLAT_PARTITION_BLOCK_SIZE */
+
+CASSERT((PLAT_PARTITION_BLOCK_SIZE == 512) ||
+ (PLAT_PARTITION_BLOCK_SIZE == 4096),
+ assert_plat_partition_block_size);
+
+#define LEGACY_PARTITION_BLOCK_SIZE 512
#define EFI_NAMELEN 36