From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078654410982.tru64-unix-managers.marc@archive.invalid> From: Jim Zelenka Date: Thu, 22 Jan 1998 16:20:37 +0000 To: tru64-unix-managers Subject: memory-mapped adapters X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078654410982 Hardware/software: Alphastations and Alphaservers running DUX 3.2g and 4.0b mostly. Background: I have a PCI adapter which exports some of its memory over the PCI bus. Normally, I would access this memory from within the kernel using read_io_port() and write_io_port(). In theory, one could memory-map this space by using PHYS_TO_KSEG(), however, this produces a dense-space mapping, and it appears that the AXP Architecture does not honor the non-cachable property when dense space mappings are used to access adapter memory, so we're constrained to the sparse-space mappings used by read_io_port() and write_io_port(). Problem: I would like to map this memory directly into an application's address space. Ideally, I would like the sort of dense space mapping that I would get a la PHYS_TO_KSEG(). I suspect that this is not possible, because it would require a dense space mapping. However, I am not aware of any read_io_port() and write_io_port() equivalents for user space. We can add code to the kernel to perform any mappings or protection-twiddling necessary to make this application run. We can not, however, afford to pay lots of overhead for every access to adapter memory, so any scheme that involved either making a system call or generating a kernel trap (ie, page fault) for every such access is not acceptable. Does anyone have any thoughts or suggestions? Also, are there any mailing lists or newsgroups devoted to topics related to system and kernel development with Digital Unix? Thanks very much, Jim.Zelenka@cs.cmu.edu