Subject: Re: aperture, broken again?
To: None <rmk@rmkhome.com>
From: Jaromir Dolecek <jdolecek@netbsd.org>
List: current-users
Date: 10/11/2002 19:51:38
Why do you need aperture? MTRR support is standard part of NetBSD
in 1.6, and options INSECURE should be enough to allow X access /dev/mem.[*]

Jaromir

 [*] Surely the pkg should be fixed to compile&work, too.

Rick Kelly wrote:
> Stephen Ma said:
> 
> >Below is a quick patch for the aperture driver that includes the
> >previous change for the devsw stuff. It should be used in place of
> >pkgsrc/sysutils/aperture/patches/patch-ab (assuming you're building
> >from pkgsrc). This patch has been extensively untested.
> 
> This patch fails with pkgsrc downloaded from ftp.netbsd.org last night.
> 
> xf86_mod.c.rej
> ***************
> *** 31,37 ****
>          0,
>          seltrue, xf86mmap, 0};
>   
>   MOD_DEV("xf86", LM_DT_CHAR, -1, &newdev)
>   
>   char *xf86_major_version = "2";
>   char *xf86_minor_version = "0";
> --- 37,47 ----
>          0,
>          seltrue, xf86mmap, 0};
>   
> + #if __NetBSD_Version__ >= 106080000
> + MOD_DEV("xf86", "xf86ap", NULL, -1, &newdev, -1)
> + #else
>   MOD_DEV("xf86", LM_DT_CHAR, -1, &newdev)
> + #endif
>   
>   char *xf86_major_version = "2";
>   char *xf86_minor_version = "0";
> ***************
> *** 76,82 ****
>   
>          case LKM_E_UNLOAD:
>                  /* Free allocated memory */
> -                free(mem_range_softc.mr_desc, M_MEMDESC);
>                  break;
>   
>          case LKM_E_STAT:
> --- 86,95 ----
>   
>          case LKM_E_UNLOAD:
>                  /* Free allocated memory */
> +                if (mem_range_softc.mr_desc != NULL) {
> +                        free(mem_range_softc.mr_desc, M_MEMDESC);
> +                        mem_range_softc.mr_desc = NULL;
> +                }
>                  break;
>   
>          case LKM_E_STAT:
> 
> Is anyone working on this? I really need to get X up on this machine.
> 
> -- 
> Rick Kelly  rmk@rmkhome.com  www.rmkhome.com
> 


-- 
Jaromir Dolecek <jdolecek@NetBSD.org>            http://www.NetBSD.org/
-=- We should be mindful of the potential goal, but as the tantric    -=-
-=- Buddhist masters say, ``You may notice during meditation that you -=-
-=- sometimes levitate or glow.   Do not let this distract you.''     -=-