summaryrefslogtreecommitdiff
path: root/src/init/main.c
diff options
context:
space:
mode:
authordzwdz2021-07-20 21:38:09 +0200
committerdzwdz2021-07-20 21:38:09 +0200
commit9ad0eafcf7e2f3e0532666c5353b0f5294401b06 (patch)
tree2e17da4c1953b6f24fb9a9a6c533a62d3f6c4d4c /src/init/main.c
parent061363a38eff486c809d397e69ae4fe290db95d2 (diff)
per-process virtual memory
VGA is only mapped into the virtual memory because there are no other ways of interacting with the OS.
Diffstat (limited to 'src/init/main.c')
-rw-r--r--src/init/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/init/main.c b/src/init/main.c
index e6188ac..ce1600c 100644
--- a/src/init/main.c
+++ b/src/init/main.c
@@ -6,5 +6,8 @@ int main() {
uint8_t *vga = (void*) 0xB8000;
for (int i = 0; i < 80 * 25; i++)
vga[(i << 1) + 1] = 0x4e;
- for (;;);
+
+ // try to mess with kernel memory
+ uint8_t *kernel = (void*) 0x100000;
+ *kernel = 0; // should segfault
}