Linux-Development-Sys Digest #648, Volume #6     Fri, 23 Apr 99 21:13:51 EDT

Contents:
  Re: HELP PLEASE: ioremap/mmap/vma_operations?? (Keith Brown)
  Re: The UNIX GUI Manifesto (David M. Cook)
  Re: physical Memory (Christophe KUMSTA)
  Re: How to create a boot sector? Documentation of ld86/as86? (Josef 
=?iso-8859-1?Q?M=F6llers?=)
  Re: Make my own System call? (Gordon Scott)
  Re: problems with parport and 2.2.6 (Igor Zlatkovic)
  Re: Problems with traffic shape (root)
  Re: GLP License Question? (Paul Kimoto)
  Re: Templates ([EMAIL PROTECTED])
  Re: Took one guy 3 days, another 1 day, me 1 hour...
  Attempting to write PCI code (Violently)
  Re: Port I/O with Linux (David Warren)
  Re: Any Comments About GTK and G++/CygWin for Cross Platform Development (Robert 
Wuest)

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

From: Keith Brown <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: HELP PLEASE: ioremap/mmap/vma_operations??
Date: Wed, 21 Apr 1999 14:47:54 +0000

jeff wrote:
> 
> Hi All,
> I am sure this has been probably answered before... I am a beginner
> programmer (coming from the h/w design world..) so some of these kernel
> calls are not very clear to me... I am trying to understand how all
> these calls relate to each other:
> 
> I believe 'ioremap' is used by the kernel driver module to map a devices
> control registers (i.e. pci device control registers)...right?
> 
> I think 'mmap' is equivalent of 'ioremap' at the user space level.
> right?  But what about vma_operations (i.e, open, close). Is this needed
> before an application program can use 'mmap' call??
> 
> My goal is to write a PCI device driver which has it is control
> registers memory mapped. I would like to map these to kernel space by
> 'ioremap' (I think) and then use 'mmap' in the user application program
> to access to these register (I think)... But when do I use the
> vma_operations?? Am I on the right track??
> 

On my end, it didn't look like you got any answers, and I can't really
help except on 'mmap'. There is a man page on it, BTW. 'mmap' simply
maps a file or portions of a file into virtual memory address space with
protections if desired, or can be used to reserve a range of memory
addresses with protections. 'mmap' can be called at any time.

I *can* point you to a couple of books I've seen that might help: An ORA
book titled something like "Writing Linux Device Drivers", and a book
from another publisher titled something like "The Linux Kernel Book".
You may also check the Linux Documentation Project web page at
http://www.ssc.com/linux/LDP/index.html

-- 
 _    _                ___   __    ________________________________
| |  (_)_ _ _  ___ __ |_  ) /  \  | Keith Brown [EMAIL PROTECTED]    |\
| |__| | ' \ || \ \ /  / / | () | | http://web.wt.net/~bahalana    |\
|____|_|_||_\_,_/_\_\ /___(_)__/  |________________________________|\
   THE SOURCE IS OUT THERE....     \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

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

From: [EMAIL PROTECTED] (David M. Cook)
Crossposted-To: alt.os.linux
Subject: Re: The UNIX GUI Manifesto
Date: Fri, 23 Apr 1999 10:27:27 GMT

On Thu, 22 Apr 1999 17:35:44 -0400, Jethro Wright III <[EMAIL PROTECTED]> wrote:

>    Don't know if anyone's interested, but I just did a bit of
>compelling reading at: http://www.cybtrans.com/infostrc/unixgui.htm

I find these kind of essays where the author rants on and on about the CLI
unix culture being a hindrance to Progress to be really, really, tiresome.
No one is stopping these people from turning their ideas into Linux code,
yet they prefer to torture us with their verbiage instead.

Dave Cook
-- 
No Linux for you!

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

From: Christophe KUMSTA <[EMAIL PROTECTED]>
Subject: Re: physical Memory
Date: Wed, 21 Apr 1999 15:19:05 +0000

[EMAIL PROTECTED] wrote:
> 
> Moin,
> 
> I have a PCI-Card with busmaster-DMA. I programed the address with the
> following lines:
> 
>    unsigned long *dmabuf;
> 
>    dmabuf = (unsigned long *) malloc(4096);
>    SIOREG(0x08) = (unsigned log) dmabuf;
> 
> Because it do not work, I think, that the address from the malloc() function
> is not a physical address.

void *phys_to_virt(long address) ;
long  virt_to_phys(void *address) ;

> 
> How can I get the reel address of an page in unser-memory and how can I made
> that this page will not be swapped.
> 
> Thanks

Hi,(I do BusMaster with our PCI card)

First thing : I think that malloc is not a good thing for busmaster ,
cause the kernel allocation is done by pages which are not always
contiguous physical addresses !!!

