From a8a9ade74fc5571ba34635d7ea4bae58748100b0 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Wed, 6 May 2026 06:49:02 +0000 Subject: dump_mb2i: add support for framebuffer tag --- scripts/gdb/teachos/dump_mb2i.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'scripts/gdb') diff --git a/scripts/gdb/teachos/dump_mb2i.py b/scripts/gdb/teachos/dump_mb2i.py index 06f4531..ca0c378 100644 --- a/scripts/gdb/teachos/dump_mb2i.py +++ b/scripts/gdb/teachos/dump_mb2i.py @@ -36,6 +36,12 @@ class MemoryType(IntEnum): BAD = 5 +class FramebufferType(IntEnum): + INDEXED = 0 + RGB = 1 + TEXT = 2 + + TAG_NAMES = { TagType.END: "End of Tags", TagType.CMDLINE: "Boot Command Line", @@ -69,6 +75,13 @@ MEMORY_TYPES = { MemoryType.BAD: "Bad Memory", } +FRAMEBUFFER_TYPES = { + FramebufferType.INDEXED: "Indexed Color", + FramebufferType.RGB: "RGB", + FramebufferType.TEXT: "Text Mode", +} + + INDENT = f"{' '*11}" @@ -221,4 +234,11 @@ class DumpMB2I(gdb.Command): gdb.write(f"{INDENT}address: {base:#010x}\n") def _write_framebuffer_info_tag(self, data): - pass + address, pitch, width, height, bpp, type = struct.unpack_from("