Linux-Development-Sys Digest #646, Volume #8 Sun, 15 Apr 01 23:13:10 EDT
Contents:
Modifier keys in X ("David Allen")
Re: gdm killed mysteriously? ("Martin Miller")
Module development question (parport related) ("Martin Miller")
Re: ide_cs or ide-cs or what? (Konstantinos Agouros)
Re: Memory caching (Kasper Dupont)
Re: ioctl return value (Kasper Dupont)
Re: what is the use of empty_8042 in setup.S (Kasper Dupont)
Re: Module development question (parport related) (Kasper Dupont)
Re: Need your recommendation for a full-featured text editor ("David Ehrens")
Re: New directions for kernel development (Brent R)
Re: New directions for kernel development (Brent R)
Basic question about PCI device drivers ("Slawek Grajewski")
Re: Module development question (parport related) ("Martin Miller")
I just found that there is a ppdev driver in 2.4 - Any example out there on how to
use it ? ("Martin Miller")
Problem compiling PHP 4 to work properly. ("Mark D")
Re: Need your recommendation for a full-featured text editor ("J. E. Garrott Sr")
----------------------------------------------------------------------------
From: "David Allen" <[EMAIL PROTECTED]>
Subject: Modifier keys in X
Crossposted-To: comp.windows.x
Date: Sun, 15 Apr 2001 06:25:50 GMT
I read in the Xlib documentation that in every KeyPressEvent, the state
field holds the modifiers pressed when that KeyPressEvent happened.
>From the manpage of XSetModifierMapping and also from documentation, it
seems there are a total of 8 possible modifier masks, which are all
(1L<<1), (1L<<2), (1L<<3) etc. These get logical OR'd with the state.
My question is, how do you tell which bit to set in the state field given
a modifier? I've tried mappings several different ways, and it seems when
I use an Alt Gr key (XK_Mode_switch) xev always reports that it makes the
state field 0x2000, *regardless* of which slot in the XModifierKeymap it
holds. If I use the xmodmap file for a german keyboard, Mode_switch ends up
in slot 4, which is usually Mod2Mask. If I use another remapping program
like xkeycaps, it ends up in slot 7, usually Mod5Mask. *Regardless* of
which slot it's in, xev reports a state of 0x2000 when Alt Gr is pressed
with a character.
I thought that the state had basically the nth bit set where n was the
slot number. Also, 0x2000 is logical OR'ing 0 with 1L<<13, and there aren't
13 slots in the modifier map.
What gives? How are these values computed? Any help would be appreciated.
--
David Allen
http://opop.nols.com/
------------------------------
From: "Martin Miller" <[EMAIL PROTECTED]>
Subject: Re: gdm killed mysteriously?
Date: Sun, 15 Apr 2001 06:51:42 GMT
In article <9au3ui$95f$[EMAIL PROTECTED]>, "Crystal Luo"
<[EMAIL PROTECTED]> wrote:
When you change your system runlevel as specified by the other
reply you receive, check your system logs for errors.
I made an error in /etc/modules.conf one day, and it was what caused
gdm to kill himself.
Maybe you have a similar problem
> Dear all,
>
> This is urgent! I can boot Linux Redhat 7.0 up to the level that I can
> see "MyComputerName: login. But then the gnome desktop won't be shown,
> and I get flickering screen and the message:
>
> According to /var/run/gdm.pid, gdm was already running (xxxxpid), but
> seems to have been murdered mysteriously.
>
> Possible to fix it?
>
> I urgently need to do something on this platform. Please help me. Thank
> you very much.
>
> Crystal
>
>
>
>
------------------------------
From: "Martin Miller" <[EMAIL PROTECTED]>
Subject: Module development question (parport related)
Date: Sun, 15 Apr 2001 07:11:24 GMT
Hi,
I'm a newbie trying to learn the linux kernel, and as such I want to
write a kernel driver for a device I have.
The device is using the printer port, and I have to use EPP to
communicate with it. I tried to communicate with it using the ports
directly but it did not work, as I thought. ;-(
Here is what I want to do, and I think that it would work:
1. write a kernel module that will be controled by ioctls by a process.
2. this module needs to communicate with the device, wich is
connected thru the printer port on 0x378.
Thinking about it, and because I don't know much about this kind of
programmation, I would like to use the parport functions inside my
module, to send and receive data to/from the device.
I would like to find a good example on how to use the parport functions
in a module, and if possible that this example also use the EPP mode
to communicate with his device.
Anyways, I would apreciate suggestions and tricks on this subject because
I don't know what I should do (inits and such) to use this mode of
communication. Will the parport module do all the work in the enanced EPP
mode and I don't have to worry about it ?
Thank you for your comments!
PS.: I've found docs on modules writing so I know about that. I'm using
kernel 2.2.19 and 2.4.3 (in case there is changes in parport you want to
tell me about ;-)
--
Martin Miller
Sex the Unix way:
# unzip ; strip ; touch ; finger ; mount ; fsck ; more ; yes ; umount ; sleep
------------------------------
From: [EMAIL PROTECTED] (Konstantinos Agouros)
Subject: Re: ide_cs or ide-cs or what?
Date: 15 Apr 2001 11:00:27 +0200
In <774C6.7820$[EMAIL PROTECTED]> Harmon Seaver
<[EMAIL PROTECTED]> writes:
> I can't seem to get my pcmcia reader to work with flash cards under
>2.4.3 -- it can't find the ide_cs.o module, although that should be compiled
>as a module. I see elsewhere mention of a problem with the /etc/pcmcia/config
>having ide_cs.o (like it always was) and the new kernels do it as
>ide-cs.o -- so anyway I tried it both ways but no go. What is going
>on with this?
Do You get it to power up? Mine just does time out. Although I played with
the setup_delay parameter for pcmcia_core.
Konstantin
>--
>Harmon Seaver, MLIS
>CyberShamanix
>Work 920-203-9633 [EMAIL PROTECTED]
>Home 920-233-5820 [EMAIL PROTECTED]
--
Dipl-Inf. Konstantin Agouros aka Elwood Blues. Internet: [EMAIL PROTECTED]
Otkerstr. 28, 81547 Muenchen, Germany. Tel +49 89 69370185
============================================================================
"Captain, this ship will not sustain the forming of the cosmos." B'Elana Torres
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Memory caching
Date: Sun, 15 Apr 2001 09:38:54 +0000
Trevor Hemsley wrote:
>
> On Fri, 13 Apr 2001 14:50:27, "Ryan Storgaard"
> <[EMAIL PROTECTED]> wrote:
>
> > After booting my system, I periodically ran free &/or meminfo and you will
> > notice it starts off with lots free, and then declines... Is this normal?
>
> Yes.
>
> The memory is free until it is used. It's either used for loading a
> program into or for a program's use. Or it's used as a file cache.
> When you first boot you haven't read many files so not much is used as
> a file cache. Nor have you used much to load programs. The longer you
> run, the more files you read and the more they get cached in that
> memory that was marked as free. Now it's not free, it's used for file
> caching.
>
> --
> Trevor Hemsley, Brighton, UK.
> [EMAIL PROTECTED]
In most cases the amount of free memory will decrease
while the system is in use and then stop at a few MB.
In some cases the amount of free memory can actually
increase. If a program has been keeping large data
structures in memory and terminates or otherwise free
the memory it will not instantly be used for cache.
You can flush the cache and swap almost everything out
by callocing the size of the physical memory.
--
Kasper Dupont
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: ioctl return value
Date: Sun, 15 Apr 2001 10:01:36 +0000
Daniele Ziglioli wrote:
>
> If wish return the error code directly,
> not in the errno var.
>
> I verified that, for example, the value -10000
> is passed directly to the caller.
> A value of -2, -3, etc. are all coverted in -1.
>
> I suppose that a filter translate any error code in -1
> and than store the user error code in the errno.
>
> There is a way the starting point of user definable
> error code ?
>
> What is the rigtht way to return an user defined error code in
> a iocl device routine ?
>
> Where can I found in the kernel tree the ioctl syscall ?
>
> _______________________________
> Daniele Ziglioli
> Signal s.r.l.
> [EMAIL PROTECTED]
> _______________________________
The errno variable, and all the functions write, read,
ioctl and so on are implemented by glibc which is a
library used by almost all userspace programs.
The functions are runing in userspace and you can easily
write your own replacements, which does not use the
errno variable.
The functions basically call just calls int 0x80 with
the right syscall number and the suplied arguments. The
kernel will then dispatch acording to the syscall number
and call one of the functions sys_write, sys_read,
sys_ioctl and so on. On return the glibc function will
set the errno variable and return -1 if an error occured,
otherwise return the returnvalue from the kernel.
The code below shows how the glibc code for ioctl()
could look, change as needed.
#include <linux/vt.h>
#include <asm/unistd.h>
#include <errno.h>
#include <stdio.h>
int ioctl(int fd,int request,unsigned long arg)
{
long res;
__asm__ volatile ("int $0x80" :
"=a" (res) :
"a" (__NR_ioctl), "b" ((long)(fd)),
"c" ((long)(request)), "d" ((long)(arg))
);
if ((unsigned long)(res) >= (unsigned long)(-125)) {
errno = -res;
return -1;
}
return (int) res;
}
int main()
{
if (ioctl(0,VT_ACTIVATE,1)) perror("VT_ACTIVATE");
return 0;
}
--
Kasper Dupont
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: what is the use of empty_8042 in setup.S
Date: Sun, 15 Apr 2001 10:16:42 +0000
hushui wrote:
>
> In setup.S ,the following codes is initializing keybord or wait for input
> ???
> .........
> ! that was painless, now we enable A20
> call empty_8042
> mov al,#0xD1 ! command write
> out #0x64,al
> call empty_8042
> mov al,#0xDF ! A20 on
> out #0x60,al
> call empty_8042
> ......
> What is command line ??
> Is it like /proc/cmdline ??
> Thank you .Sorry for my poor english.
This is a clasical example of the way backward
compatibility leads to bad hardware design.
All intel and compatible 286 and newer CPUs
have an input line switching a special 8086
compatibility feature on and off. In one
setting the system is 8086 compatible, but
can use only the first 1 MB of the physical
address space. In the other mode all memory
can be used, but you will loose a litle bit
of compatibility.
It would be nice to be able to control this
line in some way, hardwiring it to one of
the to setings was not wanted.
The 8042 keyboard controler has a software
controlable output line that was not yet
used for anything. The designers choosed to
use this output to control the line to this
line also known as the A20 control line,
becuase it is basically just anded to the
value sended on the A20 line on the system
bus.
So even though this is done through the
keyboard controller it has nothing to do
with the keyboard.
I was chocked when I first realized that
all PC's actually work that way.
--
Kasper Dupont
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Module development question (parport related)
Date: Sun, 15 Apr 2001 10:26:39 +0000
Martin Miller wrote:
>
> The device is using the printer port, and I have to use EPP to
> communicate with it. I tried to communicate with it using the ports
> directly but it did not work, as I thought. ;-(
>
You should be able to use the ports directly from
userspace, and I think it will be easier to start
that way.
In order for this to work from userspace you must
first get permitions for the IO ports. This could
look something like this:
#define BASEPORT 0x378 /* lp1 */
int main()
{
/* Get access to the ports */
if (ioperm(BASEPORT, 8, 1)) {perror("ioperm"); exit(1);}
/* Insert your code here */
}
Also verify the BIOS settings, on some computers
you will have to enter BIOS setup and change the
parallel port setting to EPP.
Also try reading the Linux I/O port programming
mini-HOWTO.
You cannot do DMA or receive interrupts from
userspace, but you can use EPP without any of
theese.
--
Kasper Dupont
------------------------------
From: "David Ehrens" <[EMAIL PROTECTED]>
Crossposted-To:
alt.comp.shareware.programmer,comp.editors,comp.lang.java.help,comp.lang.java.programmer,comp.lang.java.softwaretools,comp.os.linux.advocacy
Subject: Re: Need your recommendation for a full-featured text editor
Date: Sun, 15 Apr 2001 17:06:21 GMT
Please see the following for the theology of editors:
http://www.dina.kvl.dk/~abraham/religion/
Read and repent!
------------------------------
From: Brent R <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.advocacy,comp.os.linux.development
Subject: Re: New directions for kernel development
Date: Sun, 15 Apr 2001 19:15:11 GMT
R Smith wrote:
>
> "Arthur H. Gold" wrote:
> >
> > [Bogus] Linus Torvalds wrote:
> > >
> > > Hi all,
> > >
> > [snip]
> > >
> > > Thank you,
> > > --Linus Torvalds
> >
> > Looks to me that you're about ten days late. That doesn't
> > even work on the Julian calendar.
> >
>
> I'm sure the stupid fuckwit typed as fast as he could.
It was funny because it was true.
--
- Brent
http://rotten168.home.att.net
------------------------------
From: Brent R <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.advocacy,comp.os.linux.development
Subject: Re: New directions for kernel development
Date: Sun, 15 Apr 2001 19:16:05 GMT
ChromeDome wrote:
>
> Brent R wrote:
> >
> > Linus Torvalds wrote:
> > >
> > > Hi all,
> > >
> > > Recently, I've been thinking a lot about where Linux development
>
> <snip,snip,snip>
>
> > > Thank you,
> > > --Linus Torvalds
> >
> > ROFL.
> >
> > It's sad but true.
> >
> > --
> > - Brent
>
> And you felt compelled to quote the entire @!#$% message for that one
> little inane comment? See signature below.
Yeah, just to rub it in your face a little more.
--
- Brent
http://rotten168.home.att.net
------------------------------
From: "Slawek Grajewski" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.networking
Subject: Basic question about PCI device drivers
Date: Sun, 15 Apr 2001 21:19:43 +0200
Hello,
I'm looking at various network card drivers and have the following question.
I know that after the PCI card completes the frame reception via DMA, it
signals that condition with an interrupt. The interrupt service routine,
notices that and pushes the frame into the upper layers by calling
netif_rx() function.
My question is: what happens that after DMA operation to given physical
page, performed by a network card, CPU does not have to invalidate its cache
for this particular page, and (as I se in various device drivers) sees the
right data (data actually written by network card). Since DMA is performed
by a different processor (card adapter), there must be some way of
invalidating (synchronizing) the cache for that page in the main CPU.
Otherwise, the main CPU could possibly use the stale contents of its cache
for that page, not affected by the DMA transfer.
I see three possibilities, but I don't know which is true:
a. network buffers (alloc_skb()) are in non-cached memory,
b. CPU invalidates the cache before accessing the frame,
c. CPU cache is automatically updated by hardware (so that its view is
always coherent).
Can someone explain it to me?
TIA,
Slawek
------------------------------
From: "Martin Miller" <[EMAIL PROTECTED]>
Subject: Re: Module development question (parport related)
Date: Sun, 15 Apr 2001 20:33:03 GMT
In article <[EMAIL PROTECTED]>, "Kasper Dupont"
<[EMAIL PROTECTED]> wrote:
That's exactly what I've tried (but I did not check my bios settings).
Could it be possible that the device (a mp3 player) works only in EPP ?
I don't think I would be that difficult to do it in a module using
parport. I just need an example to show me how to initialise that mode,
and when I'll know how to send/receive commands, it would be as easy
as the direct port method.
Thanks for your help!
> You should be able to use the ports directly from userspace, and I think
> it will be easier to start that way.
>
> In order for this to work from userspace you must first get permitions
> for the IO ports. This could look something like this:
>
> #define BASEPORT 0x378 /* lp1 */
> int main()
> {
> /* Get access to the ports */
> if (ioperm(BASEPORT, 8, 1)) {perror("ioperm"); exit(1);} /* Insert
> your code here */
> }
>
> Also verify the BIOS settings, on some computers you will have to enter
> BIOS setup and change the parallel port setting to EPP.
>
> Also try reading the Linux I/O port programming mini-HOWTO.
>
> You cannot do DMA or receive interrupts from userspace, but you can use
> EPP without any of theese.
------------------------------
From: "Martin Miller" <[EMAIL PROTECTED]>
Subject: I just found that there is a ppdev driver in 2.4 - Any example out there on
how to use it ?
Date: Sun, 15 Apr 2001 23:25:16 GMT
I just found out that there is a driver that I could use in user-space !
it's ppdev in kernel 2.4 ; Does anyone here know an example of a
program that use it to communicate in EPP mode ?
thanks,
Martin Miller
------------------------------
From: "Mark D" <[EMAIL PROTECTED]>
Subject: Problem compiling PHP 4 to work properly.
Date: Sun, 15 Apr 2001 21:29:17 +0800
I have a very annoying problem when I try to compile and run PHP 4.
I compile with the following options.
rm config.cache
./configure --with-apxs --with-imap --with-pgsql --without-mysql --without-k
erberos
make clean
make
make install
When I try to fire up Apache, I get the following error
Starting httpd: Syntax error on line 872 of /etc/httpd/conf/httpd.conf:
Cannot load /etc/httpd/modules/libphp4.so into server:
/etc/httpd/modules/libphp4.so: undefined symbol: gss_mech_krb5
I have loaded all the krb5 rpms, rebuilt the php from scratch, etc, but I
cannot get rid of this error.
Any ideas?
Regards
Mark
------------------------------
From: "J. E. Garrott Sr" <[EMAIL PROTECTED]>
Crossposted-To:
alt.comp.shareware.programmer,comp.editors,comp.lang.java.help,comp.lang.java.programmer,comp.lang.java.softwaretools,comp.os.linux.advocacy
Subject: Re: Need your recommendation for a full-featured text editor
Date: Sun, 15 Apr 2001 18:43:06 -0700
David Ehrens wrote:
>
> Please see the following for the theology of editors:
>
> http://www.dina.kvl.dk/~abraham/religion/
>
> Read and repent!
Cute. But I still like vim. :)
John
------------------------------
** 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
******************************