You should limit the memory usage of linux by 
'mem=48M' for exemple if you have 64Mo of RAM.
Then you use the upper 16Mo for your busmaster.
This solution give you a fixed physical address (0x03000000)
then you remap in user space this address :

fdmem = open("/dev/mem",O_RDONLY) ;
MyVirtAddr = (char
*)mmap(0,MemorySize,PROT_READ,MAP_SHARED,fdmem,MyPhysAddr) ;


if it's a kernel level appli ( like module )

MyVirtAddr = (char *)ioremap(MyPhysAddr,MemorySize) ; /* for kernel >=
2.2.0 */
----> don't forget iounmap ...
or

MyVirtAddr = (char *)phys_to_virt(MyPhysAddr) ; /* for kernel < 2.2.0 */

Good Luck.

-- KUMSTA Christophe
-- <[EMAIL PROTECTED]>
-- real-time system developper
-- RT-Linux (Use the source luke)

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

From: Josef =?iso-8859-1?Q?M=F6llers?= <[EMAIL PROTECTED]>
Subject: Re: How to create a boot sector? Documentation of ld86/as86?
Date: Fri, 23 Apr 1999 08:52:13 +0200

Adrian 'Dagurashibanipal' von Bidder wrote:
> =

> Hi!
> =

> I'm trying to write a bootloader which should read a kernel from a
> serial port (sort of 'serial remote boot').
> =

> I suppose I would write the biest with as86 and link it with ld86 -
> but I can't find the documentation on these tools - there seems to
> be not even a manpage (in my SuSE installation, at least).
> Also an info file or such on the syntax of the as86 assembler would
> be nice (seems to be a modified intel-style syntax to me).
> =

> Perhaps anybody would tell me at least how to invoke as86/ld86 so
> that I can install the resulting executable with lilo as either
> image=3D/kernel/bla or other=3D/kernel/bla
> =

> The way I tried (without any special command arguments) the ld86
> linker seems to generate some header.

Look at the lilo generation stuff. It's somewhere on tsx-11.mit.edu.

Josef
-- =

PS Die hier dargestellte Meinung ist die persoenliche Meinung des
Autors!
PS This article reflects the autor=B4s personal views only!

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

From: [EMAIL PROTECTED] (Gordon Scott)
Subject: Re: Make my own System call?
Date: 23 Apr 1999 11:24:49 GMT
Reply-To: Gordon Scott <[EMAIL PROTECTED]>

Dongwon Lee ([EMAIL PROTECTED]) wrote:
: Hi!
: I wanna make my own system call like read or write
: How can I make it
: I have some information about it but not detail
: Someone know about it , Please let me know , I really appreciate that.

There's some stuff on the in the Module Programmers Guide in the
Linux Documentation Project.

You could also consider whether for your application you might be able
to interpret existing system calls appropriately for your module.
I'm presuming a module as your system call presumable has to talk
with some hardware or something. If not, see the Kernel Hacker's Guide
at the same place.

G.
--
Gordon Scott             Opinions expressed are my own.
[EMAIL PROTECTED]   (official)     [EMAIL PROTECTED]  (backdoor)
[EMAIL PROTECTED]  (home)         http://www.apis.demon.co.uk
Linux  ...............   Because I like to _get_ there today.

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

From: Igor Zlatkovic <[EMAIL PROTECTED]>
Subject: Re: problems with parport and 2.2.6
Date: Fri, 23 Apr 1999 11:59:25 +0000

[EMAIL PROTECTED] wrote:

> ...  I can see from kernel boot messages and
> /proc/parport/0/autoprobe that the printer gets detected and returns ...

What does /proc/parport/0/devices say?
It should say "lp". If it doesn�t, you have the parralel port functioning,
but you forgot to compile in the parallel printer support .

--
      o
     O       Cheers,
  ______O___
  \________/   Igor Zlatkovic
   \   o  /    mailto:[EMAIL PROTECTED]
    \ O  /
     \  /
      \/       Student at the
      ||       University of Applied Sciences
   ___||___    Frankfurt, Germany, EU.




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

From: root <[EMAIL PROTECTED]>
Subject: Re: Problems with traffic shape
Date: Fri, 23 Apr 1999 12:54:02 +0200

Mikko Hyvarinen wrote:
> =

> "Bernat Ginard Llad=F3" wrote:
> >
> > I'm trying the traffic shape kernel utility with a Fast Ethernet
> > card but when I try to configure it with the utility shapecfg it
> > complains with Operation not permited.
> >
> > I'm interested in know the reliability of the utility and if it is
> > stable enough to use it how to configure it.
> =

> Documentation/networking/shaper.txt quite clearly states that the modul=
e
> works reliably only up to 256Kbit/sec.
> =

