From bd99e429a96c0b877da330e24383ca91523d7d6a Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Sun, 20 Mar 2022 22:58:25 -0400 Subject: [PATCH] Comment hulk.bootinfo a bit --- src/hulk/bootinfo.d | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/src/hulk/bootinfo.d b/src/hulk/bootinfo.d index 0777fa9..d152bc9 100644 --- a/src/hulk/bootinfo.d +++ b/src/hulk/bootinfo.d @@ -1,25 +1,52 @@ +/** + * HULK boot information. + */ module hulk.bootinfo; +/** + * HULK boot information structure. + */ struct BootInfo { - struct MemoryRegion - { - ulong base; - size_t size; - ubyte type; - } + /** + * Framebuffer description structure. + */ struct Framebuffer { + /** Framebuffer base address. */ uint * buffer; + /** Horizontal resolution. */ uint width; + /** Vertical resolution. */ uint height; + /** Number of pixels per scan line. */ uint stride; + /** Pixel format. */ uint format; } + /** + * Memory map entry description structure. + */ + struct MemoryRegion + { + /** Base address of the memory region. */ + ulong base; + /** Size in bytes of the memory region. */ + size_t size; + /** Type of the memory region. */ + ubyte type; + } + + /* Framebuffer parameters. */ Framebuffer fb; + + /* Memory map. */ MemoryRegion[800] memory_map; + + /* Number of memory map entries. */ size_t memory_map_count; } +/** HULK base virtual address. */ enum ulong HULK_VIRTUAL_START = 0x0000_4000_0000_0000u;