1.0 KiB
EFI framebuffer
Introduction
This subsystem aims to provide a simple way to indicate the boot process state using a progress bar displayed on the EFI GOP framebuffer. For the moment, only framebuffers using 32 bits pixel format are supported. It's defined in shelter/lib/include/kernel/efifb.h and implemented in shelter/lib/src/kernel/efifb.c.
Overview
To avoid any complex colors encoding, pixel values for the colors white and gray must be provided through the framebuffer configuration.
The framebuffer parameters are loaded using the sh_efifb_init_fb(sh_conf_FB_CONFIG *fb_conf,sh_page_PAGE_TABLE_POOL *ptp) function. This function will:
- Load framebuffers dimensions
- Identity map the whole framebuffers
- Erase the previous texts on the framebuffer, based on the information provided in the framebuffer configuration
The progress bar is initialized using sh_efifb_init_bar(). It will draw an empty progress bar.
Finally, to update the progress bar, the sh_efifb_set_bar(sh_uint8 percent) function is used.