Commit 1e7a0473 authored by Bin Meng's avatar Bin Meng Committed by Simon Glass
Browse files

x86: Sanity test on vesa parameters before setting up kernel screen_info

We should not set up kernel screen_info when the vesa parameters are
insane, otherwise kernel will panic.
Signed-off-by: default avatarBin Meng <>
Acked-by: default avatarSimon Glass <>
parent a2eb65fc
......@@ -235,6 +235,10 @@ void setup_video(struct screen_info *screen_info)
struct vesa_mode_info *vesa = &mode_info.vesa;
/* Sanity test on VESA parameters */
if (!vesa->x_resolution || !vesa->y_resolution)
screen_info->orig_video_isVGA = VIDEO_TYPE_VLFB;
screen_info->lfb_width = vesa->x_resolution;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment