Linux-Development-Sys Digest #684, Volume #7     Fri, 17 Mar 00 03:13:11 EST

Contents:
  inw() use... (Sebastien Guillemin)
  Re: How to test a device driver (Pjtg0707)
  Re: g77 warning: multiple common of   �******� (Toon Moene)
  Re: Solaris DDI and Linux ([EMAIL PROTECTED])
  cpu time (Jeremy Schofield)
  Re: cpu time (Kaz Kylheku)
  Re: How to test a device driver ("Norm Dresner")
  Re: GFX Getting Pointer To Screen Mem (Nate Eldredge)
  Re: cpu time (Juergen Heinzl)
  IBM evangelist Simon Phibbs muses on the role of Java, XML and Linux for the Web's 
future (Simone Paddock)
  Re: Absolute failure of Linux dead ahead? (Bill Godfrey)
  Re: kernel in C++ ("AliMac")
  Kernel timer ("Aurelie Fonteny")
  Re: kernel in C++ (Kaz Kylheku)
  Re: Kernel timer (Kaz Kylheku)
  mmap PCI I/O registers ([EMAIL PROTECTED])
  ACTIVE MEMORY EDITING...NEED HELP ("Syntax")
  Re: How to test a device driver (Ron Reeder)
  Tempfile management guide... (Elmo)
  Re: PGCC and nasm (W R Carr)
  Re: Device Driver Developer Wanted (WiseGuy)
  Re: NIC's promisc mode (WiseGuy)

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

From: Sebastien Guillemin <[EMAIL PROTECTED]>
Subject: inw() use...
Date: Thu, 16 Mar 2000 18:09:18 +0000

Hi,

I'm just trying to use the inw() function but when I compile my code,
gcc send me some undefined references due to the use of this function.

I'm quite new to linux : do I need to add something in gcc cmd line in
order for this function to work ? does it require a special library to
be given to the linker ?

Cheers and sorry if my question seems a bit newbie (it surely does ;-)),

        Seb

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

From: [EMAIL PROTECTED] (Pjtg0707)
Subject: Re: How to test a device driver
Reply-To: [EMAIL PROTECTED]
Date: Thu, 16 Mar 2000 19:29:22 GMT

On Thu, 16 Mar 2000 09:46:37 -0800, Limin Zhang <[EMAIL PROTECTED]> wrote:
>Hello!
>
>Can some body tell me how to test a device driver like"scull" described
>in the book by Rubini? In other words, I do not know how to communicate
>with the driver. Thanks.
>
>Limin

I'd like to know that too. I kept compiler warnings trying to compile his codes
as well.

>

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

From: Toon Moene <[EMAIL PROTECTED]>
Crossposted-To: comp.lang.fortran
Subject: Re: g77 warning: multiple common of   �******�
Date: Thu, 16 Mar 2000 20:34:40 +0100

Li Long wrote:

