summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/nfs.c6
-rw-r--r--net/tftp.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/net/nfs.c b/net/nfs.c
index 381b75f..8e05ae5 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -26,6 +26,7 @@
#include <command.h>
#include <net.h>
#include <malloc.h>
+#include <mapmem.h>
#include "nfs.h"
#include "bootp.h"
@@ -93,7 +94,10 @@ store_block(uchar *src, unsigned offset, unsigned len)
} else
#endif /* CONFIG_SYS_DIRECT_FLASH_NFS */
{
- (void)memcpy((void *)(load_addr + offset), src, len);
+ void *ptr = map_sysmem(load_addr + offset, len);
+
+ memcpy(ptr, src, len);
+ unmap_sysmem(ptr);
}
if (NetBootFileXferSize < (offset+len))
diff --git a/net/tftp.c b/net/tftp.c
index 0a2c533..51c67be 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <command.h>
+#include <mapmem.h>
#include <net.h>
#include "tftp.h"
#include "bootp.h"
@@ -184,7 +185,10 @@ store_block(int block, uchar *src, unsigned len)
} else
#endif /* CONFIG_SYS_DIRECT_FLASH_TFTP */
{
- (void)memcpy((void *)(load_addr + offset), src, len);
+ void *ptr = map_sysmem(load_addr + offset, len);
+
+ memcpy(ptr, src, len);
+ unmap_sysmem(ptr);
}
#ifdef CONFIG_MCAST_TFTP
if (Multicast)