Physical/Logical address translation
Fabrice Le Metayer
fabrice at sj.ate.slb.com
Sat Mar 10 11:41:16 AEST 1990
I have been trying to get information about devices from the kernel. My
goal is to return a description of system parameters plus a list of
devices presents in the same format as displayed at boot time. For example :
when I boot my machine, I will see a message such as :
zs0 at obio 0x20000 pri 3
To reproduce the same message, assuming that the information is not
available from /etc/dmesg, I tried to read the kernel variables.
I executed the following commands successively :
% nm /vmunix | grep _mbdinit
0f0820ee D _mbdinit
% adb /dev/kmem
0f0820ee+a?X (assuming, for instance that zs0
0xf0820f8: f0ea000 is the first device in the table)
%
I did this for the whole table of devices pointed by "_mbdinit". And the
addresses that I got for the drivers were all of the type "0xf0ea000".
I have tried to tweak them in every possible way to establish an equivalence
between the expected "0x20000" address for zs0 and the page table translation
with all the help I could from the standard include files in /usr/include,
but I was left with the approximation :
zs0 at obio 0xf0ea000 pri 3
So, as a last resort, I called Sun, since we have a software support
contract, and I asked them what the algorithm was to perform the translation
between the devices addresses entered in the kernel configuration files and
this address found in the kernel. After a waiting a week, I received a call
from them to hear them tell me that this kind of information was beyond the
scope of their contract and that if I wanted to find out I had either to
hire a Sun consultant or attend the Sun Device Driver Programming course.
A little overkill for what I thought was an easy question.
So I am posting here, in hope that someone will be able to respond, or at
least direct me to a book or a manual page that will answer my desperate
quest for truth.
Regards,
-- Fabrice
--
Fabrice Le Metayer DOMAIN : fabrice at sj.ate.slb.com
Schlumberger Technologies - ATE UUCP : {amdahl,decwrl,uunet}!sjsca4!fabrice
San Jose, CA 95110 BELL : (408) 437-5114
More information about the Comp.unix.wizards
mailing list