Linux-Development-Sys Digest #171, Volume #8 Mon, 25 Sep 00 21:13:11 EDT
Contents:
Re: Installing Win98, Win2000 and Linux on one PC?! ("Scott Simpson")
Re: gdb (Russ Suter)
Re: how pci devices use dma ("Michael D. Colasono")
Re: ioremap not in namespce...? (Sean Patrick McNamee)
Re: aic7xxx 2.4.0 kernel module...gone (bill davidsen)
Re: Q: network driver interface changes between 2.2.x and 2.4.x (bill davidsen)
Re: lilo problems with 2.4.0-testx (bill davidsen)
Nested Xnest ([EMAIL PROTECTED])
Re: undefined symbols in modules (Jerry Peters)
How to determine IP address in C program? ([EMAIL PROTECTED])
What's the diffrence of "Task_Interruptible" and "Task_Uninterruptible"? (Changxun
Wu)
Re: What's the diffrence of "Task_Interruptible" and "Task_Uninterruptible"? (Kaz
Kylheku)
Problems with mmap() call and PCI device memory protections. (Ben Burch)
Re: How to determine IP address in C program? (Taavo Raykoff)
Re: How to determine IP address in C program? (fex)
----------------------------------------------------------------------------
From: "Scott Simpson" <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux,comp.os.linux.setup,microsoft.public.win2000.applications
Subject: Re: Installing Win98, Win2000 and Linux on one PC?!
Date: Mon, 25 Sep 2000 17:12:27 GMT
See http://home.earthlink.net/~simpson3
------------------------------
From: Russ Suter <[EMAIL PROTECTED]>
Subject: Re: gdb
Date: Mon, 25 Sep 2000 11:35:46 -0600
Paul wrote:
> Forgot to mention - I did compile/build with GCC, not CC as wrongly stated
> below.
>
> Paul <[EMAIL PROTECTED]> wrote in message
> news:8qkapj$7o3$[EMAIL PROTECTED]...
> > I am trying to debug my application using GDB with no luck.
> > So I wrote a simple program and tried debugging it - with still no luck.
> > I have read up on GDB on the RedHat website (using Ver 6.2 of RedHat).
> > Anyway I'm trying to display some variables using the "print" command as
> per
> > doco. after a crash.
> >
> > So here is the code: test.c
> >
> > ====================
> > #include <stdio.h>
> >
> > main ( )
> > {
> > int i, count;
> >
> > count = 0;
> > printf("count=%d\n", count);
> > i = 10 / count;
> > printf("i=%d\n", i);
> > }
> > =======================
> >
> > Here is my compiler command:
> >
> > cc testdb.c -g -otestdb
> >
> > =====================
> >
> > When I run it and it crashes, I type in the following to run GDB
> >
> > gdb -e testdb -c core
> >
> > Then at the GDB prompt I want to view the value of the variable "count".
> > I type in:
> >
> > (gdb) print 'testdb.c'::count
> >
> > The response from GDB is:
> >
> > No symbol "testdb.c" in current context
> >
> >
> > Can someone help me and tell me why I can't view the value of any
> variables
> > ???
> >
> > Thank you in advance
> > Paul
> >
> >
When specifying a variable name, you do not include the file name. The gdb
help page for
print states "Variables accessible are those of the lexical environment of
the selected
stack frame, plus all those whose scope is global or an entire file." So, the
file name is
implied based on where you are in the code (in this case, at the point of the
core).
------------------------------
From: "Michael D. Colasono" <[EMAIL PROTECTED]>
Subject: Re: how pci devices use dma
Date: Mon, 25 Sep 2000 19:30:17 GMT
I wish. If you don't mind spending $1500, you can try WinDriver from
jungo.com. They have
Linux drivers. It comes with a wizard to help with skeleton code.
I ran the 30 day demo at home ( the registered version , which is also
protected with Crypt Key ,
only runs on one machine - you must call them for a new license string
if you move it.)
and the wizard found all the interesting stuff on my Matrox card.
I haven't looked at the Linux
part of it, but I used it for a pci card we used for a project running
under winders. If your not in a
hurry, it might be ok. Just make sure you use it b4 your 90 day(?)
support runs out so you can ask
all the e-mail questions you need to ask two or three times since the
answers will not always
be what your looking for. You might also be able to get the source to
the actual driver code from them.
Check the web- site. I know that you can put your code into kernel mode
for winders, should be the
same for Linux. Check the web site info closely-I think the linux pkg is
separate from winders.
Now this package will help you write driver code for variouse pci chips.
Not all have DMA capability
and you'll need to use the DMA chip on the mother board. If you have a
specific card in mind, you
can get the spec sheet for the pci interface chip. Then you have to scan
for the card looking for a
vendor / board ID and find the internal registers, etc. Seems to me, PNP
cards all have a HEX word
that the os looks for while scanning addresses incremented by HEX 100 or
whatever. At this point
the os can look for onboard BIOS code that may or may be on board.
You may also try running winders and get into the SDK (was MASM) which
no longer ships with Visual C++ but
can be downloaded for free. Maybe you can glean enough from it to write
the code for Linux.
There are also resource on the web for winders DMA programming. Again
you'll have to figure out how
to do it for linux.
now for the smart-ass answer: pci devices in linux use dma however they
want to.
Anil Prasad wrote:
> hi,
> can anyone tell that how pci devices in linux use dma.
------------------------------
From: Sean Patrick McNamee <[EMAIL PROTECTED]>
Subject: Re: ioremap not in namespce...?
Date: Mon, 25 Sep 2000 19:36:28 GMT
Arne Driescher wrote:
> Sean Patrick McNamee wrote:
> >
> > Arne Driescher wrote:
> >
> > > > Hmmm.... I tried re-compiling the kernel with CONFIG_MODVERSIONS = 0 via
> > > > make menuconfig, verified that it was #undef'd in
> > > > linxlude/config/modversions.h, and did the
> > > > compile the kernel thang, and also tried #inlcuding the linux/version.h in
> > > > my own module... neither worked.
> > > > Also, shouldn't I be able to see ioremap in the ksyms output??? Methinks my
> > > > kernel takes the 'short bus' to school....
> > > >
> > > Hmm, strange problem. What kernel version are you useing?
> > > ioremap is not presend in the 2.0.x series. It was called vremap.
> > > Try to include sysdep.h from the driver book. May be that
> > > will fix your problem.
> > >
> > > -Arne
> > >
> > > P.S. ioremap should be defined in io.h.
> >
> > I am running kernel version 2.2.5-15, so I believe I am supposed to have access
> > to ioremap().
> Sure. There should be no problem.
>
> > I tried including the sysdep.h file from the book just for the hell of it, but
> > with no luck.
> It would only help with kernel 2.0.x. You can savely remove it is you
> don't need support for older versions.
>
> > The funny thing is, the module compiles just fine, it's when I try to load it
> > that I get the error.
> > I'm stilll unclear as to whether I shoule be able to see ioremap in the ksyms
> > output...
> I get
> c010ebe4 t remap_area_pages
> c010ee54 T __ioremap (This is mapped to ioremap according to io.h)
> c010ef34 T iounmap
> in my System.map. So should you. If the symbol is not in your
> System.map consider to rebuild your kernel. I can only think about
> one case where symbols are not exported, but you surely have
> enabled module-support in your kernel....
>
> -Arne
Hmmm... I DO see the same __ioremap in my System.map file - I don't see it when I
run ksyms however.
I must admit, I'm confused. Where exactly does the module look for it? I thought
that in order for a module to access it, it would
have to be listed in ksyms' output...but Why would it be in my System.map and not in
ksyms' output?
Well, thanks again,
Sean McNamee
[EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] (bill davidsen)
Crossposted-To: alt.os.linux,comp.os.linux.misc,comp.os.linux.setup
Subject: Re: aic7xxx 2.4.0 kernel module...gone
Date: Mon, 25 Sep 2000 19:43:47 +0000 (UTC)
In article <[EMAIL PROTECTED]>,
Michael Meding <[EMAIL PROTECTED]> wrote:
| > I am using the 2.4.0-test7 kernel and I amusing the aic7xxx drivers with
| > no problem. However, I have the drivers compile into the kernel, not
| > loaded as a module. I made that mistake once and my machine would not
| > boot. After reading the docs in the Documentation tree of the new kernel
| > it clearly states **NOT** to load any of the SCSI stuff as a module if
| > that is where you boot from.
|
| That is not true. You can use for example the aic7x module with an
| initial ramdisk (you have to mkinitrd and specify it in lilo.conf) and
| then boot up the system through a aic7x based controller without hassle.
Putting it in the initrd instead of the kernel certainly makes
generating a new kernel harder, but in terms of getting the benefits of
using a module it doesn't buy you much. You can do the boot and two
stage load, but other than as a proof of concept it isn't all that
useful.
That said, in the 2.2 kernel you need uni and SMP versions of modules,
so you can select the initrd to get the ones you need. That makes sense
on a distribution disk which must be flexible, but for regular users
it's probably not worth the effort, since an SMP kernel seems to run
okay on uni, if somewhat slower.
The need for separate modules is supposed to go away in 2.4, although
I have NOT verified it.
--
bill davidsen <[EMAIL PROTECTED]> CTO, TMR Associates, Inc
Make the rules? I don't make the rules. I don't even FOLLOW the rules!
------------------------------
From: [EMAIL PROTECTED] (bill davidsen)
Crossposted-To: comp.os.linux.networking,comp.os.linux.development
Subject: Re: Q: network driver interface changes between 2.2.x and 2.4.x
Date: Mon, 25 Sep 2000 19:48:28 +0000 (UTC)
In article <[EMAIL PROTECTED]>,
Shmulik Hen <[EMAIL PROTECTED]> wrote:
| Is there a good source of information that I can find about what changed
| between 2.2.x and 2.4.x kernels in terms of ethernet device drivers ?
If you have lots of time and disk space, you can take the two kernels,
run a diff on the trees, use patchview to change the output to pretty
HTML, and browse.
However, the diff program doesn't work well when a file is moved to a
new directory, so this may not do all you want.
There are vast changes, so don't expect anyone to type in a summary.
--
bill davidsen <[EMAIL PROTECTED]> CTO, TMR Associates, Inc
Make the rules? I don't make the rules. I don't even FOLLOW the rules!
------------------------------
From: [EMAIL PROTECTED] (bill davidsen)
Crossposted-To: linux.dev.kernel
Subject: Re: lilo problems with 2.4.0-testx
Date: Mon, 25 Sep 2000 19:50:50 +0000 (UTC)
In article <[EMAIL PROTECTED]>,
F. Heitkamp <[EMAIL PROTECTED]> wrote:
| I have yet to figure out why I can't get lilo to boot
| the 2.4.0-testx kernels I've compiled. The test8
| version works fine booting from a floppy. I even tried the
| latest Lilo from metalab and I get the famous (at least
| to me) "No setup signature found". I have a AMD Athlon 650
| and KX133 MB with all SCSI drives. I have Symbios 53c875 based
| SCSI cards. Could some tell me how the have lilo setup to boot
| 2.4.0x kernels? I have all my kernels in the root directory.
| Could this be causing the problem?
If your disk has more than 1024 cylinders, you may be storing the
kernel too high. Upgrade your LILO to the current version (21.5.1?) and
try again.
--
bill davidsen <[EMAIL PROTECTED]> CTO, TMR Associates, Inc
Make the rules? I don't make the rules. I don't even FOLLOW the rules!
------------------------------
From: [EMAIL PROTECTED]
Subject: Nested Xnest
Date: Mon, 25 Sep 2000 20:15:10 GMT
I am trying to create a Xnest then create another Xnest inside of the
existing one but I caonnot get it to work and I'm not even sure if it is
possible. What I am trying
Xnest :1.0 -geometry 660x500+620+495 &
Xnest :2.0 -display 1.0 -geometry 66x50+620+495 &
but I get an error of:
X Error of failed request: BadDrawable (invalid Pixmap or
Window parameter)
Major opcode of failed request: 55 (X_CreateGC)
Resource id in failed request: 0x0
Serial number of failed request: 10
Current serial number in output stream: 29
Any help would be great.
Tim
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: Jerry Peters <[EMAIL PROTECTED]>
Subject: Re: undefined symbols in modules
Date: Mon, 25 Sep 2000 21:05:15 GMT
St. Otto <[EMAIL PROTECTED]> wrote:
> Gilles Riffaud wrote:
>>
>> I have a project involving modules.
>> When I compile my modules using "gcc -c -O module.c -DMODULE \
>> -D__KERNEL__ -o module.o" and then use insmod to
>> insert the module, I get several undefined symbols.
>> Why do I get the undefined symbols, and how can I resolve
>> them?
>>
>> Gilles
>>
>> These are the errors that insmod gives.
>>
>> acr.o: unresolved symbol open
>> acr.o: unresolved symbol read
>> acr.o: unresolved symbol select
>> acr.o: unresolved symbol __xstat
>> acr.o: unresolved symbol close
>> acr.o: unresolved symbol write
>> acr.o: unresolved symbol fcntl
>> acr.o: unresolved symbol ioctl
>> acr.o: unresolved symbol gettimeofday
> Check the manuals for required libraries for open(), read()...
> Append them to the linkers command line with -L.
> St. Otto
No! AFAIK you can't use stdio from libc in the kernel.
Jerry
------------------------------
From: [EMAIL PROTECTED]
Subject: How to determine IP address in C program?
Crossposted-To:
comp.os.linux.questions,comp.os.linux.development.apps,comp.os.linux.development
Date: Mon, 25 Sep 2000 21:51:24 GMT
I am trying to write a C program that can determine the IP address
assigned to /dev/eth0. The program needs to be able to figure this
out without knowing the hostname of the machine that it's running on.
Also, it can't be certain that the IP address will exist in a file
(such as /etc/dhcpc/dhcpcd-eth0.info) because the IP address may or
may not be dynamically allocated.
Thus, using gethostbyname(3) isn't useful.
Is there any system call that will simply return the IP address
assigned to a particular network device? Or a way to enumerate the
network devices from a user-mode program?
Thanks in advance.
--
Cliff Lardin
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://cliff.lardin.net
------------------------------
From: Changxun Wu <[EMAIL PROTECTED]>
Subject: What's the diffrence of "Task_Interruptible" and "Task_Uninterruptible"?
Date: Mon, 25 Sep 2000 18:06:10 -0400
In kernel/sched.c, why we need two similar process states:
Task_Interruptible and Task_Uninterruptible?
What's the difference of these two?
Thanks.
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: What's the diffrence of "Task_Interruptible" and "Task_Uninterruptible"?
Reply-To: [EMAIL PROTECTED]
Date: Mon, 25 Sep 2000 22:11:31 GMT
On Mon, 25 Sep 2000 18:06:10 -0400, Changxun Wu <[EMAIL PROTECTED]> wrote:
>In kernel/sched.c, why we need two similar process states:
>Task_Interruptible and Task_Uninterruptible?
>
>What's the difference of these two?
The difference between the two is that unterruptible sleep will not wake up due
to the delivery of a signal. Using this kind of sleep simplifies the
assumptions that a driver writer can make, since it's not necessary to recover
from interrupted sleeps. Uninterrupted sleeps are useful for synchronzing with
fast, dedicated peripherals. They are a poor choice for situations like waiting
for network or serial input or generally any indefinite, or just plain long
wait.
--
Any hyperlinks appearing in this article were inserted by the unscrupulous
operators of a Usenet-to-web gateway, without obtaining the proper permission
of the author, who does not endorse any of the linked-to products or services.
------------------------------
From: Ben Burch <[EMAIL PROTECTED]>
Subject: Problems with mmap() call and PCI device memory protections.
Date: Mon, 25 Sep 2000 18:09:54 -0500
Hi!
I have here a driver I based upon Grant Edward's demomm.c driver. The goal
here is to map SRAM from a PCI VCC Hotworks-II/Spartan board into the memory
space of a user task. This is a 2 MB SRAM, and is pointed to by the device
base register zero, with base register 1 pointing to the device I/O space;
Sep 25 17:49:31 Device register 0: F5000000
Sep 25 17:49:31 Device register 1: 00001081
The driver builds and loads, and when I call mmap() I seem to have successfully
mapped to it. That is, I can read data I know to be there. However, when I
try to write to the same addresses, I get a bus error each time.
The protection registers from the vma struct;
vma->flags: 0073
vma->page_prot: 000000
When I try, the error in the kernel logs is;
kernel: do_wp_page: bogus page at address 4010b000 (b5000000)
Which is odd to me because the physical address as returned from the device's
registers is f5000000.
I am probably missing something simple as I started what should have been a
working driver module.
Any and all suggestions will be gratefully received!!!
====== Posted via Newsfeeds.Com, Uncensored Usenet News ======
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
======= Over 80,000 Newsgroups = 16 Different Servers! ======
------------------------------
From: Taavo Raykoff <[EMAIL PROTECTED]>
Crossposted-To:
comp.os.linux.questions,comp.os.linux.development.apps,comp.os.linux.development
Subject: Re: How to determine IP address in C program?
Date: Mon, 25 Sep 2000 19:34:43 -0400
Cliff, you basically do this with ioctl(). Check out the following
sample code snipped from interface.c from net-tools distribution kit
(e.g. the ifconfig command). __It is all in man netdevice. ___ Hope
this helps.
Taavo.
int if_fetch(struct interface *ife)
{
struct ifreq ifr;
int fd;
char *ifname = ife->name;
...
/* IPv4 address? */
fd = get_socket_for_af(AF_INET);
if (fd >= 0) {
strcpy(ifr.ifr_name, ifname);
ifr.ifr_addr.sa_family = AF_INET;
if (ioctl(fd, SIOCGIFADDR, &ifr) == 0) {
...
return 0;
}
[EMAIL PROTECTED] wrote:
> I am trying to write a C program that can determine the IP address
> assigned to /dev/eth0. The program needs to be able to figure this
> out without knowing the hostname of the machine that it's running on.
> Also, it can't be certain that the IP address will exist in a file
> (such as /etc/dhcpc/dhcpcd-eth0.info) because the IP address may or
> may not be dynamically allocated.
>
> Thus, using gethostbyname(3) isn't useful.
>
> Is there any system call that will simply return the IP address
> assigned to a particular network device? Or a way to enumerate the
> network devices from a user-mode program?
>
> Thanks in advance.
>
> --
>
> Cliff Lardin
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> http://cliff.lardin.net
------------------------------
From: [EMAIL PROTECTED] (fex)
Crossposted-To:
comp.os.linux.questions,comp.os.linux.development.apps,comp.os.linux.development
Subject: Re: How to determine IP address in C program?
Date: 26 Sep 2000 00:28:22 GMT
Reply-To: [EMAIL PROTECTED]
On Mon, 25 Sep 2000 21:51:24 GMT, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>I am trying to write a C program that can determine the IP address
>assigned to /dev/eth0. The program needs to be able to figure this
man proc
>out without knowing the hostname of the machine that it's running on.
>Also, it can't be certain that the IP address will exist in a file
>(such as /etc/dhcpc/dhcpcd-eth0.info) because the IP address may or
>may not be dynamically allocated.
>
>Thus, using gethostbyname(3) isn't useful.
you could use 'localhost' as the name.
------------------------------
** 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
******************************