CVSROOT:        /cvs
Module name:    src
Changes by:     m...@cvs.openbsd.org    2012/05/27 08:27:10

Modified files:
        sys/arch/sgi/hpc: hpc.c hpcvar.h if_sq.c if_sqvar.h 
        sys/arch/sgi/include: autoconf.h 
        sys/arch/sgi/localbus: imcreg.h 
        sys/arch/sgi/sgi: bus_dma.c ip22.h ip22_machdep.c machdep.c 

Log message:
Proper support for the so-called `fast mode' of the Indigo2 ECC memory
controller. In this mode, access to physical memory are not allowed to
bypass the cache, and this allows the memory subsystem to run faster.

Of course, some device drivers will require uncached memory access (e.g.
for proper HPC DMA descriptor operation).

New ip22-specific functions to switch between `fast mode' and `slow mode'
are introduced.

hpc(4) now provides read and write routines to fetch a dma descriptor from
uncached memory into a local copy, and update it from said modified copy.
On systems without the ECC MC, these will do nothing and operation will
continue to access the uncached memory directly. On systems with the ECC MC,
they will perform a copy, and the writeback will be done in slow mode.

bus_dmamem_map() requests for DMA memory with BUS_DMA_COHERENT set in flags,
which would return uncached memory, will now always fail on systems with
the ECC memory controller. Drivers which really need uncached memory, and
are aware of this particular setup, will now pass
BUS_DMA_COHERENT | BUS_DMA_BUS1, which will let the request succeed.

sq(4) will use all of the above to work mostly unmodified on ECC MC systems
in fast mode.

Finally, fast mode is enabled after autoconf.

Tested on IP22 and IP28.

Reply via email to