bootloader: Check that VESA mode is linear
I don't think there are any graphical non-linear framebuffers but good to be sure
This commit is contained in:
@@ -108,9 +108,11 @@ vesa_find_video_mode:
|
|||||||
cmpb $0x4F, %al; jne .vesa_unsupported
|
cmpb $0x4F, %al; jne .vesa_unsupported
|
||||||
cmpb $0x00, %ah; jne .vesa_error
|
cmpb $0x00, %ah; jne .vesa_error
|
||||||
|
|
||||||
# check whether in graphics mode
|
# check whether in graphics mode and linear framebuffer
|
||||||
testb $0x10, (vesa_mode_info_buffer + 0)
|
movb (vesa_mode_info_buffer + 0), %al
|
||||||
jz .vesa_find_video_mode_next_mode
|
andb $(0x80 | 0x10), %al
|
||||||
|
cmpb $(0x80 | 0x10), %al
|
||||||
|
jne .vesa_find_video_mode_next_mode
|
||||||
|
|
||||||
# compare mode's dimensions
|
# compare mode's dimensions
|
||||||
movw -2(%ebp), %ax; cmpw %ax, (vesa_mode_info_buffer + 0x12)
|
movw -2(%ebp), %ax; cmpw %ax, (vesa_mode_info_buffer + 0x12)
|
||||||
|
|||||||
Reference in New Issue
Block a user