Linux-Development-Sys Digest #405, Volume #8 Wed, 10 Jan 01 16:13:16 EST
Contents:
Re: devfs / pts ("Morten B�hmer")
glibc-2.2 testing problem (J�rgen Koslowski)
Re: vm86 and virtual memory ("Eppie")
Re: UNIX98 Pty's ???? (Eric)
Re: vm86 and virtual memory (Kasper Dupont)
Device Driver Engineers Needed-Great Opportunity!! (larry)
Re: about pci_find_device function (Andrey Valik)
Re: interrupt handling (Andrey Valik)
Re: thread debuggin (Andrey Valik)
Re: how to get the pci device resources (Andrey Valik)
Re: Problems with MINORS in Device Driver Writing ([EMAIL PROTECTED])
Re: interrupt handling (Andi Kleen)
Re: Linux device driver ([EMAIL PROTECTED])
Re: need help fixing a tcp kernel problem (Eric Taylor)
Kernel2.4 - Unusual Panic (N-Thread) ("mpierce")
Re: need help fixing a tcp kernel problem ("Peter T. Breuer")
Re: how to get the pci device resources ("Alex_Dubkov")
Re: ppp 2.3.10 fails (LCP Timeout) after installing 2.4.0 kernel. (Clifford Kite)
Re: how to get the pci device resources (Pete Zaitcev)
Re: Extending /proc filesystem on Solaris 7/8? (Kaelin Colclasure)
Re: glibc-2.2 testing problem (Andreas Jaeger)
Re: Extending /proc filesystem on Solaris 7/8? ("Peter T. Breuer")
----------------------------------------------------------------------------
From: "Morten B�hmer" <[EMAIL PROTECTED]>
Subject: Re: devfs / pts
Date: Wed, 10 Jan 2001 13:28:04 +0100
Do any of you know how to correctly setup and make the programs use the pts
system?
--
Med vennlig hilsen/Best Regards,
Morten B�hmer - [EMAIL PROTECTED]
AdCo Partner AS
Bjellandveien 14 - 3172 VEAR
[EMAIL PROTECTED]
http://www.veggers.no
"Kasper Dupont" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Paul Sack wrote:
> >
> > I am using devfs and devfsd. This works fine. I want to move everything
to use
> > the new devfs nodenames. This has not been a problem with the exception
of the
> > use of pts's.
> >
> > With devfsd, xterm's work fine in XF86 3.3. W/o them, I get an error
message
> > that a pts couldn't be opened.
> >
> > I am not mounting devpts (as the devfs docs suggest). I do *not* want to
> > upgrade to XF86 4.0 for a variety of unrelated reasons (as the docs do
> > suggest).
> >
> > When I stop using devfsd, what do I need to mknod to get xterm's to
work? (to
> > allocate a pts properly)
> >
> > I am using glibc 2.1.3, BTW.
> >
> > Thanks.
> >
> > Paul Sack
> >
> > --
> > Death is God's way of telling you not to be such a wise guy.
>
> XF86 3.3 or XF86 4.0 does not make any difference, but perhaps
> it makes a difference which version of xterm you use.
>
> The pts' are used by xterm and also by many other programs,
> even programs like screen which can run without any X server
> use pts'. Try stracing a program using pts' with /dev on an
> ext2 filesystem and /dev/pts on a devpts filesystem. And try
> stracing the same program with the entire /dev hieracy on a
> devfs filesystem.
>
> Perhaps the problem has something to do with /dev/ptmx which
> is used to create the /dev/pts entries.
>
> --
> Kasper Dupont
------------------------------
From: [EMAIL PROTECTED] (J�rgen Koslowski)
Subject: glibc-2.2 testing problem
Date: 10 Jan 2001 12:54:53 GMT
Hi,
I'm currently using glibc-2.1.3, self-compiled on a Slackware 7.1-
derived system. Compilation of glibc-2.2 seemed to work alright, but
when running "make check", after a while I'm getting an error message
complaining about a missing mtrace in the malloc directory. Sure
enough, this program hasn't been built, although .d, .o, and .os files
are there. Any ideas?
I can post a detailed error message, if necessary.
-- J�rgen
------------------------------
From: "Eppie" <[EMAIL PROTECTED]>
Subject: Re: vm86 and virtual memory
Date: Wed, 10 Jan 2001 14:30:23 +0100
"Kasper Dupont" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Eppie wrote:
> You must mmap the memory at address 0 in your virtual address
> space. You can do that by using the MAP_FIXED flag to mmap.
> Also notice that you might have to mmap more than 1MB, you can
> mmap up to 1088 KB where the last 64KB will be the HMA.
> If you want to emulate a 8086 where that 64KB maps to the first
> 64KB you can do that using shmget, shmctl, shmat.
>
But where does the proces that called vm86 reside in that address
space? Does it reside in that address space or do they have different
adress spaces?
> The vm86 calls take a struct as argument, the struct contains
> more or less the internal state of the CPU. Emulating a 8086
> requires a long sequence of vm86 calls with the same struct as
> argument.
>
> If you want to emulate a 8086 SMP system you can either do that
> by having two different structs where you alternating call vm86
> and one and the other or you could have two processes whith
> shared memory maped at address 0.
>
I have an application complete with RTOS in it and it does not call
any BIOS functions. I want to emulate that application in a virtual
proces running under Linux.
> I have made a PC emulator a litle different from DOSEMU, if you
> want I can send you the source of some of my earlier versions,
> that does litle more than emulating a CPU.
>
I would appreciate it very much if you send me the source. You can
e-mail it to: [EMAIL PROTECTED]
Thanks,
Erwin
------------------------------
From: Eric <[EMAIL PROTECTED]>
Subject: Re: UNIX98 Pty's ????
Date: Wed, 10 Jan 2001 14:41:27 +0100
Reply-To: [EMAIL PROTECTED]
Morten B�hmer wrote:
>
> What should the inittab look like?
>
I presume you mean the fstab.
none /dev/pts devpts gid=5,mode=620
0 0
Eric
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: vm86 and virtual memory
Date: Wed, 10 Jan 2001 13:42:07 +0000
Eppie wrote:
>
> "Kasper Dupont" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
> > Eppie wrote:
> > You must mmap the memory at address 0 in your virtual address
> > space. You can do that by using the MAP_FIXED flag to mmap.
> > Also notice that you might have to mmap more than 1MB, you can
> > mmap up to 1088 KB where the last 64KB will be the HMA.
> > If you want to emulate a 8086 where that 64KB maps to the first
> > 64KB you can do that using shmget, shmctl, shmat.
> >
>
> But where does the proces that called vm86 reside in that address
> space? Does it reside in that address space or do they have different
> adress spaces?
>
They share a virtual 4GB address space.
Normally the first 128MB are unused.
vm86 can access only first 1088KB.
process in user mode can access first 3 GB.
process in kernel mode can access all 4 GB.
>
> I would appreciate it very much if you send me the source. You can
> e-mail it to: [EMAIL PROTECTED]
>
When I've found the sources they can be downloaded from:
<URL:http://www.daimi.au.dk/~kasperd/pcemu/>
--
Kasper Dupont
------------------------------
From: larry <[EMAIL PROTECTED]>
Subject: Device Driver Engineers Needed-Great Opportunity!!
Date: Wed, 10 Jan 2001 14:49:41 GMT
***Great Career Opportunity***
My client a WORLD WIDE LEADER in custom device driver & system level
software development seeks talented software engineers.
2+ years experience in development of device drivers.
Fluency in coding and debugging C & assembly. Experience in one of the
following : ATM,SONET/SDH,NDIS,BLUETOOTH.
Experience in one of the following O/S:UNIX(linux),VX WORKS,MS WINDOWS.
Kernel level Driver Development required
USB or IEEE experience beneficial.
You will work with w/the latest & greatest technologies and w/ the best
and brightest engineers in the industry.
Unique and exciting opportunity!! TELECOMMUTE position(work from
home),excellent compensation,full benefits, stock options,sign on bonus.
No more sitting in traffic to work and long commutes, enjoy the
flexibility this company has to offer all its engineers.No need to
relocate, live where you want and work from home!!
Contact me for more details.
Don't miss this great opportunity!!
Send resume or questions to:
Larry Marks
emailto : [EMAIL PROTECTED]
------------------------------
From: Andrey Valik <[EMAIL PROTECTED]>
Subject: Re: about pci_find_device function
Date: Wed, 10 Jan 2001 20:07:05 +0500
ShawnTsao wrote:
>
> Hi,
>
> i tried to find the hardware resource in module about irq, memory map...
>
> But i have a problem in my program during compiling
> Is it right that i use the pci_find_device() to get the info about my
> hardware?
>
> struct pci_dev *vdev;
> .
> .
>
> vdev = pci_find_device ( VENDOR_ID, DEVICE_ID, NULL); <----- (warning:
> assignment makes pointer from integer without a cast)
> .
> .
> Irq = vdev->irq <-----(error: dereferencing pointer to incomplete type)
> .
> .
> .
>
> Thanks for your help
>
> Shawn Tsao
my code:
if (pcibios_find_device( VENDOR_ID, DEVICE_ID, pci_index,&pci_bus, &pci_device) == 0 )
{
...
pcibios_read_config_byte(pci_bus, pci_device, PCI_INTERRUPT_LINE, &pci_irq);
...
}
--
+----------------------+
| Andrey V. Valik |
| Papillon Systems |
|Mailto:[EMAIL PROTECTED]|
+----------------------+
------------------------------
From: Andrey Valik <[EMAIL PROTECTED]>
Subject: Re: interrupt handling
Date: Wed, 10 Jan 2001 20:14:51 +0500
Ralf Edrich wrote:
>
> HI,
>
> I've tried to set a new new interrupt-routine, based on "man 9
> request_irq/free_irq".
> Even though I did it exactly the same, errors are coming up just like as
> if there
> would be missing a header-file (or maybe a lib).
>
> Is there any example out there or could anyone give me a hint?
>
> tia,
>
> Ralf
#include <linux/sched.h>
request_irq( irq_number, &interrupt_handler, 0, "MYDRIVER", NULL);
--
+----------------------+
| Andrey V. Valik |
| Papillon Systems |
|Mailto:[EMAIL PROTECTED]|
+----------------------+
------------------------------
From: Andrey Valik <[EMAIL PROTECTED]>
Subject: Re: thread debuggin
Date: Wed, 10 Jan 2001 20:26:02 +0500
Jen-Chieh Tang wrote:
>
> Hello ...
>
> I was wondering if someone had a good link to thread
> debugging. I'm trying gdb, but it's rather cumbersome,
> and the usual debugging techniques don't seem to work.
> Thanks.
>
> - Tom Tang
>
> --
>
> Tom Tang
> [EMAIL PROTECTED]
>
gdb:
info threads - get info about threads
thread ID - switch to thread ID
--
+----------------------+
| Andrey V. Valik |
| Papillon Systems |
|Mailto:[EMAIL PROTECTED]|
+----------------------+
------------------------------
From: Andrey Valik <[EMAIL PROTECTED]>
Subject: Re: how to get the pci device resources
Date: Wed, 10 Jan 2001 20:35:05 +0500
ShawnTsao wrote:
>
> Hi,
>
> I tried to write a device driver, but i have a probelm,
> How to get the pci device resources in module about irq, memory map ....
>
> Thanks for your help.
> Shawn Tsao
if (pcibios_find_device( VENDOR_ID, DEVICE_ID, pci_index,&pci_bus,&pci_device) == 0 )
{
...
pcibios_read_config_dword(pci_bus, pci_device, PCI_BASE_ADDRESS_0,&pci_ioaddr);
pcibios_read_config_byte(pci_bus, pci_device, PCI_INTERRUPT_LINE,&pci_irq);
...
}
__
+----------------------+
| Andrey V. Valik |
| Papillon Systems |
|Mailto:[EMAIL PROTECTED]|
+----------------------+
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: Problems with MINORS in Device Driver Writing
Date: Wed, 10 Jan 2001 15:55:19 GMT
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> Hi ,
>
> I'm also a beginner.
>
> try "MINOR(inode->i_rdev)" .
> That macro will give you the minor number of the device ?
>
> Thank you.Hope this will help you.
>
> [EMAIL PROTECTED] wrote:
>
> > Hi there,
> >
> > I'm trying my hand at kernel device driver writing
> > on Linux 2.2.14. I've written a bare bones kernel
> > device driver which attempts to use minor devices,
> > however when my methods access the inode
> > structure, it cannot extract a Minor Number
> > properly (i.e. the inode->i_rdev holds a 0). Its
> > like the inode structure returned from the OS is
> > empty. I've looked through other device drivers
> > such as the sound blaster, but I'm not sure where
> > my coding error is.
> >
> > Any help would be greatly appreciated.
> > Luke Ng
> > Graduate Student
> > Dept of Mechanical Engineering
> > University of Waterloo
> >
> > Sent via Deja.com
> > http://www.deja.com/
>
>
Thanks for the reply Ninja, but yes I have tried the Minor macro but
somehow, it returns a 0 every time. Like I said, its like the inode
structure from the OS is coming back empty.
Thanks for the reply
Luke Ng
Grad Student
University of Waterloo
Sent via Deja.com
http://www.deja.com/
------------------------------
From: Andi Kleen <[EMAIL PROTECTED]>
Subject: Re: interrupt handling
Date: 10 Jan 2001 17:00:31 +0100
Ralf Edrich <[EMAIL PROTECTED]> writes:
> HI,
>
> I've tried to set a new new interrupt-routine, based on "man 9
> request_irq/free_irq".
> Even though I did it exactly the same, errors are coming up just like as
> if there
> would be missing a header-file (or maybe a lib).
>
> Is there any example out there or could anyone give me a hint?
There are a few hundred if not thousand examples in /usr/src/linux/drivers/**/*
-Andi
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: Linux device driver
Date: Wed, 10 Jan 2001 16:09:46 GMT
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> Hi ,
>
> What kind of device driver that we can find in Linux . As far as I
know,
> we can divide it to 3 groups (character device,block device and
network
> device).Is it true ?
>
> How do we classified these devices ? How about VGA card,sound card ?
Are
> they character device ?
>
> Thank you .
>
>
HI Ninja,
There are also user-level device drivers such as those used for the
svgalib. These device driver operate in user-mode with priviledges to
provide access to hardware while stilll having access to high-level
libraries. These are easy to write but are very limited in terms of
accessing hardware. Sound drivers are block drivers. A great reference
for the aspiring device driver writer is "Linux Device Drivers" by
Allessandro Rubini (I hope I spelled his name right) by O'Reilly Press.
Its a pretty good guide to writing device drivers, although, when things
go wrong you are back to the newsgroups.
Good Luck
Luke Ng
Grad Student
University of Waterloo
Sent via Deja.com
http://www.deja.com/
------------------------------
From: Eric Taylor <[EMAIL PROTECTED]>
Subject: Re: need help fixing a tcp kernel problem
Date: Wed, 10 Jan 2001 16:38:43 GMT
Peter T. Breuer wrote:
>
> Eric Taylor <[EMAIL PROTECTED]> wrote:
> > I can easily force an error using 2 perl scripts.
> > I simply create a socket server in one script, a
> > client in another, start sending, suspend the receiver
> > and wait 4 minutes. The socket will get disconnected. It
> > should not do this, it should send an ack with a window
> > of 0, which it fails to do. Both the client and the
> > server can be on the same system to easily see the error.
>
> Please send your report to Alan Cox and other interested parties.
>
> The kernel list is your obvious target.
>
> Peter
I am new to this, could you please elaborate on
where I can find this list? And how do I reach
Alan?
thanks
eric
------------------------------
From: "mpierce" <[EMAIL PROTECTED]>
Subject: Kernel2.4 - Unusual Panic (N-Thread)
Date: Thu, 11 Jan 2001 04:45:32 +1100
Reply-To: [EMAIL PROTECTED]
Thanks for all previous replies; I've got the kernel to compile and
recognise hda1 (root) and hda6 (home) by switching on virtually
everything and compiling using the kgcc package under Mandrake7.2 in lieu
of egcs.
Problem: kernel starts the boot and recognises drives and then stops on this
process:
Setting profile to :
Does anyone know what this is and a possible solution?
Marvin
------------------------------
From: "Peter T. Breuer" <[EMAIL PROTECTED]>
Subject: Re: need help fixing a tcp kernel problem
Date: Wed, 10 Jan 2001 18:33:59 +0100
Eric Taylor <[EMAIL PROTECTED]> wrote:
> Peter T. Breuer wrote:
>> The kernel list is your obvious target.
> I am new to this, could you please elaborate on
> where I can find this list? And how do I reach
Go to the obvious places. Read the MAINTAINERS list in the kernel
source directory, and go to www.<linuxanything>.org (or deja!)
for the kernel list. I won't publish email addresses here,
though I'll mention vger.linux.org as being the list machine, with
linux-kernel (on it) as your preferred list.
Peter
------------------------------
From: "Alex_Dubkov" <[EMAIL PROTECTED]>
Subject: Re: how to get the pci device resources
Date: Wed, 10 Jan 2001 21:06:57 +0300
ShawnTsao <[EMAIL PROTECTED]> ����� �
���������:93ejn4$1059$[EMAIL PROTECTED]
> Hi,
>
> I tried to write a device driver, but i have a probelm,
> How to get the pci device resources in module about irq, memory map ....
>
> Thanks for your help.
> Shawn Tsao
>
hi
see in src\arch\i386\lernel\bios32.c and usr\include\pci.h
very good title
Title "programming pci-devices under linux"
author: Claus Schroeter
URL
ftp://ftp.llp.fu-berlin.de/pub/linux/LINUX-LAB/whitepapers/pcip.ps.gz
good luck
>
------------------------------
From: Clifford Kite <[EMAIL PROTECTED]>
Subject: Re: ppp 2.3.10 fails (LCP Timeout) after installing 2.4.0 kernel.
Date: Wed, 10 Jan 2001 12:23:43 -0600
Gene Heskett <[EMAIL PROTECTED]> wrote:
> By damn I finally got it! kernel 2.4.0 and ppp-2.4.1 works!
> I detest shouting as much as the rest but...
> THE SECRET, AND NO PLACE IN THE DOCS THAT I'VE SPENT A FSCKING MONTH
> RE-READING, DOES IT TELL YOU TO MOVE YOUR /etc/ppp/*-secrets FILES TO
> /etc/sysconf/network-scripts/*-secrets!
It is a distribution thing. There is no standard track ppp-2.4.1 and
ppp-2.4.0 has the secrets files in the usual place, and I'm using the
2.4.0 kernel. I'd suspect a Red Hat distribution, but maybe others
(SuSE?) do weird things as well.
Happy trails...
--
Clifford Kite <kite@inet%port.com> Not a guru. (tm)
/* Editing with vi is a lot better than using a huge swiss army knife.
Use =} to wrap paragraphs in vi. Or put map ^] !}fmt -72^M in
~/.exrc and use ^] to wrap to 72 columns or whatever you choose. */
------------------------------
From: [EMAIL PROTECTED] (Pete Zaitcev)
Subject: Re: how to get the pci device resources
Date: Wed, 10 Jan 2001 19:24:48 GMT
> if (pcibios_find_device( VENDOR_ID, DEVICE_ID, pci_index,&pci_bus,&pci_device) == 0 )
> {
> ...
> pcibios_read_config_dword(pci_bus, pci_device, PCI_BASE_ADDRESS_0,&pci_ioaddr);
> pcibios_read_config_byte(pci_bus, pci_device, PCI_INTERRUPT_LINE,&pci_irq);
> ...
> }
Andrey, this is a bad idea if your code is ever to run on
anything other than a desktop PC. This is especially true
for IRQ number, which may be remapped. The right way to find
PCI resources is to reference pci_dev structure.
In other posting Shawn had a right example, except that he
forgot to include necessary headers.
-- Pete
------------------------------
From: Kaelin Colclasure <[EMAIL PROTECTED]>
Crossposted-To: comp.unix.solaris
Subject: Re: Extending /proc filesystem on Solaris 7/8?
Date: 10 Jan 2001 12:11:26 -0800
[EMAIL PROTECTED] (Casper H.S. Dik - Network Security Engineer) writes:
[...]
> The "text" representation of Linux /proc is perhaps interesting, but
> it's really awful when it comes to writing code.
>
> There's a good reason why /proc in Solaris contains binary files;
> they're much easier to use for programs and they're much easier to
> write code for.
>
> #include <sys/procfs.h>
>
>
> struct pfoo foo;
>
> fd = open("/proc/<pid>/foo", O_RDONLY);
> read(fd, &foo, sizeof foo);
>
>
> Much simpler than
>
> fscanf(FOO, fmt, &foo.foo_x, ....))
Hmmm, now although my *particular* module bends the Linux recommendations
and uses a binary representation for *some* of its /proc entries, let me
play Devil's advocate for a moment here...
What we've seen going on in the networking world for the past few decades
is that text-based protocols survive and evolve, while binary ones tend
not to fare well. At a recent IETF WG meeting I attended, this point
was raised and generated quite a bit of contention -- but when examples
had been enumerated, I for one was pretty convinced. Now certainly a
poorly designed protocol is not going to flourish wether text-based or
binary, but the weight of evidence in the Internet protocol arena
strongly suggests that there are real advantages to adopting a textual
representation.
Also, what little I have read on Plan 9 suggests that they have taken
the Unix-is-file-descriptors-and-text concept to new extremes. I'm
sure I read in some article or other that Plan 9 dumped ioctl in favor
of having "command strings" written to the device fds. And I would
submit to you that the folks who put together Plan 9 knew a thing or
two about Unix, its history, what's worked and what's not over the
years...
Not that I'm arguing that I or anyone else should thwart Solaris'
architectural conventions when writing a Solaris device driver (or
whatever). But I do think Linux's /proc has a good deal of merit only
slightly tarnished by the cruft.
-- Kaelin
------------------------------
From: Andreas Jaeger <[EMAIL PROTECTED]>
Subject: Re: glibc-2.2 testing problem
Date: 10 Jan 2001 21:34:23 +0100
>>>>> J�rgen Koslowski writes:
> Hi,
> I'm currently using glibc-2.1.3, self-compiled on a Slackware 7.1-
> derived system. Compilation of glibc-2.2 seemed to work alright, but
> when running "make check", after a while I'm getting an error message
> complaining about a missing mtrace in the malloc directory. Sure
I've never seen that.
> enough, this program hasn't been built, although .d, .o, and .os files
> are there. Any ideas?
How did you configure glibc? Which compiler?
> I can post a detailed error message, if necessary.
Please do so.
Andreas
--
Andreas Jaeger
SuSE Labs [EMAIL PROTECTED]
private [EMAIL PROTECTED]
http://www.suse.de/~aj
------------------------------
From: "Peter T. Breuer" <[EMAIL PROTECTED]>
Crossposted-To: comp.unix.solaris
Subject: Re: Extending /proc filesystem on Solaris 7/8?
Date: Wed, 10 Jan 2001 21:28:14 +0100
In comp.os.linux.development.system Kaelin Colclasure <[EMAIL PROTECTED]> wrote:
>> There's a good reason why /proc in Solaris contains binary files;
>> they're much easier to use for programs and they're much easier to
A clearer instance of "I don't know how to write a parser" I have never
seen!
> What we've seen going on in the networking world for the past few decades
> is that text-based protocols survive and evolve, while binary ones tend
> not to fare well. At a recent IETF WG meeting I attended, this point
Agreed. Ditto. Ibid.
Peter
------------------------------
** 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 by posting to the
comp.os.linux.development.system newsgroup.
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
******************************