Memory access
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
Em Tue, Jul 03, 2001 at 04:45:32PM +0200, Guillaume Lancelin escreveu:
Quoted 11 lines
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
Quoted 4 lines · Guillaume Lancelin
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.
Quoted 8 lines
[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
Quoted 4 lines · Guillaume Lancelin
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.
Quoted 8 lines
[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
Quoted 12 lines · 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.
Quoted 2 lines
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