diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2010-09-13 19:58:46 +0000 |
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2010-09-13 19:58:46 +0000 |
| commit | f6ff063a6efa260d0e0ec2bd2de18616483910a2 (patch) | |
| tree | a47a0860b766e1e4304f4e2ccdbb581540b0e7a5 /sys/dev/fb | |
| parent | d3a8a8b9fa8d418ef26b4101b6bacd77b4e647dd (diff) | |
Notes
Diffstat (limited to 'sys/dev/fb')
| -rw-r--r-- | sys/dev/fb/vesa.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/dev/fb/vesa.c b/sys/dev/fb/vesa.c index 4cb3fb5895ea8..0c05699ff97b3 100644 --- a/sys/dev/fb/vesa.c +++ b/sys/dev/fb/vesa.c @@ -804,18 +804,16 @@ vesa_bios_init(void) vbios = x86bios_get_orm(vesa_bios_offs); if (vbios != NULL) { vesa_bios_size = vbios[2] * 512; - offs = BIOS_SADDRTOLADDR(vesa_bios_int10); - if (offs > vesa_bios_offs && - offs < vesa_bios_offs + vesa_bios_size) { + if (((VESA_BIOS_OFFSET << 12) & 0xffff0000) == + (vesa_bios_int10 & 0xffff0000) && + vesa_bios_size > (vesa_bios_int10 & 0xffff)) { vesa_bios = x86bios_alloc(&vesa_bios_offs, vesa_bios_size, M_WAITOK); memcpy(vesa_bios, vbios, vesa_bios_size); - offs = offs - VESA_BIOS_OFFSET + vesa_bios_offs; - offs = (X86BIOS_PHYSTOSEG(offs) << 16) + - X86BIOS_PHYSTOOFF(offs); + offs = ((vesa_bios_offs << 12) & 0xffff0000) + + (vesa_bios_int10 & 0xffff); x86bios_set_intr(0x10, offs); - } else - offs = vesa_bios_int10; + } } if (vesa_bios == NULL) printf("VESA: failed to shadow video ROM\n"); |
