* Kernel memory limits? @ 2005-03-17 18:06 Peter W. Morreale 2005-03-17 18:34 ` Dave Hansen 2005-03-17 19:08 ` linux-os 0 siblings, 2 replies; 5+ messages in thread From: Peter W. Morreale @ 2005-03-17 18:06 UTC (permalink / raw) To: linux-kernel (I did not see this addressed in the FAQs...) How much physical memory can the 2.4.26 kernel address in kernel context on x86? What about DMA memory? Local rumor says ~1GB. But this makes little sense given a 32-bit address. Where in the source can I learn more about this? Thanks, -PWM ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Kernel memory limits? 2005-03-17 18:06 Kernel memory limits? Peter W. Morreale @ 2005-03-17 18:34 ` Dave Hansen 2005-03-17 19:08 ` linux-os 1 sibling, 0 replies; 5+ messages in thread From: Dave Hansen @ 2005-03-17 18:34 UTC (permalink / raw) To: Peter W. Morreale; +Cc: Linux Kernel Mailing List On Thu, 2005-03-17 at 11:06 -0700, Peter W. Morreale wrote: > (I did not see this addressed in the FAQs...) > > How much physical memory can the 2.4.26 kernel address in kernel context on > x86? 896 MB There are patches to move this around, though. > What about DMA memory? What kind of DMA? > Local rumor says ~1GB. But this makes little sense given a 32-bit address. > > Where in the source can I learn more about this? arch/i386 include/asm-i386 :) Check out MAXMEM in include/asm-i386/page.h (at least 2.6) -- Dave ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Kernel memory limits? 2005-03-17 18:06 Kernel memory limits? Peter W. Morreale 2005-03-17 18:34 ` Dave Hansen @ 2005-03-17 19:08 ` linux-os 2005-03-17 20:13 ` Coywolf Qi Hunt 1 sibling, 1 reply; 5+ messages in thread From: linux-os @ 2005-03-17 19:08 UTC (permalink / raw) To: Peter W. Morreale; +Cc: linux-kernel On Thu, 17 Mar 2005, Peter W. Morreale wrote: > (I did not see this addressed in the FAQs...) > > How much physical memory can the 2.4.26 kernel address in kernel context on > x86? > All of it. > What about DMA memory? > All of it, too. The old DMA controller(s) could only address 16 MB because that's all the page-registers allowed. Bus-mastering DMA off the PCI/Bus has no such limitation. Most have DMA controllers that use scatter-lists so RAM doesn't even have to be contiguous, only properly allocated (in pages) and nailed down with no caching. > Local rumor says ~1GB. But this makes little sense given a 32-bit address. > If you are looking for a dynamic buffer in DMA-able RAM, you probably can only use aout 1GB, but that's not how to do DMA. > Where in the source can I learn more about this? > ../linux-`uname -r`/mm > Thanks, > -PWM Cheers, Dick Johnson Penguin : Linux version 2.6.11 on an i686 machine (5537.79 BogoMips). Notice : All mail here is now cached for review by Dictator Bush. 98.36% of all statistics are fiction. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Kernel memory limits? 2005-03-17 19:08 ` linux-os @ 2005-03-17 20:13 ` Coywolf Qi Hunt 2005-03-17 20:51 ` linux-os 0 siblings, 1 reply; 5+ messages in thread From: Coywolf Qi Hunt @ 2005-03-17 20:13 UTC (permalink / raw) To: linux-os; +Cc: Peter W. Morreale, linux-kernel linux-os wrote: > On Thu, 17 Mar 2005, Peter W. Morreale wrote: > >> (I did not see this addressed in the FAQs...) >> >> How much physical memory can the 2.4.26 kernel address in kernel >> context on x86? >> > > All of it. > >> What about DMA memory? >> > > All of it, too. The old DMA controller(s) could only address 16 MB > because that's all the page-registers allowed. Bus-mastering DMA > off the PCI/Bus has no such limitation. Most have DMA controllers > that use scatter-lists so RAM doesn't even have to be contiguous, > only properly allocated (in pages) and nailed down with no caching. > Kernel Image itself resides at physical address 1M. Is this kernel image area a hole to the old DMA range? Thanks. Coywolf ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Kernel memory limits? 2005-03-17 20:13 ` Coywolf Qi Hunt @ 2005-03-17 20:51 ` linux-os 0 siblings, 0 replies; 5+ messages in thread From: linux-os @ 2005-03-17 20:51 UTC (permalink / raw) To: Coywolf Qi Hunt; +Cc: Peter W. Morreale, Linux kernel On Fri, 18 Mar 2005, Coywolf Qi Hunt wrote: > linux-os wrote: >> On Thu, 17 Mar 2005, Peter W. Morreale wrote: >> >>> (I did not see this addressed in the FAQs...) >>> >>> How much physical memory can the 2.4.26 kernel address in kernel context >>> on x86? >>> >> >> All of it. >> >>> What about DMA memory? >>> >> >> All of it, too. The old DMA controller(s) could only address 16 MB >> because that's all the page-registers allowed. Bus-mastering DMA >> off the PCI/Bus has no such limitation. Most have DMA controllers >> that use scatter-lists so RAM doesn't even have to be contiguous, >> only properly allocated (in pages) and nailed down with no caching. >> > > Kernel Image itself resides at physical address 1M. Is this kernel image > area a hole to the old DMA range? Thanks. > No. DMA doesn't "know" about holes and it also doesn't "know" about the CPU. The DMA controller(s) require the bus address of RAM. Knowing that address, i.e., the physical to virtual mapping, the DMA controllers can overwrite a kernel and anything else just fine. For instance, one of the common PCI/Bus interface controllers is the PLX PCI-9656BA. It can read or write to/from anywhere as long as it is aligned properly. There is no protection possible from a DMA controller. If it's been programmed to overwrite your kernel, it will! Some old motherboards may not map the RAM controller to all the bits on the PCI/Bus, but that problem was fixed when people started using AGP screen boards (the screen BIOS must be in low memory and it is read out of the board). Since DMA always bypasses any cache, if the CPU is expected to access anything in the RAM just written by DMA, either that address area must be set to non-cached or the cache(s) must be flushed. If you use a busmaster with scatter/gather, you can DMA to/from RAM that is not contiguous. You just set up the scatter-list properly and away you go. This is sometimes useful for buffers that are contiguous when addressed in virtual mode, but are obtained from paged-RAM scattered all over the place. The pages need to be "reserved" so they are not stolen by the pager and then they need to be set to no-cache so the DMA activity can actually be "seen" by the CPU. > > Coywolf > Cheers, Dick Johnson Penguin : Linux version 2.6.11 on an i686 machine (5537.79 BogoMips). Notice : All mail here is now cached for review by Dictator Bush. 98.36% of all statistics are fiction. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-03-17 20:54 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-03-17 18:06 Kernel memory limits? Peter W. Morreale 2005-03-17 18:34 ` Dave Hansen 2005-03-17 19:08 ` linux-os 2005-03-17 20:13 ` Coywolf Qi Hunt 2005-03-17 20:51 ` linux-os
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.