On Fri, 28 Jan 2005 [EMAIL PROTECTED] wrote:

I want to develop a device driver that would allow access to board
registers and memory that is addressable
on the system bus.  The reason for this is to allow hardware developers to
access board registers while the system
is running to determine what is wrong with a board. The problem I'm having
is attempting to determine if an address
is addressable and would not cause a system panic when accessing. I'm
looking for functions similar to the

From within the kernel, on Intel machines, all addresses that are
mapped (using ioremap_nocache()) are addressable even if there is
no hardware at that address. It cannot cause a system panic. A
read from non-existent hardware will simply return a value with
all bits set (0xffffffff for a size_t). A write will go to
hyper-space, doing nothing.

verify_access for user addresses, or if that is not available a method to
determine that an address fault in the
kernel is actually due to a bad board address being used.


There will be no such faults. You to use ioremap_nocache() first. Remember to iounmap() when you are through.

The driver has a user program that allows the hardware developers to peek
and poke at address locations.
So it is possible for them to mistype the address.

Thank you in advance for your help.


If the access is through a port (in and out instructions), you don't have to do anything, ports are always available in kernel space.


BBBBUUUTTT! If you write to somebody else's address-space like a hard-disk controller, you can destroy all your data requiring a complete re-installation of everything. That's why what you want to do is NOT what you should do.

You need to have a competent programmer make a driver and
its attendant test-program to thoroughly test your board(s)
with no possibility of somebody entering wrong information.

Jeff Fellin
RFL Electronics
[EMAIL PROTECTED]
973 334-3100, x 327

Cheers, Dick Johnson Penguin : Linux version 2.6.10 on an i686 machine (5537.79 BogoMips). Notice : All mail here is now cached for review by Dictator Bush. 98.36% of all statistics are fiction. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Reply via email to