🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #1360

Re: problems with physio()

#1360
From: Beau James {Manager - SW Devel -...
Date: Fri, 01 Sep 1989 18:16
20 lines
1505 bytes
--> I am porting a device driver which worked under SunOS 3.x to Sun4.0.1, and
--> am having some problems.  The driver uses physio() (as per the Guide to
--> Writing Device Drivers) to lock down the user's i/o buffer and map it into
--> the kernel.

Physio() does not map the user buffer into kernel virtual address space in
4.0.  That's not normally necessary, since you are typically only locking
the buffer down in order to DMA into/out of it.  When you call mbsetup()
to map the buffer onto the bus, the buffer does get mapped inot DVMA
space, which is also a valid part of kernel virtual address space.

This has the additional benefit of avoiding double-mapping the pages in
kernel virtual address space.  That saves kernel page table entries and
helps avoid cache aliasing problems.

If you also want to examine the contents of the buffer while in the
kernel, the safest thing to do is to look at it at is DVMA-mapped address.

Beau James				beau@Ultra.COM
Ultra Network Technologies		{sun,ames}!ultra.com!beau
Technical Details
Message-ID: <1357@brazos.Rice.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request
From: beau@ultra.com (Beau James {Manager - SW Devel - Ultra Networks})
Newsgroups: comp.sys.sun
Subject: Re: problems with physio()
Keywords: SunOS
Message-ID: <1357@brazos.Rice.edu>
Date: 1 Sep 89 18:16:04 GMT
Sender: root@rice.edu
Organization: Sun-Spots
Lines: 20
Approved: Sun-Spots@rice.edu
X-Sun-Spots-Digest: Volume 8, Issue 114, message 5 of 15