diff --git a/libsel4vmmplatsupport/CMakeLists.txt b/libsel4vmmplatsupport/CMakeLists.txt index 6b0f3f7d6..0b55154d8 100644 --- a/libsel4vmmplatsupport/CMakeLists.txt +++ b/libsel4vmmplatsupport/CMakeLists.txt @@ -65,4 +65,5 @@ target_link_libraries( sel4_autoconf sel4vm_Config usbdrivers_Config + sel4vmmplatsupport_Config ) diff --git a/libsel4vmmplatsupport/src/arch/x86/guest_boot_init.c b/libsel4vmmplatsupport/src/arch/x86/guest_boot_init.c index 65885396e..aa97cd476 100644 --- a/libsel4vmmplatsupport/src/arch/x86/guest_boot_init.c +++ b/libsel4vmmplatsupport/src/arch/x86/guest_boot_init.c @@ -8,6 +8,7 @@ #include #include +#include #include #include @@ -91,19 +92,20 @@ static void make_guest_screen_info(vm_t *vm, struct screen_info *info) } } if (error) { - ZF_LOGE("Failed to map vbe protected mode interface for VESA frame buffer. Disabling"); + ZF_LOGE("Failed to map vbe protected mode interface for VESA frame buffer. Not disabling"); + } + + fbuffer_size = vmm_plat_vesa_fbuffer_size(&vbeinfo.vbeModeInfoBlock); + ZF_LOGI("VESA Frame buffer size: 0x%x\n", fbuffer_size); + vm_memory_reservation_t *reservation = vm_reserve_anon_memory(vm, fbuffer_size, 0x1000, + default_error_fault_callback, NULL, &base); + if (!reservation) { + ZF_LOGE("Failed to reserve base pointer for VESA frame buffer. Not Disabling\n"); } else { - fbuffer_size = vmm_plat_vesa_fbuffer_size(&vbeinfo.vbeModeInfoBlock); - vm_memory_reservation_t *reservation = vm_reserve_anon_memory(vm, fbuffer_size, 0x1000, - default_error_fault_callback, NULL, &base); - if (!reservation) { - ZF_LOGE("Failed to reserve base pointer for VESA frame buffer. Disabling"); - } else { - error = map_ut_alloc_reservation_with_base_paddr(vm, vbeinfo.vbeModeInfoBlock.vbe20.physBasePtr, reservation); - if (error) { - ZF_LOGE("Failed to map base pointer for VESA frame buffer. Disabling"); - base = 0; - } + error = map_ut_alloc_reservation_with_base_paddr(vm, vbeinfo.vbeModeInfoBlock.vbe20.physBasePtr, reservation); + if (error) { + ZF_LOGE("Failed to map base pointer for VESA frame buffer. Disabling"); + base = 0; } } }