summaryrefslogtreecommitdiff
path: root/kernel/include/multiboot2.h
diff options
context:
space:
mode:
authorAleksa Vuckovic <aleksav013@gmail.com>2022-08-16 18:03:58 +0200
committerAleksa Vuckovic <aleksav013@gmail.com>2022-08-16 18:03:58 +0200
commit501a706643a056863b6ea214882a2be270966f87 (patch)
tree7f1ff025e7aa37b936ce15ebfe21783ae312d7f2 /kernel/include/multiboot2.h
parent5c1c4eb0a4084b666342e6f8eb348eb80be6214b (diff)
libk/list.h; reading mmap from multiboot2
Diffstat (limited to 'kernel/include/multiboot2.h')
-rw-r--r--kernel/include/multiboot2.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/kernel/include/multiboot2.h b/kernel/include/multiboot2.h
index e7935a6..6d4a86f 100644
--- a/kernel/include/multiboot2.h
+++ b/kernel/include/multiboot2.h
@@ -21,6 +21,23 @@ struct mb2_tag_fb {
} __attribute__((packed, aligned(8)));
typedef struct mb2_tag_fb mb2_tag_fb;
+struct mb2_tag_mmap {
+ uint32_t type;
+ uint32_t size;
+ uint32_t entry_size;
+ uint32_t entry_version;
+};
+typedef struct mb2_tag_mmap mb2_tag_mmap;
+
+struct mb2_tag_mmap_entry {
+ uint64_t base_addr;
+ uint64_t length;
+ uint32_t type;
+ uint32_t reserved;
+};
+typedef struct mb2_tag_mmap_entry mb2_tag_mmap_entry;
+
+
// multiboot2 magic check
#define MB2_MAGIC 0x36D76289
@@ -35,6 +52,9 @@ typedef struct mb2_tag_fb mb2_tag_fb;
#define MB2_TAG_VBE 7
#define MB2_TAG_FB 8
-void init_fb(mb2_tag_header* multiboot_bootinfo, uint32_t multiboot_magic);
+
+void read_mb2(mb2_tag_header* multiboot_bootinfo, uint32_t multiboot_magic);
+void init_fb(mb2_tag_fb* tag_fb);
+void init_mmap(mb2_tag_mmap* tag_mmap);
#endif