From: Amelia Coutard <eliottulio.coutard@gmail.com>
Date: Mon, 7 Aug 2023 01:30:05 +0000 (+0200)
Subject: Added printing of the framebuffer memory range
X-Git-Url: https://git.ameliathe1st.gay/?a=commitdiff_plain;h=adff17a64e2951595706d9ef008d4712f2723edc;p=voyage-au-centre-des-fichiers.git

Added printing of the framebuffer memory range
---

diff --git a/kernel/src/kernel.cpp b/kernel/src/kernel.cpp
index a0e47ef..802f825 100644
--- a/kernel/src/kernel.cpp
+++ b/kernel/src/kernel.cpp
@@ -102,6 +102,12 @@ extern "C" void kmain(unsigned long magic, os::phys_ptr<const multiboot2::info_s
 		bool module_specified = false;
 		for (auto it = multiboot2::next(info); it->type != multiboot2::info::type_t::end; it = multiboot2::next(it)) {
 			switch (it->type) {
+			case multiboot2::info::type_t::framebuffer_info:
+				os::print("FB: {} -> {}.\n",
+					(void*)(multiboot2::framebuffer_addr(it)),
+					(void*)(multiboot2::framebuffer_addr(it) + multiboot2::framebuffer_pitch(it) * multiboot2::framebuffer_height(it))
+				);
+				break;
 			case multiboot2::info::type_t::memory_map:
 				for (std::size_t i = 0; i < multiboot2::memory_map_number_of_entries(it); i++) {
 					if (multiboot2::memory_map_type(it, i) == 1) {