summaryrefslogtreecommitdiff
path: root/kc/core/vm_object.h
blob: c8e93f8542a52a1a5eda1bb78e704e9bd3dbcb33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once

#include "vm_tree.h"

typedef int (*vm_object_handler_func)(
        struct vm_tree_node *node,
        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
    // TODO: more to come
};

struct vm_object
{
    enum vm_object_type type;
    vm_object_handler_func handler;
};