> -Mikko Hyv=E4rinen

I've read the Documentation/networking/shaper.txt but when I try to
configure
it with shapecfg attach shape0 eth0 it complains with:
shaper: Operation not supported by device
I have the shaper configured as a module and I load it before.
What's the problem?

Thanks

Bernat


___________________________
Bernat Ginard

[EMAIL PROTECTED]
__________________________

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

From: [EMAIL PROTECTED] (Paul Kimoto)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: GLP License Question?
Date: 23 Apr 1999 15:01:42 -0500
Reply-To: [EMAIL PROTECTED]

[This is not a system matter.  Followups redirected.]

In article <7fq7tc$9i2$[EMAIL PROTECTED]>, Alan Williams wrote:
> If I release some software I have written under the gpl, am I (as the 
> author) [allowed] to redistribute it under any other license at a later time 
> (including using it in commercial software)?

Yes, but the situation may be different if anyone else helps you (e.g.,
you accept patches), since then you are not the sole author.

-- 
Paul Kimoto             <[EMAIL PROTECTED]>

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

From: [EMAIL PROTECTED]
Crossposted-To: 
alt.os.linux,comp.lang.c++,comp.os.linux.development.apps,comp.unix.programmer,comp.unix.questions,gnu.g++.help,gnu.gcc.help,alt.linux
Subject: Re: Templates
Date: 22 Apr 1999 14:44:05 GMT

In alt.os.linux Arthur Rabatin <[EMAIL PROTECTED]> wrote:

Newsgroups: alt.linux,alt.os.linux,comp.lang.c++,
comp.os.linux.development.apps,comp.os.linux.development.system,
comp.unix.programmer,comp.unix.questions,gnu.g++.help,gnu.gcc.help

:>Andrew Eiler wrote:
:>> Or include the cc file at the bottom header file. The only issue you run into

:>Although even Stroustrup uses this as example, 

<SNIP><SNIP>

CHRIST!!!
Are you quite sure you crossposted this *off-topic* posting to enough totally
irrelevant newsgroups??? Oh NO! I think you missed
comp.os.linux.hardware and alt.beer!!!
How about rec.games.quake and alt.fan.beatles???

Keep the C++-discussions to C++-newsgroups!

<Flame withheld with great effort!>
Haha!

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

From: <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.advocacy
Subject: Re: Took one guy 3 days, another 1 day, me 1 hour...
Date: Thu, 22 Apr 1999 18:24:17 -0400

I was just thinking since I might install Linux one of these days...  What
pieces of information are necessary to know during Linux installation?  This
would help a lot so I don't have to go running when I install it.  Thanks a
lot.

Charlie Ebert wrote in message <[EMAIL PROTECTED]>...
>RHS Linux User wrote:
>
>> Rupert Said the following:
>>
>> >This marks the end of my first week with Linux.
>> >
>> >First, let me state:  This is not a troll.  I am going to criticize
>> >Linux, but not bash it.  I have a great deal of respect for it and the
>> >enormous amount of effort so may have put in to developing and
advocating
>> >it.
>> >
>> >I am a long time NT user and fan, and before that a big Mac guy -- ever
>> >since they first came out.  I am a programmer, database developer, and
>> >web application developer.  I am not a "newbie", but I'm not a hard-core
>> >geek either.  My experience with Unix thus far has been using it lightly
>> >to serve Perl scripts through an ISP years ago.
>> >
>> >I also believe MS's days are numbered.  Their core philosophies are old-
>> >hat and the world is changing.  I do believe a publicly owned OS as
Linux
>> >is will ultimately be the end of MS's reign -- it's pretty obvious Gates
>> >lacks the ability to really shift his way of thinking to the degree
>> >necessary.  I do not believe that Linux will be the answer, because for
>> >it to be would require it appeal to the mainstream of users out there,
>> >not a small segment of geeks and sysadmins.
>> >
>> >It has taken me a full week to even get Linux installed and operating
>> >correctly with my machine's hardware.  The network card itself took 3
>> >days and calling a Unix geek friend of mine over who ultimately found a
>> >solution so esoteric that I would have never been able to find it.  The
>> >phrase, "God this sucks" was muttered many many times.  Even trying to
>> >get the desired color depth, resolution, and refresh rate from my
monitor
>> >was scary.
>> >
>> >
>> >-RS
>>
>> I can understand you point of view.  It would be really disappointing if
>> I were want to install this really great operating system and have it
working
>> in one day so I could play.  It took me several days to install my
version of
>> Linux too.   Hell, it took me a week to put OS/2 on one of my machines
also.
>> However the point I want to make is I was pretty sure that it would take
time
>> to load this operating system.  People who also loaded it up before me
>> warned me that it wouldn't be that easy.  Especially since I never put
such
>> a complicated piece of code on my computer before.  One friend told me it
would
>> be a great learning experience that it would be well worth the effort.
And
>> he was right.  I also bugged him alot too about setting up my machine
before
>> do the installation, he is rather a well experience with Unix.
>>
>> If you must, be pissed, get mad, hate Linux.  But remember this you
probably
>> know alittle more about operating systems and how they work with
computers.
>> The MAC os and Windows may make setting up real easy for you and you can
play,
>> you really don't learn about what you are doing with your computer.  Any
idiot
>> can set up a Windows machine, they even do it for you if you buy a
pre-installed
>> machine.
>>
>> The experience can be bad or good.  It's up to you how you wish to look
at it.
>>
>>                         John
>
>I don't understand folks.  You must be installing slackware.
>I remember when I tried slackware two years ago it took me 2 weeks to get
everthing
>set up.
>But in the process I learned a whole lot about LINUX.  A whole lot.
>
>Today I have a copy of RedHat 5.2 on my machine.
>It took me about 1 hour to install and it got everything right on the first
try.
>
>I don't think this is an issue anymore.  RedHat has such a superior install
it's
>silly.
>And further, everything they put on their release has been tested
thoroughly so you
>have
>less chance of running into problems.
>
>It's like $12 over at best buy.  And it's certainly a NT killer.
>
>I also read in here something about having to re-boot linux one to install
>software.
>What?  I've never had to re-boot linux to install software.  Not since I
installed
>RedHat have
>I personally had to do that.
>
>Applix required NO re-boot.
>Cad Cam program had no re-boot.
>None of my editors did.
>
>There is no re-boot necessary with Linux on an install?
>What did you guys install which required a re-boot anyway?
>
>
>Charlie
>
>




  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
    http://www.newsfeeds.com/       The Largest Usenet Servers in the World!
