The Physical Address Extension (PAE) Paging Mechanism

The amount of RAM supported by a processor is limited by the number of address pins connected to the address bus.

PAE is activated by setting the Physical Address Extension ( PAE ) flag in the cr4 control register. The Page Size ( PS ) flag in the page directory entry enables large page sizes (2 MB when PAE is enabled).

When mapping linear addresses to 4 KB pages ( PS flag cleared in Page Directory entry), the 32 bits of a linear address are interpreted in the following way:

cr3

        Points to a PDPT

bits 31–30

        Point to 1 of 4 possible entries in PDPT

bits 29–21

        Point to 1 of 512 possible entries in Page Directory

bits 20–12

        Point to 1 of 512 possible entries in Page Table

bits 11–0

        Offset of 4-KB page

When mapping linear addresses to 2-MB pages ( PS flag set in Page Directory entry), the 32 bits of a linear address are interpreted in the following way:

cr3
        Points to a PDPT
bits 31–30
       Point to 1 of 4 possible entries in PDPT
bits 29–21
       Point to 1 of 512 possible entries in Page Directory
bits 20–0
       Offset of 2-MB page

To summarize, once cr3 is set, it is possible to address up to 4 GB of RAM. If we want to address more RAM, we’ll have to put a new value in cr3 or change the content of the PDPT.

Clearly, PAE does not enlarge the linear address space of a process, because it deals only with physical addresses. Furthermore, only the kernel can modify the page tables of the processes, thus a process running in User Mode cannot use a physical address space larger than 4 GB.


Note: For linear address, only the last 12-bit offset are the size of the page frame. Other fields are the numbers of the corresponding entries in the table. When the base address pointer plug the number, it will get be 'base address + number * 4(or 8) = the entry address'.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值