🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.unix.internals
2 messages
2 total messages Started by Graham Hausler Fri, 20 Nov 1992 08:45
HELP: kernel routines for device driver
#2396
Author: Graham Hausler
Date: Fri, 20 Nov 1992 08:45
26 lines
1594 bytes
I have reached a brick wall in attempting to implement my first device
driver on a Motorola MVME187 running System V/88 R32V3. 
I need some/all of the following details clarified ....

1. Can I access physical memory (not in IO space) directly from a
   device driver, assumming I have removed this memory from usage by unix?
   I want the physical memory at a fixed address, and hence cannot
   allocate in virtual address space and then derive the physical address
   (assuming I can even manage that !!)

2. If I cannot access directly, what supplied routines within the kernel are
   good candidates for trying to perform the accesses ie 'fake DMA' type
   transfers and the like ... If you suggest routines like undisjointio(), I
   would appreciate some details as my documentation does not describe it!

If any of the above solutions seem long-winded and horribly indirect, maybe
someone can explain how unix performs it's shared memory operations when you 
can directly attach/access the same physical memory???

Please email any responses, I will forward relevant information to anyone
that requests it ....

Thanks 
Graham Hausler
-- 
Internet:   hausler@aldetec.oz.au      --> GEMCO, Perth, Australia.
Re: HELP: kernel routines for device driver
#2423
Author: Krishna Seshadri
Date: Thu, 17 Dec 1992 04:24
27 lines
1722 bytes
In article <144400004@hpcupt3.cup.hp.com> sbmn@hpcupt3.cup.hp.com (S.Subramanian(contr)) writes:
>/ hpcupt3:comp.unix.internals / hausler@aldetec.oz.au (Graham Hausler) / 12:45 am  Nov 20, 1992 /
>> 1. Can I access physical memory (not in IO space) directly from a
>>   device driver, assumming I have removed this memory from usage by unix?
>>    I want the physical memory at a fixed address, and hence cannot
>>    allocate in virtual address space and then derive the physical address
>>    (assuming I can even manage that !!)
>
>If your kernel has a sptalloc() / ptalloc() routine, you can make use of it.
>It takes a base physical address maps it to a kernel virtual address and
>returns this address.



All you need to do is choose a physical address range (not used by
UNIX) and plunk in a value in the TTRs (Transparent Translation
Registers) so that the physical addresses are directly accessible from
the driver. Pretty cool. I am assuming of course that you are using a
68040...

Krishna

-- 

seshadri@alpha.ces.cwru.edu	| A bachelor is a selfish, 
kps2@po.cwru.edu                | undeserving guy who has cheated 
Work: (216)-368-5038		| some poor woman out of a divorce.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads