You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Chapter-8/README.md
+13-5Lines changed: 13 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -41,14 +41,14 @@ The two types of entries (table and directory) look like the same. Only the fiel
41
41
*`A`: indicate if the page or table was accessed
42
42
*`D`: (only for pages table) indicate if the page was written
43
43
*`PS` (only for pages directory) indicate the size of pages:
44
-
* 0 = 4ko
45
-
* 1 = 4mo
44
+
* 0 = 4kb
45
+
* 1 = 4mb
46
46
47
-
**Note:** Physical addresses in the pages diretcory or pages table are written using 20 bits because these addresses are aligned on 4ko, so the last 12bits should be equal to 0.
47
+
**Note:** Physical addresses in the pages diretcory or pages table are written using 20 bits because these addresses are aligned on 4kb, so the last 12bits should be equal to 0.
48
48
49
49
* A pages directory or pages table used 1024*4 = 4096 bytes = 4k
50
-
* A pages table can address 1024 * 4k = 4 Mo
51
-
* A pages directory can address 1024 * (1024 * 4k) = 4 Go
50
+
* A pages table can address 1024 * 4k = 4 Mb
51
+
* A pages directory can address 1024 * (1024 * 4k) = 4 Gb
52
52
53
53
#### How to enable pagination?
54
54
@@ -63,5 +63,13 @@ asm(" mov %%cr0, %%eax; \
63
63
64
64
But before, we need to initialize our pages directory with at least one pages table.
65
65
66
+
#### First Implementation: Identity Mapping
67
+
68
+
For a first implementation, we will not create user task. The page will apply only to the kernel as the first 4 MB of virtual memory coincide with the first 4 MB of physical memory:
0 commit comments