=========== Over 72,000 Groups, Plus    Dedicated  Binaries Servers ==========

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

From: [EMAIL PROTECTED] (Violently)
Subject: Attempting to write PCI code
Date: Fri, 23 Apr 1999 20:27:52 GMT
Reply-To: [EMAIL PROTECTED]

Hi,

I'm trying to write a user executable program that queries the PCI bus
(yes , I knowthey already exist), and am trying to find out which
archive libs I have to include to get functions like "pcibios_present"
to work ...

Thanks..
^..^ Violently's Web ^..^
http://www.violently.com

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

From: David Warren <[EMAIL PROTECTED]>
Subject: Re: Port I/O with Linux
Date: Fri, 23 Apr 1999 18:13:05 +0000

Matthias Mueller wrote:

> Hi all
>
> my question:
>
>   How can I do Port I/O under Linux?
>
> A friend developed a special PC-Card to control
> external hardware. The system communicates with
> the card via the IN and OUT assembly commands.
>
> - Under MS DOS, he just uses the 80x86 commands
>   IN and OUT.
> - Under Windows NT, there is a special driver
>   "GenPort" coming with the Driver-Development-Kit
>   to do Port I/O
>
> - How do I control hardware under Linux?
>
> Please send hints to mailto:[EMAIL PROTECTED]
>
>   Thanks in advance!
>
>   Matthew

If the port is under 0x3ff you can use the ioperm() call to give
yourself permission and then use the inb()/outb() calls to do the IO.
The iopl() call will change the processor mode and allow you to access
all IO ports.   (It also lets you do bad things like turn off interrupts
or halt the CPU...)

There is an IOPort-HOWTO that explains all this with examples.

If you want a simplified example of a driver that doesn't have to deal
with interrupts or DMAs or other such issues I would recommend checking
out the joystick driver module; it is pretty cut and dried...

-Dave.



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

From: Robert Wuest <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Any Comments About GTK and G++/CygWin for Cross Platform Development
Date: Fri, 23 Apr 1999 19:58:21 +0000

Jethro Wright III wrote:
> 
>     Folks:  I'm a newbie, but I'm definitely sold on this Linux
> stuf.  I'm exploring cross-platform development options and would
> like to use G++ on both sides of the Linux/Windows world.  This
> means CygWin (or possibly mingW32) and I'd like to know what the
> real-world thinks about doing such things, especially WRT GTK.  If
> you have other suggestions/real-world comments about libs/frameworks
> that could get the job done, pls feel free to chime in.

CygWin worked pretty well for me on a project once on a commandline
program.  I never got development going the other way, though (windows
compiler for linux).

You should seriously look at using QT, though, since it is both a Linux
and Windows GUI.  There are other GUIs that are cross platform, V,
wxwindows and twin (is that a dev lib?) are all I can think of off the
top of my head, but QT is currently the most popular.  And it is real
good.  I don't think current versions for windows are free, however.

Robert

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


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