Linux-Development-Sys Digest #102, Volume #8     Fri, 25 Aug 00 11:13:12 EDT

Contents:
  question about bootsect.S head.S and setup.S ("Nera")
  Re: Programming /dev/ttyS* in Unix (Josef Moellers)
  Re: question about bootsect.S head.S and setup.S (Josef Moellers)
  Re: Linux server to hold thousands of tcp connections? (Ratz)
  Re: crypt(3) (Andreas Jaeger)
  IO Port Problem ("Michael Zuniga")
  Re: Kernel panic: VFS: (Koch)
  Differenc between gdb and gdbm (Robert Resch)
  jiffies undeclared ("Ram�n Ag�ero")
  Re: Differenc between gdb and gdbm (Kai Stuke)
  Re: Linux driver module question (Andi Kleen)
  Re: Differenc between gdb and gdbm (Robert Resch)
  Re: "Best" x86 Linux C/C++ compiler?? (Marco van de Voort)
  Re: IO Port Problem (Iwo Mergler)
  crazy newbie' s experiements ("Christos Karayiannis")
  Possible Problem with RTL8139 Driver (David Ronis)
  Re: "Best" x86 Linux C/C++ compiler?? (Christopher Browne)
  Re: IO Port Problem ("Michael Zuniga")
  changing video card (Gee)
  Re: "Best" x86 Linux C/C++ compiler?? (Michel TALON)
  Re: Are there any timerLib available ("Robert Colbert")

----------------------------------------------------------------------------

From: "Nera" <[EMAIL PROTECTED]>
Subject: question about bootsect.S head.S and setup.S
Date: Fri, 25 Aug 2000 13:27:47 +0800

Do anyone know what files from the disk have been copied to the memory
during the code of bootsect.S, setup.S and head.S?

Nera



------------------------------

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: Programming /dev/ttyS* in Unix
Date: Fri, 25 Aug 2000 09:07:07 +0200

Mario Klebsch wrote:
> =

> "Pliev" <[EMAIL PROTECTED]> writes:
> =

> >Do you can to say to me, how in Unix (Linux) can to program COM ports
> >(/dev/ttyS*).  Which functions I must to use? I programmed in Win32
> >earlier, and used function CreateFile, WriteFile etc. Which analogs
> >this functions using in Unix.
> =

> What about open(), read(), write(), close() & ioctl()?

Rather than use ioctl(), better use the tcgetattr()/tcsetattr() and
friends.

-- =

Josef M=F6llers (Pinguinpfleger bei FSC)

------------------------------

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: question about bootsect.S head.S and setup.S
Date: Fri, 25 Aug 2000 09:09:23 +0200

Nera wrote:
> =

> Do anyone know what files from the disk have been copied to the memory
> during the code of bootsect.S, setup.S and head.S?

These files get compiled and linked into the kernel. Thus, when the
kernel (as a whole) is copied into memory e.g. by LILO, so will these
files or what they are compiled into.

-- =

Josef M=F6llers (Pinguinpfleger bei FSC)

------------------------------

From: Ratz <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.networking,comp.protocols.tcp-ip
Subject: Re: Linux server to hold thousands of tcp connections?
Date: Fri, 25 Aug 2000 09:35:36 +0200

Dan Harpold wrote:
> 
> If you are hosting 300,000 active sessions on one box, you are taking a big
> risk. You must spread that load across multiple boxes. Just think if you
> _are_ able to spend the time to get it to work, one hardware failure will
> crash all 300,000 connections. You need to have some load balancing and
> redundancy.

...and this can be done with our nice lvs-project for linux. Check it
out at http://www.linuxvirtualserver.org. We would be happy if you could
test it on your setup :)

Regards,
Roberto Nibali, ratz

------------------------------

From: Andreas Jaeger <[EMAIL PROTECTED]>
Subject: Re: crypt(3)
Date: 25 Aug 2000 09:29:28 +0200

>>>>> Fro-Man  writes:

 > On 24 Aug 2000, Andreas Jaeger wrote:
>> >>>>> Fro-Man  writes:

>> > Hopefully this is a simple question:

>> > /* excerpt from man page */
>> >        #define _XOPEN_SOURCE
>> >        #include <unistd.h>

>> >        char *crypt(const char *key, const char *salt);
>> > /* end of excerpt */

>> > The char* that crypt returns, what is it?  Is it malloc()'d memory or
>> > static somewhere?  I have tried compiling it with with free()'ing the
>> > returned pointer, but it segfaults.  If it isn't malloc()'d, where'd it
>> > come from?

