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: 02_Architecture/01_Overview.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Architecture and Drivers
1
+
# Architecture And Drivers
2
2
3
3
Before going beyond a basic "hello world" and implementing the first real parts of our kernel, there are some key concepts about how the CPU operates that we have to understand. What is an interrupt, and how do we handle it? What does it mean to mask them? What is the GDT and what is it's purpose?
Copy file name to clipboardExpand all lines: 99_Appendices/E_Debugging.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -204,6 +204,37 @@ From here you can send commands directly to the emulator, below a list of useful
204
204
***x/cf address** where c is the number of items we want to display in decimal, f is the format (`x` for hex, `c` for char, etc) display the content of c virtual memory locations starting from address
205
205
***xp/cf address** same as above, but for physical memory
206
206
207
+
#### Info mem & Info tlb
208
+
209
+
These commands are very useful when we need to debug memory related issues, the first command `info mem` will print the list of active virtual memory mappings, the output format depends on the architecture, for exmple on `x86-64`, it will be similar to the following:
Where every line contain represent a single virtual memory mapping, and contains in order: _base, limit, size and flags_.
221
+
222
+
the `info tlb` shows the virtual to physical memory mappings. An example output is:
223
+
224
+
```
225
+
info tlb
226
+
ffffffff80062000: 000000000994a000 XG------W
227
+
ffffffff80063000: 000000000994b000 XG------W
228
+
ffffffff80064000: 000000000994c000 XG--A---W
229
+
ffffffff80065000: 000000000994d000 XG-DA---W
230
+
ffffffff80066000: 000000000994e000 XG-DA---W
231
+
ffffffff80067000: 000000000994f000 XG-DA---W
232
+
ffffffff80068000: 0000000009950000 XG-DA---W
233
+
ffffffff80069000: 0000000009951000 XG-DA---W
234
+
ffffffff8006a000: 0000000009952000 XG-DA---W
235
+
```
236
+
237
+
In this case the line contains: _virtualaddress: physicaladdress flags_. The command is not available on all architecture, so if developing on an architecture different from `x86-64` it could not be available.
0 commit comments