Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/arch/hppa/hppa Pull up following revision(s) (request...



details:   https://anonhg.NetBSD.org/src/rev/f4e51cd82e7e
branches:  netbsd-8
changeset: 450825:f4e51cd82e7e
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Apr 26 19:08:03 2019 +0000

description:
Pull up following revision(s) (requested by skrll in ticket #1248):

        sys/arch/hppa/hppa/machdep.c: revision 1.9
        sys/arch/hppa/hppa/fpu.c: revision 1.25

Some fixes for QEMU/hppa.

Don't call desidhash_l on pcxl2 as it doesn't support it.  QEMU emulates
this cpu and would trap on illegal instruction for the diag in desidhash_l

Allow a FPU to be missing... more fixes are likely here.

QEMU doesn't set C bit properly yet

diffstat:

 sys/arch/hppa/hppa/fpu.c     |  10 ++++++++--
 sys/arch/hppa/hppa/machdep.c |  14 +++++++-------
 2 files changed, 15 insertions(+), 9 deletions(-)

diffs (80 lines):

diff -r 3d600105a3b0 -r f4e51cd82e7e sys/arch/hppa/hppa/fpu.c
--- a/sys/arch/hppa/hppa/fpu.c  Fri Apr 26 19:04:19 2019 +0000
+++ b/sys/arch/hppa/hppa/fpu.c  Fri Apr 26 19:08:03 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpu.c,v 1.24 2012/04/06 12:21:59 skrll Exp $   */
+/*     $NetBSD: fpu.c,v 1.24.32.1 2019/04/26 19:08:03 martin Exp $     */
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.24 2012/04/06 12:21:59 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.24.32.1 2019/04/26 19:08:03 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -144,6 +144,12 @@
 
        /* See if we have a present and functioning hardware FPU. */
        fpu_present = (ccr_enable & HPPA_FPUS) == HPPA_FPUS;
+       if (!fpu_present) {
+               fpu_csw = 0;
+               curcpu()->ci_fpu_state = 0;
+
+               return;
+       }
 
        KASSERT(fpu_present);
        /* Initialize the FPU and get its version. */
diff -r 3d600105a3b0 -r f4e51cd82e7e sys/arch/hppa/hppa/machdep.c
--- a/sys/arch/hppa/hppa/machdep.c      Fri Apr 26 19:04:19 2019 +0000
+++ b/sys/arch/hppa/hppa/machdep.c      Fri Apr 26 19:08:03 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.7 2017/04/02 08:31:10 skrll Exp $        */
+/*     $NetBSD: machdep.c,v 1.7.6.1 2019/04/26 19:08:03 martin Exp $   */
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.7 2017/04/02 08:31:10 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.7.6.1 2019/04/26 19:08:03 martin Exp $");
 
 #include "opt_cputype.h"
 #include "opt_ddb.h"
@@ -374,7 +374,7 @@
        { "PA7300LC", "Velociraptor", "PCXL2",
          hpcxl2, HPPA_CPU_PCXL2,
          HPPA_FTRS_TLBU | HPPA_FTRS_BTLBU | HPPA_FTRS_HVT, "1.1e",
-         desidhash_l, itlb_l, dtlb_l, itlbna_l, dtlbna_l, tlbd_l,
+         NULL, itlb_l, dtlb_l, itlbna_l, dtlbna_l, tlbd_l,
          ibtlb_g, NULL, pbtlb_g, hpti_g },
 #endif
 #ifdef HP8000_CPU
@@ -809,9 +809,6 @@
 
        if (hppa_cpu_info->hci_chip_name == NULL)
                panic("bad model string for 0x%x", pdc_model.hwmodel);
-       else if (hppa_cpu_info->desidhash == NULL)
-               panic("no kernel support for %s",
-                   hppa_cpu_info->hci_chip_name);
 
        /*
         * TODO: HPT on 7200 is not currently supported
@@ -825,7 +822,10 @@
        cpu_hpt_init = hppa_cpu_info->hptinit;
        cpu_desidhash = hppa_cpu_info->desidhash;
 
-       cpu_revision = (*cpu_desidhash)();
+       if (cpu_desidhash)
+               cpu_revision = (*cpu_desidhash)();
+       else
+               cpu_revision = 0;
 
        /* force strong ordering for now */
        if (hppa_cpu_ispa20_p())



Home | Main Index | Thread Index | Old Index