console resolution

Peter Wemm peter at wemm.org
Tue Oct 18 16:40:02 PDT 2005


On Monday 10 October 2005 11:27 pm, Vasil Dimov wrote:
> On Mon, Oct 10, 2005 at 11:01:52PM -0700, John-Mark Gurney wrote:
> > Vasil Dimov wrote this message on Tue, Oct 11, 2005 at 08:46 +0300:
> > > Is there *any* way to get something different than 80x25 on the
> > > console?
> >
> > man vidcontrol
> >
> > > uname -a:
> > > FreeBSD qlovarnika.bg.datamax 6.0-RC1 FreeBSD 6.0-RC1 #0: Mon Oct 10
> > > 17:41:04 EEST 2005    
> > > root at qlovarnika.bg.datamax:/usr/obj/usr/src/sys/QLOVARNIKA  amd64
>
> Well,
>
> # vidcontrol -i mode
>     mode#     flags   type    size       font      window      linear
> buffer
> ---------------------------------------------------------------------------
>--- 24 (0x018) 0x00000001 T 80x25           8x16  0xb8000 32k 32k 0x00000000
> 32k
>
> # vidcontrol 80x30
> vidcontrol: cannot set videomode: Operation not supported by device
> vidcontrol: cannot set videomode: Operation not supported by device
>
> # vidcontrol VESA_800x600
> vidcontrol: cannot set videomode: Inappropriate ioctl for device
> vidcontrol: cannot set videomode: Inappropriate ioctl for device
>
> Did something change since amd64/72213?
>
> hint.sc.0.flags="0x80" in /boot/device.hints has no effect.

This stuff is trying to use bios calls to change the modes.  This is something 
a 64 bit kernel cannot do.  To make this work, one would have to trampoline 
out of 64 bit mode and into 32 bit mode, then do the vm86 or bios32() calls.  
This is more work than it might appear at first because you have to deal with 
interrupts.  One would have to write a 32 bit mini-kernel that can accept 
interrupts and traps, trampoline to 64 bit mode, handle them, then return, 
switching back to 32 bit mode.  All with page tables etc.  And of course you 
have to do extra data copying and have a way to describe it to the API.  (I 
don't remmeber if bios32() does data copying or not in its API.  I know vm86 
does.)

-Peter



More information about the freebsd-amd64 mailing list