>> From Unix98:
>> Upon successful completion, crypt() returns a pointer to the
>> encoded string. The first two characters of the returned value are
>> those of the salt argument.

 > Yes, but that doesn't answer if it was malloc()'d or if it was a static
 > string.  I have since found out it is static, but nothing said that
 > before.  And it seems kind of silly to have a static string in such an
 > instance like this, instead of a malloc()'d one.

crypt changes key in place and returns a pointer to key.  YOU know how
you allocated key.

Andreas
-- 
 Andreas Jaeger
  SuSE Labs [EMAIL PROTECTED]
   private [EMAIL PROTECTED]
    http://www.suse.de/~aj

------------------------------

From: "Michael Zuniga" <[EMAIL PROTECTED]>
Subject: IO Port Problem
Date: Fri, 25 Aug 2000 07:46:55 GMT

Hello everyone.

I am trying to create a device driver for my ATI Mach64 video card. I am
using the XFree86 one as a base. The XFree86 one works (but of course, it is
not a device driver as it runs in user space).

Now to the problem:

Within the device driver, during the probe, I read the value of a port...

tmp = inl(ioSCRATCH_REG0)

then I try to write a different value (0x55555555) to that port and re-read
it to see if it changed. The XFree86 version does this exact same thing and
does so successfully. However, in the device driver version that I have, I
am able to read the port (and I get the same value as XFree86) but I cannot
successfully write the new value.

When I do

outl(ioSCRATCH_REG0, 0x55555555)

then then do inl(ioSCRATCH_REG0), it comes back with the same value as
before, i.e., it appears the outl had no effect. I've also tried outl_p and
I've tried placing a delay (udelay(250)) between the outl and inl, to no
avail.

The value of ioSCRATCH_REG0 is correct (FC80), and the initial value read
from it matchs what I get from the XFree86 version. But I can't write to
this port. Can anyone tell me what I am doing wrong?

I am also having some problems with the BIOS. When I attempt to read 0x10000
bytes from the BIOS (located at 0xC0000), the computer freezes up. When I
attempt to read just 0x4000 bytes, everything works just fine (and I see the
proper signature where I expect to see it, so I know the address is
correct)...

save_flags(flags);
cli();
memcpy_fromio(bios_data, ChipBIOSBase, BIOS_DATA_SIZE);
restore_flags(flags);

where BIOS_DATA_SIZE is defined as 0x10000

