[BACK]Return to machdep.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / ibmnws / ibmnws

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

Diff for /src/sys/arch/ibmnws/ibmnws/machdep.c between version 1.9 and 1.9.18.2

version 1.9, 2007/10/17 19:55:01 version 1.9.18.2, 2008/06/17 09:14:04
Line 69  __KERNEL_RCSID(0, "$NetBSD$");
Line 69  __KERNEL_RCSID(0, "$NetBSD$");
   
 #include <powerpc/oea/bat.h>  #include <powerpc/oea/bat.h>
 #include <arch/powerpc/pic/picvar.h>  #include <arch/powerpc/pic/picvar.h>
   #include <arch/powerpc/include/pio.h>
   #include <dev/pci/pcivar.h>
   #include <dev/ic/ibm82660reg.h>
   
 #include <dev/cons.h>  #include <dev/cons.h>
   
Line 87  void
Line 90  void
 initppc(u_long startkernel, u_long endkernel, u_int args, void *btinfo)  initppc(u_long startkernel, u_long endkernel, u_int args, void *btinfo)
 {  {
   
           uint32_t sa, ea, banks;
           u_long memsize = 0;
           pcitag_t tag;
   
         /*          /*
          * Set memory region           * Set memory region by reading the memory size from the PCI
            * host bridge.
          */           */
         {  
                 u_long memsize;  
   
 #if 0          tag = genppc_pci_indirect_make_tag(NULL, 0, 0, 0);
                 /* Get the memory size from the PCI host bridge */  
           out32rb(PCI_MODE1_ADDRESS_REG, tag | IBM_82660_MEM_BANK0_START);
           sa = in32rb(PCI_MODE1_DATA_REG);
   
           out32rb(PCI_MODE1_ADDRESS_REG, tag | IBM_82660_MEM_BANK0_END);
           ea = in32rb(PCI_MODE1_DATA_REG);
   
           /* Which memory banks are enabled? */
           out32rb(PCI_MODE1_ADDRESS_REG, tag | IBM_82660_MEM_BANK_ENABLE);
           banks = in32rb(PCI_MODE1_DATA_REG) & 0xFF;
   
           /* Reset the register for the next call. */
           out32rb(PCI_MODE1_ADDRESS_REG, 0);
   
           if (banks & IBM_82660_MEM_BANK0_ENABLED)
                   memsize += IBM_82660_BANK0_ADDR(ea) - IBM_82660_BANK0_ADDR(sa) + 1;
   
           if (banks & IBM_82660_MEM_BANK1_ENABLED)
                   memsize += IBM_82660_BANK1_ADDR(ea) - IBM_82660_BANK1_ADDR(sa) + 1;
   
           if (banks & IBM_82660_MEM_BANK2_ENABLED)
                   memsize += IBM_82660_BANK2_ADDR(ea) - IBM_82660_BANK2_ADDR(sa) + 1;
   
           if (banks & IBM_82660_MEM_BANK3_ENABLED)
                   memsize += IBM_82660_BANK3_ADDR(ea) - IBM_82660_BANK3_ADDR(sa) + 1;
   
           memsize <<= 20;
   
           physmemr[0].start = 0;
           physmemr[0].size = memsize & ~PGOFSET;
           availmemr[0].start = (endkernel + PGOFSET) & ~PGOFSET;
           availmemr[0].size = memsize - availmemr[0].start;
   
                 pci_read_config_32(0, 0x90, &ea);  
                 if(ea & 0xff00)  
                     memsize = (((ea >> 8) & 0xff) + 1) << 20;  
                 else  
                     memsize = ((ea & 0xff) + 1) << 20;  
 #else  
                 memsize = 64 * 1024 * 1024;         /* 64MB hardcoded for now */  
 #endif  
   
                 physmemr[0].start = 0;  
                 physmemr[0].size = memsize & ~PGOFSET;  
                 availmemr[0].start = (endkernel + PGOFSET) & ~PGOFSET;  
                 availmemr[0].size = memsize - availmemr[0].start;  
         }  
         avail_end = physmemr[0].start + physmemr[0].size;    /* XXX temporary */          avail_end = physmemr[0].start + physmemr[0].size;    /* XXX temporary */
   
         /*          /*
Line 149  cpu_startup(void)
Line 172  cpu_startup(void)
          */           */
         oea_startup("IBM NetworkStation 1000 (8362-XXX)");          oea_startup("IBM NetworkStation 1000 (8362-XXX)");
   
           pic_init();
         isa_pic = setup_prepivr(PIC_IVR_IBM);          isa_pic = setup_prepivr(PIC_IVR_IBM);
   
         oea_install_extint(pic_ext_intr);          oea_install_extint(pic_ext_intr);

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.9.18.2

CVSweb <webmaster@jp.NetBSD.org>