Create PDE from the higher address?

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

 



hi,

In the following code of i386 arch, I have a very simple question. Why
does it store the higher address of the PDE to the page global table
instead of the starting lower address? And the size of each PDE is 8
bytes, right?

I assume this happens on line 122 and 123.

Thanks,
Neo

116 page_pde_offset = (__PAGE_OFFSET >> 20);
117
118         movl $(pg0 - __PAGE_OFFSET), %edi
119         movl $(swapper_pg_dir - __PAGE_OFFSET), %edx
120         movl $0x007, %eax                       /* 0x007 =
PRESENT+RW+USER */
121 10:
122         leal 0x007(%edi),%ecx                   /* Create PDE entry */
123         movl %ecx,(%edx)                        /* Store identity
PDE entry */
124         movl %ecx,page_pde_offset(%edx)         /* Store kernel PDE entry */
125         addl $4,%edx
126         movl $1024, %ecx
127 11:
128         stosl
129         addl $0x1000,%eax
130         loop 11b
131         /* End condition: we must map up to and including
INIT_MAP_BEYOND_END */
132         /* bytes beyond the end of our own page tables; the +0x007
is the attribute bits */
133         leal (INIT_MAP_BEYOND_END+0x007)(%edi),%ebp
134         cmpl %ebp,%eax
135         jb 10b
136         movl %edi,(init_pg_tables_end - __PAGE_OFFSET)

--
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!

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