Linux-Development-Sys Digest #564, Volume #8 Tue, 13 Mar 01 22:13:19 EST
Contents:
I/O port accessing problems (Matt)
Re: I/O port accessing problems ("Norm Dresner")
Re: system call interface to insmod ("Norm Dresner")
memleak-deluxe ("Omkar Sathe")
Re: system call interface to insmod ("Joseph A. Knapka")
Kernel Panic!! (Help!!!!) (David)
Re: syscall problem (SPM)
Re: syscall problem ("Joseph A. Knapka")
Re: AMR ??? (Aminudin Khalid)
problem using poll for multiple socket (Rud)
Ft. Worth - Linux Kernel Module Programmer - Unix kernel modules & Unix device
drivers ("Larry Bergstrom")
Re: AT&T vs Intel x86 asm format ("Norman Black")
Trouble Booting Linux Redhat-7/kernel paging request (walt)
versionless module (Michael Andrew Posadas)
Re: system call interface to insmod ("Gene Soudlenkov")
Re: Can linux be trusted? (Robert Redelmeier)
----------------------------------------------------------------------------
From: Matt <[EMAIL PROTECTED]>
Subject: I/O port accessing problems
Date: Tue, 13 Mar 2001 22:24:03 GMT
I'm currently writing a driver for a card that has some RAM on it. To read
from the RAM, I write the address I want to the first two ports, (0x300),
and then read the value from the next two ports, (0x302).
The problem is every inw() call returns -1. I've requested the I/O region
for four ports, and /proc/ioports shows my driver bagging those ports
correctly. I thought it might be my driver, but I tried at a different
address, (which has no hardware connected), and I get the same effect.
I'm reading the values into a variable of type __s16 which should be the
right size and I didn't think I had to do anything extra after requesting
the I/O region.
Is -1 the standard response to reading an "open" port? In which case, I
should check to make sure the evaluation board isn't duff.
Any ideas appreciated
Matt
------------------------------
From: "Norm Dresner" <[EMAIL PROTECTED]>
Subject: Re: I/O port accessing problems
Date: Tue, 13 Mar 2001 22:55:43 GMT
If this is a pentium system, the chipset may need to be told that you want
the range of I/O addresses 300-30x reserved for the ISA bus. In most
systems, by default, all I/O (and memory) addresses are initially assigned
to the PCI bus. This has to be done in your CMOS setup.
Norm
Matt <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> I'm currently writing a driver for a card that has some RAM on it. To read
> from the RAM, I write the address I want to the first two ports, (0x300),
> and then read the value from the next two ports, (0x302).
>
> The problem is every inw() call returns -1. I've requested the I/O region
> for four ports, and /proc/ioports shows my driver bagging those ports
> correctly. I thought it might be my driver, but I tried at a different
> address, (which has no hardware connected), and I get the same effect.
>
> I'm reading the values into a variable of type __s16 which should be the
> right size and I didn't think I had to do anything extra after requesting
> the I/O region.
>
> Is -1 the standard response to reading an "open" port? In which case, I
> should check to make sure the evaluation board isn't duff.
>
> Any ideas appreciated
>
> Matt
>
------------------------------
From: "Norm Dresner" <[EMAIL PROTECTED]>
Subject: Re: system call interface to insmod
Date: Tue, 13 Mar 2001 22:57:21 GMT
Have you tried it. Even if it's not allowed, you're not likely to destroy
the computer.
If you're going to do systems programming, you've got to learn to
experiment.
Norm
Jothi P Neelamegam <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hi All,
>
> Is there a system call interface to insmod - i.e. can I insmod a module
> from inside a c program, rather than from console.
>
> Thanks
> Jothi
>
>
------------------------------
From: "Omkar Sathe" <[EMAIL PROTECTED]>
Subject: memleak-deluxe
Date: Tue, 13 Mar 2001 17:53:39 -0500
Hi,
Is there anything similar to memleak-deluxe available for 2.2.XX kernels ?
Ingo Molnar's memleak-deluxe is pretty old(for 2.0.XX)
TIA
omkar
------------------------------
From: "Joseph A. Knapka" <[EMAIL PROTECTED]>
Subject: Re: system call interface to insmod
Date: Tue, 13 Mar 2001 23:01:39 GMT
Norm Dresner wrote:
>
> Have you tried it. Even if it's not allowed, you're not likely to destroy
> the computer.
He's asking *if* there even *is* such an API. Hard to experimentally
call an API when you have no idea what its interface looks like.
Jothi, you can always do
system("modprobe my_module");
HTH,
-- Joe
> If you're going to do systems programming, you've got to learn to
> experiment.
>
> Norm
>
> Jothi P Neelamegam <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
> > Hi All,
> >
> > Is there a system call interface to insmod - i.e. can I insmod a module
> > from inside a c program, rather than from console.
> >
> > Thanks
> > Jothi
> >
> >
-- Joe Knapka
"It was just a maddened crocodile hidden in a flower bed. It could
have happened to anyone." -- Pratchett
------------------------------
From: David <[EMAIL PROTECTED]>
Subject: Kernel Panic!! (Help!!!!)
Date: Tue, 13 Mar 2001 23:30:23 -0000
I recently downloaded the 2.2.18 kernel from kernel.org. I compiled it and installed
it on my Debian 2.2 (Potato) system. I configured and ran lilo (I'm no newbie at these
things). I tried it and it worked well for a few days.
I have a dual boot (Win98 SE) system and one day I booted Windows to play flight
simulator. During the boot, Norton reported that my MBR had been changed and asked if
I wanted it (Norton) to repair it. Without thinking, I hit "yes". Probably a dumb
thing to do.
Later, I decided that I wanted to try the reiserfs so I downloaded the patch for me
spanking new kernel. Yes, I'm sure I got the right patch. I applied it and recompiled.
Reinstalled lilo. Tried to reboot the new kernel. The new image uncompressed and
started booting, then I got:
VFS: Cannot open root device 03:03
Kernel panic: VFS : Unable to mount root fs on 03:03
So I rebooted with the old kernel (still worked!) and messed around a bit with lilo's
settings. Reran lilo. Still no dice. COMPLETELY changed my lilo settings to the point
where I would notice the changes at the lilo prompt. Reran lilo. WAIT A MINUTE!!
Nothing changed at the lilo prompt as it should have! Something flaky going on here!
Reran lilo again. Still no expected changes!
Decided to install grub. Did so successfully. New kernel now gives me the the same
error messages except it substitutes 00:00 for the 03:03's.
What the heck can I do to get me new kernel to work again? I'm still using ext2 and
yes, ext2 is switched on in the kernel (not as a module).
Help!!
David
--
Posted via CNET Help.com
http://www.help.com/
------------------------------
From: SPM <[EMAIL PROTECTED]>
Subject: Re: syscall problem
Date: Tue, 13 Mar 2001 16:04:12 -0800
Hey - I did the same thing but can't get it to work either.
I keep getting 'unresolved symbol systest' when I compile the user-space app which
tries to call the new system call.
I did an 'nm' on libc and found that vfork, as an example, is a symbol in libc (vfork
is # 190 in the unistd.h file).
Do I need to recompile libc to contain this info?
Mikael Chambon wrote:
> Hi,
>
> I 've just put my new system call to a kernel 2.2.18 and I've got some
> problem with it now.
> As there is a printk inside, at boot and all the time my syscall is
> called each time that I executed a program
> I don't know what is going on, here is what I did:
>
> Here is my system call
>
> ==== systest.c ====
> #include <kernel.h>
>
> asmlinkage int sys_systest(int val)
> {
> printk("systest called with %d\n", val);
> return (0);
> }
> ==== end systest.c ====
>
> I went in arch/i386/kernel/entry.S (in your kernel tree) and add new entry:
>
> .long SYMBOL_NAME(sys_systest) /* 191 */
>
> and change .rept NR_syscalls-190 to .rept NR_syscalls-191
>
> And then I went in include/asm/unistd.h (in your kernel tree) and add a new entry:
>
> #define __NR_systest 191
>
> And when I rebooted on my new kernel I've got the problem,
>
> Did I miss something ??
>
> Thanls for all.
>
> --
> Mikael Chambon
> [EMAIL PROTECTED] || [EMAIL PROTECTED]
> ICQ 10249913 || http://www.cronos.org
------------------------------
From: "Joseph A. Knapka" <[EMAIL PROTECTED]>
Subject: Re: syscall problem
Date: Wed, 14 Mar 2001 00:26:27 GMT
SPM wrote:
>
> Hey - I did the same thing but can't get it to work either.
> I keep getting 'unresolved symbol systest' when I compile the user-space app which
> tries to call the new system call.
> I did an 'nm' on libc and found that vfork, as an example, is a symbol in libc (vfork
> is # 190 in the unistd.h file).
> Do I need to recompile libc to contain this info?
The libc code is not going to know anything about your new magic
syscall. You will probably need to write a piece of code that
supplies your arguments in the way that syscalls expect, and then
does an "int 0x80" in inline assembler to enter kernel mode and
execute the syscall. The syscall number should be in the EAX
register before the interrupt is triggered, but I don't know
for sure how other args are passed to syscalls. I think it's
via registers, but Use the Source to be sure.
HTH,
-- Joe
>
> Mikael Chambon wrote:
>
> > Hi,
> >
> > I 've just put my new system call to a kernel 2.2.18 and I've got some
> > problem with it now.
> > As there is a printk inside, at boot and all the time my syscall is
> > called each time that I executed a program
> > I don't know what is going on, here is what I did:
> >
> > Here is my system call
> >
> > ==== systest.c ====
> > #include <kernel.h>
> >
> > asmlinkage int sys_systest(int val)
> > {
> > printk("systest called with %d\n", val);
> > return (0);
> > }
> > ==== end systest.c ====
> >
> > I went in arch/i386/kernel/entry.S (in your kernel tree) and add new entry:
> >
> > .long SYMBOL_NAME(sys_systest) /* 191 */
> >
> > and change .rept NR_syscalls-190 to .rept NR_syscalls-191
> >
> > And then I went in include/asm/unistd.h (in your kernel tree) and add a new entry:
> >
> > #define __NR_systest 191
> >
> > And when I rebooted on my new kernel I've got the problem,
> >
> > Did I miss something ??
> >
> > Thanls for all.
> >
> > --
> > Mikael Chambon
> > [EMAIL PROTECTED] || [EMAIL PROTECTED]
> > ICQ 10249913 || http://www.cronos.org
-- Joe Knapka
"It was just a maddened crocodile hidden in a flower bed. It could
have happened to anyone." -- Pratchett
------------------------------
From: Aminudin Khalid <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware
Subject: Re: AMR ???
Date: Wed, 14 Mar 2001 09:20:02 +0800
Reply-To: [EMAIL PROTECTED]
==============9F5E56F0D327F6720DC1A2CE
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Hi,
Well , I just want to know is there any project to support AMR devices in
Linux or may be developing AMR library .
If I want to develop a AMR device driver what should I study ? Do I have to
study the AMR architecture and specification .
"Kenneth R�rvik" wrote:
> [EMAIL PROTECTED] (Aminudin Khalid) wrote in <[EMAIL PROTECTED]>:
>
> >What is AMR ?
>
> Audio/Modem Riser - a special slot to insert cheap software modems. These
> cards use the system CPU for many functions that are done in hardware in
> real modems. Much like the dreaded winmodems that use the PCI bus.
>
> >Where can I get the AMR specification ?
>
> Don't know, but try Intel.
>
> >Does Linux support AMR devices ?
>
> Not as far as I know.
>
> >Do we have any linux library to program AMR devices ?
>
> Not that I know of.
>
> --
> Kenneth R�rvik 91841353/22950312
> Nordbergv. 60 A [EMAIL PROTECTED]
> 0875 OSLO home.no.net/stasis
--
Mohd. Aminudin bin Mohd. Khalid
System Software Development
MIMOS
==============9F5E56F0D327F6720DC1A2CE
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi,
<p>Well , I just want to know is there any project to support AMR devices
in Linux or may be developing AMR library .
<br>If I want to develop a AMR device driver what should I study ? Do I
have to study the AMR architecture and specification .
<p>"Kenneth Rørvik" wrote:
<blockquote TYPE=CITE>[EMAIL PROTECTED] (Aminudin Khalid) wrote in
<[EMAIL PROTECTED]>:
<p>>What is AMR ?
<p>Audio/Modem Riser - a special slot to insert cheap software modems.
These
<br>cards use the system CPU for many functions that are done in hardware
in
<br>real modems. Much like the dreaded winmodems that use the PCI bus.
<p>>Where can I get the AMR specification ?
<p>Don't know, but try Intel.
<p>>Does Linux support AMR devices ?
<p>Not as far as I know.
<p>>Do we have any linux library to program AMR devices ?
<p>Not that I know of.
<p>--
<br>Kenneth Rørvik
91841353/22950312
<br>Nordbergv. 60 A
[EMAIL PROTECTED]
<br>0875
OSLO
home.no.net/stasis</blockquote>
<pre>--
Mohd. Aminudin bin Mohd. Khalid
System Software Development
MIMOS</pre>
</html>
==============9F5E56F0D327F6720DC1A2CE==
------------------------------
From: Rud <[EMAIL PROTECTED]>
Subject: problem using poll for multiple socket
Date: Tue, 13 Mar 2001 20:57:54 -0800
I all I'm using the poll function to wait on multiple fd all fd are
non-blocking
when I try to send data to the socket and I get an error
and if errno is set to EAGAIN I set for my fd the POLLOUT flag
like this my_poll[i].events |= POLLOUT
and I have a pipe to force the poll to read again all descriptors
to do that I write to the pipe.
my question is sometimes I never get the POLLOUT event and no data can
be sent to the pending socket afer that since if I force it while not
having the POLLOUT event
I always get the EAGAIN set in errno if for example I close the socket I
can send again to the remaining socket
my bet is for reason All socket are block.
can some one help figure out what is going on since I dont want to have
to close the socket for all pending socket
when ever I get errno set to EAGAIN and I dont want to try to send
forever
if you need more information please let me know or if my problem is not
clear
thanks for any help
------------------------------
Reply-To: "Larry Bergstrom" <[EMAIL PROTECTED]>
From: "Larry Bergstrom" <[EMAIL PROTECTED]>
Subject: Ft. Worth - Linux Kernel Module Programmer - Unix kernel modules & Unix
device drivers
Date: Wed, 14 Mar 2001 02:24:11 GMT
Linux Kernel Module Programmer - A very loose environment, casual attire,
needs an intermediate to advanced Linux Kernel Module Programmer
immediately for a critical role. This person must have specific experience
in programming Unix kernel modules or drivers and TCP/sockets, preferably
with Linux kernel modules or drivers, or an understanding or experience of
parallel and distributed processing. Program a Linux kernal module to
fulfill the need for a routing program performing communications and shared
server resource management on web servers. These programming tasks are below
the socket level, but some manipulation of sockets is part of the tasks.
This person will perform cutting edge server applications development in a
parallel and distributed environment. This experience is a huge resume
boost.
Required Skills: MUST HAVE experience in programming a Unix or Linux KERNAL
MODULE or DRIVER! ... and C / Unix, networks and protocols, an innovative
mind that enjoys thinking out of the box, good work ethic, work well alone,
self motivated, requires little supervision.
Desired Skills: parallel and distributed processing.
Start Date: ASAP
Type: - Permanent -
Pay Range: $60,000 - $65,000 Annual
+stock options
Benefits: Health Insurance, Life Insurance, Dental Insurance, Disability
Insurance, Paid Vacation, Paid Sick Leave, Stock Options, Flex Time
Location: Ft. Worth , TX - Hurst, TX
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TO APPLY, PLEASE CALL OR FORWARD RESUME TO:
Larry Bergstrom
Computer Staff, LLC
1701 W. Northwest Highway
Grapevine, Texas 76051-8105
EMAIL [EMAIL PROTECTED]
OFFICE metro (817) 329-5009
FAX (817) 329-5091
WEBSITE: http://www.compstaffonline.com/listings.html
HOME (817) 251-2029
MOBILE (817) 723-4298
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Information Technology Contract & Permanent Placement Services
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ALL RESUME RESPONDENTS ARE HELD CONFIDENTIAL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------
From: "Norman Black" <[EMAIL PROTECTED]>
Subject: Re: AT&T vs Intel x86 asm format
Date: Tue, 13 Mar 2001 18:29:34 -0800
Reply-To: "Norman Black" <[EMAIL PROTECTED]>
> MOV EAX, DWORD PTR [EBP - 8]
DWORD PTR is not necessary, since EAX specifies a 32-bit operand. If AX were
used a 16-bit operand is assumed.
However for
ADD [BP-8], 1
you need the BYTE, WORD or DWORD prefix since the add can be any of multiple
items. "typed" memory operands eliminate all need for PTR assembler syntax.
This is not always possible however.
Intel was not really into pseudo mnemonics, so they ended up taking a
different route.
--
Norman Black
Stony Brook Software
the reply, fubar => ix.netcom
"Kaz Kylheku" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> On Mon, 12 Mar 2001 17:24:10 -0700, D. Stimits <[EMAIL PROTECTED]> wrote:
> >I'm looking for a URL or other reference that will give me a cross
> >reference between nasm/Intel syntax asm versus AT&T/as syntax for x86
> >Linux.
> >
> >Also, if I use gcc or g++ and compile with a -S to generate assembler,
> >and I end up with a "movl" line, e.g.:
> >movl -8(%ebp),%eax
>
> This is simple indirect addressing with a displacement. The value -8 is
> added to EBP to form an address from which 32 bits are moved into EAX.
>
> >Can someone tell me on this specific movl which exact mov instruction
> >this corresponds to in x86 assembler under Intel pneumonics? There is a
>
> Pneumonics is an excellent word for the, er, inflated syntax, which
> is something like:
>
> MOV EAX, DWORD PTR [EBP - 8]
>
> :)
>
> >sizeable family of movl... instructions, but none simply named "movl"
> >(at least not in the Intel asm reference).
>
> The l suffix determines the width of the data being operated on,
> expressing in one letter that for which some imbecile invented
> the notation ``DWORD PTR''.
------------------------------
From: walt <[EMAIL PROTECTED]>
Subject: Trouble Booting Linux Redhat-7/kernel paging request
Date: Wed, 14 Mar 2001 02:30:06 -0000
PLEASE HELP ME I am new to Linux! I have just loaded Linux Redhat-7
(workstation) on my Compaq Presario 2100 and I am having trouble getting
it to boot.Everytime I try to boot the operating system it locks up and
the only way to get out of frozen screen is to power down the system. I
get the following message on my screen:
Call Trace : Bad EIP value
Code: <17> Unable to handle kernel paging request at virtual address
0000b4fc
Oops:0000
CPU:0
EIP: 0010 : [<c010a4d7>]
The hardware on the system is a Cyrix 133Mhz (processor type 80486 DX),
2.1 Gb IDE/ESDI harddrive, 64 Mb of ram, 8x cdrom,compaq 336-df
modem,creative labs sound blaster-16 soundcard, a standard PS/2
mouse,standard 101 key keyboard,ISA bus,and a Phoenix BIOS- version EPP
revision 3.00
If you need more information please feel free to contact me at
[EMAIL PROTECTED]
Thanks
--
Posted via CNET Help.com
http://www.help.com/
------------------------------
From: [EMAIL PROTECTED] (Michael Andrew Posadas)
Subject: versionless module
Date: 14 Mar 2001 02:51:04 GMT
I am trying to write a loadable driver module that will run on multiple
kernel versions. Can someone explain how to do this or point me to
references that will. Thanks
Mike
------------------------------
From: "Gene Soudlenkov" <[EMAIL PROTECTED]>
Subject: Re: system call interface to insmod
Date: Wed, 14 Mar 2001 15:42:19 +1300
If you are going to do that with valid "current" value, you can use
request_module(const char *) call from kmod.
Gene
Jothi P Neelamegam <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hi All,
>
> Is there a system call interface to insmod - i.e. can I insmod a module
> from inside a c program, rather than from console.
>
> Thanks
> Jothi
>
>
------------------------------
Date: Tue, 13 Mar 2001 20:57:27 -0600
From: Robert Redelmeier <[EMAIL PROTECTED]>
Crossposted-To:
comp.lang.c,comp.os.linux.development.apps,comp.sys.be.programmer,comp.sys.mac.programmer.misc,comp.unix.bsd.freebsd.misc,comp.unix.bsd.misc,gnu.gcc
Subject: Re: Can linux be trusted?
[EMAIL PROTECTED] wrote:
>
> In article <[EMAIL PROTECTED]>, Robert Redelmeier <[EMAIL PROTECTED]> wrote:
>
> >> How ? Is it an exact binary number ?
>
> >YES! 3d = 1.1b * 2^1b .
> >
> >In general, all non-mantissa over[under?]flowing integers
> >can be exactly representing by floats.
>
> You are assuming that normalized floats are x.xxxx * 10^nn and not
> 0.xxxx * 10^nn.
This isn't the difference, but the base of the floating point
is important. IEEE and x87 use base 2 coding. You get
b.bbb * 2^nn NOT x.xxx * 10^nn.
But calculators probably use binary-coded decimal floating
point (base 10) x.xxx * 10 ^ nn . AFAIK, no modern
FPU takes this approach.
-- Robert "You have to play the hand you are dealt in Silicon."
------------------------------
** 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
******************************