From patchwork Wed Feb 25 00:02:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Hershberger X-Patchwork-Id: 443280 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 713561400DD for ; Wed, 25 Feb 2015 11:06:20 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 063284A02F; Wed, 25 Feb 2015 01:05:55 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6BOsmiQ7OAcN; Wed, 25 Feb 2015 01:05:54 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 994364B667; Wed, 25 Feb 2015 01:05:07 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E0C274B372 for ; Wed, 25 Feb 2015 01:04:42 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1DGMeLd7yaI1 for ; Wed, 25 Feb 2015 01:04:42 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from ni.com (skprod2.natinst.com [130.164.80.23]) by theia.denx.de (Postfix) with ESMTPS id AF6134B62B for ; Wed, 25 Feb 2015 01:04:32 +0100 (CET) Received: from us-aus-mgwout2.amer.corp.natinst.com (nb-chan1-1338.natinst.com [130.164.19.134]) by us-aus-skprod2.natinst.com (8.15.0.59/8.15.0.59) with ESMTP id t1P04TCZ021395; Tue, 24 Feb 2015 18:04:29 -0600 Received: from linux-xvxi.natinst.com ([130.164.14.198]) by us-aus-mgwout2.amer.corp.natinst.com (Lotus Domino Release 8.5.3FP6) with ESMTP id 2015022418042956-383815 ; Tue, 24 Feb 2015 18:04:29 -0600 From: Joe Hershberger To: u-boot@lists.denx.de Date: Tue, 24 Feb 2015 18:02:20 -0600 Message-Id: <1424822552-4366-12-git-send-email-joe.hershberger@ni.com> X-Mailer: git-send-email 1.7.11.5 In-Reply-To: <1424822552-4366-1-git-send-email-joe.hershberger@ni.com> References: <1423618233-11397-1-git-send-email-joe.hershberger@ni.com> <1424822552-4366-1-git-send-email-joe.hershberger@ni.com> X-MIMETrack: Itemize by SMTP Server on US-AUS-MGWOut2/AUS/H/NIC(Release 8.5.3FP6|November 21, 2013) at 02/24/2015 06:04:29 PM, Serialize by Router on US-AUS-MGWOut2/AUS/H/NIC(Release 8.5.3FP6|November 21, 2013) at 02/24/2015 06:04:29 PM, Serialize complete at 02/24/2015 06:04:29 PM X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2015-02-24_06:, , signatures=0 Cc: Tom Rini , Joe Hershberger Subject: [U-Boot] [RFC PATCH v4 11/23] net: Access mapped physmem in net functions X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 --- Changes in v4: -New to v4 Changes in v3: None Changes in v2: None net/nfs.c | 2 +- net/tftp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/nfs.c b/net/nfs.c index 381b75f..c816acd 100644 --- a/net/nfs.c +++ b/net/nfs.c @@ -93,7 +93,7 @@ store_block(uchar *src, unsigned offset, unsigned len) } else #endif /* CONFIG_SYS_DIRECT_FLASH_NFS */ { - (void)memcpy((void *)(load_addr + offset), src, len); + memcpy((void *)(map_sysmem(load_addr, 0) + offset), src, len); } if (NetBootFileXferSize < (offset+len)) diff --git a/net/tftp.c b/net/tftp.c index 0a2c533..9290182 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -184,7 +184,7 @@ store_block(int block, uchar *src, unsigned len) } else #endif /* CONFIG_SYS_DIRECT_FLASH_TFTP */ { - (void)memcpy((void *)(load_addr + offset), src, len); + memcpy((void *)(map_sysmem(load_addr, 0) + offset), src, len); } #ifdef CONFIG_MCAST_TFTP if (Multicast)