Date: Sun, 7 Jul 2013 04:41:43 -0700 (PDT) From: mangesh chitnis <mngesh1@yahoo.com> To: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: memmap in FreeBSD Message-ID: <1373197303.40304.YahooMailNeo@web160703.mail.bf1.yahoo.com>
next in thread | raw e-mail | index | archive | help
Hi, What is the memmap equivalent of Linux in FreeBSD? In Linux memmap is used to reserve a portion of physical memory. This is used as a kernel boot argument. E.g.: memmap=2G$1G will reserve 1GB memory above 2GB, incase I have 3GB RAM. This 1GB reserved memory is not visible to the OS, however this 1GB can be used using ioremap. How can I reserve memory in FreeBSD and later use it i.e memmap and ioremap equivalent? I have tried using hw.physmem loader parameter. I have 3 GB system memory and I have set hw.physmem=2G. sysctl -a shows: hw.physmem: 2.12G hw.usermem: 1.9G hw.realmem: 2.15G devinfo -rv shows: ram0: 0x00-0x9f3ff 0x10000000-0xbfedffff 0xbff00000-0xbfffffff Here, looks like it is showing the full 3 GB mapping. Now, how do I know which is that 1 GB available memory (In Linux, this memory is shown as reserved in /proc/iomem under System RAM) ? Also, which function(similar to ioremap) should I call to map the physical address to virtual address? Thanks. From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 7 11:45:47 2013 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0A7742EF for <freebsd-hackers@freebsd.org>; Sun, 7 Jul 2013 11:45:47 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-pd0-x235.google.com (mail-pd0-x235.google.com [IPv6:2607:f8b0:400e:c02::235]) by mx1.freebsd.org (Postfix) with ESMTP id E266E110D for <freebsd-hackers@freebsd.org>; Sun, 7 Jul 2013 11:45:46 +0000 (UTC) Received: by mail-pd0-f181.google.com with SMTP id 14so3222351pdj.12 for <freebsd-hackers@freebsd.org>; Sun, 07 Jul 2013 04:45:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s 120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=ismV/tJkUX0EPav8HreOl7EIay15veTSOBTw/GG6Fto=; b=skmb0Eo0FyTNeMTiCtvVQQcoX0+hFpleQ0O9MYXsprWHYKY4YlSDWXEipzvuJ4hnzm c/q6AbGclL0mVmbd4v50nIOVK/aAdxBqoXF3KY3RTesZ6HaOL1oPtdbqLO/x6e/6xNjt EYjA8rPwb114113KywD0axdsbolVlokbhf26QfskBXQTZbH8nGH5Zw2Q422lzxuuFEzK KijA/GHEB9+HKZ/3oggrSAAMu5XNNsFUxcL7qErP+AYJi8qAvNHAic3gNFqK/cMdOzpO zK87t9mZEXz84IT3snI45/RxP0dp6Zzqohuy/sGxxjnJ5bFhVeS+q5deEnMJlyd9zdR3 FnzA=MIME-Version: 1.0 X-Received: by 10.68.197.98 with SMTP id it2mr16669859pbc.200.1373197546682; Sun, 07 Jul 2013 04:45:46 -0700 (PDT) Received: by 10.68.80.231 with HTTP; Sun, 7 Jul 2013 04:45:46 -0700 (PDT) Date: Sun, 7 Jul 2013 07:45:46 -0400 Message-ID: <CAGBxaX==-GEiJ462hvD=k=8N=Ums9_sv1TS0dOxO8dCbVy_LcA@mail.gmail.com> Subject: writing a rc.d script From: Aryeh Friedman <aryeh.friedman@gmail.com> To: FreeBSD Mailing List <freebsd-hackers@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 07 Jul 2013 11:45:47 -0000 I have a program I am making a port for that also requires a /usr/local/etc/rc.d script is there anywhere I can find documentation on how write one and/or a template file to follow?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1373197303.40304.YahooMailNeo>
