running diagnostics application in user space to test hardware:



we are trying write diagnostics application in user space. the criteria
for the diagnostics

is that the testing should be done in user space as much as possible.
and we need to run the application on top of linux. cpu is powerPC.

memory test. how do you implement memory test from user space. If
it's done in user

space, there are only 2 options. The first option is using mmap but
with mmap option, how

do you know which area of memories are availble for testig, and which
ones are used by

other processes and kernels. The other option is to test memory using
the virtual address

returned by malloc. But this way, when you have a failure, how do you
know which physical

memory location is faulty? In both cases, do we need to be concerned
with paging?


2. do you also use mmap to access PCI device, pretty much the same way
that you use

mmap to access physical memory?


3. For certain hardware such as FE, the buffer address required by the
hardware has to

be in physical address form. From user space, malloc returns virtual
address. How do you

convert this to physical address so that it can be used by the
hardware. Also, how do you

ensure that no pagin occurs.
4. last but not least. Interrupt. I think you mentioned this to me when
we met. Do we

implement kernel driver to handle hardware interrupt? This driver will
dispatch interrupt

to the user app??


thank you in advance

.



Relevant Pages

  • Re: + edac-new-opteron-athlon64-memory-controller-driver.patch added to -
    ... Memory errors are by far the most common kind of hardware error ... What is the chipsets idea of which DIMM the memory error occurred on. ... user space figure it out from there. ...
    (Linux-Kernel)
  • Re: + edac-new-opteron-athlon64-memory-controller-driver.patch added to -
    ... So we can kill the processes using that memory. ... What is the chipsets idea of which DIMM the memory error occurred on. ... There has always been enough information to determine the hardware ... some that are not easily accessible to user space so a kernel driver ...
    (Linux-Kernel)
  • Re: user_to_phys() without mmap?
    ... |> ram, not some PCI or AGP video card), but mmap'ing from kernel space ... |> into user space is causing large latencies and unsightly artifacts. ... | virtual memory locations from user space, ... Directly mapping physical memory to a process _can_, of course, be very ...
    (comp.os.linux.development.system)
  • [PATCH 2.6.9-rc1-mm4 4/6] [m32r] Update uaccess.h
    ... + * Test whether a block of memory is a valid user space address. ... * Context: User context only. ... * Checks if a pointer to a block of memory in user space is valid. ... * Returns zero on success, ...
    (Linux-Kernel)
  • Re: size_t or int for malloc-type functions?
    ... Some go as high as 3GB with special boot ... RedHat has a special Linux kernel that gives just under 4GB of user address space; a bit of kernel space is still required to keep syscalls working, ... It's mainly used by database folks, who should be moving to AMD64 now anyways (with its 2^51 bytes of user space, currently). ... of like the old extended/expanded memory hacks in the DOS days. ...
    (comp.lang.c)