mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:57:44 +00:00
Kernel: Much improved BochsVGA (BXVGA) support.
Instead of cowboy-calling the VESA BIOS in the bootloader, find the emulator VGA adapter by scanning the PCI bus. Then set up the desired video mode by sending device commands.
This commit is contained in:
parent
e9f6508ada
commit
731fc5a7c8
16 changed files with 298 additions and 114 deletions
|
@ -9,43 +9,6 @@ boot:
|
|||
mov ss, ax
|
||||
mov sp, 0xffff
|
||||
|
||||
; get vesa modes
|
||||
mov ax, 0x4f00
|
||||
xor dx, dx
|
||||
mov es, dx
|
||||
mov di, 0xc000
|
||||
mov [es:di], byte 'V'
|
||||
mov [es:di+1], byte 'B'
|
||||
mov [es:di+2], byte 'E'
|
||||
mov [es:di+3], byte '2'
|
||||
int 0x10
|
||||
cmp ax, 0x004f
|
||||
jne fug
|
||||
cmp [es:di], byte 'V'
|
||||
jne fug
|
||||
cmp [es:di+1], byte 'E'
|
||||
jne fug
|
||||
cmp [es:di+2], byte 'S'
|
||||
jne fug
|
||||
cmp [es:di+3], byte 'A'
|
||||
jne fug
|
||||
|
||||
; get vesa info
|
||||
mov ax, 0x4f01
|
||||
mov cx, 0x144
|
||||
xor dx, dx
|
||||
mov es, dx
|
||||
mov di, 0x2000
|
||||
int 0x10
|
||||
cmp ax, 0x004f
|
||||
jne fug
|
||||
|
||||
mov ax, 0x4f02
|
||||
mov bx, 0x4144
|
||||
int 0x10
|
||||
cmp ax, 0x004f
|
||||
jne fug
|
||||
|
||||
push cs
|
||||
pop ds
|
||||
xor bx, bx
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue