Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262158AbVDFPGF (ORCPT ); Wed, 6 Apr 2005 11:06:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262221AbVDFPGF (ORCPT ); Wed, 6 Apr 2005 11:06:05 -0400 Received: from cam-admin0.cambridge.arm.com ([193.131.176.58]:15034 "EHLO cam-admin0.cambridge.arm.com") by vger.kernel.org with ESMTP id S262158AbVDFPGD (ORCPT ); Wed, 6 Apr 2005 11:06:03 -0400 To: linux-os@analogic.com Cc: Bas Vermeulen , linux-kernel@vger.kernel.org Subject: Re: NOMMU - How to reserve 1 MB in top of memory in a clean way References: <1112781027.2687.6.camel@laptop.blackstar.nl> From: Catalin Marinas Date: Wed, 06 Apr 2005 16:05:51 +0100 In-Reply-To: (Richard B. Johnson's message of "Wed, 6 Apr 2005 10:53:07 -0400 (EDT)") Message-ID: User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux) 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: 984 Lines: 25 "Richard B. Johnson" wrote: > 1 Megabyte of DMA RAM should be available using conventional > means __get_dma_pages(GFP_KERNEL, 0x100) soon after boot. The problem is that he needs to get this memory from the last MB only, __get_dma_pages would return pages from ZONE_DMA but this is usually at the beginning of RAM. > Or just use mem= on the boot command line. This will tell > the kernel the extent of memory to use. Any RAM after that > is available. Your driver can access kernel variable, "num_physpages" > to find the last page it is supposed to use. But this means that you would need to modify all the drivers that need DMA memory. Modifying the zones is actually transparent for the drivers. -- Catalin - 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/