[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: video mem access with oskit-mach

From: Marcus Brinkmann
Subject: Re: video mem access with oskit-mach
Date: Mon, 10 Dec 2001 20:20:15 +0100
User-agent: Mutt/1.3.24i

On Mon, Oct 01, 2001 at 05:12:17PM -0400, Roland McGrath wrote:
> The keyboard and video questions are really quite separate,
> so I am answering them in two separate threads.
> I believe that everything should already be in place in Mach (both flavors)
> and in the Hurd for mapping physical device memory such as the frame buffer.
> mmap on /dev/mem ought to dtrt already.  If not, it's a bug.

Ugh, except that I can't map a part of the mem device, because of libstore

static error_t
dev_map (const struct store *store, vm_prot_t prot, mach_port_t *memobj)
  size_t nruns = store->num_runs;

  if (nruns > 1 || (nruns == 1 && store->runs[0].start != 0))
    return EOPNOTSUPP;
      /* We pass in 0 for the OFFSET and SIZE argument because in many cases
         we can't supply them (devices that can't otherwise do I/O are often
         still mappable) and mach ignores them entirely.  XXXX */
      error_t err = device_map (store->port, prot, 0, 0, memobj, 0);
      if (err == ED_INVALID_OPERATION)
        err = EOPNOTSUPP;       /* This device doesn't support paging.  */
      return err;

We should fix Mach where it ignores the offsets and just make this function
do the obvious thing.  Shouldn't we?  The user can provide the size == 0
argument for Mach devices that need them.  I am not sure it's libstore's job
to hide the Mach breakage where it exists.

OSKit Mach seems to deal with offsets, at least in the mem device.


`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]