Skip to content

Commit 38f2252

Browse files
committed
Update README.md
1 parent 8188904 commit 38f2252

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

chapter9/README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,16 @@ The rest of the physical memory is freely available to the kernel and applicatio
1919

2020
The address space between the beginning of memory and `0x40000000` address is the kernel space, while the space between the address `0x40000000` and the end of the memory corresponds to user space:
2121

22-
![Virtual Memory](virtualmemory.png)
22+
![Virtual Memory](virtualmemory.png)
23+
24+
The kernel space in virtual memory, which is using 1Gb of virtual memory, is common to all tasks (kernel and user).
25+
26+
This is implemented by pointing the first 256 entries of the task page directory to the kernel page directory:
27+
28+
```cpp
29+
/*
30+
* Kernel Space. v_addr < USER_OFFSET are addressed by the kernel pages table
31+
*/
32+
for (i=0; i<256; i++)
33+
pdir[i] = pd0[i];
34+
```

0 commit comments

Comments
 (0)