Re: kernel address space question

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

 



On 9/6/05, NAHieu <nahieu@xxxxxxxxx> wrote:
> Hi,
> 
> I follow the address space thread on the list, and have a question.
> 
> - Kernel space maps the physical memory to virtual address from 3G to
> 4G (I am talking about vanilla kernel).  So if in the *kernel
> context*, I access to the virtual address 3G+128MB, then actually I
> will access to the physical memory at 128MB.
> 

Yes, it is correct ..... actually u can get physical memory address by
Viurtual_Address - PAGE_OFFSET ............

> The question is: in *kernel context*, do I need the page table? As
> above, I suppose that since I can work out the physical memory address
> directly from the virtual address (by subtracting the virtual address
> with PAGE_OFFSET), so I do not need the page table.
> 
> So the conclusion is: (in *vanilla kernel*) page tables are only for
> userspace processes, and kernel space doesnt need page tables at all.
> 
> Is that correct?

Page tables are required by the processor in paging (i m talking abt
i386 in protected mode) and linux kernel implements paging, so kernel
do implement them for its usage, although less than 896MB RAM kernel
keeps direct memory mappings (that is also through page-tables) and
for more than that it using temporary mappings through page-tables too
..........

-- 
Fawad Lateef

--
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