Re: get the reserved memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Using LILO and the mem=40M to allow 40M for the system, and I would like
to access the memory after.
I've read that I have to do : ioremap(0x2800000/*40M*/, ... but I'm not
sure I access to the good memory region.



Yes, you can now access the RAM above 40MB with ioremap ..... what do you mean by good memory regoin ?



The thing I realy does understand it's:
- when I get 1 page from get_free_page , and I give the address to the device ( for a PCI device driver ) :
page = alloc_page(GFP_KERNEL);
pci_write_config_dword(dev,0xa8, virt_to_bus(page_address(page)));
It works, I can access the this space from pci device.


- when I do : buf = ioremap(0x2800000,0x100000);
pci_write_config_dword(dev,0xa8, virt_to_bus(buf));
It doesn't work ....
So do I have to use some function like io_remap_page_range or something else. I don't well understant why I can access this
memory space from the device?



Does somebody know the good method to reserve large memory region ?
I'm using 2.6 kernel.



As you already reserved the RAM above 40MB through mem=40M option, now you can use it freely through ioremap and you can consider this region as usable regoing for you ...... You have to use ioremap to map memory in chunks, map a chunk of memory let say 4KB (a page) use it, unmap it and then map other 4KB and so on ....... then you can access whole memory above 40M or your reserved memory.





--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux