Lets give out a simple example.
Lets say that we want this page to manage the 4KB address space beginning at physical location 1MB (0x100000).
What this means--to put in other words--is that this page is "mapped" to address 1MB.
To create this page, simply set 0x100000 in bits 12-31 (the frame address) of the page, and set the present bit. Voila--the page is mapped to 1MB. :) For example:
%define PRIV 3
mov ebx, 0x100000 | PRIV ; this page is mapped to 1MB
Notice that 0x100000 is 4KB aligned? It ORs it with 3 (11 binary which sets the first two bits. Looking at the above table,
we can see that it sets the present and read/write flags, making this page present
(Meaning its in physical memory. This is true as it is mapped from physical address 0x100000), and is writable.
Lets say that we want this page to manage the 4KB address space beginning at physical location 1MB (0x100000).
What this means--to put in other words--is that this page is "mapped" to address 1MB.
To create this page, simply set 0x100000 in bits 12-31 (the frame address) of the page, and set the present bit. Voila--the page is mapped to 1MB. :) For example:
%define PRIV 3
mov ebx, 0x100000 | PRIV ; this page is mapped to 1MB
Notice that 0x100000 is 4KB aligned? It ORs it with 3 (11 binary which sets the first two bits. Looking at the above table,
we can see that it sets the present and read/write flags, making this page present
(Meaning its in physical memory. This is true as it is mapped from physical address 0x100000), and is writable.
The quieter you become, the more you can hear