summaryrefslogtreecommitdiff
path: root/drivers/io/io_memmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/io/io_memmap.c')
-rw-r--r--drivers/io/io_memmap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/io/io_memmap.c b/drivers/io/io_memmap.c
index fe39652b..5aedd010 100644
--- a/drivers/io/io_memmap.c
+++ b/drivers/io/io_memmap.c
@@ -32,6 +32,7 @@
#include <debug.h>
#include <io_driver.h>
#include <io_storage.h>
+#include <platform_def.h>
#include <string.h>
/* As we need to be able to keep state for seek, only one file can be open
@@ -185,7 +186,9 @@ static int memmap_block_read(io_entity_t *entity, uintptr_t buffer,
file_state_t *fp;
assert(entity != NULL);
+#ifndef PLAT_ALLOW_ZERO_ADDR_COPY
assert(buffer != (uintptr_t)NULL);
+#endif
assert(length_read != NULL);
fp = (file_state_t *)entity->info;