Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 13 Mar 2003 15:47:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 13 Mar 2003 15:47:07 -0500 Received: from comtv.ru ([217.10.32.4]:18427 "EHLO comtv.ru") by vger.kernel.org with ESMTP id ; Thu, 13 Mar 2003 15:47:06 -0500 X-Comment-To: sridhar vaidyanathan To: sridhar vaidyanathan Cc: linux-kernel@vger.kernel.org Subject: Re: mmaping /dev/mem References: <1047515807.3e6fd29f92939@webmail.health.ufl.edu> From: Alex Tomas Organization: HOME Date: 13 Mar 2003 23:49:59 +0300 In-Reply-To: <1047515807.3e6fd29f92939@webmail.health.ufl.edu> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1198 Lines: 20 >>>>> sridhar vaidyanathan (sv) writes: sv> I have a problem mmaping /dev/mem on some address in RAM. I am sv> aware of caveats,but I am trying to mmap a region which I am sure sv> is not in use by the kernel(some additional code does this and sv> returns a physical address which is what I use for mmap). The sv> mmap call itself succeeds and /proc/pid/maps also shows that sv> region, but I am unable to see what I write in target memory.I sv> also tried with the O_SYNC flag as I was wondering is caching had sv> anything to do with the results that I was seeing.No effect. sv> This however works with a mem= option and when the mmap region sv> falls out of the mem= boundary. any clues? Please cc as I am sv> not subscribed sridhar look at mm/memory.c:remap_pte_range(): if ((!VALID_PAGE(page)) || PageReserved(page)) set_pte(pte, mk_pte_phys(phys_addr, prot)); so, your pages aren't mapped at all and pte'es contain zero ... - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/