NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-hp700/41379: PA7150 CPU on 735/125 is not probed properly



The following reply was made to PR port-hp700/41379; it has been noted by GNATS.

From: Nick Hudson <nick.hudson%gmx.co.uk@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: port-hp700-maintainer%netbsd.org@localhost,
 gnats-admin%netbsd.org@localhost,
 netbsd-bugs%netbsd.org@localhost
Subject: Re: port-hp700/41379: PA7150 CPU on 735/125 is not probed properly
Date: Wed, 13 May 2009 10:39:31 +0100

 --Boundary-00=_UVpCKxb98MWLit+
 Content-Type: text/plain;
   charset="iso-8859-6"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 On Thursday 07 May 2009 13:15:01 tsutsui%ceres.dti.ne.jp@localhost wrote:
 > >Number:         41379
 > >Category:       port-hp700
 > >Synopsis:       PA7150 CPU on 735/125 is not probed properly
 
 Please test this patch.
 
 Thanks,
 Nick
 
 --Boundary-00=_UVpCKxb98MWLit+
 Content-Type: text/x-diff;
   charset="iso 8859-15";
   name="cpu.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
        filename="cpu.diff"
 
 Index: arch/hp700/hp700/machdep.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/hp700/hp700/machdep.c,v
 retrieving revision 1.62
 diff -u -p -u -r1.62 machdep.c
 --- arch/hp700/hp700/machdep.c 9 May 2009 11:39:30 -0000       1.62
 +++ arch/hp700/hp700/machdep.c 13 May 2009 09:13:05 -0000
 @@ -270,6 +270,7 @@ void delay_init(void);
  static inline void fall(int, int, int, int, int);
  void dumpsys(void);
  void cpuid(void);
 +enum hppa_cpu_type cpu_model_cpuid(int);
  
  /*
   * wide used hardware params
 @@ -622,6 +623,7 @@ cpuid(void)
        extern int kpsw;
  
        /* may the scientific guessing begin */
 +      cpu_type = hpc_unknown;
        cpu_features = 0;
        cpu_version = 0;
  
 @@ -648,8 +650,10 @@ cpuid(void)
        if ((error = pdc_call((iodcio_t)pdc, 0, PDC_MODEL, PDC_MODEL_CPUID,
           &pdc_cpuid, 0, 0, 0, 0)) < 0) {
  #ifdef DEBUG
 -              printf("WARNING: PDC_MODEL_CPUID error %d\n", error);
 +              printf("WARNING: PDC_MODEL_CPUID error %d."
 +                  "Using cpu_hvers based cpu_type.\n", error);
  #endif
 +              cpu_type = cpu_model_cpuid(cpu_hvers);
        } else {
  #ifdef DEBUG
                printf("%s: cpuid.version  = %x\n", __func__,
 @@ -752,7 +756,12 @@ cpuid(void)
  
        if (cpu_version)
                for (p = cpu_types; p->hci_chip_name; p++) {
 -                      if (p->hci_cpuid == cpu_version)
 +                      if (p->hci_cpuversion == cpu_version)
 +                              break;
 +              }
 +      else if (cpu_type != hpc_unknown)
 +              for (p = cpu_types; p->hci_chip_name; p++) {
 +                      if (p->hci_cputype == cpu_type)
                                break;
                }
        else
 @@ -802,6 +811,38 @@ cpuid(void)
        hppa_fpu_bootstrap(pdc_coproc.ccr_enable);
  }
  
 +enum hppa_cpu_type
 +cpu_model_cpuid(int hvers)
 +{
 +      switch (hvers) {
 +      /* no supported HP8xx/9xx models with pcx */
 +      case HPPA_BOARD_HP720:
 +      case HPPA_BOARD_HP750_66:
 +      case HPPA_BOARD_HP730_66:
 +      case HPPA_BOARD_HP710:
 +      case HPPA_BOARD_HP705:
 +              return hpcxs;
 +
 +      case HPPA_BOARD_HP735_99:
 +      case HPPA_BOARD_HP755_99:
 +      case HPPA_BOARD_HP755_125:
 +      case HPPA_BOARD_HP735_130:
 +      case HPPA_BOARD_HP715_50:
 +      case HPPA_BOARD_HP715_33:
 +      case HPPA_BOARD_HP715S_50:
 +      case HPPA_BOARD_HP715S_33:
 +      case HPPA_BOARD_HP715T_50:
 +      case HPPA_BOARD_HP715T_33:
 +      case HPPA_BOARD_HP715_75:
 +      case HPPA_BOARD_HP715_99:
 +      case HPPA_BOARD_HP725_50:
 +      case HPPA_BOARD_HP725_75:
 +      case HPPA_BOARD_HP725_99:
 +              return hpcxt;
 +      }
 +      return hpc_unknown;
 +}
 +
  void
  cpu_startup(void)
  {
 Index: arch/hp700/include/cpu.h
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/hp700/include/cpu.h,v
 retrieving revision 1.32
 diff -u -p -u -r1.32 cpu.h
 --- arch/hp700/include/cpu.h   9 May 2009 11:39:31 -0000       1.32
 +++ arch/hp700/include/cpu.h   13 May 2009 09:13:06 -0000
 @@ -62,6 +62,7 @@
  
  /* types */
  enum hppa_cpu_type {
 +      hpc_unknown,
        hpcx,   /* PA7000 (x)           PA 1.0 */
        hpcxs,  /* PA7000 (s)           PA 1.1a */
        hpcxt,  /* PA7100 (t)           PA 1.1b */
 @@ -89,7 +90,7 @@ struct hppa_cpu_info {
        /* The type and PA-RISC specification of the chip. */
        const char hci_chip_type[8];
        enum hppa_cpu_type hci_cputype;
 -      int  hci_cpuid;
 +      int  hci_cpuversion;
        int  hci_features;              /* CPU types and features */
  #define       HPPA_FTRS_TLBU          0x00000001
  #define       HPPA_FTRS_BTLBU         0x00000002
 
 --Boundary-00=_UVpCKxb98MWLit+--
 


Home | Main Index | Thread Index | Old Index