Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Dec 1997 03:26:16 -0800
From:      Amancio Hasty <hasty@rah.star-gate.com>
To:        pb@fasterix.freenix.org (Pierre Beyssac)
Cc:        gjp@erols.com (Gary Palmer), gjp@erols.net (Gary Palmer), current@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/i386/linux linux.h linux_ioctl.c 
Message-ID:  <199712191126.DAA00915@rah.star-gate.com>
In-Reply-To: Your message of "Wed, 17 Dec 1997 21:55:17 %2B0100." <19971217215517.RV57140@@> 

next in thread | previous in thread | raw e-mail | index | archive | help

Hi Pierre,

Tnks for the correction .

So far I managed to get some of the svgalib programs to work over here.
Ran into a minor problem with mmap:
   __svga_graph_mem_orginal = (unsigned char *) mmap(
                                   (caddr_t) 0,
                                   GRAPH_SIZE,
                                   PROT_READ | PROT_WRITE,
                                  MAP_SHARED,
                                   0,
                                   __svgalib_mem_fd,
                                   GRAPH_BASE
        );


  __svgalib_graph_mem =
          (unsigned char *) mmap((caddr_t) __svga_graph_mem_orginal,
                                 GRAPH_SIZE,
                                 PROT_READ | PROT_WRITE,
                                 MAP_SHARED | MAP_FIXED,
                                 __svgalib_virtual_mem_fd,
                                 (int)__svga_graph_mem_orginal);


It appears that we don't support remapping a map region.
Does anyone know if we can perform the above mmap procedure in FreeBSD?


With respect to virtual terminal operations which forced me to
modify svgalib is the following sequence:

  for (__svgalib_tty_fd = 0; __svgalib_tty_fd < 3; __svgalib_tty_fd++) {
        if (fstat(__svgalib_tty_fd, &sbuf) < 0)
            continue;
        if (ioctl(__svgalib_tty_fd, VT_GETMODE, &vtm) < 0) {
            continue;
        }

The permissions for the virtual console are wrong in FreeBSD 


        /*        if ((sbuf.st_rdev & 0xff00) != 0x400)
            continue;
        if (!(sbuf.st_rdev & 0xff))
            continue; */

        svgalib_vc = sbuf.st_rdev & 0xff;
        return;                 /* perfect */
    }

    
-----
I think if we solved the above two problems with svgalib then we will
not have to have a modified version of svgalib for FreeBSD.
-----

With respect to ioperm , I moved linux_ioperm from linux_dummy.c to 
linux_misc.c and just have this for now:


int
linux_ioperm(struct proc *p, struct linux_ioperm_args *args)
{
        int error;
 
        error = suser(p->p_ucred, &p->p_acflag);
        if (error != 0)
                return error;
        if (securelevel > 0)
                return EPERM;
        p->p_md.md_regs->tf_eflags |= PSL_IOPL;
        return 0;
}

squake seems to work over here is not as good as glquake but hey 
if you don't have a Voodoo card I guess is alright to run squake 8)



	Enjoy,
	Amancio

> Amancio Hasty writes:
> > I think when I get back I will post a summary or target goals
> > to get svgalib fully compatible on FreeBSD and it is pretty
> 
> That's great!
> 
> > In the mean time you can download:
> > ftp://rah.star-gate.com/svgalib-foo.tar.gz
> > ftp://rah.star-gate.com/svgalib-1.2.11.tar.gz  (thats the orignal)
> 
> I think you mean:
> 
> 	ftp://rah.star-gate.com/pub/svgalib-foo.tar.gz
> 	ftp://rah.star-gate.com/pub/svgalib-1.2.11.tar.gz
> -- 
> Pierre Beyssac	      pb@fasterix.frmug.org pb@fasterix.freenix.org
> {Free,Net,Open}BSD, Linux : il y a moins bien, mais c'est plus cher
>     Free domains: http://www.eu.org/ or mail dns-manager@EU.org





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712191126.DAA00915>