Re: Different types of Address Types.

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

 



Hi Shreyansh,

> >
> > Furthermore the virtual field in the page structure coresponds to this
> > kernel logical address and it never changes if the page belongs to
> > ZONE_NORMAL?
>
> IMHO, yes.
Does that also mean that the kernel image is loaded in the RAM memory
region corresponding to ZONE_DMA?

I am concluding this from the fact that the kernel image (bzImage) is
loaded at the *physical location* 0x100000 (which corresponds to
1048576 or 1 MB). - as mentioned in Understanding the Linux Kernel
(Booting process).

This seems to be very much the case. A quick objdump of the kernel
image reveals the kernel is indeed expecting to be loaded at an
address of C0100000:

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
 0 .text         00114254  c0100000  c0100000  00001000  2**4
                 CONTENTS, ALLOC, LOAD, READONLY, CODE
 1 .text.lock    0000279e  c0214254  c0214254  00115254  2**2
                 CONTENTS, ALLOC, LOAD, READONLY, CODE
 2 .rodata       0000d3c0  c0216a00  c0216a00  00117a00  2**5



If that is right, does this effect any DMA'able devices' way of
addressing the 16MB of dedicated DMA zone

Ummm ... I do not think that the drivers should be affected by this. I
expect kmalloc (and other memory allocation functions) to be smart
enough - so they will allocate a and return memory ONLY if it is not
occupied by the kernel (Obviously!).

So IMHO, there is no potential danger of corrupting the kernel image
if your driver restricts its access to only the memory it got from
kmalloc().

Thanks,

Rajat

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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