summaryrefslogtreecommitdiff
path: root/doc/Memory.txt
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-03-25 17:36:52 -0400
committerFreya Murphy <freya@freyacat.org>2025-03-25 17:38:22 -0400
commit6af21e6a4f2251e71353562d5df7f376fdffc270 (patch)
treede20c7afc9878422c81e34f30c6b010075e9e69a /doc/Memory.txt
downloadcomus-6af21e6a4f2251e71353562d5df7f376fdffc270.tar.gz
comus-6af21e6a4f2251e71353562d5df7f376fdffc270.tar.bz2
comus-6af21e6a4f2251e71353562d5df7f376fdffc270.zip
initial checkout from wrc
Diffstat (limited to 'doc/Memory.txt')
-rw-r--r--doc/Memory.txt92
1 files changed, 92 insertions, 0 deletions
diff --git a/doc/Memory.txt b/doc/Memory.txt
new file mode 100644
index 0000000..cecfea3
--- /dev/null
+++ b/doc/Memory.txt
@@ -0,0 +1,92 @@
+Systems Programming framework memory layout
+
+Version: @(#)Memory.txt 2.2a
+Date: 3/23/25
+---------------------------------------------------------------------------
+
+This diagram shows important areas in the first 1MB of memory as seen
+by the standalone framework code.
+
+Each row in the diagram represents 0x100 (256) bytes of memory, except in
+"elided" areas (< ... >). The starting address is indicated for each
+region in hex; if a CPP #define exists for that region in either
+bootstrap.h or x86/bios.h, its name is also given.
+
+ -----------------------
+ | Interrupt Vector | 0x00000
+ | 256 x 4 bytes |
+ | (1024, 0x400) |
+ | |
+ -----------------------
+ | BIOS Data Area (BDA)| 0x00400 BIOS_BDA
+ -----------------------
+ | GDT | 0x00500 GDT_ADDR
+ | 1024 x 8 bytes |
+ | (8192, 0x2000) |
+ | |
+ < . . . >
+ | |
+ -----------------------
+ | IDT | 0x02500 IDT_ADDR
+ | 256 x 8 bytes |
+ | (2048, 0x800) |
+ | |
+ | |
+ | |
+ | |
+ | |
+ -----------------------
+ | Mmap data | 0x02D00 MMAP_ADDR
+ | |
+ | |
+ | |
+ | |
+ < . . . >
+ | |
+ -----------------------
+ | Bootstrap sector 1 | 0x07c00 BOOT_ADDR
+ | |
+ -----------------------
+ | Bootstrap sector 2 | 0x07e00 PART2_ADDR
+ | |
+ -----------------------
+ | | 0x08000
+ | |
+ < . . . >
+ | ^ |
+ | Bootstrap stack | |
+ -----------------------
+ | | 0x0bc00 BOOT_SP_ADDR
+ | |
+ | |
+ < . . . >
+ | OS stack |
+ -----------------------
+ | Operating System | 0x10000 TARGET_ADDR, TARGET_STACK
+ | (size varies) |
+ | |
+ < . . . >
+ | |
+ -----------------------
+ | User Code Blob | 0x30000
+ | (size varies) |
+ | |
+ < . . . >
+ | |
+ -----------------------
+ | Extended BIOS Data | 0x9fc00
+ | Area (EBDA) |
+ | |
+ < . . . >
+ | |
+ -----------------------
+ | Video memory | 0xb8000 VID_BASE_ADDR
+ | |
+ < . . . >
+ | |
+ -----------------------
+ | The BIOS | 0xf0000
+ | |
+ < . . . >
+ | |
+ ----------------------- 0xfffff