> otherwise I get
> /tmp/ccpcbcqK.o: warning: multiple common of `oppar_'
> /tmp/ccAqSW6R.o: warning: previous common is here
> 
> I use SuSe linux 6.1 g77 v0.5.24. May it is a problem of suse linux
> fortran compiler, as point out
> by Toon Moene ([EMAIL PROTECTED]) in this group.
> 
> If these warning messages are not harmful, it seems so, how can I get
> rid of it.

well, that's the rub - and that's why I'm particularly dissappointed
about SuSE's treatment of Fortran users:  You can't.

You cannot override the -warn-commons option passed to the linker (at
least I cannot think of a way to do so).

Cheers,

-- 
Toon Moene ([EMAIL PROTECTED])
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Phone: +31 346 214290; Fax: +31 346 214286
GNU Fortran: http://gcc.gnu.org/onlinedocs/g77_news.html

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

Subject: Re: Solaris DDI and Linux
From: [EMAIL PROTECTED]
Date: 16 Mar 2000 20:10:14 +0100

"Michael" <[EMAIL PROTECTED]> writes:

Hi Michael,

> 
> I have an app that was originally written for Solaris.  I would like to port
> it ASAP but it uses Solaris functionality called DDI.  Is there a Linux

Device Driver Interface

> version?  Other than that, where could I find out more about DDI to either
> recreate DDI in Linux or rewrite the offending code.

Hmm - probably not an easy job...

You can find out more about Solaris DDI on
http://docs.sun.com:80/ab2/coll.571.1/COSREFMAN9DDI/@Ab2PageView/407?DwebQuery=DDI&Ab2Lang=C&Ab2Enc=iso-8859-1

Have fun,
Jens.
-- 
+---[ Jens Elkner ]------[ IVS, Otto-von-Guericke-Universitaet Magdeburg ]-+
| Walther-Rathenau-Str. 58            [EMAIL PROTECTED]       |
| 39104 Magdeburg   GERMANY       http://ivs.cs.uni-magdeburg.de/~elkner/  |
+--------------------------------------------------------------------------+

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

From: Jeremy Schofield <[EMAIL PROTECTED]>
Subject: cpu time
Date: Thu, 16 Mar 2000 14:12:55 -0500

        Hello, I realize this is probably a general unix question,
but does anyone know the system call accessible from C to get
the CPU time and percent CPU usage taken by a process?
I've been using "gettimeofday", which only gives elapsed
wall clock time. I'd prefer to do things this way
rather than using the "time" command.
        Any guidance greatly appreciated.
-- 
Jeremy Schofield 
Chemical Physics Theory Group       telephone: 416-978-4376
Department of Chemistry             fax:       416-978-8775
University of Toronto
Toronto, Ontario M5S 3H6
Canada                          email: [EMAIL PROTECTED]

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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: cpu time
Reply-To: [EMAIL PROTECTED]
Date: Thu, 16 Mar 2000 21:01:37 GMT

On Thu, 16 Mar 2000 14:12:55 -0500, Jeremy Schofield
<[EMAIL PROTECTED]> wrote:
>       Hello, I realize this is probably a general unix question,
>but does anyone know the system call accessible from C to get
>the CPU time and percent CPU usage taken by a process?
>I've been using "gettimeofday", which only gives elapsed
>wall clock time. I'd prefer to do things this way
>rather than using the "time" command.

I think you want times(2).

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

Reply-To: "Norm Dresner" <[EMAIL PROTECTED]>
From: "Norm Dresner" <[EMAIL PROTECTED]>
Subject: Re: How to test a device driver
Date: Thu, 16 Mar 2000 21:37:07 GMT

Rubini tells you how to do it in the book.  He suggests using dd or cp for
"testing" (really exercising) most of his "drivers".
    Norm
Limin Zhang <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hello!
>
> Can some body tell me how to test a device driver like"scull" described
> in the book by Rubini? In other words, I do not know how to communicate
> with the driver. Thanks.
>
> Limin
>


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

From: Nate Eldredge <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: GFX Getting Pointer To Screen Mem
Date: 16 Mar 2000 13:58:45 -0800

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

> Hi, could anyone point me to any info/source on getting access to VRAM under
> LinuxPPC or RedHat for PC in text mode and under X Window?
> I have tried to access the RAM using the vga address (0xB0000000) while I
> was in 256 colours, but that wasn't it, because it caused a segmentation
> fault.
> I have experience in C under MacOS and DOS, but just ANSI-pansy text stuff
> under Linux, so snippets of source would be great.

In text mode (i.e. on the console): Get and install svgalib.  It will
map the video ram into your memory space, among other things.  You can
read the source if you want to find out how it's done.  (Very
complicated because Linux runs in protected mode (so normal processes
can't screw with the kernel, the hardware, or each other) and has a
flat memory model (no more segment:offset or far pointers)).

Under X: AFAIK, you basically can't.  Here the video memory is solely
the domain of the X server.  However, I believe the MIT-SHM extension
will give you something that looks like a framebuffer that you can
draw to.  You'll have to do more research here, as I've not done any X
programming to speak of.

-- 

Nate Eldredge
[EMAIL PROTECTED]

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

From: [EMAIL PROTECTED] (Juergen Heinzl)
Subject: Re: cpu time
Date: Thu, 16 Mar 2000 22:30:33 GMT

In article <[EMAIL PROTECTED]>, Jeremy Schofield wrote:
>       Hello, I realize this is probably a general unix question,
>but does anyone know the system call accessible from C to get
>the CPU time and percent CPU usage taken by a process?
>I've been using "gettimeofday", which only gives elapsed
>wall clock time. I'd prefer to do things this way
>rather than using the "time" command.
[...]
getrusage() might help.

Cheers,
Juergen

-- 
\ Real name     : J�rgen Heinzl                 \       no flames      /
 \ EMail Private : [EMAIL PROTECTED] \ send money instead /

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

From: [EMAIL PROTECTED] (Simone Paddock)
Crossposted-To: 
comp.os.linux.development.apps,comp.os.linux.hardware,comp.os.linux.misc,comp.os.linux.networking,comp.os.linux.setup,comp.os.linux.x
Subject: IBM evangelist Simon Phibbs muses on the role of Java, XML and Linux for the 
Web's future
Reply-To: [EMAIL PROTECTED]
Date: Thu, 16 Mar 2000 22:54:24 GMT

Hi all,

There's an interview with Simon Phibbs, IBM's Java and XML 
evangelist on the O'Reilly site.

Check it out:
http://conferences.oreilly.com/java/news/phipps_0300.html

You can hear him talk more about "Why the Web Works" 
at the O'Reilly Conference on Java. 
http://conferences.oreilly.com/java/


Simone Paddock
O'Reilly & Associates
simone at oreilly dot com
www.oreilly.com

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

From: Bill Godfrey <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.advocacy
Subject: Re: Absolute failure of Linux dead ahead?
Date: 16 Mar 2000 23:08:17 +0000
Reply-To: [EMAIL PROTECTED]

"Joseph T. Adams" <[EMAIL PROTECTED]> writes:

> Indeed, I hope (and am reasonably certain) that Moore's Law will make
> it possible and beneficial to start to do at least some kinds of
> system work in a language much safer than C.

Use a standard library where time_t is a 64 bit signed integer (the new
C standard requires such an integer type) and keep using C. No need to
change languages. 

Bill, enniuum.

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

From: "AliMac" <[EMAIL PROTECTED]>
Subject: Re: kernel in C++
Date: Thu, 16 Mar 2000 23:43:46 GMT


Saurabh Shrivastava <"Saurabh Shrivastava"@efi.com> wrote in message
news:[EMAIL PROTECTED]...
> hi everybody,
>               people say, kernel cant be written in C++. Is it true ?

1. Macros do exsist in C to add wrappers around struct defs.
2. Messages and processes should be the same structure.
3. One global hierachial name space should be used.
4. The kernal should only support
        new
        destroy
        start
        stop
    and all other functionality should be done by .so modules autoloading as
virtual device drivers.
5. (*virt)() typing inside structures provides inheritance, along with nice
macros for naming functions.
6. Excess virtuality is slow.
7. Who actually uses bitfields in C?
8. People drive poluting cars!
9. gcc k-tools?
10. Every point list needs ten items :)

[EMAIL PROTECTED]




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

From: "Aurelie Fonteny" <[EMAIL PROTECTED]>
Subject: Kernel timer
Date: Thu, 16 Mar 2000 17:21:20 -0600

I'm triing to schedule a routine to work when a timer expires in a module.
Here is part of my function :
I know there is something wrong, so could you please tell me where or could
you please give me another way to simply call a routine when a timer
expires? Or if you have any example working for kernel 2.2, this would help
a lot.
Thanks.


- - - - -  - - - - - - - - - - - - - - -
struct timer_list jiq_timer;
struct jiq_data_struct jiq_data;

int function1(char *buf)
{
jiq_data.nb = 0;
jiq_data.buf = buf;
init_timer(&jiq_timer);
jiq_timer.function = function2;
jiq_timer.data = (unsigned long)&jiq_data;
jiq_timer.expires = jiffies + HZ;
add_timer(&jiq_timer);

return;
}

void function2 (unsigned long ptr)
{
struct jiq_data_struct *data = (struct jiq_data_struct *)ptr;
char *buf = data->buf;
int *nb = data->nb;
printk("<1> Hello World\n");
}



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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: kernel in C++
Reply-To: [EMAIL PROTECTED]
Date: Fri, 17 Mar 2000 00:14:38 GMT

On Thu, 16 Mar 2000 23:43:46 GMT, AliMac <[EMAIL PROTECTED]> wrote:
>
>Saurabh Shrivastava <"Saurabh Shrivastava"@efi.com> wrote in message
>news:[EMAIL PROTECTED]...
>> hi everybody,
>>               people say, kernel cant be written in C++. Is it true ?
>
>1. Macros do exsist in C to add wrappers around struct defs.
>2. Messages and processes should be the same structure.
>3. One global hierachial name space should be used.
>4. The kernal should only support

4.a kernal should be spelled kernel. ;)

>        new
>        destroy
>        start
>        stop
>    and all other functionality should be done by .so modules autoloading as
>virtual device drivers.

Except these drivers have no way to call anything useful in their host
because it only provides new, destroy, start, stop. ;)

>5. (*virt)() typing inside structures provides inheritance, along with nice
>macros for naming functions.
>6. Excess virtuality is slow.
>7. Who actually uses bitfields in C?

I use them in C as well as C++. C++ allows you to define a bitfield of type
bool of width 1, which neatly provides compact storage for flags.

-- 
#exclude <windows.h>

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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: Kernel timer
Reply-To: [EMAIL PROTECTED]
Date: Fri, 17 Mar 2000 00:16:39 GMT

On Thu, 16 Mar 2000 17:21:20 -0600, Aurelie Fonteny <[EMAIL PROTECTED]>
rote:
>I'm triing to schedule a routine to work when a timer expires in a module.
>Here is part of my function :
>I know there is something wrong, so could you please tell me where or could
>you please give me another way to simply call a routine when a timer
>expires? Or if you have any example working for kernel 2.2, this would help
>a lot.

Did you forget to delete the timers as part of module shutdown?

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

From: [EMAIL PROTECTED]
Subject: mmap PCI I/O registers
Date: Fri, 17 Mar 2000 00:25:09 GMT

I have a device driver that uses mmap to allow an application to access
some 8-bit PCI I/O registers (0x100 bytes).  Read/write the registers
works fine inside the driver (inb/outb), but the user application does
not seem to have access via the address returned by my mmap.  There are
no failures or errors returned.  The base address of the PCI region is
low (0x2400).  I use the following inside my mmap function:

remap_page_range(vma->vm_start, (vma->vm_offset + map_addr), map_size,
vma->vm_page_prot);

where:
map_addr = 0x2400;  (physical address from PCI base_address array)
map_size = 0x100;

The address returned to the application makes sense (0x40014000), but
certainly does not provide access to the registers.  I tried adding
PAGE_OFFSET to the map_addr as well, but no luck.  Any clues?


Sent via Deja.com http://www.deja.com/
Before you buy.

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

From: "Syntax" <[EMAIL PROTECTED]>
Subject: ACTIVE MEMORY EDITING...NEED HELP
Date: Fri, 17 Mar 2000 04:31:03 GMT

I wish to learn how to edit memory in a active process...
basically this is my goal..

have a program loop a

printf("%d\n",x);

where x is a number.

i want to find the memory address in memory and change the value of x so
that it will print a different number. while the program is running of
course.
basically a very simple beginning to a "program trainer"

i am aware that memory is located in /dev/kmem,  the trick is i have no clue
on how to search through it, advanced topics such as active memory editing
are very hard to find on the internet...especially under linux..for windows
it is a tad easier because i know the special functions for it. but linux i
am a bit confused..

I am a pretty good at programming so don't worry about getting technical
with the answer..also any URLs would be appreciated also...infact any
information to guide me in the right direction would be nice...
Thanx everybody.

-Lucas
 [EMAIL PROTECTED]



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

From: Ron Reeder <[EMAIL PROTECTED]>
Subject: Re: How to test a device driver
Date: Thu, 16 Mar 2000 21:39:46 -0700

Yes,

I just tried to do a make after downloading the examples from
www.ora.com website. No  got... Lotsa compiler warnings because I guess
they've moved to using lotsa typdefs (instead of just int) and the
current struct... is now a macro pointing to a function call.  The code
WAS only tested on 2.1.x kernls and I was attempting to compile under RH
6.1  2,2.12-20

If anyone knows of an updated link.....  I'd love to know what it is.

Then again... doing the research to update the code would teach me a
lot.... Then again.... I've got things to do and would rather have the
working samples.



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

From: Elmo <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development
Subject: Tempfile management guide...
Date: Fri, 17 Mar 2000 01:21:23 -0500

I wrote a no-bull guide to temp file management and coding under unix.
All comments welcome... http://www.philtered.net/techsupport.phtml
-elmo

-- 

Elmo Recio; Philadelphia, PA 19103; USA
http://polywog.philtered.net
Sociology/Philosophy student at Drexel Univ

The Digital Millenium Copyright Act: Just one more example 
of greedy multinationals shovelling the entrails of the poor 
and disenfranchised into the unslakable maw of the corporate 
fat cats.

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

From: W R Carr <[EMAIL PROTECTED]>
Subject: Re: PGCC and nasm
Date: Fri, 17 Mar 2000 01:03:02 -0600

On 16 Mar 2000 04:14:43 GMT, [EMAIL PROTECTED] (Horst
von Brand) wrote:

>On Wed, 15 Mar 2000 08:12:11 -0600, W R Carr <[EMAIL PROTECTED]> wrote:
>>I've recompiled gcc-2.95.2 with the patches to make it pgcc-2.95.3.
>>It works just fine EXCEPT, that the GNU assembler (as)  says that
>>"prefetch" is an invalid instruction for a K6-III.
>
>What binutils are you using? Maybe 2.9.5.0.x (from
>ftp://ftp.varesearch.com/pub/support/hjl/binutils/) knows about this?


Thanks...I'll try that.  My binutils are 2.9.1.

Ray


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

From: [EMAIL PROTECTED] (WiseGuy)
Subject: Re: Device Driver Developer Wanted
Date: 17 Mar 2000 06:37:41 GMT
Reply-To: no.one@all

On Sat, 04 Mar 2000 02:38:40 GMT, Brian <[EMAIL PROTECTED]> wrote:
>I have an exceptional opportunity for someone who has experience with
>Unix or Linux display driver development.
>
>This is a "WORK FROM HOME" full time position with my client, which is a
>leading Software Company 
>specializing in the development of device drivers.
>You will work with some of the best developers in the industry as well
>as with some of the top companies in the high technology community.
>You will earn a full time salary and benefits, while working in your own
>home.
>

The problem here is that "full time salary with benefits" statement.  The
people out there who are skilled enough to do a professional job of driver
development see FTE relationships as more to the benefit of the company
and less of a benefit to the programmer.  If you want the best and 
brightest then accept the fact that you're going to have to pay them
straight time and materials!

WORK FROM HOME...Yeah right!  So will you stand behind me when I claim my
home office as a legitimate tax deduction and get audited because the IRS
says I'm your employee and you should be providing me with work space?
What about workmans comp. insurance?  The Fed. recently passed a ruling
exempting companies from liability when their employees tele-commute.  Yet
another example of business lobbyists using the governemnt to stick it
to the workers.

-Wiseguy



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

From: [EMAIL PROTECTED] (WiseGuy)
Subject: Re: NIC's promisc mode
Date: 17 Mar 2000 06:57:35 GMT
Reply-To: no.one@all

On Fri, 25 Feb 2000 22:11:03 -0500, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>hi, all.
>       there is a new way to set network interface card to promisc mode
>in the linux kernel 2.2 and above. but my program looks did not work.
>why? maybe you can help me.
>
>i called setsockopt to set , and it return 0, meanes ok. but when i use
>ifconfig command , it is still in  MULTICAST mode.
>

I could be mistaken but I'm thinking that running a NIC card in promisc
mode doesn't gain you anything anymore.  The reason being that most
of todays network fabrics are based on switches instead of hubs.  A switch,
by its nature only passes traffic to a port when the MAC address of the
packet matches that of the destination NIC, or if it's a broadcast packet.
So, wouldn't using promisc mode to intercept traffic on a segment require 
that you be on an (unswitched) segment?

But then, what legitimate uses are there for promisc mode anyway?

-Wiseguy



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


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