PTE structure in linux kernel

I am trying to look in linux source code for a structure / union that will correspond to PTE on x86 system with PAE disabled. So far, I have only found the following in arch / x86 / include / asm / page_32.h

typedef union {
        pteval_t pte;
        pteval_t pte_low;
} pte_t;

I'm a little confused right now since I got the Intel Vol 3A reference guide and nothing in this pool matches the dozen odd fields present in PTE, as the guide explains.

This may be a trivial question, but for me it has become more like a stumbling block in the process of understanding memory management in the linux kernel.

EDIT: I have source 2.6.29 with me

+3
source share
2 answers

Pteval_t blob - , , 32- .

PTE - , (Linux 2.6.24), include/asm-x86/pgtable_32.h. , Intel ( ), :

#define _PAGE_PRESENT   0x001
#define _PAGE_RW    0x002
#define _PAGE_USER  0x004
#define _PAGE_PWT   0x008
#define _PAGE_PCD   0x010
#define _PAGE_ACCESSED  0x020
#define _PAGE_DIRTY 0x040
#define _PAGE_PSE   0x080   /* 4 MB (or 2MB) page, Pentium+, if present.. */
#define _PAGE_GLOBAL    0x100   /* Global TLB entry PPro+ */
#define _PAGE_UNUSED1   0x200   /* available for programmer */
#define _PAGE_UNUSED2   0x400
#define _PAGE_UNUSED3   0x800
+5

Linux O'REILLY, Linux. LWN.net; .

" "... " ". , , .

+4

Source: https://habr.com/ru/post/1717971/


All Articles