Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/hppa/hppa Some fixes for QEMU/hppa.
details: https://anonhg.NetBSD.org/src/rev/422331a3ce9f
branches: trunk
changeset: 445832:422331a3ce9f
user: skrll <skrll%NetBSD.org@localhost>
date: Wed Nov 14 10:58:04 2018 +0000
description:
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 4778b7f8e630 -r 422331a3ce9f sys/arch/hppa/hppa/fpu.c
--- a/sys/arch/hppa/hppa/fpu.c Wed Nov 14 08:44:34 2018 +0000
+++ b/sys/arch/hppa/hppa/fpu.c Wed Nov 14 10:58:04 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu.c,v 1.24 2012/04/06 12:21:59 skrll Exp $ */
+/* $NetBSD: fpu.c,v 1.25 2018/11/14 10:58:04 skrll 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.25 2018/11/14 10:58:04 skrll 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 4778b7f8e630 -r 422331a3ce9f sys/arch/hppa/hppa/machdep.c
--- a/sys/arch/hppa/hppa/machdep.c Wed Nov 14 08:44:34 2018 +0000
+++ b/sys/arch/hppa/hppa/machdep.c Wed Nov 14 10:58:04 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.8 2018/09/03 16:29:24 riastradh Exp $ */
+/* $NetBSD: machdep.c,v 1.9 2018/11/14 10:58:04 skrll 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.8 2018/09/03 16:29:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.9 2018/11/14 10:58:04 skrll 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