changing the value of BIOS_DATA_SIZE to a smaller value works (but of
course, I don't get all of the BIOS memory that I want). Is there some limit
to the amount of data you can read with memcpy_fromio at one time? Do I need
to make multiple calls? Is memcpy_fromio even the proper method to call?

Any help would be appreciated.

-Michael Zuniga







------------------------------

From: [EMAIL PROTECTED] (Koch)
Subject: Re: Kernel panic: VFS:
Date: Fri, 25 Aug 2000 07:40:42 GMT
Reply-To: [EMAIL PROTECTED]

>humm i' had this error and in fact i forgot to check ext2fsextended in my
>kernel ( filesystem)
>if it help you
>psc80

Thank you for your suggestion, but it had been checked in my .config.

koch



------------------------------

From: Robert Resch <[EMAIL PROTECTED]>
Subject: Differenc between gdb and gdbm
Date: Fri, 25 Aug 2000 11:32:02 +0200

Hi!

Does anybody know the difference between gdb and gdbm?

I only know that the gdb is more actual and bigger but what's the real
difference?

Robert Resch

------------------------------

From: "Ram�n Ag�ero" <[EMAIL PROTECTED]>
Subject: jiffies undeclared
Date: Fri, 25 Aug 2000 12:42:45 +0200

    Hi all


    I'm writing a little module for Linux kernel, and when I have tried to
cope with timers, I had a seroius problem with jiffies.

    Everithing works fine, but when I try to get the value of jiffies, I get
a compiling error

    'jiffies_Rsmp_0da02d67' undeclared (first use in this function)

    I am including the sched.h file, so I can't see what I am doing wrong,
could anybody tell me where is the problem...


    Thanks in advance...

    Ram�n



------------------------------

From: Kai Stuke <[EMAIL PROTECTED]>
Subject: Re: Differenc between gdb and gdbm
Date: Fri, 25 Aug 2000 12:54:03 +0200

Robert Resch wrote:
> 
> Hi!
> 
> Does anybody know the difference between gdb and gdbm?

gdb is the Gnu DeBugger and gdbm is the Gnu DataBase Manager.
> 
> I only know that the gdb is more actual and bigger but what's the real
> difference?

They are totally different beasts.

> 
> Robert Resch

Kai

------------------------------

From: Andi Kleen <[EMAIL PROTECTED]>
Subject: Re: Linux driver module question
Date: 25 Aug 2000 12:44:32 +0200

[EMAIL PROTECTED] (Pete Zaitcev) writes:

> Hehe, a witty response! Ed's wording was not very good but I guess
> he asked how to pin down user pages in the way of bp_mapin()
> in Solaris, or some such. I did not answer because the canonical
> answer is "You cannot do that. Use kmalloc() and copy_to_user().".
> This is not the whole story, as some people pushed for DMA
> into a user memory, for instance Werner Almesberger (sp?) did
> something about it in the context of ATM support. Apparently,
> 2.4 is supposed to have some user memory DMA support.
> Also, you can do get_free_pages() than remap this into
> user space with remap_page_range() when user calls mmap(2).
> However, it's only a partial solution.

The standard Linux solution is to implement a mmap() method in your
character driver, allocate the memory in kernel using vmalloc() 
and map that to user space. I don't see why this is only a partial
solution, Pete, unless you have too complex buffering in user space.

About pinning user pages: 

Standard 2.2 does not have a non hackish solution (it is possible, but
not recommended, so I won't describe it), but the 2.4 kernel and most
2.2 kernels currently shipping in distributions [=all that support rawio]
support the kiovec model. With that you do a map_user_kiobuf() and get an 
pinned array of user pages.

I would recommend the mmap() method though.

-Andi

------------------------------

From: Robert Resch <[EMAIL PROTECTED]>
Subject: Re: Differenc between gdb and gdbm
Date: Fri, 25 Aug 2000 13:39:45 +0200

Kai Stuke wrote:
> 
> Robert Resch wrote:
> >
> > Hi!
> >
> > Does anybody know the difference between gdb and gdbm?
> 
> gdb is the Gnu DeBugger and gdbm is the Gnu DataBase Manager.

OOps.... Sorry - now everything is clear to me...

> > I only know that the gdb is more actual and bigger but what's the real
> > difference?
> 
> They are totally different beasts.

Yep - that's right... Thank you!

------------------------------

From: [EMAIL PROTECTED] (Marco van de Voort)
Subject: Re: "Best" x86 Linux C/C++ compiler??
Date: 25 Aug 2000 12:39:25 GMT

In article <[EMAIL PROTECTED]>, Martin von Loewis wrote:
>"H.W. Stockman" <[EMAIL PROTECTED]> writes:
>
>> I'd truly like to see comparable performance.
>
>I believe at the moment, there is no other choice but gcc on
>Linux. With some effort, you may be able to find a copy of lcc, but I
>have no idea which would perform better.
>
>There is also The Portland Group CC, http://www.pgroup.com; I don't
>have any performance information on that compiler, either.

Afaik C++ buider will follow in Q1 next year.


------------------------------

From: Iwo Mergler <[EMAIL PROTECTED]>
Subject: Re: IO Port Problem
Date: Fri, 25 Aug 2000 12:31:49 GMT
Reply-To: [EMAIL PROTECTED]

Michael Zuniga wrote:
> When I do
> 
> outl(ioSCRATCH_REG0, 0x55555555)
> 

If this isn't a typo it is the problem...

The parameters for outl are

void outl(unsigned int value, unsigned short port)

Regards,

Iwo

------------------------------

From: "Christos Karayiannis" <[EMAIL PROTECTED]>
Subject: crazy newbie' s experiements
Date: Fri, 25 Aug 2000 15:43:50 +0300

I am what is used to call a "newbie" in kernel programming. So as normally I
started with "Hello word". I have changed I simple kernel file udp.c from
/usr/src/linux/net/ipv4 and I wrote there:
printk (KERN_EMERG "Hello there\n");
I recompiled the kernel and when I restarted my PC "Hello there" messages
appeared all the time.
My question is  WHAT  HAVE  I  DONE ???
OK seriously now, why is the message appearing continously and without
having send any udp packets ?

                                                    thanks
                                                  Christos



------------------------------

From: David Ronis <[EMAIL PROTECTED]>
Subject: Possible Problem with RTL8139 Driver
Date: Fri, 25 Aug 2000 13:30:16 GMT


I recently changed the ethernet card on an i586-linux-2.2.16-gnu box
to a SMC EZ card (Model No. SMC1211TX), and rebuilt the kernel to use
the rtl8139 driver (as a module with no special options).  Things
work, however I get system oops every couple of days, often triggered
when large amounts of data get transferred to or from the machine.
Nothing else was changed on the machine, which was very stable stable
before.

The system log and ksymoops output is given below and do not directly
point to the rtl8139.

David


Aug 21 10:52:22 boltzmann kernel: Unable to handle kernel paging request at virtual 
address 02000048
Aug 21 10:52:22 boltzmann kernel: current->tss.cr3 = 00101000, Lr3 = 00101000
Aug 21 10:52:22 boltzmann kernel: *pde = 00000000
Aug 21 10:52:22 boltzmann kernel: Oops: 0002
Aug 21 10:52:22 boltzmann kernel: CPU:    0
Aug 21 10:52:22 boltzmann kernel: EIP:    0010:[<c011d379>]
Aug 21 10:52:22 boltzmann kernel: EFLAGS: 00010202
Aug 21 10:52:22 boltzmann kernel: eax: 0004ace0   ebx: c0242730   ecx: 00000002   edx: 
02000000
Aug 21 10:52:22 boltzmann kernel: esi: 00001207   edi: 00000002   ebp: 00000030   esp: 
c2fc3f6c
Aug 21 10:52:22 boltzmann kernel: ds: 0018   es: 0018   ss: 0018
Aug 21 10:52:22 boltzmann kernel: Process kswapd (pid: 5, process nr: 5, 
stackpage=c2fc3000)
Aug 21 10:52:22 boltzmann kernel: Stack: 00000003 00000030 c0110213 c2fc3fac fffffc18 
c0122fc9 00000002 00000030 
Aug 21 10:52:22 boltzmann kernel:        c01e2640 00000000 c2fc2000 00000000 c01e2640 
00000000 00000000 00000002 
Aug 21 10:52:22 boltzmann kernel:        00000000 00000020 c2fc2000 00000000 c2fc4000 
c0123174 00000030 c01e263c 
Aug 21 10:52:22 boltzmann kernel: Call Trace: [<c0110213>] [<c0122fc9>] [<c0123174>] 
[<c012315d>] [<c010678b>] [<c0106794>] 
Aug 21 10:52:22 boltzmann kernel: Code: ff 4a 48 39 5a 78 75 05 8b 03 89 42 78 8b 13 
85 d2 74 06 8b 

>>EIP; c011d379 <shrink_mmap+16d/1c0>   <=====
Trace; c0110213 <schedule+14b/284>
Trace; c0122fc9 <do_try_to_free_pages+59/198>
Trace; c0123174 <kswapd+6c/c4>
Trace; c012315d <kswapd+55/c4>
Trace; c010678b <kernel_thread+1f/38>
Trace; c0106794 <kernel_thread+28/38>
Code;  c011d379 <shrink_mmap+16d/1c0>
00000000 <_EIP>:
Code;  c011d379 <shrink_mmap+16d/1c0>   <=====
   0:   ff 4a 48          decl   0x48(%edx)   <=====
Code;  c011d37c <shrink_mmap+170/1c0>
   3:   39 5a 78          cmpl   %ebx,0x78(%edx)
Code;  c011d37f <shrink_mmap+173/1c0>
   6:   75 05             jne    d <_EIP+0xd> c011d386 <shrink_mmap+17a/1c0>
Code;  c011d381 <shrink_mmap+175/1c0>
   8:   8b 03             movl   (%ebx),%eax
Code;  c011d383 <shrink_mmap+177/1c0>
   a:   89 42 78          movl   %eax,0x78(%edx)
Code;  c011d386 <shrink_mmap+17a/1c0>
   d:   8b 13             movl   (%ebx),%edx
Code;  c011d388 <shrink_mmap+17c/1c0>
   f:   85 d2             testl  %edx,%edx
Code;  c011d38a <shrink_mmap+17e/1c0>
  11:   74 06             je     19 <_EIP+0x19> c011d392 <shrink_mmap+186/1c0>
Code;  c011d38c <shrink_mmap+180/1c0>
  13:   8b 00             movl   (%eax),%eax

------------------------------

From: [EMAIL PROTECTED] (Christopher Browne)
Subject: Re: "Best" x86 Linux C/C++ compiler??
Reply-To: [EMAIL PROTECTED]
Date: Fri, 25 Aug 2000 13:31:23 GMT

Centuries ago, Nostradamus foresaw a time when Marco van de Voort would say:
>In article <[EMAIL PROTECTED]>, Martin von Loewis wrote:
>>"H.W. Stockman" <[EMAIL PROTECTED]> writes:
>>
>>> I'd truly like to see comparable performance.
>>
>>I believe at the moment, there is no other choice but gcc on
>>Linux. With some effort, you may be able to find a copy of lcc, but I
>>have no idea which would perform better.
>>
>>There is also The Portland Group CC, http://www.pgroup.com; I don't
>>have any performance information on that compiler, either.
>
>Afaik C++ buider will follow in Q1 next year.

Keep in mind that Linux is an operating system kernel that runs on IA-32,
IA-64, Alpha, Sparc, PowerPC, PA-RISC, StrongARM, MIPS, and other
architectures.

A compiler that cannot generate code for at least that set of platforms
is crippled, only really applicable to specially targeted embedded
applications.
-- 
[EMAIL PROTECTED] - <http://www.hex.net/~cbbrowne/>
"Are  we  worried about  Linux?  ... Sure  we  are  worried." 
-- Steve Ballmer, VP of MICROS~1 at Seybold publishing conference

------------------------------

From: "Michael Zuniga" <[EMAIL PROTECTED]>
Subject: Re: IO Port Problem
Date: Fri, 25 Aug 2000 13:50:54 GMT

Iwo,

Thanks a bunch. No, it wasn't a typo, and using the API correctly does
wonderful things for the code. The XFree86 code has their own versions of
inx and outx, written in asmmacros.h, and I am using the standard asm/io.h.
The XFree86 code use the other order for the arguements, and I didn't even
think to check it. It's right there in the header and also in the Linux
Device Drivers book.

-Michael Zuniga

Iwo Mergler <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Michael Zuniga wrote:
> > When I do
> >
> > outl(ioSCRATCH_REG0, 0x55555555)
> >
>
> If this isn't a typo it is the problem...
>
> The parameters for outl are
>
> void outl(unsigned int value, unsigned short port)
>
> Regards,
>
> Iwo



------------------------------

From: Gee <[EMAIL PROTECTED]>
Subject: changing video card
Date: Fri, 25 Aug 2000 09:56:38 -0400

Hi, I changed my video card from a 4 meg ATI to a 8 meg Matrox G200.  I
reran the xf86config and selected the correct video card, but now when I
try to startX it's still looking for the old video card...

what should I change??

thanks

Gee


------------------------------

From: Michel TALON <[EMAIL PROTECTED]>
Subject: Re: "Best" x86 Linux C/C++ compiler??
Date: Fri, 25 Aug 2000 16:07:39 +0200

Christopher Browne <[EMAIL PROTECTED]> wrote:
: Centuries ago, Nostradamus foresaw a time when Marco van de Voort would say:
:>In article <[EMAIL PROTECTED]>, Martin von Loewis wrote:
:>>"H.W. Stockman" <[EMAIL PROTECTED]> writes:
:>>
:>>> I'd truly like to see comparable performance.
:>>
:>>I believe at the moment, there is no other choice but gcc on
:>>Linux. With some effort, you may be able to find a copy of lcc, but I
:>>have no idea which would perform better.
:>>
:>>There is also The Portland Group CC, http://www.pgroup.com; I don't
:>>have any performance information on that compiler, either.
:>
:>Afaik C++ buider will follow in Q1 next year.

: Keep in mind that Linux is an operating system kernel that runs on IA-32,
: IA-64, Alpha, Sparc, PowerPC, PA-RISC, StrongARM, MIPS, and other
: architectures.

: A compiler that cannot generate code for at least that set of platforms
: is crippled, only really applicable to specially targeted embedded
: applications.

This is a very OS-centric view. There are people who use a compiler to compile
useful (for them) non embedded programs, for example scientific computations.
They don't bother one second wether the compiler supports Sparc or StrongARM.

But they are very concerned when they discover that the same program compiled
with Digital compiler for Alpha runs 7 times faster than when compiled with
gcc. Or more prosaically they want a compiler producing good code for the
IA-32 architecture. It happens that the Portland compiler produces faster 
executables than gcc, in that case.

-- 

Michel TALON


------------------------------

From: "Robert Colbert" <[EMAIL PROTECTED]>
Subject: Re: Are there any timerLib available
Date: Fri, 25 Aug 2000 07:38:11 -0700

Look at the API for timeout(). Keep in mind that, within your callback, you
can call timeout() again to have the "event" recur. I have not yet
encountered one that will set up a tick on a heartbeat, but that doesn't
mean that one doesn't exist.

CreateEvent and the like do have analogous calls in the Posix Threads
library (pthread). Have a look in pthread.h or do a "man pthread_create" to
get started reading more about them.

--
-Rob Colbert ([EMAIL PROTECTED])
"If you see a rider frowning at the end of a ride, they brought it with them
and couldn't get rid of it."

<[EMAIL PROTECTED]> wrote in message news:8m9ddv$shv$[EMAIL PROTECTED]...
> I am looking for timeLib for linux basically looking at function that
> windows provide like SetTimer, or vxworks posix timer_connect or
> timer_create etc. Also event based calls like CreateEvent etc.



------------------------------


** 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
******************************

Reply via email to