Linux-Development-Sys Digest #996, Volume #7 Wed, 5 Jul 00 14:13:18 EDT
Contents:
[Q] Kernel Debugger program ("Koji Yamamoto")
Re: Standard Data Types (Eoin Ryan)
Re: 2.2.16 eepro100 driver problems (Eric Lamarque)
Re: [Q] Kernel Debugger program (Josef Moellers)
Re: [Q] Kernel Debugger program (Eric Lamarque)
Re: Standard Data Types (Mathias Waack)
Re: Standard Data Types (Eoin Ryan)
Dangerous functions inside signal handler? (Hee-Chul Yun)
Hot-Swap capabilities under Linux (Amir Inbar)
can't implement get_user ("Eugene Shchepetov")
Re: Dangerous functions inside signal handler? (Mathias Waack)
Re: How to retreive/change the full MAC address of a network card ? (with ioctl)
("Chris L.")
Re: can't implement get_user (Mathias Waack)
Romable Linux ("Kevin P. Dankwardt")
mapping ISA device memory in kernel space ([EMAIL PROTECTED])
linux shutdown unclean? (Keith Osowski)
Re: mapping ISA device memory in kernel space (Mathias Waack)
Problems with writel in a device driver: please help save lives! (Nick Bailey)
Re: Problems with writel in a device driver: please help save lives! (Mathias Waack)
IOremap question ("andres")
Re: linux shutdown unclean? (John Gluck)
----------------------------------------------------------------------------
From: "Koji Yamamoto" <[EMAIL PROTECTED]>
Subject: [Q] Kernel Debugger program
Date: Wed, 5 Jul 2000 20:01:02 +0900
Hello.
I'm looking for kernel debugger for debugging my device driver.
I found one whose name is "kdebug" in O'REILLY's "Linux Device Driver",
but this is too old to use(version 1.1).
Does anyone know about other kernel debugger program ?
Thanks in advance.
--
Koji Yamamoto
------------------------------
From: [EMAIL PROTECTED] (Eoin Ryan)
Subject: Re: Standard Data Types
Date: 5 Jul 2000 12:35:52 GMT
[EMAIL PROTECTED] (Mathias Waack) wrote in
<[EMAIL PROTECTED]>:
>[EMAIL PROTECTED] (Eoin Ryan) writes:
>
>> Will the migratory process be
>> limited to machines of the exact same archeticture (even chip) as it
>> started out on?
>
>Yes (IMHO of course), you're limited to compatible machines. You
>cannot run a program compiled for a Pentium MMX on a 486, so a
>migration would fail.
why cant you run a program compiled for a Pentium MMX on a 486?????????
>And of course all machines should run the same software, especially
>kernel and (shared-)libraries.
>
>But there are much questions left:
>
>How do you handle shared libraries? How do you handle resources
>likes file descriptors (ie. open pipes, sockets aso.)? How do you
>handle device access? (for instance a program opens /dev/some_dev,
>which results in modprobe loading the appropriate module, you are
>doing some operations on this device which sets the module an a
>specific state, and now the program migrates to another node
>- how do you restore the modules state on this node?)
>
I take your point about shared libraries etc. I thought I said this in my
original post, but i will be deliberately writing a process to suit
migration. The executable will be stored on an nfs drive (nfs is stateless
thus every access to this will require complete path etc, clarify please)
and accesses to it will be to that drive, and as long as its mounted on the
destination machine there should be no problem. Likewise it's only output
should be to a file on that mounted drive....the actual goal of executable
is arbitary to me, since i have an interrest in security maybe it could
monitor vunerable demons sitting on ports or something, it doesnt matter.
At the moment the way its designed is that there will be a kernel module
which will do all of the copying of the process, very like fork(). There
will also be a comms unit in user space which will do the RPC stuff etc.
The kernel will preempt the process i deisgned, take the task_struct, mem
etc and pass it to the comms unit, and thats the end of the kernels job.
the comms unit will communicate with the other machine and send over
everything, which will in turn contact the kernel module on that machine
and ask for it to be set up...
The project is a Final Year Project for my Degree and as such isn't going
to be a fully working migration system as in the site, and O.S's such as
Clouds and Aemoba etc....
------------------------------
From: Eric Lamarque <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc
Subject: Re: 2.2.16 eepro100 driver problems
Date: Wed, 05 Jul 2000 15:03:42 +0200
Reply-To: [EMAIL PROTECTED]
"Timothy J. Lee" wrote:
>
> With kernel 2.2.16, compiling the eepro100 into the kernel (not as
> a module) does not seem to work. The following messages appear in
> the dmesg:
>
> eepro100: wait_for_cmd_done timeout!
It seems that eepro100 in 2.2.16 driver has a problem:
here, on a very standard configuration, and the driver compiled
as kernel module, I obtain periodically:
eth0:Printing Rx ring (next to receive into 503127).
Rx ring entry 0 00000001.
[...]
PHY index 1 register 4 is 05e1.
PHY index 1 register 5 is 0021.
PHY index 1 register 21 is 0000.
eth0: Trying to restart the transmitter...
The same machine ran happilly for a long time with a kernel 2.2.13
and the driver as a module.
Any solution or fixes?
Eric.
------------------------------
From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: [Q] Kernel Debugger program
Date: Wed, 05 Jul 2000 15:16:25 +0200
Koji Yamamoto wrote:
> =
> Hello.
> =
> I'm looking for kernel debugger for debugging my device driver.
> I found one whose name is "kdebug" in O'REILLY's "Linux Device Driver",=
> but this is too old to use(version 1.1).
> Does anyone know about other kernel debugger program ?
Look at oss.sgi.com, They have a more recent kernel debugger.
-- =
Josef M=F6llers
Fujitsu Siemens Computers
SHV Server DS 1
------------------------------
From: Eric Lamarque <[EMAIL PROTECTED]>
Subject: Re: [Q] Kernel Debugger program
Date: Wed, 05 Jul 2000 15:13:41 +0200
Koji Yamamoto wrote:
> Does anyone know about other kernel debugger program ?
you can find two patches for your kernel:
http://oss.sgi.com/projects/kgdb/
to acces and debug your kernel remotely with gdb
and
http://oss.sgi.com/projects/kdb/
to include a embedded debugger in your kernel
Eric.
------------------------------
From: Mathias Waack <[EMAIL PROTECTED]>
Subject: Re: Standard Data Types
Date: 05 Jul 2000 15:00:50 +0200
[EMAIL PROTECTED] (Eoin Ryan) writes:
> [EMAIL PROTECTED] (Mathias Waack) wrote in
> <[EMAIL PROTECTED]>:
>
> >[EMAIL PROTECTED] (Eoin Ryan) writes:
> >
> >> Will the migratory process be limited to machines of the exact same
> >>archeticture (even chip) as it started out on?
> > Yes (IMHO of course), you're limited to compatible machines. You
> >cannot run a program compiled for a Pentium MMX on a 486, so a
> >migration would fail.
>
> why cant you run a program compiled for a Pentium MMX on a
> 486?????????
Ok, it was not correct. I should say: it can happen, that a program
which was compiled for a Pentium MMX couldn't run on a 486. Because
it uses MMX or other Pentium specific instructions, which are not
available on a 486.
Mathias
------------------------------
From: [EMAIL PROTECTED] (Eoin Ryan)
Subject: Re: Standard Data Types
Date: 5 Jul 2000 13:34:47 GMT
[EMAIL PROTECTED] (Mathias Waack) wrote in
<[EMAIL PROTECTED]>:
>[EMAIL PROTECTED] (Eoin Ryan) writes:
>
>> [EMAIL PROTECTED] (Mathias Waack) wrote in
>> <[EMAIL PROTECTED]>:
>>
>> >[EMAIL PROTECTED] (Eoin Ryan) writes:
>> >
>> >> Will the migratory process be limited to machines of the exact same
>> >>archeticture (even chip) as it started out on?
>> > Yes (IMHO of course), you're limited to compatible machines. You
>> >cannot run a program compiled for a Pentium MMX on a 486, so a
>> >migration would fail.
>>
>> why cant you run a program compiled for a Pentium MMX on a
>> 486?????????
>
>Ok, it was not correct. I should say: it can happen, that a program
>which was compiled for a Pentium MMX couldn't run on a 486. Because
>it uses MMX or other Pentium specific instructions, which are not
>available on a 486.
>
>Mathias
Do you know of any other good sites dealing in this stuff which you might
want to share with me, saving me having to buy a book....
------------------------------
From: Hee-Chul Yun <[EMAIL PROTECTED]>
Subject: Dangerous functions inside signal handler?
Date: 5 Jul 2000 14:17:23 GMT
plz tell me the functions which are safe inside signal handler and vise versa.
--
Hee-Chul, Yun e-mail: [EMAIL PROTECTED]
KAIST CS Dept, CA Lab. Phone : 5552(Lab), 017-755-9413
------------------------------
From: [EMAIL PROTECTED] (Amir Inbar)
Subject: Hot-Swap capabilities under Linux
Date: Wed, 05 Jul 2000 14:26:36 GMT
Jungo (www.jungo.com) announced today the release of its new "GO
Hot-Swap" OS Extension v4.40, adding CompactPCI hot-swap capabilities
to Linux, Solaris, VxWorks, Windows2000, Windows NT, Windows
NT-Embedded, Windows CE and Windows9x.
"Go Hot-Swap" OS Extension, which includes a powerful driver
development toolkit, adds hot-swap capabilities for CompactPCI
hardware to all major operating systems, and on any available system
board.
"Go Hot-Swap" enables users to immediately add hot-swap capabilities
to their existing PCI drivers or to easily develop hot-swappable
drivers from scratch. The resulting code will compile and run on all
supported operating systems.
"Go Hot-Swap" also transparently supports all CompactPCI hardware,
i.e. it is not dependant on the hardware configuration on which it is
running or the host PCI controller it is using.
AudioCodes - A leading VoIP vendor has recently selected Jungo's "GO
Hot-Swap" Operating System Extension to provide "Hot Swapping"
capabilities to its TrunkPack-VoIP/400 product line, hence being the
first to market a fully hot-swappable communication board under
Windows, Linux and Solaris operating systems.
For more details and a free full-featured evaluation version visit:
http://www.jungo.com/cpci.html or contact: [EMAIL PROTECTED]
------------------------------
From: "Eugene Shchepetov" <[EMAIL PROTECTED]>
Subject: can't implement get_user
Date: Wed, 5 Jul 2000 17:28:17 -0700
I'l writing kernel module that's uses data from user process. There
get_user function in my source code. Everything compiles good - but when I
try to insmod it - an error occurs : unresolved __get_user_X
There only __get_user_x that I found i kernel source in uaaccess.h.
I think I make a very stupid error :-)
Help please.
------------------------------
From: Mathias Waack <[EMAIL PROTECTED]>
Subject: Re: Dangerous functions inside signal handler?
Date: 05 Jul 2000 16:44:45 +0200
Hee-Chul Yun <[EMAIL PROTECTED]> writes:
> plz tell me the functions which are safe inside signal handler
All reentrant functions (POSIX lists about 40 functions, I would
list them if you would pay me for that;)
> and
> vise versa.
hu?
Mathias
------------------------------
From: "Chris L." <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: How to retreive/change the full MAC address of a network card ? (with
ioctl)
Date: Wed, 5 Jul 2000 10:33:02 -0500
Matthew Dare <[EMAIL PROTECTED]> wrote in message
news:395f47cf$[EMAIL PROTECTED]...
> Theoretically you shouldn't be able to modify any of it. The first four
digits are the
> ID of the cards manufacturer. (ie 3COM, IBM etc... - Each manufacturer may
have more
> than one ID) The second set of four digits are assigned by the
manufacturer (generally in
> sequence) to give each card a unique ID. (ie every network card ever
manufactured
> should have a unique id). Some cheap NIC manufacturers allowed the last
four digits to be
> changed by their configuration software. If you have one of these then
you should be able
> to read the NIC's (BIOS?) configuration, change the last four digits and
write it back.
>
> What I can't understand is why you would want to change the MAC address
for anyway.
> If two or more cards chare the same mac address your network won't work
anyway.
What if you want to thange the NIC that connects to your DSL ISP that needs
the MAC address of the correct NIC to connect? Swap the NIC, change the MAC
and go.
My guess anyway,
Chris L.
------------------------------
From: Mathias Waack <[EMAIL PROTECTED]>
Subject: Re: can't implement get_user
Date: 05 Jul 2000 17:00:48 +0200
"Eugene Shchepetov" <[EMAIL PROTECTED]> writes:
> I'l writing kernel module that's uses data from user process. There
> get_user function in my source code. Everything compiles good - but
> when I try to insmod it - an error occurs : unresolved __get_user_X
> There only __get_user_x that I found i kernel source in uaaccess.h. I
> think I make a very stupid error :-) Help please.
Maybe. Pls. give us some code and the command line used for compiling.
Have you read the comments in uaccess.h for the get_user family?
Remark that in get_user(val,addr) val must be a lvalue and address
a pointer into the user space. The size of the item retrieved by
this function is determined at compile time from the type of
*addr :
#define get_user(x,ptr) \
({ int __ret_gu,__val_gu; \
switch(sizeof (*(ptr))) { \
case 1: __get_user_x(1,__ret_gu,__val_gu,ptr); break; \
case 2: __get_user_x(2,__ret_gu,__val_gu,ptr); break; \
case 4: __get_user_x(4,__ret_gu,__val_gu,ptr); break; \
default: __get_user_x(X,__ret_gu,__val_gu,ptr); break; \
...
(taken from uaccess.h)
It looks like your pointer type isn't supported and you must switch to
copy_from_user()
Mathias
------------------------------
From: "Kevin P. Dankwardt" <[EMAIL PROTECTED]>
Subject: Romable Linux
Date: 05 Jul 2000 11:37:18 EDT
Does anyone know a reference to a discussion of what was required to make a
version of Linux run from ROM? I've heard people say they've done it and
it's a bit tricky. But, I haven't heard anyone say what they had to do.
This is for embedded devices, there is RAM and/or Flash in the system, but
the kernel runs/boots from ROM.
thanks.
------------------------------
From: [EMAIL PROTECTED]
Subject: mapping ISA device memory in kernel space
Date: Wed, 05 Jul 2000 15:46:07 GMT
Hi,
i have a ISA device having 8 kb of physical mem(start address
D000:0000). How can I map it to virtual memory for access in my driver.
Please help.
regards
jeseem
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: Keith Osowski <[EMAIL PROTECTED]>
Subject: linux shutdown unclean?
Date: 5 Jul 2000 16:30:51 GMT
I am working with a linux kernel to have it reload an operating system. I am
successful at reloading linux, but I am not able to reload msdos or NT.
What I am trying to do is boot a linux kernel, image a disk(put an os on it),
and then load that OS using BIOS int 19. It works great when I put linux on as
the OS and reload it, but DOS and NT load part of the way, "Starting MSDOS..."
and "...press space bar to get last configuration..." and hangs. It appears
that linux maybe changes some stuff that the MS world expects to be there. Any
thoughts or help here would be appreciated.
Keith
------------------------------
From: Mathias Waack <[EMAIL PROTECTED]>
Subject: Re: mapping ISA device memory in kernel space
Date: 05 Jul 2000 18:14:27 +0200
[EMAIL PROTECTED] writes:
> i have a ISA device having 8 kb of physical mem(start address
> D000:0000). How can I map it to virtual memory for access in my
> driver. Please help.
First register a dma channel by calling request_dma().
After that setup the dma controller with set_dma_{mode|addr|count}.
Check if all is ok by calling get_dma_residue().
For cleanup use disable_dma() and free_dma().
Read asm/dma.h for more infos and look at drivers like the soundblaster
driver in drivers/sound/dmabuf.c or sscape.c
If there are still questions, run (don't walk!) to your next book store
and by A. Rubini: Linux Device Drivers.
Mathias
------------------------------
From: [EMAIL PROTECTED] (Nick Bailey)
Subject: Problems with writel in a device driver: please help save lives!
Date: Wed, 5 Jul 2000 17:42:53 +0100 (BST)
I need help quite urgently on a device driver writing problem. We have
built an intravascular ultrasound acquision board for caridac artery
scanning. There is a set of drivers for it for NT which work, just
about, but are polling mode to get the testing off the ground.
Now we have come to making a really clinical machine, I insisted we
dropped NT and went to Linux (would *you* trust your cardiac surgery to
an NT user? 8-) But to get this OKed, I had to volunteer to write a
device driver, and am stuck pretty early on, never having written a
device driver before. I'd really, really appreciate it if somebody
could have a quick look at this (very short) code and tell my the
(hopefully very obvious) thing I'm doing wrong. I'm using a 2.2.13
kernel on the development machine. This is pro bono work, by the way,
for a UK heart research charity.
Our card gets detected properly (checked using /proc/pci to look at it's
IDs). The module prints a line to the kernel log
ftp://eenlnx1.leeds.ac.uk/pub/Pegasus/kernlog.txt and it looks good
(although I don't understand why the function code isn't 0 which is
what ftp://eenlnx1.leeds.ac.uk/pub/Pegasus/proccat.txt (the result of
cat /proc/pci) records). We then map the memory using ioremap_nocache()
and hit it with the configuration bit twiddling. I've checked all this
with Steve, the hardware guy, and it looks good, but even cutting it all
out and just essentially poking a line high has no effect. It looks
like writel() or something to do with the remapping is failing, but the
code ftp://eenlnx1.leeds.ac.uk/pub/Pegasus/init.c is so very simple, I
just can't see where!
Any help much appreciated. And if you would like to recommed something
I should read, please do. I've got a copy of the O'Reilly book on Linux
Device Drivers, although it targets 2.0 mostly. I've made some changes
I've been told to in the kernel docs, but maybe I missed something. At
the moment, only the first 25 lines or so work, which is not good for 2
weeks' work 8-(
Thanks in advance,
Nick/
--
Dr N J Bailey, mailto:[EMAIL PROTECTED]
Deputy Director, Interdisciplinary Centre for Scientific Research in Music
Lecturer in Applied Computing, School of Electronic and Electrical Engineering
University of Leeds. http://www.ee.leeds.ac.uk/homes/NJB
------------------------------
From: Mathias Waack <[EMAIL PROTECTED]>
Subject: Re: Problems with writel in a device driver: please help save lives!
Date: 05 Jul 2000 18:59:50 +0200
What a dramatic subject;)
Hope I don't make any mistakes and kill some of your
patients.
[EMAIL PROTECTED] (Nick Bailey) writes:
> kernel on the development machine. This is pro bono work, by the way,
> for a UK heart research charity.
What does "pro bono" mean?
> cat /proc/pci) records). We then map the memory using
> ioremap_nocache() and hit it with the configuration bit twiddling.
You cannot use writel on mapped regions. Ether you map the region
or you access per PIO using the writeX family.
If your memory on the PCI card is mappable, then you should
instead of
writel(SamplingFrequency,
PEGASUS_ECL_CONTROL_REG(pegasus_base));
better use
*(pegasus_base + PEGASUS_ECL_CONTROL_REG) = SamplingFrequency;
(assuming the pointer arithmetic is correct and the macro above simply
adds an offset).
Try both: first eleminate the ioremap, then the writel should work.
Or use ioremap and change the writel to simply pointer accesses.
Mathias
------------------------------
From: "andres" <[EMAIL PROTECTED]>
Subject: IOremap question
Date: Wed, 5 Jul 2000 10:30:04 -0700
Hello all:
After two weeks struggling to write a driver in linux, I finally succeded
not without some questions that are still unanswered.
Could somebody, explain me exactly what is the function of
ioremap ?
I know that I have to used if ever I want to access the pci memory I want to
have access to. (in my case 0xe0a00000). But why a simple pointer
referencing to that address does not work ? What the ioremap function really
does?
Thanks and regards
Andres
------------------------------
From: John Gluck <[EMAIL PROTECTED]>
Subject: Re: linux shutdown unclean?
Date: Wed, 05 Jul 2000 13:56:05 -0400
Keith Osowski wrote:
> I am working with a linux kernel to have it reload an operating system. I am
> successful at reloading linux, but I am not able to reload msdos or NT.
>
> What I am trying to do is boot a linux kernel, image a disk(put an os on it),
> and then load that OS using BIOS int 19. It works great when I put linux on as
> the OS and reload it, but DOS and NT load part of the way, "Starting MSDOS..."
> and "...press space bar to get last configuration..." and hangs. It appears
> that linux maybe changes some stuff that the MS world expects to be there. Any
> thoughts or help here would be appreciated.
>
> Keith
If you are trying to do a warm boot and are changing operating system versions it
may fail to reload depending on what system variables and locations have changed.
If you are booting say linux and switching to MS-DOS as a warm boot thing it will
almost certainly fail.
I you are doing a cold boot going from one operating system to another should
work.
--
John Gluck (Passport Kernel Design Group)
(613) 765-8392 ESN 395-8392
Unless otherwise stated, any opinions expressed here are strictly my own
and do not reflect any official position of Nortel Networks.
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.development.system) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-System Digest
******************************