summaryrefslogtreecommitdiff
path: root/kc/core/vm_object.h
diff options
context:
space:
mode:
authorAda Christine <adachristine18@gmail.com>2022-01-10 00:59:00 +0000
committerAda Christine <adachristine18@gmail.com>2022-01-10 00:59:00 +0000
commit6dfbb3850ac99945de12251f99867c1edff9036c (patch)
tree6098fe765f8f67b416bdd6201c0b27406bdaed81 /kc/core/vm_object.h
parente3748940c9f5b87008221c2a4fe544f79a2c7363 (diff)
new header vm_object.h
Diffstat (limited to 'kc/core/vm_object.h')
-rw-r--r--kc/core/vm_object.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/kc/core/vm_object.h b/kc/core/vm_object.h
new file mode 100644
index 0000000..d1de145
--- /dev/null
+++ b/kc/core/vm_object.h
@@ -0,0 +1,21 @@
+#pragma once
+
+typedef int (*vm_object_handler_func)(uint32_t code, void *address);
+
+enum vm_object_type
+{
+ NULL_VM_OBJECT, // a non-object. shouldn't even exist. an abomination unto man and god
+ DIRECT_VM_OBJECT, // a 1:1 physical-to-virtual mapping
+ TRANSLATION_VM_OBJECT, // a mapping between a physical and virtual address range
+ ANONYMOUS_VM_OBJECT, // a mapping that has no definite physical location
+ KC_IMAGE_VM_OBJECT, // a kernel component image
+ KC_HEAP_VM_OBJECT, // a kernel component heap
+ // TODO: more to come
+};
+
+struct vm_object
+{
+ enum vm_object_type type;
+ vm_object_handler_func handler;
+};
+