Skip to content

Commit 72079e2

Browse files
author
Yuma Arakawa
committed
doc: メモリマップのVAのタスクスタック領域の説明を修正
タスクのスタック領域として割り当てている4KB領域は、 現在、以下の使い方をしている。 - VA 0x2000 1000 〜 0x2000 17ff - 特権レベル3で使用 - アプリが動作するとき、この領域をスタックとして使う - VA 0x2000 1800 〜 0x2000 2000 - 特権レベル0で使用 - システムコール・割り込みなどでカーネル空間で動作する際、 この領域をスタックとして使う
1 parent 06d0e0c commit 72079e2

File tree

1 file changed

+65
-64
lines changed

1 file changed

+65
-64
lines changed

doc/memory_map.txt

Lines changed: 65 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -92,70 +92,71 @@ GDT
9292
|-----------+------------------------------|
9393

9494
** Virtual Address Space
95-
|-----------+-----------------------------|
96-
| 0000 0000 | Kernel Address Space(first) |
97-
| ... | ... |
98-
| 0000 7000 | kernel PT map(first) |
99-
| ... | ... |
100-
| 0000 7e00 | loaded kernel binary(first) |
101-
| | - text |
102-
| | - rodata |
103-
| | - data |
104-
| | - bss |
105-
| ... | ... |
106-
| 0001 0ffe | - sign(0xbeef) |
107-
| 0001 0fff | loaded kernel binary(last) |
108-
| 0001 1000 | loaded shell binary(first) |
109-
| | - text |
110-
| | - rodata |
111-
| | - data |
112-
| | - bss |
113-
| ... | ... |
114-
| 0001 1ffe | - sign(0xcafe) |
115-
| 0001 1fff | loaded shell binary(last) |
116-
| 0001 2000 | loaded uptime binary(first) |
117-
| | - text |
118-
| | - rodata |
119-
| | - data |
120-
| | - bss |
121-
| ... | ... |
122-
| 0001 2ffe | - sign(0xcafe) |
123-
| 0001 2fff | loaded uptime binary(last) |
124-
| ... | ... |
125-
| 0007 1000 | shell stack base |
126-
| ... | ... |
127-
| 0007 2000 | uptime stack base |
128-
| ... | ... |
129-
| 0008 0000 | kernel stack base |
130-
| ... | ... |
131-
| 0008 5fff | kernel PT map(last) |
132-
| ... | ... |
133-
| 0009 5000 | kernel PT map(first) |
134-
| 0009 5000 | heap memory(first) |
135-
| ... | ... |
136-
| 0009 ffff | heap memory(last) |
137-
| 0009 ffff | kernel PT map(last) |
138-
| ... | ... |
139-
| 000b 8000 | kernel PT map(first) |
140-
| 000b 8000 | Video Memory(first) |
141-
| ... | ... |
142-
| 000b ffff | Video Memory(last) |
143-
| 000b ffff | kernel PT map(last) |
144-
| ... | ... |
145-
| 1fff ffff | Kernel Address Space(last) |
146-
|-----------+-----------------------------|
147-
| 2000 0000 | User Address Space(first) |
148-
| 2000 0000 | loaded app binary(first) |
149-
| | - text |
150-
| | - rodata |
151-
| | - data |
152-
| | - bss |
153-
| ... | ... |
154-
| 2000 0ffe | - sign(0xcafe) |
155-
| 2000 0fff | loaded app binary(last) |
156-
| 2000 2000 | app stack base |
157-
| ffff ffff | User Address Space(last) |
158-
|-----------+-----------------------------|
95+
|-----------+--------------------------------------|
96+
| 0000 0000 | Kernel Address Space(first) |
97+
| ... | ... |
98+
| 0000 7000 | kernel PT map(first) |
99+
| ... | ... |
100+
| 0000 7e00 | loaded kernel binary(first) |
101+
| | - text |
102+
| | - rodata |
103+
| | - data |
104+
| | - bss |
105+
| ... | ... |
106+
| 0001 0ffe | - sign(0xbeef) |
107+
| 0001 0fff | loaded kernel binary(last) |
108+
| 0001 1000 | loaded shell binary(first) |
109+
| | - text |
110+
| | - rodata |
111+
| | - data |
112+
| | - bss |
113+
| ... | ... |
114+
| 0001 1ffe | - sign(0xcafe) |
115+
| 0001 1fff | loaded shell binary(last) |
116+
| 0001 2000 | loaded uptime binary(first) |
117+
| | - text |
118+
| | - rodata |
119+
| | - data |
120+
| | - bss |
121+
| ... | ... |
122+
| 0001 2ffe | - sign(0xcafe) |
123+
| 0001 2fff | loaded uptime binary(last) |
124+
| ... | ... |
125+
| 0007 1000 | shell stack base |
126+
| ... | ... |
127+
| 0007 2000 | uptime stack base |
128+
| ... | ... |
129+
| 0008 0000 | kernel stack base |
130+
| ... | ... |
131+
| 0008 5fff | kernel PT map(last) |
132+
| ... | ... |
133+
| 0009 5000 | kernel PT map(first) |
134+
| 0009 5000 | heap memory(first) |
135+
| ... | ... |
136+
| 0009 ffff | heap memory(last) |
137+
| 0009 ffff | kernel PT map(last) |
138+
| ... | ... |
139+
| 000b 8000 | kernel PT map(first) |
140+
| 000b 8000 | Video Memory(first) |
141+
| ... | ... |
142+
| 000b ffff | Video Memory(last) |
143+
| 000b ffff | kernel PT map(last) |
144+
| ... | ... |
145+
| 1fff ffff | Kernel Address Space(last) |
146+
|-----------+--------------------------------------|
147+
| 2000 0000 | User Address Space(first) |
148+
| 2000 0000 | loaded app binary(first) |
149+
| | - text |
150+
| | - rodata |
151+
| | - data |
152+
| | - bss |
153+
| ... | ... |
154+
| 2000 0ffe | - sign(0xcafe) |
155+
| 2000 0fff | loaded app binary(last) |
156+
| 2000 1800 | app stack base(Priv Level 3: Apps) |
157+
| 2000 2000 | app stack base(Priv Level 0: Kernel) |
158+
| ffff ffff | User Address Space(last) |
159+
|-----------+--------------------------------------|
159160

160161
** ref. x86 convert address PA <-> VA
161162
| | PA | | |

0 commit comments

Comments
 (0)