linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Memory access
@ 2001-07-03 14:45 Guillaume Lancelin
  2001-07-03 14:51 ` Arnaldo Carvalho de Melo
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Guillaume Lancelin @ 2001-07-03 14:45 UTC (permalink / raw)
  To: linux-kernel

Writing a device driver for a IO card, I have the following message from
the kernel:
Unable to handle kernel paging request at virtual address 000d0804.
[then it gives the register values]
Segmentation fault."

This address (0xd0804) is the location of a "mailbox" reserved by the IO
card, and from which commands are passed to the card.

My question: is the kernel using or protecting this area of the memory,
and is there a way to deprotect it??? (how dangerous!)

Thanks
Guillaume



_______________________________________________________________
Do You Yahoo!?
Yahoo! Messenger: Comunicación instantánea gratis con tu gente -
http://messenger.yahoo.es

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Memory access
  2001-07-03 14:45 Memory access Guillaume Lancelin
@ 2001-07-03 14:51 ` Arnaldo Carvalho de Melo
  2001-07-03 14:54 ` Brian Gerst
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2001-07-03 14:51 UTC (permalink / raw)
  To: Guillaume Lancelin; +Cc: linux-kernel

Em Tue, Jul 03, 2001 at 04:45:32PM +0200, Guillaume Lancelin escreveu:
> Writing a device driver for a IO card, I have the following message from
> the kernel:
> Unable to handle kernel paging request at virtual address 000d0804.
> [then it gives the register values]
> Segmentation fault."
> 
> This address (0xd0804) is the location of a "mailbox" reserved by the IO
> card, and from which commands are passed to the card.
> 
> My question: is the kernel using or protecting this area of the memory,
> and is there a way to deprotect it??? (how dangerous!)

are you accessing it directly? read Documentation/IO-mapping.txt

- Arnaldo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Memory access
  2001-07-03 14:45 Memory access Guillaume Lancelin
  2001-07-03 14:51 ` Arnaldo Carvalho de Melo
@ 2001-07-03 14:54 ` Brian Gerst
  2001-07-03 14:56 ` Eli Carter
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Brian Gerst @ 2001-07-03 14:54 UTC (permalink / raw)
  To: Guillaume Lancelin; +Cc: linux-kernel

Guillaume Lancelin wrote:
> 
> Writing a device driver for a IO card, I have the following message from
> the kernel:
> Unable to handle kernel paging request at virtual address 000d0804.
> [then it gives the register values]
> Segmentation fault."
> 
> This address (0xd0804) is the location of a "mailbox" reserved by the IO
> card, and from which commands are passed to the card.
> 
> My question: is the kernel using or protecting this area of the memory,
> and is there a way to deprotect it??? (how dangerous!)

Use ioremap()

--

				Brian Gerst

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Memory access
  2001-07-03 14:45 Memory access Guillaume Lancelin
  2001-07-03 14:51 ` Arnaldo Carvalho de Melo
  2001-07-03 14:54 ` Brian Gerst
@ 2001-07-03 14:56 ` Eli Carter
  2001-07-03 14:57 ` Richard B. Johnson
  2001-07-03 15:33 ` Alan Cox
  4 siblings, 0 replies; 6+ messages in thread
From: Eli Carter @ 2001-07-03 14:56 UTC (permalink / raw)
  To: Guillaume Lancelin; +Cc: linux-kernel

Guillaume Lancelin wrote:
> 
> Writing a device driver for a IO card, I have the following message from
> the kernel:
> Unable to handle kernel paging request at virtual address 000d0804.
> [then it gives the register values]
> Segmentation fault."
> 
> This address (0xd0804) is the location of a "mailbox" reserved by the IO
> card, and from which commands are passed to the card.
> 
> My question: is the kernel using or protecting this area of the memory,
> and is there a way to deprotect it??? (how dangerous!)

Sounds like you may want to look into ioremap() and maybe buy Linux
Device Drivers by Rubini (O'Reilly).

Have fun!

Eli 
-----------------------.   No wonder we didn't get this right first time
Eli Carter             |      through. It's not really all that horribly 
eli.carter(at)inet.com `- complicated, but the _details_ kill you. Linus

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Memory access
  2001-07-03 14:45 Memory access Guillaume Lancelin
                   ` (2 preceding siblings ...)
  2001-07-03 14:56 ` Eli Carter
@ 2001-07-03 14:57 ` Richard B. Johnson
  2001-07-03 15:33 ` Alan Cox
  4 siblings, 0 replies; 6+ messages in thread
From: Richard B. Johnson @ 2001-07-03 14:57 UTC (permalink / raw)
  To: Guillaume Lancelin; +Cc: linux-kernel

On Tue, 3 Jul 2001, [iso-8859-1] Guillaume Lancelin wrote:

> Writing a device driver for a IO card, I have the following message from
> the kernel:
> Unable to handle kernel paging request at virtual address 000d0804.
> [then it gives the register values]
> Segmentation fault."
> 
> This address (0xd0804) is the location of a "mailbox" reserved by the IO
> card, and from which commands are passed to the card.
> 
> My question: is the kernel using or protecting this area of the memory,
> and is there a way to deprotect it??? (how dangerous!)
> 

This is not the correct address!! The addresses in the kernel are
virtual addresses, you need to execute ioremap(0xd0804, LENGTH) to
get the correct virtual address for access.

Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).

    I was going to compile a list of innovations that could be
    attributed to Microsoft. Once I realized that Ctrl-Alt-Del
    was handled in the BIOS, I found that there aren't any.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Memory access
  2001-07-03 14:45 Memory access Guillaume Lancelin
                   ` (3 preceding siblings ...)
  2001-07-03 14:57 ` Richard B. Johnson
@ 2001-07-03 15:33 ` Alan Cox
  4 siblings, 0 replies; 6+ messages in thread
From: Alan Cox @ 2001-07-03 15:33 UTC (permalink / raw)
  To: Guillaume Lancelin; +Cc: linux-kernel

> My question: is the kernel using or protecting this area of the memory,
> and is there a way to deprotect it??? (how dangerous!)

The kernel maps ISA space at different addresses. What address and how it is
accessed depends on the CPU and system

	isa_readb/readw/readl(addr)
	isa/writeb/writew/writel(value,addr)

to read/write 8,16,32 bit values 


	

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-07-03 15:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-03 14:45 Memory access Guillaume Lancelin
2001-07-03 14:51 ` Arnaldo Carvalho de Melo
2001-07-03 14:54 ` Brian Gerst
2001-07-03 14:56 ` Eli Carter
2001-07-03 14:57 ` Richard B. Johnson
2001-07-03 15:33 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).