On 18.11.2022 14:44, Roger Pau Monné wrote:
> On Fri, Nov 18, 2022 at 02:04:40PM +0100, Jan Beulich wrote:
>> On 18.11.2022 13:39, Roger Pau Monne wrote:
>>> --- a/xen/arch/x86/efi/efi-boot.h
>>> +++ b/xen/arch/x86/efi/efi-boot.h
>>> @@ -552,7 +552,7 @@ static void __init 
>>> efi_arch_video_init(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop,
>>>          bpp  = 0;
>>>          break;
>>>      }
>>> -    if ( bpp > 0 )
>>> +    if ( bpp > 0 && gop->Mode->FrameBufferBase )
>>>      {
>>>          vga_console_info.video_type = XEN_VGATYPE_EFI_LFB;
>>>          vga_console_info.u.vesa_lfb.gbl_caps = 2; /* possibly non-VGA */
>>
>> A few lines up from here, just out of patch context, there is a
>> PrintErr() which imo is bogus/misleading when also encountering a
>> zero fb base. I'd like to suggest that you put the new check early
>> in the function (perhaps extended by a zero check of other
>> applicable fields, as per above), returning right away alongside
>> another new PrintErr().
> 
> Would you be fine with the new message being "Invalid Frame Buffer
> configuration found"?

Yeah, that'll probably do.

Jan

Reply via email to