Opened 10 years ago
Closed 10 years ago
#14096 closed defect (fixed)
VBE fn 0Ah returns wrong size for VBE2.0 PMI => Fixed in SVN
Reported by: | RainerZufall | Owned by: | |
---|---|---|---|
Component: | other | Version: | VirtualBox 4.3.20 |
Keywords: | vbe vesa bios | Cc: | |
Guest type: | other | Host type: | all |
Description
I recently wrote a small application to display VBE/VESA BIOS mode information and noticed that in VirtualBox the reported size of the VBE Protected Mode Interface table is wrong.
My program reports:
Address of VBE 2.0 PM Interface Table : C000:4600 PM Interface Table Length : 47893 Bytes <= WAY TOO LARGE
This is apparently due to a double subtraction in /src/VBox/Devices/Graphics/BIOS/vberom.asm:
Here, after execution of VBE Function 0Ah cx should contain the table size.
In line 838 cx is loaded with (vesa_pm_end - vesa_pm_start) and thus already contains the table size, but then in line 839 (sub cx, di) di (=offset vesa_pm_start) is again subtracted from cx.
In effect, vesa_pm_start is subtracted twice from vesa_pm_end to calculate the size.
Line 839 (sub cx,di) should simply be removed.
822 ; Function 0Ah - Return VBE Protected Mode Interface 823 ; 824 ; Input: AX = 4F0Ah VBE 2.0 Protected Mode Interface 825 ; BL = 00h Return protected mode table 826 ; Output: AX = Status 827 ; ES = Real Mode Segment of Table 828 ; DI = Offset of Table 829 ; CX = Length of Table including protected mode code 830 ; (for copying purposes) 831 ; 832 vbe_biosfn_return_protected_mode_interface: 833 test bl, bl 834 jnz _fail 835 mov di, 0C000h 836 mov es, di 837 mov di, offset vesa_pm_start 838 mov cx, vesa_pm_end - vesa_pm_start 839 sub cx, di 840 mov ax, 004Fh 841 ret 842 _fail: 843 mov ax, 014fh 844 ret 845 846 VGAROM ends
Change History (1)
comment:1 by , 10 years ago
priority: | major → trivial |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Summary: | Bug in VBE/VESA BIOS (vberom.asm) : Function 0Ah returns wrong size for VBE2.0 Protected Mode Interface Table → VBE fn 0Ah returns wrong size for VBE2.0 PMI => Fixed in SVN |
Yes.