[BACK]Return to mca_machdep.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / i386 / mca

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/arch/i386/mca/mca_machdep.c between version 1.18 and 1.19

version 1.18, 2002/11/22 15:23:51 version 1.19, 2003/02/26 22:23:05
Line 57  __KERNEL_RCSID(0, "$NetBSD$");
Line 57  __KERNEL_RCSID(0, "$NetBSD$");
 #include <machine/bioscall.h>  #include <machine/bioscall.h>
 #include <machine/psl.h>  #include <machine/psl.h>
   
 #define _I386_BUS_DMA_PRIVATE  #define _X86_BUS_DMA_PRIVATE
 #include <machine/bus.h>  #include <machine/bus.h>
   
 #include <dev/isa/isavar.h>  #include <dev/isa/isavar.h>
Line 91  struct bios_config {
Line 91  struct bios_config {
  * Used to encode DMA channel into ISA DMA cookie. We use upper 4 bits of   * Used to encode DMA channel into ISA DMA cookie. We use upper 4 bits of
  * ISA DMA cookie id_flags, it's unused.   * ISA DMA cookie id_flags, it's unused.
  */   */
 struct i386_isa_dma_cookie {  struct x86_isa_dma_cookie {
         int id_flags;          int id_flags;
         /* We don't care about rest */          /* We don't care about rest */
 };  };
Line 124  static int _mca_bus_dmamap_load_raw __P(
Line 124  static int _mca_bus_dmamap_load_raw __P(
  */   */
 #define MCA_DMA_BOUNCE_THRESHOLD        (16 * 1024 * 1024)  #define MCA_DMA_BOUNCE_THRESHOLD        (16 * 1024 * 1024)
   
 struct i386_bus_dma_tag mca_bus_dma_tag = {  struct x86_bus_dma_tag mca_bus_dma_tag = {
         MCA_DMA_BOUNCE_THRESHOLD,               /* _bounce_thresh */          MCA_DMA_BOUNCE_THRESHOLD,               /* _bounce_thresh */
         _isa_bus_dmamap_create,          _isa_bus_dmamap_create,
         _isa_bus_dmamap_destroy,          _isa_bus_dmamap_destroy,
Line 274  mca_nmi()
Line 274  mca_nmi()
   
         int     slot, mcanmi=0;          int     slot, mcanmi=0;
   
         /* if there is no MCA bus, call i386_nmi() */          /* if there is no MCA bus, call x86_nmi() */
         if (!MCA_system)          if (!MCA_system)
                 goto out;                  goto out;
   
Line 300  mca_nmi()
Line 300  mca_nmi()
    out:     out:
         if (!mcanmi) {          if (!mcanmi) {
                 /* no CHCK bits asserted, assume ISA NMI */                  /* no CHCK bits asserted, assume ISA NMI */
                 return (i386_nmi());                  return (x86_nmi());
         } else          } else
                 return(0);                  return(0);
 }  }
Line 444  _mca_bus_dmamap_sync(t, map, offset, len
Line 444  _mca_bus_dmamap_sync(t, map, offset, len
         bus_size_t len;          bus_size_t len;
         int ops;          int ops;
 {  {
         struct i386_isa_dma_cookie *cookie;          struct x86_isa_dma_cookie *cookie;
         bus_addr_t phys;          bus_addr_t phys;
         bus_size_t cnt;          bus_size_t cnt;
         int dmach, mode;          int dmach, mode;
Line 464  _mca_bus_dmamap_sync(t, map, offset, len
Line 464  _mca_bus_dmamap_sync(t, map, offset, len
         if (ops != BUS_DMASYNC_PREREAD && ops != BUS_DMASYNC_PREWRITE)          if (ops != BUS_DMASYNC_PREREAD && ops != BUS_DMASYNC_PREWRITE)
                 return;                  return;
   
         cookie = (struct i386_isa_dma_cookie *)map->_dm_cookie;          cookie = (struct x86_isa_dma_cookie *)map->_dm_cookie;
         dmach = (cookie->id_flags & 0xf0) >> 4;          dmach = (cookie->id_flags & 0xf0) >> 4;
   
         phys = map->dm_segs[0].ds_addr;          phys = map->dm_segs[0].ds_addr;
Line 532  mca_dmamap_create(t, size, flags, dmamp,
Line 532  mca_dmamap_create(t, size, flags, dmamp,
         int dmach;          int dmach;
 {  {
         int error;          int error;
         struct i386_isa_dma_cookie *cookie;          struct x86_isa_dma_cookie *cookie;
   
 #ifdef DEBUG  #ifdef DEBUG
         /* Sanity check */          /* Sanity check */
Line 556  mca_dmamap_create(t, size, flags, dmamp,
Line 556  mca_dmamap_create(t, size, flags, dmamp,
                 return (error);                  return (error);
   
         /* Encode DMA channel */          /* Encode DMA channel */
         cookie = (struct i386_isa_dma_cookie *) (*dmamp)->_dm_cookie;          cookie = (struct x86_isa_dma_cookie *) (*dmamp)->_dm_cookie;
         cookie->id_flags &= 0x0f;          cookie->id_flags &= 0x0f;
         cookie->id_flags |= dmach << 4;          cookie->id_flags |= dmach << 4;
   

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

CVSweb <webmaster@jp.NetBSD.org>