From 55d5fd9a84ced5c5feb5eda0db1523fa3c2fc742 Mon Sep 17 00:00:00 2001 From: Joe Hershberger Date: Sun, 22 Mar 2015 17:09:08 -0500 Subject: net: Access mapped physmem in net functions Previously the net functions would access memory assuming physmem did not need to be mapped. In sandbox, that's not the case. Now we map the physmem specified by the user in loadaddr to the buffer that represents that space. Signed-off-by: Joe Hershberger Reviewed-by: Simon Glass --- net/nfs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'net/nfs.c') diff --git a/net/nfs.c b/net/nfs.c index 381b75f1c5..8e05ae57cd 100644 --- a/net/nfs.c +++ b/net/nfs.c @@ -26,6 +26,7 @@ #include #include #include +#include #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)) -- cgit v1.2.1