grub2: avoid switching modes
to reduce flickering during boot Issue #2778
This commit is contained in:
committed by
Christian Helmuth
parent
a3999c93f4
commit
193e14a489
@@ -490,11 +490,17 @@ Platform::Platform() :
|
||||
|
||||
Hip::Mem_desc *boot_fb = nullptr;
|
||||
|
||||
bool efi_boot = false;
|
||||
|
||||
/*
|
||||
* All "available" ram must be added to our physical allocator before all
|
||||
* non "available" regions that overlaps with ram get removed.
|
||||
*/
|
||||
for (unsigned i = 0; i < num_mem_desc; i++, mem_desc++) {
|
||||
/* 32/64bit EFI image handle pointer - see multiboot spec 2 */
|
||||
if (mem_desc->type == 20 || mem_desc->type == 19)
|
||||
efi_boot = true;
|
||||
|
||||
if (mem_desc->type == Hip::Mem_desc::FRAMEBUFFER)
|
||||
boot_fb = mem_desc;
|
||||
if (mem_desc->type != Hip::Mem_desc::AVAILABLE_MEMORY) continue;
|
||||
@@ -675,6 +681,9 @@ Platform::Platform() :
|
||||
if (!boot_fb)
|
||||
return;
|
||||
|
||||
if (!efi_boot)
|
||||
return;
|
||||
|
||||
xml.node("framebuffer", [&] () {
|
||||
xml.attribute("phys", String<32>(Hex(boot_fb->addr)));
|
||||
xml.attribute("width", Resolution::Width::get(boot_fb->size));
|
||||
|
||||
Reference in New Issue
Block a user