On using boot time reserved memory ("reservetop") by user/kernel programs.

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

 




Hi,

I am trying to experiment with Kernel HighMem on x86_32.

quote
"Linux can't access memory which hasn't been directly mapped into its address
space. Therefore, to use more than 1 GB or RAM, the physical pages have to be
mapped in the kernel virtual address space first. ie. Pages in ZONE_HIGHMEM
have to be mapped in ZONE_NORMAL before access."

So, kernel will only address memory for which it has setup a page table entry.

Assuming we reserve some memory space on top of the virtual memory address as shown :
(which is as simple as giving "reservetop=8M" while booting kernel)

|---------------------------+
|    reservetop=8M  |
|________________|  FIXADDR_TOP
|                           |

To use that memory just for read/write (avoiding page frame reclamation and
other collection), we might need to

    a) restrict the Linux Kernel from gaining access to the memory hole (how ??
        probably by using segment limits ..?? )
    b) Setup page table entry.
    c) Map the pages that lie in ZONE_HIGHMEM into ZONE_NORMAL before using them.
    d) clear the "PG_reserved" bit for all the mapped pages.

Does it make sense ? Can there be some alternative (say my motive is simply to
read/write some Hex values on those addresses).

Thanks in advance,
-Regmee


[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