rust-osdev / bootloader

An experimental pure-Rust x86 bootloader

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation on FrameBufferInfo (and related) is too unspecific.

maow-tty opened this issue · comments

commented

While the framebuffer info type provides the pixel bit depth (bytes_per_pixel), it is not mentioned what the minimum depth for certain formats are, nor what the proper layout for a 32-bit RGB value would be. The documentation for the Unknown format is equally confusing and should provide more information and/or examples.

In the case of 32-bit pixels, it's mostly caused by a GOP framebuffer, where 24-bits represent the color channels and the remaining 8-bits is reserved. I think that not only should this be mentioned, but also the position of the reserved byte, being the least significant byte of each pixel. The only way of knowing this is by going to the UEFI specification and finding the section for the GOP, as not even the OSDev wiki touches on the subject in detail.

This change would help those that are less acquainted with the framebuffer and wish to provide a cross-platform (or at the very least, UEFI-compatible) implementation. Thanks.