aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Borner2021-04-05 00:27:54 +0200
committerMarvin Borner2021-04-05 00:27:54 +0200
commit225f2c8da7aeb3a694da790fc42f99cbe23bdf82 (patch)
treea9633980566f0036db9e3af64f87c2e55676d56a
parentb476dc856431436ac0f3e0179f8a25302421a0cc (diff)
Updated README and added MMAP
-rw-r--r--MMAP.md39
-rw-r--r--README.md5
2 files changed, 44 insertions, 0 deletions
diff --git a/MMAP.md b/MMAP.md
new file mode 100644
index 0000000..8705504
--- /dev/null
+++ b/MMAP.md
@@ -0,0 +1,39 @@
+# Memory map
+
+These tables should be irrelevant for most users/developers. You may find these interesting for finding bugs or potential exploits, though.
+
+**Note**: All memory endings in the tables are exclusive.
+
+## Available (QEMU with 256M-2G)
+
+| Start | End | Available |
+| :----------: | :----------: | :-------: |
+| `0x00000000` | `0x0009fc00` | Y |
+| `0x0009fc00` | `0x000a0000` | N |
+| `0x000f0000` | `0x00100000` | N |
+| `0x00100000` | `0x????????` | Y |
+| `0x????????` | `0x40000000` | N |
+| `0x40000000` | `0xffffffff` | ? |
+
+## Physical/virtual memory map (theoretical max values, mostly way smaller in practice)
+
+| Start | End | Name |
+| :----------: | :----------: | :-----------------------: |
+| `0x00000000` | `0x00000500` | Unusable |
+| `0x00000500` | `0x00000600` | Memory map |
+| `0x00007c00` | `0x00007e00` | Bootloader (first stage) |
+| `0x00007e00` | `0x00008000` | Bootloader (second stage) |
+| `0x00009000` | `0x00009???` | Bootloader (third stage) |
+| `0x0000c000` | `0x0008????` | Bootloader heap |
+| `0x00100000` | `0x001?????` | Kernel |
+| `0x00400000` | `0x00500000` | Kernel stack |
+| `0x03000000` | `0x03??????` | VESA buffer |
+| `0x40000000` | `0x????????` | Userspace (virtual) |
+
+## Notes
+
+I've designed this memory map with future expansion in mind, that's why there are some gaps in the map.
+
+All physical kernel memory ranges are identity-mapped into the virtual space.
+
+The free virtual space below the virtual userspace boundary is used for the kernel heap. The free virtual space above the virtual userspace boundary is used for the userspace programs, libraries, heap and stack.
diff --git a/README.md b/README.md
index 0e37039..f0c640c 100644
--- a/README.md
+++ b/README.md
@@ -35,6 +35,10 @@ This project is somewhat of a coding playground for me. It doesn't have any usef
![Melvix screenshot](screenshot.png?raw=true "Screenshot")
+## Documentation
+
+- [Memory map](MMAP.md)
+
## Test
- Install the qemu i386 emulator
@@ -100,6 +104,7 @@ Inspiration/usage (documented in the respective files):
Resources:
- [Spleen font](https://github.com/fcambus/spleen) - [MIT License](https://github.com/fcambus/spleen/blob/5759e9abb130b89ba192edc5324b12ef07b7dad3/LICENSE)
+- [Material icons](https://github.com/Templarian/MaterialDesign/) - [Several Licenses (MIT compliant)](https://github.com/Templarian/MaterialDesign/blob/5772b5e293352e7feed316c4ab6bde3ba572959e/LICENSE)
Libraries: