From: "Richard B. Johnson" <jmodem@AbominableFirebug.com>
To: "Jun Sun" <jsun@junsun.net>, <linux-kernel@vger.kernel.org>
Subject: Re: reserve memory in low physical address - possible?
Date: Tue, 31 Oct 2006 07:32:37 -0500 [thread overview]
Message-ID: <02f201c6fce8$a660ece0$0732700a@djlaptop> (raw)
In-Reply-To: 20061031072203.GA10744@srv.junsun.net
----- Original Message -----
From: "Jun Sun" <jsun@junsun.net>
To: <linux-kernel@vger.kernel.org>
Sent: Tuesday, October 31, 2006 2:22 AM
Subject: reserve memory in low physical address - possible?
>
> This question is specific to i386 architecture. While I am fairly
> comfortable with Linux kernel, I am not familiar with i386 arch.
>
> My objective is to reserve, or hide from kernel, some memory space in low
> physical address range starting from 0. The memory amount is in the order
> of 100MB to 200MB. The total memory is assumed to be around 512MB.
>
> Is this possible?
>
> I understand it is possible to reserve some memory at the end by
> specifying "mem=xxxM" option in kernel command line. I looked into
> "memmap=xxxM" option but it appears not helpful for what I want.
>
For special purpose (DMA to user-space, etc.), it has become commonplace to
reserve some high memory.
Then, in your driver, you can find the end of kernel memory as
(num_physpages * PAGE_SIZE).
You will not be able to reserve any address space starting at 0 anyway, but
your driver or even
user-space code can memory-map it.
> While searching on the web I also found things like DMA zone and loaders
> etc that all seem to assume the existence low-addressed physical
> memory. True?
>
Some early (ISA) boards couldn't access address-space beyoond 16 megabytes,
hense the "low" memory
for DMA.
> I can certainly workaround the loader issue. I can also re-code the
> real-mode
> part of kernel code to migrate to higher addresses. The DMA zone might be
> a thorny one. Any clues? Are modern PCs still subject to
> the 16MB DMA zone restriction?
>
Anything that plugs into a PCI bus will __not__ have a low address
restriction.
> Am I too far off from what I want to do?
>
> Thanks.
>
> Jun
> -
> 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/
next prev parent reply other threads:[~2006-10-31 12:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-31 7:22 reserve memory in low physical address - possible? Jun Sun
2006-10-31 8:12 ` Paul Mundt
2006-10-31 15:06 ` Jun Sun
2006-11-02 18:40 ` Jun Sun
2006-10-31 12:32 ` Richard B. Johnson [this message]
2006-10-31 15:40 ` Jun Sun
2006-10-31 16:01 ` Alan Cox
2006-10-31 12:45 ` Mark Hounschell
2006-10-31 15:14 ` Jun Sun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='02f201c6fce8$a660ece0$0732700a@djlaptop' \
--to=jmodem@abominablefirebug.com \
--cc=jsun@junsun.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.