CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Sat Feb 15 07:38:22 UTC 2014 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.118 -r1.119 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.118 src/sys/arch/hp700/hp700/machdep.c:1.119 --- src/sys/arch/hp700/hp700/machdep.c:1.118 Thu Jan 16 13:19:36 2014 +++ src/sys/arch/hp700/hp700/machdep.c Sat Feb 15 07:38:22 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.118 2014/01/16 13:19:36 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.119 2014/02/15 07:38:22 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.118 2014/01/16 13:19:36 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.119 2014/02/15 07:38:22 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -196,7 +196,7 @@ static struct btlb_slot { /* The number associated with this slot. */ int btlb_slot_number; - + /* The flags associated with this slot. */ int btlb_slot_flags; #define BTLB_SLOT_IBTLB (1 0) @@ -477,7 +477,7 @@ hppa_init(paddr_t start, void *bi) error = pdcproc_hpa_processor(hppa_mcpuhpa); if (error 0) panic(%s: PDC_HPA failed, __func__); - + /* cache parameters */ error = pdcproc_cache(pdc_cache); if (error 0) { @@ -667,7 +667,7 @@ cpuid(void) error = pdcproc_model_info(pdc_model); if (error 0) { DPRINTF((WARNING: PDC_MODEL_INFO error %d\n, error)); - + pdc_model.hwmodel = 0; pdc_model.hv = 0; } else { @@ -1159,7 +1159,7 @@ hppa_btlb_insert(pa_space_t space, vaddr * allow execution also need instruction translation. */ switch (tlbprot TLB_AR_MASK) { - case TLB_AR_R: + case TLB_AR_R: case TLB_AR_RW: case TLB_AR_R | TLB_USER: case TLB_AR_RW | TLB_USER: @@ -1218,7 +1218,7 @@ hppa_btlb_insert(pa_space_t space, vaddr for (btlb_slot = btlb_slots; btlb_slot btlb_slot_end; btlb_slot++) { - + /* * Skip this slot if it's in use, or if we need a * variable-range slot and this isn't one. @@ -1258,7 +1258,7 @@ hppa_btlb_insert(pa_space_t space, vaddr DPRINTFN(10, (BTLB full\n)); return -(ENOMEM); } - + /* * Now fill this BTLB slot record and insert the entry. */ @@ -1639,7 +1639,7 @@ hppa_pim64_dump(int check_type, void *da printf(\n\n%s Registers:, name); for (reg_k = 0; reg_k reg_j; reg_k++) printf(%s0x%016lx, - (reg_k 3) ? : \n, + (reg_k 3) ? : \n, (unsigned long)regarray[reg_k]); } @@ -1748,7 +1748,7 @@ hppa_machine_check(int check_type) DELAY(25); panic(machine check); } - + /* Reboot the machine. */ printf(Rebooting...\n); cpu_die(); @@ -1833,7 +1833,7 @@ dumpsys(void) dump = bdev-d_dump; /* TODO block map the whole physical memory */ for (i = 0; i bytes; i += n) { - + /* Print out how many MBs we are to go. */ n = bytes - i; if (n (n % (1024*1024)) == 0) @@ -1946,7 +1946,7 @@ sysctl_machdep_heartbeat(SYSCTLFN_ARGS) int error; bool oldval; struct sysctlnode node = *rnode; - + oldval = lcd_blink_p; /* * If we were false and are now true, start the timer.
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Thu Jan 16 13:07:07 UTC 2014 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: Drop CPU detection by features and panic if a CPU isn't detected via PDC_MODEL_CPUID or cpu_model_cpuid. To generate a diff of this commit: cvs rdiff -u -r1.116 -r1.117 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.116 src/sys/arch/hp700/hp700/machdep.c:1.117 --- src/sys/arch/hp700/hp700/machdep.c:1.116 Sat Oct 19 13:16:30 2013 +++ src/sys/arch/hp700/hp700/machdep.c Thu Jan 16 13:07:07 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.116 2013/10/19 13:16:30 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.117 2014/01/16 13:07:07 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.116 2013/10/19 13:16:30 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.117 2014/01/16 13:07:07 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -685,9 +685,13 @@ cpuid(void) error = pdcproc_model_cpuid(pdc_cpuid); if (error 0) { DPRINTF((WARNING: PDC_MODEL_CPUID error %d. - Using cpu_modelno based cpu_type.\n, error)); + Using cpu_modelno (%#x) based cpu_type.\n, error, cpu_modelno)); cpu_type = cpu_model_cpuid(cpu_modelno); + if (cpu_type == hpc_unknown) { + printf(WARNING: Unknown cpu_type for cpu_modelno %x\n, + cpu_modelno); + } } else { DPRINTF((%s: cpuid.version = %x\n, __func__, pdc_cpuid.version)); @@ -774,26 +778,33 @@ cpuid(void) pmap_hptsize = 0; } + bool cpu_found = false; if (cpu_version) { + DPRINTF((%s: looking for cpu_version %x\n, __func__, + cpu_version)); for (i = 0, p = cpu_types; i __arraycount(cpu_types); i++, p++) { - if (p-hci_cpuversion == cpu_version) + if (p-hci_cpuversion == cpu_version) { +cpu_found = true; break; + } } } else if (cpu_type != hpc_unknown) { + DPRINTF((%s: looking for cpu_type %d\n, __func__, + cpu_type)); for (i = 0, p = cpu_types; i __arraycount(cpu_types); i++, p++) { - if (p-hci_cputype == cpu_type) -break; - } - } else { - for (i = 0, p = cpu_types; i __arraycount(cpu_types); - i++, p++) { - if (p-hci_features == cpu_features) + if (p-hci_cputype == cpu_type) { +cpu_found = true; break; + } } } + if (!cpu_found) { + panic(CPU detection failed. Please report the problem.); + } + hppa_cpu_info = p; if (hppa_cpu_info-hci_chip_name == NULL)
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Thu Jan 16 13:19:36 UTC 2014 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: Add some 715 machines to cpu_model_cpuid including the 715/100 that Ryo ONODERA has. To generate a diff of this commit: cvs rdiff -u -r1.117 -r1.118 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.117 src/sys/arch/hp700/hp700/machdep.c:1.118 --- src/sys/arch/hp700/hp700/machdep.c:1.117 Thu Jan 16 13:07:07 2014 +++ src/sys/arch/hp700/hp700/machdep.c Thu Jan 16 13:19:36 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.117 2014/01/16 13:07:07 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.118 2014/01/16 13:19:36 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.117 2014/01/16 13:07:07 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.118 2014/01/16 13:19:36 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -861,6 +861,13 @@ cpu_model_cpuid(int modelno) case HPPA_BOARD_HPE25: case HPPA_BOARD_HPE35: case HPPA_BOARD_HPE45: + case HPPA_BOARD_HP715_80: + case HPPA_BOARD_HP715_64: + case HPPA_BOARD_HP715_100: + case HPPA_BOARD_HP715_100XC: + case HPPA_BOARD_HP715_100L: + case HPPA_BOARD_HP715_120L: + case HPPA_BOARD_HP715_80M: return hpcxl; case HPPA_BOARD_HP735_99:
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Sat Oct 19 13:13:09 UTC 2013 Modified Files: src/sys/arch/hp700/hp700: intr.c Log Message: Sprinkle __unused. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/hp700/hp700/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/intr.c diff -u src/sys/arch/hp700/hp700/intr.c:1.41 src/sys/arch/hp700/hp700/intr.c:1.42 --- src/sys/arch/hp700/hp700/intr.c:1.41 Wed May 23 16:11:37 2012 +++ src/sys/arch/hp700/hp700/intr.c Sat Oct 19 13:13:09 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.41 2012/05/23 16:11:37 skrll Exp $ */ +/* $NetBSD: intr.c,v 1.42 2013/10/19 13:13:09 skrll Exp $ */ /* $OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $ */ /* @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.41 2012/05/23 16:11:37 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.42 2013/10/19 13:13:09 skrll Exp $); #define __MUTEX_PRIVATE @@ -408,7 +408,7 @@ hp700_intr_dispatch(int ncpl, int eiem, int ipending_run; int bit_pos; void *arg; - int handled; + int handled __unused; bool locked = false; /*
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Sat Oct 19 13:15:53 UTC 2013 Modified Files: src/sys/arch/hp700/hp700: mainbus.c Log Message: Add __unused to a variable To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/sys/arch/hp700/hp700/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.83 src/sys/arch/hp700/hp700/mainbus.c:1.84 --- src/sys/arch/hp700/hp700/mainbus.c:1.83 Wed May 23 16:11:37 2012 +++ src/sys/arch/hp700/hp700/mainbus.c Sat Oct 19 13:15:53 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.83 2012/05/23 16:11:37 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.84 2013/10/19 13:15:53 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.83 2012/05/23 16:11:37 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.84 2013/10/19 13:15:53 skrll Exp $); #include locators.h #include power.h @@ -1243,7 +1243,7 @@ _bus_dmamap_load_buffer(bus_dma_tag_t t, bmask = ~(map-_dm_boundary - 1); for (seg = *segp; buflen 0; ) { - bool ok; + bool ok __unused; /* * Get the physical address for this segment. */
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Sat Oct 19 13:16:30 UTC 2013 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: Use __unused for a variable and use the correct #ifdef for a block of code. To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.115 src/sys/arch/hp700/hp700/machdep.c:1.116 --- src/sys/arch/hp700/hp700/machdep.c:1.115 Sat Jul 28 19:08:23 2012 +++ src/sys/arch/hp700/hp700/machdep.c Sat Oct 19 13:16:30 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.115 2012/07/28 19:08:23 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.116 2013/10/19 13:16:30 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.115 2012/07/28 19:08:23 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.116 2013/10/19 13:16:30 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -1071,7 +1071,7 @@ static int _hp700_btlb_insert(struct btlb_slot *btlb_slot) { int error; -#ifdef DEBUG +#ifdef MACHDEPDEBUG const char *prot; /* Display the protection like a file protection. */ @@ -1741,7 +1741,7 @@ cpu_dump(void) { long buf[dbtob(1) / sizeof (long)]; kcore_seg_t *segp; - cpu_kcore_hdr_t *cpuhdrp; + cpu_kcore_hdr_t *cpuhdrp __unused; const struct bdevsw *bdev; segp = (kcore_seg_t *)buf;
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Sat Oct 19 13:21:43 UTC 2013 Modified Files: src/sys/arch/hp700/hp700: autoconf.c Log Message: Remember to unmap pagezero once we've finished with it. Found by gcc 4.8. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/arch/hp700/hp700/autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/autoconf.c diff -u src/sys/arch/hp700/hp700/autoconf.c:1.50 src/sys/arch/hp700/hp700/autoconf.c:1.51 --- src/sys/arch/hp700/hp700/autoconf.c:1.50 Sat Oct 27 17:17:52 2012 +++ src/sys/arch/hp700/hp700/autoconf.c Sat Oct 19 13:21:43 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.50 2012/10/27 17:17:52 chs Exp $ */ +/* $NetBSD: autoconf.c,v 1.51 2013/10/19 13:21:43 skrll Exp $ */ /* $OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $ */ @@ -86,7 +86,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.50 2012/10/27 17:17:52 chs Exp $); +__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.51 2013/10/19 13:21:43 skrll Exp $); #include opt_kgdb.h #include opt_useleds.h @@ -471,6 +471,8 @@ cpu_rootconf(void) } printf(dp_flags 0x%x pz_class 0x%x\n, PAGE0-mem_boot.pz_dp.dp_flags, PAGE0-mem_boot.pz_class); + + hp700_pagezero_unmap(pagezero_cookie); #endif /* DEBUG */ if (boot_device != NULL)
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Sat Oct 19 14:01:00 UTC 2013 Modified Files: src/sys/arch/hp700/hp700: disksubr.c Log Message: Remove unused variable. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/hp700/hp700/disksubr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/disksubr.c diff -u src/sys/arch/hp700/hp700/disksubr.c:1.27 src/sys/arch/hp700/hp700/disksubr.c:1.28 --- src/sys/arch/hp700/hp700/disksubr.c:1.27 Thu Feb 23 21:38:53 2012 +++ src/sys/arch/hp700/hp700/disksubr.c Sat Oct 19 14:00:59 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: disksubr.c,v 1.27 2012/02/23 21:38:53 skrll Exp $ */ +/* $NetBSD: disksubr.c,v 1.28 2013/10/19 14:00:59 skrll Exp $ */ /* $OpenBSD: disksubr.c,v 1.6 2000/10/18 21:00:34 mickey Exp $ */ @@ -68,7 +68,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: disksubr.c,v 1.27 2012/02/23 21:38:53 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: disksubr.c,v 1.28 2013/10/19 14:00:59 skrll Exp $); #include sys/param.h #include sys/systm.h @@ -159,7 +159,7 @@ readdisklabel(dev_t dev, void (*strat)(s struct buf *bp = NULL; const char *msg = no disk label; int i; - struct disklabel minilabel, fallbacklabel; + struct disklabel fallbacklabel; /* minimal requirements for archetypal disk label */ if (lp-d_secsize == 0) @@ -177,7 +177,7 @@ readdisklabel(dev_t dev, void (*strat)(s if (lp-d_partitions[i].p_size == 0) lp-d_partitions[i].p_size = 0x1fff; lp-d_partitions[i].p_offset = 0; - minilabel = fallbacklabel = *lp; + fallbacklabel = *lp; /* get a buffer and initialize it */ bp = geteblk((int)lp-d_secsize);
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: dsl Date: Fri Jun 8 07:53:41 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: Fix type of variable passed to sysctl (int - bool). To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.113 src/sys/arch/hp700/hp700/machdep.c:1.114 --- src/sys/arch/hp700/hp700/machdep.c:1.113 Wed May 23 16:11:37 2012 +++ src/sys/arch/hp700/hp700/machdep.c Fri Jun 8 07:53:41 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.113 2012/05/23 16:11:37 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.114 2012/06/08 07:53:41 dsl 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.113 2012/05/23 16:11:37 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.114 2012/06/08 07:53:41 dsl Exp $); #include opt_cputype.h #include opt_ddb.h @@ -228,7 +228,7 @@ int cpu_modelno; int cpu_revision; #if NLCD 0 -int lcd_blink_p; +bool lcd_blink_p; #endif /* @@ -1926,7 +1926,8 @@ sysctl_machdep_boot(SYSCTLFN_ARGS) static int sysctl_machdep_heartbeat(SYSCTLFN_ARGS) { - int oldval, error; + int error; + bool oldval; struct sysctlnode node = *rnode; oldval = lcd_blink_p; @@ -1938,7 +1939,7 @@ sysctl_machdep_heartbeat(SYSCTLFN_ARGS) if (error || newp == NULL) return (error); - if (!oldval lcd_blink_p oldval) + if (!oldval lcd_blink_p) blink_lcd_timeout(NULL); return 0;
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Wed May 23 07:31:31 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: intr.c Log Message: Make a #define MULTIPROCESSOR kernel compile To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/hp700/hp700/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/intr.c diff -u src/sys/arch/hp700/hp700/intr.c:1.38 src/sys/arch/hp700/hp700/intr.c:1.39 --- src/sys/arch/hp700/hp700/intr.c:1.38 Thu Mar 29 09:26:24 2012 +++ src/sys/arch/hp700/hp700/intr.c Wed May 23 07:31:31 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.38 2012/03/29 09:26:24 skrll Exp $ */ +/* $NetBSD: intr.c,v 1.39 2012/05/23 07:31:31 skrll Exp $ */ /* $OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $ */ /* @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.38 2012/03/29 09:26:24 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.39 2012/05/23 07:31:31 skrll Exp $); #define __MUTEX_PRIVATE @@ -375,6 +375,7 @@ hppa_intr(struct trapframe *frame) extern char mutex_enter_crit_start[]; extern char mutex_enter_crit_end[]; +#ifndef MULTIPROCESSOR extern char _lock_cas_ras_start[]; extern char _lock_cas_ras_end[]; @@ -384,6 +385,7 @@ hppa_intr(struct trapframe *frame) frame-tf_iioq_head = (u_int)_lock_cas_ras_start; frame-tf_iioq_tail = (u_int)_lock_cas_ras_start + 4; } +#endif /* * If we interrupted in the middle of mutex_enter(), we must patch up
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Wed May 23 08:59:36 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: Whitespace To generate a diff of this commit: cvs rdiff -u -r1.111 -r1.112 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.111 src/sys/arch/hp700/hp700/machdep.c:1.112 --- src/sys/arch/hp700/hp700/machdep.c:1.111 Wed Apr 25 07:58:43 2012 +++ src/sys/arch/hp700/hp700/machdep.c Wed May 23 08:59:36 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.111 2012/04/25 07:58:43 dholland Exp $ */ +/* $NetBSD: machdep.c,v 1.112 2012/05/23 08:59:36 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.111 2012/04/25 07:58:43 dholland Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.112 2012/05/23 08:59:36 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -476,8 +476,7 @@ hppa_init(paddr_t start, void *bi) delay_init(); /* fetch the monarch/default cpu hpa */ - - error = pdcproc_hpa_processor(hppa_mcpuhpa); + error = pdcproc_hpa_processor(hppa_mcpuhpa); if (error 0) panic(%s: PDC_HPA failed, __func__);
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Wed May 23 11:04:54 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: intr.c Log Message: Update a comment. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/arch/hp700/hp700/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/intr.c diff -u src/sys/arch/hp700/hp700/intr.c:1.39 src/sys/arch/hp700/hp700/intr.c:1.40 --- src/sys/arch/hp700/hp700/intr.c:1.39 Wed May 23 07:31:31 2012 +++ src/sys/arch/hp700/hp700/intr.c Wed May 23 11:04:54 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.39 2012/05/23 07:31:31 skrll Exp $ */ +/* $NetBSD: intr.c,v 1.40 2012/05/23 11:04:54 skrll Exp $ */ /* $OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $ */ /* @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.39 2012/05/23 07:31:31 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.40 2012/05/23 11:04:54 skrll Exp $); #define __MUTEX_PRIVATE @@ -178,8 +178,9 @@ hp700_intr_establish(int ipl, int (*hand panic(%s: bad interrupt bit %d, __func__, bit_pos); /* - * Panic if this interrupt bit is already handled, but allow shared - * interrupts for PCI. + * Panic if this interrupt bit is already handled, but allow + * shared interrupts for cascaded registers, e.g. dino and gsc + * XXX This could be improved. */ if (ir-ir_bits_map[31 ^ bit_pos] != IR_BIT_UNUSED !IR_BIT_NESTED_P(ir-ir_bits_map[31 ^ bit_pos])
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Wed May 23 11:08:33 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: autoconf.c Log Message: Style. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/arch/hp700/hp700/autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/autoconf.c diff -u src/sys/arch/hp700/hp700/autoconf.c:1.45 src/sys/arch/hp700/hp700/autoconf.c:1.46 --- src/sys/arch/hp700/hp700/autoconf.c:1.45 Mon May 21 08:14:58 2012 +++ src/sys/arch/hp700/hp700/autoconf.c Wed May 23 11:08:33 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.45 2012/05/21 08:14:58 skrll Exp $ */ +/* $NetBSD: autoconf.c,v 1.46 2012/05/23 11:08:33 skrll Exp $ */ /* $OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $ */ @@ -86,7 +86,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.45 2012/05/21 08:14:58 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.46 2012/05/23 11:08:33 skrll Exp $); #include opt_kgdb.h #include opt_useleds.h @@ -164,6 +164,7 @@ static void hppa_pdc_system_map_scan(voi void cpu_configure(void) { + struct cpu_info *ci = curcpu(); /* * Consider stopping for a debugger before @@ -186,7 +187,7 @@ cpu_configure(void) /* in spl*() we trust */ hp700_intr_init(); hppa_enable_irq(); - curcpu()-ci_psw |= PSW_I; + ci-ci_psw |= PSW_I; spl0(); if (cold_hook)
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Wed May 23 11:18:46 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: genassym.cf Log Message: Reorder to match struct. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/arch/hp700/hp700/genassym.cf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/genassym.cf diff -u src/sys/arch/hp700/hp700/genassym.cf:1.32 src/sys/arch/hp700/hp700/genassym.cf:1.33 --- src/sys/arch/hp700/hp700/genassym.cf:1.32 Tue Feb 1 18:33:24 2011 +++ src/sys/arch/hp700/hp700/genassym.cf Wed May 23 11:18:46 2012 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.32 2011/02/01 18:33:24 skrll Exp $ +# $NetBSD: genassym.cf,v 1.33 2012/05/23 11:18:46 skrll Exp $ # $OpenBSD: genassym.cf,v 1.18 2001/09/20 18:31:14 mickey Exp $ @@ -91,12 +91,12 @@ member IR_BITS_MAP ir_bits_map export IR_BIT_REG # struct cpu_info fields +define CI_TRAPSAVE offsetof(struct cpu_info, ci_trapsave) +define CI_MTX_COUNT offsetof(struct cpu_info, ci_mtx_count) define CI_CPL offsetof(struct cpu_info, ci_cpl) define CI_IPENDING offsetof(struct cpu_info, ci_ipending) #define CI_INTR_DEPTH offsetof(struct cpu_info, ci_intr_depth) #define CI_SOFTLWPS offsetof(struct cpu_info, ci_softlwps) -define CI_MTX_COUNT offsetof(struct cpu_info, ci_mtx_count) -define CI_TRAPSAVE offsetof(struct cpu_info, ci_trapsave) define CI_PSW offsetof(struct cpu_info, ci_psw) define CI_FPU_STATE offsetof(struct cpu_info, ci_fpu_state) ifdef MULTIPROCESSOR
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Mon May 21 08:14:58 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: autoconf.c Log Message: Use hppa_enable_irq To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/arch/hp700/hp700/autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/autoconf.c diff -u src/sys/arch/hp700/hp700/autoconf.c:1.44 src/sys/arch/hp700/hp700/autoconf.c:1.45 --- src/sys/arch/hp700/hp700/autoconf.c:1.44 Sun Feb 5 08:31:53 2012 +++ src/sys/arch/hp700/hp700/autoconf.c Mon May 21 08:14:58 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.44 2012/02/05 08:31:53 skrll Exp $ */ +/* $NetBSD: autoconf.c,v 1.45 2012/05/21 08:14:58 skrll Exp $ */ /* $OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $ */ @@ -86,7 +86,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.44 2012/02/05 08:31:53 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.45 2012/05/21 08:14:58 skrll Exp $); #include opt_kgdb.h #include opt_useleds.h @@ -185,7 +185,7 @@ cpu_configure(void) /* in spl*() we trust */ hp700_intr_init(); - __asm volatile(ssm %0, %%r0 :: i (PSW_I)); + hppa_enable_irq(); curcpu()-ci_psw |= PSW_I; spl0();
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: dholland Date: Wed Apr 25 07:58:43 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: Add missing parenthesis in debug code. PR 46370 from Henning Petersen. To generate a diff of this commit: cvs rdiff -u -r1.110 -r1.111 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.110 src/sys/arch/hp700/hp700/machdep.c:1.111 --- src/sys/arch/hp700/hp700/machdep.c:1.110 Thu Apr 5 20:12:09 2012 +++ src/sys/arch/hp700/hp700/machdep.c Wed Apr 25 07:58:43 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.110 2012/04/05 20:12:09 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.111 2012/04/25 07:58:43 dholland 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.110 2012/04/05 20:12:09 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.111 2012/04/25 07:58:43 dholland Exp $); #include opt_cputype.h #include opt_ddb.h @@ -1059,7 +1059,7 @@ ibtlb_g(int i, pa_space_t sp, vaddr_t va error = pdcproc_btlb_insert(sp, va, pa, sz, prot, i); if (error 0) { #ifdef BTLBDEBUG - DPRINTF((WARNING: BTLB insert failed (%d)\n, error); + DPRINTF((WARNING: BTLB insert failed (%d)\n, error)); #endif } return error;
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Thu Apr 5 20:12:09 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: Replace #ifdef DEBUG/BTLBDEBUG with DPRINTF{,N} To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.109 src/sys/arch/hp700/hp700/machdep.c:1.110 --- src/sys/arch/hp700/hp700/machdep.c:1.109 Sun Feb 26 07:52:52 2012 +++ src/sys/arch/hp700/hp700/machdep.c Thu Apr 5 20:12:09 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.109 2012/02/26 07:52:52 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.110 2012/04/05 20:12:09 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.109 2012/02/26 07:52:52 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.110 2012/04/05 20:12:09 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -133,6 +133,24 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v #include ksyms.h #include lcd.h +#ifdef MACHDEPDEBUG + +#define DPRINTF(s) do { \ + if (machdepdebug) \ + printf s; \ +} while(0) + +#define DPRINTFN(l,s) do { \ + if (machdepdebug = (1)) \ + printf s; \ +} while(0) + +int machdepdebug = 1; +#else +#define DPRINTF(s) /* */ +#define DPRINTFN(l,s) /* */ +#endif + /* * Different kinds of flags used throughout the kernel. */ @@ -466,9 +484,7 @@ hppa_init(paddr_t start, void *bi) /* cache parameters */ error = pdcproc_cache(pdc_cache); if (error 0) { -#ifdef DEBUG - printf(WARNING: PDC_CACHE error %d\n, error); -#endif + DPRINTF((WARNING: PDC_CACHE error %d\n, error)); } dcache_line_mask = pdc_cache.dc_conf.cc_line * 16 - 1; @@ -477,9 +493,7 @@ hppa_init(paddr_t start, void *bi) icache_stride = pdc_cache.ic_stride; error = pdcproc_cache_spidbits(pdc_spidbits); -#ifdef DEBUG - printf(SPID bits: 0x%x, error = %d\n, pdc_spidbits.spidbits, error); -#endif + DPRINTF((SPID bits: 0x%x, error = %d\n, pdc_spidbits.spidbits, error)); /* Calculate the OS_HPMC handler checksums. */ p = os_hpmc; @@ -568,15 +582,12 @@ do { \ * WITHOUT TAKING SPECIAL MEASURES. */ -#ifdef DEBUG - printf(%s: PDC_CHASSIS\n, __func__); -#endif + DPRINTF((%s: PDC_CHASSIS\n, __func__)); + /* they say PDC_COPROC might turn fault light on */ pdcproc_chassis_display(PDC_OSTAT(PDC_OSTAT_RUN) | 0xCEC0); -#ifdef DEBUG - printf(%s: intr bootstrap\n, __func__); -#endif + DPRINTF((%s: intr bootstrap\n, __func__)); /* Bootstrap interrupt masking and dispatching. */ hp700_intr_bootstrap(); @@ -658,39 +669,34 @@ cpuid(void) /* identify system type */ error = pdcproc_model_info(pdc_model); if (error 0) { -#ifdef DEBUG - printf(WARNING: PDC_MODEL_INFO error %d\n, error); -#endif + DPRINTF((WARNING: PDC_MODEL_INFO error %d\n, error)); + pdc_model.hwmodel = 0; pdc_model.hv = 0; } else { -#ifdef DEBUG - printf(pdc_model.hwmodel/hv %x/%x\n, pdc_model.hwmodel, - pdc_model.hv); -#endif + DPRINTF((pdc_model.hwmodel/hv %x/%x\n, pdc_model.hwmodel, + pdc_model.hv)); } cpu_modelno = pdc_model.hwmodel; model = hppa_mod_info(HPPA_TYPE_BOARD, cpu_modelno); -#ifdef DEBUG - printf(%s: model %s\n, __func__, model); -#endif + + DPRINTF((%s: model %s\n, __func__, model)); + pdc_settype(cpu_modelno); memset(pdc_cpuid, 0, sizeof(pdc_cpuid)); error = pdcproc_model_cpuid(pdc_cpuid); if (error 0) { -#ifdef DEBUG - printf(WARNING: PDC_MODEL_CPUID error %d. - Using cpu_modelno based cpu_type.\n, error); -#endif + DPRINTF((WARNING: PDC_MODEL_CPUID error %d. + Using cpu_modelno based cpu_type.\n, error)); + cpu_type = cpu_model_cpuid(cpu_modelno); } else { -#ifdef DEBUG - printf(%s: cpuid.version = %x\n, __func__, - pdc_cpuid.version); - printf(%s: cpuid.revision = %x\n, __func__, - pdc_cpuid.revision); -#endif + DPRINTF((%s: cpuid.version = %x\n, __func__, + pdc_cpuid.version)); + DPRINTF((%s: cpuid.revision = %x\n, __func__, + pdc_cpuid.revision)); + cpu_version = pdc_cpuid.version; /* XXXNH why? */ @@ -704,62 +710,50 @@ cpuid(void) memset(pdc_coproc, 0, sizeof(pdc_coproc)); error = pdcproc_coproc(pdc_coproc); if (error 0) { - printf(WARNING: PDC_COPROC error %d\n, error); + DPRINTF((WARNING: PDC_COPROC error %d\n, error)); pdc_coproc.ccr_enable = 0; } else { -#ifdef DEBUG - printf(pdc_coproc: 0x%x, 0x%x; model %x rev %x\n, + DPRINTF((pdc_coproc: 0x%x, 0x%x; model %x rev %x\n, pdc_coproc.ccr_enable, pdc_coproc.ccr_present, - pdc_coproc.fpu_model, pdc_coproc.fpu_revision); + pdc_coproc.fpu_model, pdc_coproc.fpu_revision)); -#endif /* a kludge to detect PCXW */ if (pdc_coproc.fpu_model == HPPA_FPU_PCXW) cpu_version =
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Thu Mar 29 09:26:24 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: intr.c Log Message: Check for HPPA_SID_KERNEL when checking for interrupt in the mutex_enter critical section. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/arch/hp700/hp700/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/intr.c diff -u src/sys/arch/hp700/hp700/intr.c:1.37 src/sys/arch/hp700/hp700/intr.c:1.38 --- src/sys/arch/hp700/hp700/intr.c:1.37 Thu Mar 1 21:10:00 2012 +++ src/sys/arch/hp700/hp700/intr.c Thu Mar 29 09:26:24 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.37 2012/03/01 21:10:00 skrll Exp $ */ +/* $NetBSD: intr.c,v 1.38 2012/03/29 09:26:24 skrll Exp $ */ /* $OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $ */ /* @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.37 2012/03/01 21:10:00 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.38 2012/03/29 09:26:24 skrll Exp $); #define __MUTEX_PRIVATE @@ -391,7 +391,8 @@ hppa_intr(struct trapframe *frame) * interrupt handlers need to aquire the mutex, they could deadlock if * the owner value is left unset. */ - if (frame-tf_iioq_head = (u_int)mutex_enter_crit_start + if (frame-tf_iisq_head == HPPA_SID_KERNEL + frame-tf_iioq_head = (u_int)mutex_enter_crit_start frame-tf_iioq_head = (u_int)mutex_enter_crit_end frame-tf_ret0 != 0) ((kmutex_t *)frame-tf_arg0)-mtx_owner = (uintptr_t)curlwp;
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Thu Mar 1 21:10:01 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: intr.c Log Message: Use __func__ in panic messages. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/hp700/hp700/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/intr.c diff -u src/sys/arch/hp700/hp700/intr.c:1.36 src/sys/arch/hp700/hp700/intr.c:1.37 --- src/sys/arch/hp700/hp700/intr.c:1.36 Fri Feb 4 14:51:02 2011 +++ src/sys/arch/hp700/hp700/intr.c Thu Mar 1 21:10:00 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.36 2011/02/04 14:51:02 skrll Exp $ */ +/* $NetBSD: intr.c,v 1.37 2012/03/01 21:10:00 skrll Exp $ */ /* $OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $ */ /* @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.36 2011/02/04 14:51:02 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.37 2012/03/01 21:10:00 skrll Exp $); #define __MUTEX_PRIVATE @@ -126,7 +126,7 @@ hp700_interrupt_register_establish(struc if (hp700_interrupt_registers[idx] == NULL) break; if (idx == HP700_INTERRUPT_BITS) - panic(hp700_interrupt_register_establish: too many regs); + panic(%s: too many regs, __func__); hp700_interrupt_registers[idx] = ir; } @@ -184,7 +184,7 @@ hp700_intr_establish(int ipl, int (*hand if (ir-ir_bits_map[31 ^ bit_pos] != IR_BIT_UNUSED !IR_BIT_NESTED_P(ir-ir_bits_map[31 ^ bit_pos]) handler == NULL) - panic(hp700_intr_establish: int already handled); + panic(%s: int already handled, __func__); /* * If this interrupt bit leads us to another interrupt register, @@ -195,7 +195,7 @@ hp700_intr_establish(int ipl, int (*hand if (hp700_interrupt_registers[idx] == arg) break; if (idx == HP700_INTERRUPT_BITS) - panic(hp700_intr_establish: unknown int reg); + panic(%s: unknown int reg, __func__); ir-ir_bits_map[31 ^ bit_pos] = IR_BIT_REG | idx; return NULL; @@ -261,7 +261,7 @@ _hp700_intr_ipl_next(void) if (hp700_interrupt_bits[idx].ib_reg == NULL) break; if (idx == HP700_INTERRUPT_BITS) - panic(_hp700_intr_spl_bit: too many devices); + panic(%s: too many devices, __func__); return idx; }
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Sun Feb 26 07:52:52 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: Use new HPPA_CPU_PCXWP for PA8600 (Landshark) To generate a diff of this commit: cvs rdiff -u -r1.108 -r1.109 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.108 src/sys/arch/hp700/hp700/machdep.c:1.109 --- src/sys/arch/hp700/hp700/machdep.c:1.108 Thu Feb 23 21:38:53 2012 +++ src/sys/arch/hp700/hp700/machdep.c Sun Feb 26 07:52:52 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.108 2012/02/23 21:38:53 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.109 2012/02/26 07:52:52 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.108 2012/02/23 21:38:53 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.109 2012/02/26 07:52:52 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -384,7 +384,7 @@ const struct hppa_cpu_info cpu_types[] = #endif #ifdef HP8600_CPU { PA8600, Landshark, PCXW+, - hpcxwp, HPPA_CPU_PCXW2 /*XXX NH */, + hpcxwp, HPPA_CPU_PCXWP, HPPA_FTRS_W32B, 2.0, desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u, ibtlb_u, NULL, pbtlb_u, NULL },
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Thu Feb 23 21:38:53 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: disksubr.c machdep.c machdep.h mainbus.c Log Message: u_intXX_t - uintXX_t Same code before and after. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/hp700/hp700/disksubr.c cvs rdiff -u -r1.107 -r1.108 src/sys/arch/hp700/hp700/machdep.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hp700/hp700/machdep.h cvs rdiff -u -r1.80 -r1.81 src/sys/arch/hp700/hp700/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/disksubr.c diff -u src/sys/arch/hp700/hp700/disksubr.c:1.26 src/sys/arch/hp700/hp700/disksubr.c:1.27 --- src/sys/arch/hp700/hp700/disksubr.c:1.26 Fri May 8 09:33:58 2009 +++ src/sys/arch/hp700/hp700/disksubr.c Thu Feb 23 21:38:53 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: disksubr.c,v 1.26 2009/05/08 09:33:58 skrll Exp $ */ +/* $NetBSD: disksubr.c,v 1.27 2012/02/23 21:38:53 skrll Exp $ */ /* $OpenBSD: disksubr.c,v 1.6 2000/10/18 21:00:34 mickey Exp $ */ @@ -68,7 +68,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: disksubr.c,v 1.26 2009/05/08 09:33:58 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: disksubr.c,v 1.27 2012/02/23 21:38:53 skrll Exp $); #include sys/param.h #include sys/systm.h @@ -92,7 +92,7 @@ readbsdlabel(struct buf *bp, void (*stra { struct disklabel *dlp; const char *msg = NULL; - u_int16_t cksum; + uint16_t cksum; /* don't read the on-disk label if we are in spoofed-only mode */ if (spoofonly) Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.107 src/sys/arch/hp700/hp700/machdep.c:1.108 --- src/sys/arch/hp700/hp700/machdep.c:1.107 Sun Feb 5 08:24:43 2012 +++ src/sys/arch/hp700/hp700/machdep.c Thu Feb 23 21:38:53 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.107 2012/02/05 08:24:43 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.108 2012/02/23 21:38:53 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.107 2012/02/05 08:24:43 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.108 2012/02/23 21:38:53 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -152,7 +152,7 @@ int dcache_stride, dcache_line_mask; /* * things to not kill */ -volatile u_int8_t *machine_ledaddr; +volatile uint8_t *machine_ledaddr; int machine_ledword, machine_leds; /* @@ -1457,7 +1457,7 @@ cpu_reboot(int howto, char *user_boot_st /* NOTREACHED */ } -u_int32_t dumpmag = 0x8fca0101; /* magic number */ +uint32_t dumpmag = 0x8fca0101; /* magic number */ int dumpsize = 0; /* pages */ long dumplo = 0; /* blocks */ Index: src/sys/arch/hp700/hp700/machdep.h diff -u src/sys/arch/hp700/hp700/machdep.h:1.8 src/sys/arch/hp700/hp700/machdep.h:1.9 --- src/sys/arch/hp700/hp700/machdep.h:1.8 Tue Nov 3 05:07:25 2009 +++ src/sys/arch/hp700/hp700/machdep.h Thu Feb 23 21:38:53 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.h,v 1.8 2009/11/03 05:07:25 snj Exp $ */ +/* $NetBSD: machdep.h,v 1.9 2012/02/23 21:38:53 skrll Exp $ */ /* $OpenBSD: cpufunc.h,v 1.17 2000/05/15 17:22:40 mickey Exp $ */ @@ -95,7 +95,7 @@ void hp700_pagezero_unmap(int); /* Blinking the LEDs. */ #ifdef USELEDS #define _HP700_LED_FREQ (16) -extern volatile u_int8_t *machine_ledaddr; +extern volatile uint8_t *machine_ledaddr; extern int machine_ledword, machine_leds; extern int _hp700_led_on_cycles[]; #define hp700_led_blink(i) \ Index: src/sys/arch/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.80 src/sys/arch/hp700/hp700/mainbus.c:1.81 --- src/sys/arch/hp700/hp700/mainbus.c:1.80 Mon Jan 9 15:15:40 2012 +++ src/sys/arch/hp700/hp700/mainbus.c Thu Feb 23 21:38:53 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.80 2012/01/09 15:15:40 martin Exp $ */ +/* $NetBSD: mainbus.c,v 1.81 2012/02/23 21:38:53 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.80 2012/01/09 15:15:40 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.81 2012/02/23 21:38:53 skrll Exp $); #include locators.h #include power.h @@ -118,38 +118,38 @@ static int mb_attached; /* from machdep.c */ extern struct extent *hp700_io_extent; -u_int8_t mbus_r1(void *, bus_space_handle_t, bus_size_t); -u_int16_t mbus_r2(void *, bus_space_handle_t, bus_size_t); -u_int32_t mbus_r4(void *, bus_space_handle_t, bus_size_t); -u_int64_t mbus_r8(void *, bus_space_handle_t, bus_size_t); -void mbus_w1(void *, bus_space_handle_t, bus_size_t, u_int8_t); -void mbus_w2(void *, bus_space_handle_t, bus_size_t, u_int16_t); -void mbus_w4(void *, bus_space_handle_t, bus_size_t, u_int32_t); -void mbus_w8(void *, bus_space_handle_t, bus_size_t, u_int64_t); -void mbus_rm_1(void *,
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Sun Feb 5 08:23:12 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: -Wextra -Wno-unused-parameter To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.105 src/sys/arch/hp700/hp700/machdep.c:1.106 --- src/sys/arch/hp700/hp700/machdep.c:1.105 Fri Jan 27 18:52:56 2012 +++ src/sys/arch/hp700/hp700/machdep.c Sun Feb 5 08:23:11 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.105 2012/01/27 18:52:56 para Exp $ */ +/* $NetBSD: machdep.c,v 1.106 2012/02/05 08:23:11 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.105 2012/01/27 18:52:56 para Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.106 2012/02/05 08:23:11 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -259,11 +259,11 @@ struct fpreg lwp0_fpregs; /* Our exported CPU info */ struct cpu_info cpus[HPPA_MAXCPUS] = { - { #ifdef MULTIPROCESSOR + { .ci_curlwp = lwp0, -#endif }, +#endif }; struct vm_map *phys_map = NULL; @@ -324,21 +324,21 @@ const struct hppa_cpu_info cpu_types[] = hpcx, 0, 0, 1.0, desidhash_x, itlb_x, dtlb_x, itlbna_x, dtlbna_x, tlbd_x, - ibtlb_g, NULL, pbtlb_g }, /* XXXNH check */ + ibtlb_g, NULL, pbtlb_g, NULL }, /* XXXNH check */ #endif #ifdef HP7000_CPU { PA7000, NULL, PCXS, hpcxs, 0, 0, 1.1a, desidhash_s, itlb_s, dtlb_s, itlbna_s, dtlbna_s, tlbd_s, - ibtlb_g, NULL, pbtlb_g }, + ibtlb_g, NULL, pbtlb_g, NULL }, #endif #ifdef HP7100_CPU { PA7100, T-Bird, PCXT, hpcxt, 0, HPPA_FTRS_BTLBU, 1.1b, desidhash_t, itlb_t, dtlb_t, itlbna_t, dtlbna_t, tlbd_t, - ibtlb_g, NULL, pbtlb_g }, + ibtlb_g, NULL, pbtlb_g, NULL }, #endif #ifdef HP7100LC_CPU { PA7100LC, Hummingbird, PCXL, @@ -352,7 +352,7 @@ const struct hppa_cpu_info cpu_types[] = hpcxtp, HPPA_CPU_PCXT2, HPPA_FTRS_BTLBU, 1.1d, desidhash_t, itlb_t, dtlb_t, itlbna_t, dtlbna_t, tlbd_t, - ibtlb_g, NULL, pbtlb_g }, + ibtlb_g, NULL, pbtlb_g, NULL }, #endif #ifdef HP7300LC_CPU { PA7300LC, Velociraptor, PCXL2, @@ -366,49 +366,49 @@ const struct hppa_cpu_info cpu_types[] = hpcxu, HPPA_CPU_PCXU, HPPA_FTRS_W32B, 2.0, desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u, - ibtlb_u, NULL, pbtlb_u }, + ibtlb_u, NULL, pbtlb_u, NULL }, #endif #ifdef HP8200_CPU { PA8200, Vulcan, PCXU+, hpcxup, HPPA_CPU_PCXUP, HPPA_FTRS_W32B, 2.0, desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u, - ibtlb_u, NULL, pbtlb_u }, + ibtlb_u, NULL, pbtlb_u, NULL }, #endif #ifdef HP8500_CPU { PA8500, Barra'Cuda, PCXW, hpcxw, HPPA_CPU_PCXW, HPPA_FTRS_W32B, 2.0, desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u, - ibtlb_u, NULL, pbtlb_u }, + ibtlb_u, NULL, pbtlb_u, NULL }, #endif #ifdef HP8600_CPU { PA8600, Landshark, PCXW+, hpcxwp, HPPA_CPU_PCXW2 /*XXX NH */, HPPA_FTRS_W32B, 2.0, desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u, - ibtlb_u, NULL, pbtlb_u }, + ibtlb_u, NULL, pbtlb_u, NULL }, #endif #ifdef HP8700_CPU { PA8700, Piranha, PCXW2, hpcxw2, HPPA_CPU_PCXW2, HPPA_FTRS_W32B, 2.0, desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u, - ibtlb_u, NULL, pbtlb_u }, + ibtlb_u, NULL, pbtlb_u, NULL }, #endif #ifdef HP8800_CPU { PA8800, Mako, Make, mako, HPPA_CPU_PCXW2, HPPA_FTRS_W32B, 2.0, desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u, - ibtlb_u, NULL, pbtlb_u }, + ibtlb_u, NULL, pbtlb_u, NULL }, #endif #ifdef HP8900_CPU { PA8900, Shortfin, Shortfin, mako, HPPA_CPU_PCXW2, HPPA_FTRS_W32B, 2.0, desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u, - ibtlb_u, NULL, pbtlb_u }, + ibtlb_u, NULL, pbtlb_u, NULL }, #endif { } }; @@ -2031,7 +2031,9 @@ struct blink_lcd_softc { SLIST_HEAD(, blink_lcd) bls_head; int bls_on; struct callout bls_to; -} blink_sc = { SLIST_HEAD_INITIALIZER(bls_head), 0 }; +} blink_sc = { + .bls_head = SLIST_HEAD_INITIALIZER(bls_head) +}; void blink_lcd_register(struct blink_lcd *l)
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Sun Feb 5 08:24:43 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: Use __arrarycount(cpu_types) to bound the table search and not NULL check. The NULL check was wrong. To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.106 src/sys/arch/hp700/hp700/machdep.c:1.107 --- src/sys/arch/hp700/hp700/machdep.c:1.106 Sun Feb 5 08:23:11 2012 +++ src/sys/arch/hp700/hp700/machdep.c Sun Feb 5 08:24:43 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.106 2012/02/05 08:23:11 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.107 2012/02/05 08:24:43 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.106 2012/02/05 08:23:11 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.107 2012/02/05 08:24:43 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -410,7 +410,6 @@ const struct hppa_cpu_info cpu_types[] = desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u, ibtlb_u, NULL, pbtlb_u, NULL }, #endif - { } }; void @@ -649,7 +648,7 @@ cpuid(void) const struct hppa_cpu_info *p = NULL; const char *model; u_int cpu_version, cpu_features; - int error; + int error, i; /* may the scientific guessing begin */ cpu_type = hpc_unknown; @@ -786,21 +785,25 @@ cpuid(void) pmap_hptsize = 0; } - if (cpu_version) - for (p = cpu_types; p-hci_chip_name; p++) { + if (cpu_version) { + for (i = 0, p = cpu_types; i __arraycount(cpu_types); + i++, p++) { if (p-hci_cpuversion == cpu_version) break; } - else if (cpu_type != hpc_unknown) - for (p = cpu_types; p-hci_chip_name; p++) { + } else if (cpu_type != hpc_unknown) { + for (i = 0, p = cpu_types; i __arraycount(cpu_types); + i++, p++) { if (p-hci_cputype == cpu_type) break; } - else - for (p = cpu_types; p-hci_chip_name; p++) { + } else { + for (i = 0, p = cpu_types; i __arraycount(cpu_types); + i++, p++) { if (p-hci_features == cpu_features) break; } + } hppa_cpu_info = p;
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Sun Feb 5 08:27:37 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: conf.c Log Message: -Wextra -Wno-unused-parameter To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hp700/hp700/conf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/conf.c diff -u src/sys/arch/hp700/hp700/conf.c:1.9 src/sys/arch/hp700/hp700/conf.c:1.10 --- src/sys/arch/hp700/hp700/conf.c:1.9 Sun Dec 11 12:17:24 2005 +++ src/sys/arch/hp700/hp700/conf.c Sun Feb 5 08:27:37 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: conf.c,v 1.9 2005/12/11 12:17:24 christos Exp $ */ +/* $NetBSD: conf.c,v 1.10 2012/02/05 08:27:37 skrll Exp $ */ /* $OpenBSD: conf.c,v 1.15 2001/09/28 02:53:13 mickey Exp $ */ @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: conf.c,v 1.9 2005/12/11 12:17:24 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: conf.c,v 1.10 2012/02/05 08:27:37 skrll Exp $); #include sys/param.h #include sys/conf.h @@ -54,6 +54,6 @@ struct consdev constab[] = { #if NCOM 0 cons_init(com), #endif - { 0 } + { .cn_probe = NULL } };
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Fri Jan 13 07:05:57 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: autoconf.c Log Message: Allow uturn(4) to provide the boot device. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/hp700/hp700/autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/autoconf.c diff -u src/sys/arch/hp700/hp700/autoconf.c:1.42 src/sys/arch/hp700/hp700/autoconf.c:1.43 --- src/sys/arch/hp700/hp700/autoconf.c:1.42 Fri Jan 13 07:01:04 2012 +++ src/sys/arch/hp700/hp700/autoconf.c Fri Jan 13 07:05:57 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.42 2012/01/13 07:01:04 skrll Exp $ */ +/* $NetBSD: autoconf.c,v 1.43 2012/01/13 07:05:57 skrll Exp $ */ /* $OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $ */ @@ -86,7 +86,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.42 2012/01/13 07:01:04 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.43 2012/01/13 07:05:57 skrll Exp $); #include opt_kgdb.h #include opt_useleds.h @@ -352,7 +352,8 @@ device_register(device_t dev, void *aux) * controller's struct dev in boot_device. The SCSI device is located * later, see below. */ - if (device_is_a(pdev, gsc) || device_is_a(pdev, phantomas)) { + if (device_is_a(pdev, gsc) || device_is_a(pdev, phantomas) || + device_is_a(pdev, uturn)) { struct confargs *ca = aux; if ((hppa_hpa_t)PAGE0-mem_boot.pz_hpa == ca-ca_hpa) {
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: martin Date: Mon Jan 9 15:15:40 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: mainbus.c Log Message: Avoid a warning in kernels w/o LCD support To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/arch/hp700/hp700/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.79 src/sys/arch/hp700/hp700/mainbus.c:1.80 --- src/sys/arch/hp700/hp700/mainbus.c:1.79 Wed Feb 23 08:27:17 2011 +++ src/sys/arch/hp700/hp700/mainbus.c Mon Jan 9 15:15:40 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.79 2011/02/23 08:27:17 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.80 2012/01/09 15:15:40 martin Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.79 2011/02/23 08:27:17 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.80 2012/01/09 15:15:40 martin Exp $); #include locators.h #include power.h @@ -1359,7 +1359,9 @@ mbattach(device_t parent, device_t self, struct mainbus_softc *sc = device_private(self); struct confargs nca; bus_space_handle_t ioh; +#if NLCD 0 int err; +#endif sc-sc_dv = self; mb_attached = 1;
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Mon Jan 9 19:40:55 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.103 -r1.104 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.103 src/sys/arch/hp700/hp700/machdep.c:1.104 --- src/sys/arch/hp700/hp700/machdep.c:1.103 Mon Jan 2 16:13:12 2012 +++ src/sys/arch/hp700/hp700/machdep.c Mon Jan 9 19:40:54 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.103 2012/01/02 16:13:12 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.104 2012/01/09 19:40:54 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.103 2012/01/02 16:13:12 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.104 2012/01/09 19:40:54 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -450,11 +450,13 @@ hppa_init(paddr_t start, void *bi) if (bi != NULL) memcpy(bootinfo, bi, sizeof(struct bootinfo)); - pdc_init(); /* init PDC iface, so we can call em easy */ + /* init PDC iface, so we can call em easy */ + pdc_init(); cpu_hzticks = (PAGE0-mem_10msec * 100) / hz; - delay_init(); /* calculate CPU clock ratio */ + /* calculate CPU clock ratio */ + delay_init(); /* fetch the monarch/default cpu hpa */
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Fri Jan 6 22:14:05 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: autoconf.c Log Message: s/aprint_verbose/aprint_debug/ To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/arch/hp700/hp700/autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/autoconf.c diff -u src/sys/arch/hp700/hp700/autoconf.c:1.40 src/sys/arch/hp700/hp700/autoconf.c:1.41 --- src/sys/arch/hp700/hp700/autoconf.c:1.40 Mon Dec 12 19:03:09 2011 +++ src/sys/arch/hp700/hp700/autoconf.c Fri Jan 6 22:14:04 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.40 2011/12/12 19:03:09 mrg Exp $ */ +/* $NetBSD: autoconf.c,v 1.41 2012/01/06 22:14:04 skrll Exp $ */ /* $OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $ */ @@ -86,7 +86,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.40 2011/12/12 19:03:09 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.41 2012/01/06 22:14:04 skrll Exp $); #include opt_kgdb.h #include opt_useleds.h @@ -477,7 +477,7 @@ hppa_walkbus(struct confargs *ca) if (ca-ca_hpabase == 0) return; - aprint_verbose( Walking bus at HPA 0x%lx\n, ca-ca_hpabase); + aprint_debug( Walking bus at HPA 0x%lx\n, ca-ca_hpabase); for (i = 0; i ca-ca_nmodules; i++) { int error; @@ -500,12 +500,12 @@ hppa_walkbus(struct confargs *ca) if (error 0) continue; - aprint_verbose( HPA 0x%lx[0x%x], nhm.hm_hpa, + aprint_debug( HPA 0x%lx[0x%x], nhm.hm_hpa, nhm.hm_hpasz); TAILQ_FOREACH(hm, hppa_pdcmodule_list, hm_link) { if (nhm.hm_hpa == hm-hm_hpa) { -aprint_verbose( found by firmware\n); +aprint_debug( found by firmware\n); break; } } @@ -516,7 +516,7 @@ hppa_walkbus(struct confargs *ca) /* Expect PDC to report devices of the following types */ if (nhm.hm_type.iodc_type == HPPA_TYPE_FIO) { - aprint_verbose( expected to be missing\n); + aprint_debug( expected to be missing\n); continue; } @@ -568,7 +568,7 @@ pdc_scanbus(device_t self, struct confar } else nca.ca_naddrs = hm-hm_naddrs; - aprint_verbose( ADDRS[%d/%d]: , nca.ca_naddrs, + aprint_debug( ADDRS[%d/%d]: , nca.ca_naddrs, hm-hm_modindex); KASSERT(hm-hm_modindex != -1); @@ -583,31 +583,31 @@ pdc_scanbus(device_t self, struct confar nca.ca_addrs[ia].size = pdc_find_addr.size PGSHIFT; -aprint_verbose( 0x%lx[0x%x], +aprint_debug( 0x%lx[0x%x], nca.ca_addrs[ia].addr, nca.ca_addrs[ia].size); } - aprint_verbose(\n); + aprint_debug(\n); } - aprint_verbose( HPA 0x%lx[0x%x]\n, nca.ca_hpa, + aprint_debug( HPA 0x%lx[0x%x]\n, nca.ca_hpa, nca.ca_hpasz); snprintb(buf, sizeof(buf), PZF_BITS, nca.ca_dp.dp_flags); - aprint_verbose( probing: flags %s , buf); + aprint_debug( probing: flags %s , buf); if (nca.ca_dp.dp_mod =0) { int n; - aprint_verbose( path ); + aprint_debug( path ); for (n = 0; n 6; n++) { if (nca.ca_dp.dp_bc[n] = 0) - aprint_verbose(%d/, + aprint_debug(%d/, nca.ca_dp.dp_bc[n]); } - aprint_verbose(%d, nca.ca_dp.dp_mod); + aprint_debug(%d, nca.ca_dp.dp_mod); } - aprint_verbose( type %x sv %x\n, + aprint_debug( type %x sv %x\n, nca.ca_type.iodc_type, nca.ca_type.iodc_sv_model); nca.ca_irq = HP700CF_IRQ_UNDEF; @@ -707,12 +707,12 @@ hppa_pdcmodule_create(struct hppa_pdcmod if (hm-hm_dp.dp_mod = 0) { int n; - aprint_verbose( %s device at path , who); + aprint_debug( %s device at path , who); for (n = 0; n 6; n++) { if (hm-hm_dp.dp_bc[n] = 0) -aprint_verbose(%d/, hm-hm_dp.dp_bc[n]); +aprint_debug(%d/, hm-hm_dp.dp_bc[n]); } - aprint_verbose(%d addrs %d\n, hm-hm_dp.dp_mod, + aprint_debug(%d addrs %d\n, hm-hm_dp.dp_mod, hm-hm_naddrs); }
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Tue Jan 3 06:11:21 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: locore.S Log Message: Tidy up the M[FT]CPU_* hv-specific instructions some more. Same code before and after change. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/arch/hp700/hp700/locore.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/locore.S diff -u src/sys/arch/hp700/hp700/locore.S:1.57 src/sys/arch/hp700/hp700/locore.S:1.58 --- src/sys/arch/hp700/hp700/locore.S:1.57 Mon Jan 2 16:13:12 2012 +++ src/sys/arch/hp700/hp700/locore.S Tue Jan 3 06:11:21 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.57 2012/01/02 16:13:12 skrll Exp $ */ +/* $NetBSD: locore.S,v 1.58 2012/01/03 06:11:21 skrll Exp $ */ /* $OpenBSD: locore.S,v 1.158 2008/07/28 19:08:46 miod Exp $ */ /* @@ -118,30 +118,18 @@ _DEBUG_DUMPN(reg1, reg2, reg3, 27) ! \ _DEBUG_DUMPN(reg1, reg2, reg3, 31) -#ifdef XXXNH /* * hv-specific instructions */ -#define DR_PAGE0 diag (0x70 5)/* XXXNH Different */ -#define DR_PAGE1 diag (0x72 5)/* XXXNH Different */ -#define MTCPU_T(x,t) diag ((t) 21) | ((x) 16) | (0xc0 5) /* XXXNH Different */ -#define MFCPU_T(r,x) diag ((r) 21) | (0xa0 5) | (x) +#define DR_PAGE0 diag (0x70 5) +#define DR_PAGE1 diag (0x72 5) + +#define MTCPU_T(x,t) diag ((t) 21) | ((x) 16) | (0xb0 5) +#define MFCPU_T(r,x) diag ((r) 21) | ((x) 16) | (0xd0 5) #define MTCPU_C(x,t) diag ((t) 21) | ((x) 16) | (0x12 5) #define MFCPU_C(r,x) diag ((r) 21) | ((x) 16) | (0x30 5) -#define MFCPU_U(r,x) .word 0x140008a0 | ((r) 21) | ((x)) -#define MTCPU_U(x,r) .word 0x14001840 | ((r) 21) | ((x) 16) - -#else - -#define DR_PAGE0 .word 0x14001200 -#define DR_PAGE1 .word 0x14001240 -#define MTCPU_T(x,t) .word 0x14001600 | ((t) 21) | ((x) 16) -#define MFCPU_T(r,x) .word 0x14001a00 | ((r) 21) | ((x) 16) -#define MTCPU_C(x,t) .word 0x14000240 | ((t) 21) | ((x) 16) -#define MFCPU_C(r,x) .word 0x14000600 | ((r) 21) | ((x) 16) -#define MFCPU_U(r,x) .word 0x140008a0 | ((r) 21) | ((x)) -#define MTCPU_U(x,r) .word 0x14001840 | ((r) 21) | ((x) 16) -#endif +#define MFCPU_U(r,x) diag ((r) 21) | ((x)) | (0x45 5) +#define MTCPU_U(x,r) diag ((r) 21) | ((x) 16) | (0xc2 5) .import $global$, data .import pdc, data
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Mon Dec 19 10:57:00 UTC 2011 Modified Files: src/sys/arch/hp700/hp700: locore.S Log Message: Whitespace. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/arch/hp700/hp700/locore.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/locore.S diff -u src/sys/arch/hp700/hp700/locore.S:1.55 src/sys/arch/hp700/hp700/locore.S:1.56 --- src/sys/arch/hp700/hp700/locore.S:1.55 Mon Feb 7 12:19:35 2011 +++ src/sys/arch/hp700/hp700/locore.S Mon Dec 19 10:56:59 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.55 2011/02/07 12:19:35 skrll Exp $ */ +/* $NetBSD: locore.S,v 1.56 2011/12/19 10:56:59 skrll Exp $ */ /* $OpenBSD: locore.S,v 1.158 2008/07/28 19:08:46 miod Exp $ */ /* @@ -394,7 +394,7 @@ LEAF_ENTRY_NOPROFILE(kernel_setup) /* * set up the dp pointer so that we can do quick references off of it */ - ldil L%$global$,%dp + ldil L%$global$, %dp ldo R%$global$(%dp), %dp /*
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Wed Feb 23 08:27:18 UTC 2011 Modified Files: src/sys/arch/hp700/hp700: mainbus.c Log Message: Fix call to pmap_update. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/sys/arch/hp700/hp700/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.78 src/sys/arch/hp700/hp700/mainbus.c:1.79 --- src/sys/arch/hp700/hp700/mainbus.c:1.78 Thu Feb 3 20:37:09 2011 +++ src/sys/arch/hp700/hp700/mainbus.c Wed Feb 23 08:27:17 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.78 2011/02/03 20:37:09 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.79 2011/02/23 08:27:17 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.78 2011/02/03 20:37:09 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.79 2011/02/23 08:27:17 skrll Exp $); #include locators.h #include power.h @@ -1182,7 +1182,7 @@ size -= PAGE_SIZE; } } - pmap_update(); + pmap_update(pmap_kernel()); return (0); }
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Fri Feb 4 14:35:30 UTC 2011 Modified Files: src/sys/arch/hp700/hp700: intr.c Log Message: Another change to suit my eye. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/hp700/hp700/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/intr.c diff -u src/sys/arch/hp700/hp700/intr.c:1.34 src/sys/arch/hp700/hp700/intr.c:1.35 --- src/sys/arch/hp700/hp700/intr.c:1.34 Tue Feb 1 18:33:24 2011 +++ src/sys/arch/hp700/hp700/intr.c Fri Feb 4 14:35:30 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.34 2011/02/01 18:33:24 skrll Exp $ */ +/* $NetBSD: intr.c,v 1.35 2011/02/04 14:35:30 skrll Exp $ */ /* $OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $ */ /* @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.34 2011/02/01 18:33:24 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.35 2011/02/04 14:35:30 skrll Exp $); #define __MUTEX_PRIVATE @@ -233,17 +233,18 @@ * It returns the bit position, or -1 if no bits were available. */ int -hp700_intr_allocate_bit(struct hp700_interrupt_register *int_reg) +hp700_intr_allocate_bit(struct hp700_interrupt_register *ir) { int bit_pos, mask; for (bit_pos = 31, mask = (1 bit_pos); bit_pos = 0; bit_pos--, mask = 1) - if (int_reg-ir_bits mask) + if (ir-ir_bits mask) break; if (bit_pos = 0) - int_reg-ir_bits = ~mask; + ir-ir_bits = ~mask; + return bit_pos; }
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Fri Feb 4 14:51:03 UTC 2011 Modified Files: src/sys/arch/hp700/hp700: intr.c Log Message: mask should really be unsigned. it doesn't actually matter. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/hp700/hp700/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/intr.c diff -u src/sys/arch/hp700/hp700/intr.c:1.35 src/sys/arch/hp700/hp700/intr.c:1.36 --- src/sys/arch/hp700/hp700/intr.c:1.35 Fri Feb 4 14:35:30 2011 +++ src/sys/arch/hp700/hp700/intr.c Fri Feb 4 14:51:02 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.35 2011/02/04 14:35:30 skrll Exp $ */ +/* $NetBSD: intr.c,v 1.36 2011/02/04 14:51:02 skrll Exp $ */ /* $OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $ */ /* @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.35 2011/02/04 14:35:30 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.36 2011/02/04 14:51:02 skrll Exp $); #define __MUTEX_PRIVATE @@ -235,7 +235,8 @@ int hp700_intr_allocate_bit(struct hp700_interrupt_register *ir) { - int bit_pos, mask; + int bit_pos; + u_int mask; for (bit_pos = 31, mask = (1 bit_pos); bit_pos = 0;
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Thu Feb 3 20:37:09 UTC 2011 Modified Files: src/sys/arch/hp700/hp700: mainbus.c Log Message: Replace -1 with HP700CF_IRQ_UNDEF To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/arch/hp700/hp700/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.77 src/sys/arch/hp700/hp700/mainbus.c:1.78 --- src/sys/arch/hp700/hp700/mainbus.c:1.77 Sun Jan 23 21:53:40 2011 +++ src/sys/arch/hp700/hp700/mainbus.c Thu Feb 3 20:37:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.77 2011/01/23 21:53:40 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.78 2011/02/03 20:37:09 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.77 2011/01/23 21:53:40 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.78 2011/02/03 20:37:09 skrll Exp $); #include locators.h #include power.h @@ -1401,7 +1401,7 @@ /* get some power */ memset(nca, 0, sizeof(nca)); nca.ca_name = power; - nca.ca_irq = -1; + nca.ca_irq = HP700CF_IRQ_UNDEF; nca.ca_iot = hppa_bustag; config_found(self, nca, mbprint); #endif @@ -1414,7 +1414,7 @@ nca.ca_dp.dp_bc[0] = nca.ca_dp.dp_bc[1] = nca.ca_dp.dp_bc[2] = nca.ca_dp.dp_bc[3] = nca.ca_dp.dp_bc[4] = nca.ca_dp.dp_bc[5] = -1; nca.ca_dp.dp_mod = -1; - nca.ca_irq = -1; + nca.ca_irq = HP700CF_IRQ_UNDEF; nca.ca_iot = hppa_bustag; nca.ca_hpa = nca.ca_pcl.cmd_addr;
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Tue Feb 1 18:12:10 UTC 2011 Modified Files: src/sys/arch/hp700/hp700: intr.c Log Message: Remove trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/arch/hp700/hp700/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/intr.c diff -u src/sys/arch/hp700/hp700/intr.c:1.32 src/sys/arch/hp700/hp700/intr.c:1.33 --- src/sys/arch/hp700/hp700/intr.c:1.32 Fri Dec 24 16:03:54 2010 +++ src/sys/arch/hp700/hp700/intr.c Tue Feb 1 18:12:10 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.32 2010/12/24 16:03:54 skrll Exp $ */ +/* $NetBSD: intr.c,v 1.33 2011/02/01 18:12:10 skrll Exp $ */ /* $OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $ */ /* @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.32 2010/12/24 16:03:54 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.33 2011/02/01 18:12:10 skrll Exp $); #define __MUTEX_PRIVATE @@ -172,7 +172,7 @@ { struct hp700_int_bit *int_bit; int idx; - + /* Panic on a bad interrupt bit. */ if (bit_pos 0 || bit_pos = HP700_INT_BITS) panic(%s: bad interrupt bit %d, __func__, bit_pos); @@ -287,7 +287,7 @@ continue; imask[int_bit-int_bit_ipl] |= int_bit-int_bit_spl; } - + /* The following bits cribbed from i386/isa/isa_machdep.c: */ /* @@ -435,7 +435,7 @@ if (ci-ci_ipending ~ci-ci_cpl) hp700_intr_dispatch(ci-ci_cpl, frame-tf_eiem, frame); } - + /* * Dispatch interrupts. This dispatches at least one interrupt. * This is called with %eiem loaded with zero. @@ -483,7 +483,7 @@ } arg = clkframe; } - + /* * Remove this bit from ipending, raise spl to * the level required to run this interrupt,
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Sat Jan 22 19:27:44 UTC 2011 Modified Files: src/sys/arch/hp700/hp700: genassym.cf Log Message: Make __SIMPLELOCK_RAW_UNLOCKED available. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/hp700/hp700/genassym.cf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/genassym.cf diff -u src/sys/arch/hp700/hp700/genassym.cf:1.26 src/sys/arch/hp700/hp700/genassym.cf:1.27 --- src/sys/arch/hp700/hp700/genassym.cf:1.26 Sat Jan 22 10:57:07 2011 +++ src/sys/arch/hp700/hp700/genassym.cf Sat Jan 22 19:27:43 2011 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.26 2011/01/22 10:57:07 skrll Exp $ +# $NetBSD: genassym.cf,v 1.27 2011/01/22 19:27:43 skrll Exp $ # $OpenBSD: genassym.cf,v 1.18 2001/09/20 18:31:14 mickey Exp $ @@ -77,6 +77,7 @@ export HPPA_SID_KERNEL export VM_MAXUSER_ADDRESS export HPPA_LDCW_ALIGN +export __SIMPLELOCK_RAW_UNLOCKED # `break' entry points export HPPA_BREAK_KERNEL
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Thu Jan 20 19:43:17 UTC 2011 Modified Files: src/sys/arch/hp700/hp700: intr.h Log Message: #definetab To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hp700/hp700/intr.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/intr.h diff -u src/sys/arch/hp700/hp700/intr.h:1.13 src/sys/arch/hp700/hp700/intr.h:1.14 --- src/sys/arch/hp700/hp700/intr.h:1.13 Sun Dec 5 12:19:09 2010 +++ src/sys/arch/hp700/hp700/intr.h Thu Jan 20 19:43:16 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.13 2010/12/05 12:19:09 skrll Exp $ */ +/* $NetBSD: intr.h,v 1.14 2011/01/20 19:43:16 skrll Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ * and the maximum number of interrupt registers. */ #define HP700_INT_BITS (32) -#define CPU_NINTS HP700_INT_BITS /* Use this one */ +#define CPU_NINTS HP700_INT_BITS /* Use this one */ /* * This describes one HP700 interrupt register.
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Mon Jan 17 12:37:46 UTC 2011 Modified Files: src/sys/arch/hp700/hp700: locore.S Log Message: Whitespace. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/arch/hp700/hp700/locore.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/locore.S diff -u src/sys/arch/hp700/hp700/locore.S:1.48 src/sys/arch/hp700/hp700/locore.S:1.49 --- src/sys/arch/hp700/hp700/locore.S:1.48 Wed Jan 12 21:18:23 2011 +++ src/sys/arch/hp700/hp700/locore.S Mon Jan 17 12:37:46 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.48 2011/01/12 21:18:23 skrll Exp $ */ +/* $NetBSD: locore.S,v 1.49 2011/01/17 12:37:46 skrll Exp $ */ /* $OpenBSD: locore.S,v 1.158 2008/07/28 19:08:46 miod Exp $ */ /* @@ -385,15 +385,15 @@ /* * load address of interrupt vector table */ - ldil L%ivaaddr,%t2 - ldo R%ivaaddr(%t2),%t2 - mtctl %t2,%iva + ldil L%ivaaddr, %t2 + ldo R%ivaaddr(%t2), %t2 + mtctl %t2, %iva /* * set up the dp pointer so that we can do quick references off of it */ ldil L%$global$,%dp - ldo R%$global$(%dp),%dp + ldo R%$global$(%dp), %dp /* * Create a stack frame for us to call C with. Clear out the previous @@ -413,7 +413,7 @@ mtctl %r0, %pcsq mtctl %r0, %pcsq mtctl %rp, %pcoq - ldo 4(%rp),%rp + ldo 4(%rp), %rp mtctl %rp, %pcoq mtctl %arg1, %ipsw rfi
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Fri Jan 14 16:37:11 UTC 2011 Modified Files: src/sys/arch/hp700/hp700: autoconf.c Log Message: Copy the pdc_iodc_read data when creating a device. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/hp700/hp700/autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/autoconf.c diff -u src/sys/arch/hp700/hp700/autoconf.c:1.36 src/sys/arch/hp700/hp700/autoconf.c:1.37 --- src/sys/arch/hp700/hp700/autoconf.c:1.36 Thu Jan 13 21:15:14 2011 +++ src/sys/arch/hp700/hp700/autoconf.c Fri Jan 14 16:37:11 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.36 2011/01/13 21:15:14 skrll Exp $ */ +/* $NetBSD: autoconf.c,v 1.37 2011/01/14 16:37:11 skrll Exp $ */ /* $OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $ */ @@ -86,7 +86,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.36 2011/01/13 21:15:14 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.37 2011/01/14 16:37:11 skrll Exp $); #include opt_kgdb.h #include opt_useleds.h @@ -669,6 +669,7 @@ nhm = kmem_zalloc(sizeof(*nhm), KM_SLEEP); nhm-hm_registered = false; + nhm-hm_pir = hm-hm_pir; nhm-hm_type = hm-hm_type; nhm-hm_dp = hm-hm_dp; nhm-hm_hpa = hm-hm_hpa;
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Fri Jan 14 16:48:15 UTC 2011 Modified Files: src/sys/arch/hp700/hp700: autoconf.c Log Message: Tweak aprint_verbose output. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/arch/hp700/hp700/autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/autoconf.c diff -u src/sys/arch/hp700/hp700/autoconf.c:1.37 src/sys/arch/hp700/hp700/autoconf.c:1.38 --- src/sys/arch/hp700/hp700/autoconf.c:1.37 Fri Jan 14 16:37:11 2011 +++ src/sys/arch/hp700/hp700/autoconf.c Fri Jan 14 16:48:15 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.37 2011/01/14 16:37:11 skrll Exp $ */ +/* $NetBSD: autoconf.c,v 1.38 2011/01/14 16:48:15 skrll Exp $ */ /* $OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $ */ @@ -86,7 +86,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.37 2011/01/14 16:37:11 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.38 2011/01/14 16:48:15 skrll Exp $); #include opt_kgdb.h #include opt_useleds.h @@ -525,10 +525,8 @@ } /* If we've found the module move onto the next one. */ - if (hm) { - aprint_verbose(\n); + if (hm) continue; - } /* Expect PDC to report devices of the following types */ if (nhm.hm_type.iodc_type == HPPA_TYPE_FIO) {
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Wed Jan 12 21:18:23 UTC 2011 Modified Files: src/sys/arch/hp700/hp700: locore.S Log Message: LOCKDEBUG isn't used here. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/arch/hp700/hp700/locore.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/locore.S diff -u src/sys/arch/hp700/hp700/locore.S:1.47 src/sys/arch/hp700/hp700/locore.S:1.48 --- src/sys/arch/hp700/hp700/locore.S:1.47 Sun Jun 6 12:13:35 2010 +++ src/sys/arch/hp700/hp700/locore.S Wed Jan 12 21:18:23 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.47 2010/06/06 12:13:35 skrll Exp $ */ +/* $NetBSD: locore.S,v 1.48 2011/01/12 21:18:23 skrll Exp $ */ /* $OpenBSD: locore.S,v 1.158 2008/07/28 19:08:46 miod Exp $ */ /* @@ -60,7 +60,6 @@ #include opt_cputype.h #include opt_ddb.h #include opt_kgdb.h -#include opt_lockdebug.h #include sys/errno.h #include machine/param.h
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Fri Dec 24 16:03:54 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: intr.c Log Message: #include opt_lockdebug.h To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/hp700/hp700/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/intr.c diff -u src/sys/arch/hp700/hp700/intr.c:1.31 src/sys/arch/hp700/hp700/intr.c:1.32 --- src/sys/arch/hp700/hp700/intr.c:1.31 Mon Dec 20 00:25:33 2010 +++ src/sys/arch/hp700/hp700/intr.c Fri Dec 24 16:03:54 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.31 2010/12/20 00:25:33 matt Exp $ */ +/* $NetBSD: intr.c,v 1.32 2010/12/24 16:03:54 skrll Exp $ */ /* $OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $ */ /* @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.31 2010/12/20 00:25:33 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.32 2010/12/24 16:03:54 skrll Exp $); #define __MUTEX_PRIVATE @@ -55,6 +55,10 @@ #include machine/mutex.h +#if defined(_KERNEL_OPT) +#include opt_lockdebug.h +#endif + /* The priority level masks. */ int imask[NIPL];
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Sun Dec 12 08:52:49 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: Fix DEBUG build after previous. To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.92 src/sys/arch/hp700/hp700/machdep.c:1.93 --- src/sys/arch/hp700/hp700/machdep.c:1.92 Sun Dec 12 08:23:14 2010 +++ src/sys/arch/hp700/hp700/machdep.c Sun Dec 12 08:52:49 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.92 2010/12/12 08:23:14 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.93 2010/12/12 08:52:49 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.92 2010/12/12 08:23:14 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.93 2010/12/12 08:52:49 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -659,7 +659,8 @@ pdc_model.hv = 0; } else { #ifdef DEBUG - printf(pdc_model.hvers %d\n, pdc_model.hvers); + printf(pdc_model.hwmodel/hv %x/%x\n, pdc_model.hwmodel, + pdc_model.hv); #endif } /* XXXNH - check */
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Sun Dec 12 08:54:26 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: Remove an XXX. To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.93 src/sys/arch/hp700/hp700/machdep.c:1.94 --- src/sys/arch/hp700/hp700/machdep.c:1.93 Sun Dec 12 08:52:49 2010 +++ src/sys/arch/hp700/hp700/machdep.c Sun Dec 12 08:54:25 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.93 2010/12/12 08:52:49 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.94 2010/12/12 08:54:25 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.93 2010/12/12 08:52:49 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.94 2010/12/12 08:54:25 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -663,7 +663,6 @@ pdc_model.hv); #endif } - /* XXXNH - check */ cpu_modelno = pdc_model.hwmodel; model = hppa_mod_info(HPPA_TYPE_BOARD, cpu_modelno); #ifdef DEBUG
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Thu Dec 9 10:19:23 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: Initialise lwp0.l_cpu early so that spl* work. To generate a diff of this commit: cvs rdiff -u -r1.90 -r1.91 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.90 src/sys/arch/hp700/hp700/machdep.c:1.91 --- src/sys/arch/hp700/hp700/machdep.c:1.90 Mon Dec 6 18:42:09 2010 +++ src/sys/arch/hp700/hp700/machdep.c Thu Dec 9 10:19:23 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.90 2010/12/06 18:42:09 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.91 2010/12/09 10:19:23 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.90 2010/12/06 18:42:09 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.91 2010/12/09 10:19:23 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -429,12 +429,13 @@ #ifdef KGDB boothowto |= RB_KDB; /* go to kgdb early if compiled in. */ #endif - /* Setup curlwp/curcpu early for LOCKDEBUG */ + /* Setup curlwp/curcpu early for LOCKDEBUG and spl* */ #ifdef MULTIPROCESSOR mtctl(cpus[0], CR_CURCPU); #else mtctl(lwp0, CR_CURLWP); #endif + lwp0.l_cpu = cpus[0]; /* Copy bootinfo */ if (bi != NULL)
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Mon Dec 6 18:42:10 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: Wrap a printf in #ifdef DEBUG To generate a diff of this commit: cvs rdiff -u -r1.89 -r1.90 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.89 src/sys/arch/hp700/hp700/machdep.c:1.90 --- src/sys/arch/hp700/hp700/machdep.c:1.89 Mon Nov 8 19:59:20 2010 +++ src/sys/arch/hp700/hp700/machdep.c Mon Dec 6 18:42:09 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.89 2010/11/08 19:59:20 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.90 2010/12/06 18:42:09 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.89 2010/11/08 19:59:20 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.90 2010/12/06 18:42:09 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -715,7 +715,9 @@ usebtlb = 0; if (cpu_version == HPPA_CPU_PCXW || cpu_version HPPA_CPU_PCXL2) { +#ifdef DEBUG printf(WARNING: BTLB no supported on cpu %d\n, cpu_version); +#endif } else { /* BTLB params */
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Sun Dec 5 10:11:46 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: intr.c Log Message: Reformat comments. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/hp700/hp700/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/intr.c diff -u src/sys/arch/hp700/hp700/intr.c:1.26 src/sys/arch/hp700/hp700/intr.c:1.27 --- src/sys/arch/hp700/hp700/intr.c:1.26 Wed Jul 7 01:18:39 2010 +++ src/sys/arch/hp700/hp700/intr.c Sun Dec 5 10:11:46 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.26 2010/07/07 01:18:39 chs Exp $ */ +/* $NetBSD: intr.c,v 1.27 2010/12/05 10:11:46 skrll Exp $ */ /* $OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $ */ /* @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.26 2010/07/07 01:18:39 chs Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.27 2010/12/05 10:11:46 skrll Exp $); #define __MUTEX_PRIVATE @@ -171,16 +171,16 @@ panic(%s: bad interrupt bit %d, __func__, bit_pos); /* - * Panic if this int bit is already handled, - * but allow shared interrupts for PCI. + * Panic if this int bit is already handled, but allow shared + * interrupts for PCI. */ if (int_reg-int_reg_bits_map[31 ^ bit_pos] != INT_REG_BIT_UNUSED strncmp(device_xname(dv), dino, 4) != 0 handler == NULL) panic(hp700_intr_establish: int already handled); /* - * If this interrupt bit leads us to another interrupt - * register, simply note that in the mapping for the bit. + * If this interrupt bit leads us to another interrupt register, + * simply note that in the mapping for the bit. */ if (handler == NULL) { for (idx = 0; idx HP700_INT_BITS; idx++)
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Sun Dec 5 10:21:18 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: intr.h Log Message: Reformat/Improve comment. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hp700/hp700/intr.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/intr.h diff -u src/sys/arch/hp700/hp700/intr.h:1.10 src/sys/arch/hp700/hp700/intr.h:1.11 --- src/sys/arch/hp700/hp700/intr.h:1.10 Fri May 8 09:33:58 2009 +++ src/sys/arch/hp700/hp700/intr.h Sun Dec 5 10:21:18 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.10 2009/05/08 09:33:58 skrll Exp $ */ +/* $NetBSD: intr.h,v 1.11 2010/12/05 10:21:18 skrll Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -56,22 +56,20 @@ volatile int *int_reg_level; /* - * This array has one entry for each bit in the - * interrupt request register. If the 24 most - * significant bits are set, the low 8 - * bits are the index of the hp700_int_reg - * that this interrupt bit leads to, with zero - * meaning that the interrupt bit is unused. - * Otherwise this bits correspond to the - * hp700_int_bits. I.e. this bits are ored to - * ipending_new in hp700_intr_ipending_new() - * when an interrupt happend. + * This array has one entry for each bit in the interrupt request + * register. * - * Note that this array is indexed by HP bit - * number, *not* by normal bit number. In - * other words, the least significant bit in - * the interrupt register corresponds to array - * index 31. + * If the 24 most significant bits are set, the low 8 bits are the + * index of the hp700_int_reg that this interrupt bit leads to, with + * zero meaning that the interrupt bit is unused. + * + * Otherwise these bits correspond to hp700_int_bits. That is, these + * bits are ORed to ipending_new in hp700_intr_ipending_new() when an + * interrupt happens. + * + * Note that this array is indexed by HP bit number, *not* by normal + * bit number. In other words, the least significant bit in the inter- + * rupt register corresponds to array index 31. */ unsigned int int_reg_bits_map[HP700_INT_BITS]; #define INT_REG_BIT_REG 0xff00
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Sun Dec 5 10:27:50 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: intr.c intr.h Log Message: G/C unused _hp700_intr_spl_mask To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/hp700/hp700/intr.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hp700/hp700/intr.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/intr.c diff -u src/sys/arch/hp700/hp700/intr.c:1.27 src/sys/arch/hp700/hp700/intr.c:1.28 --- src/sys/arch/hp700/hp700/intr.c:1.27 Sun Dec 5 10:11:46 2010 +++ src/sys/arch/hp700/hp700/intr.c Sun Dec 5 10:27:50 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.27 2010/12/05 10:11:46 skrll Exp $ */ +/* $NetBSD: intr.c,v 1.28 2010/12/05 10:27:50 skrll Exp $ */ /* $OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $ */ /* @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.27 2010/12/05 10:11:46 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.28 2010/12/05 10:27:50 skrll Exp $); #define __MUTEX_PRIVATE @@ -254,17 +254,6 @@ } /* - * This return the single-bit spl mask for an interrupt. This can only be - * called immediately after hp700_intr_establish, and is not intended for wide - * use. - */ -int -_hp700_intr_spl_mask(void *_int_bit) -{ - return ((struct hp700_int_bit *) _int_bit)-int_bit_spl; -} - -/* * This finally initializes interrupts. */ void Index: src/sys/arch/hp700/hp700/intr.h diff -u src/sys/arch/hp700/hp700/intr.h:1.11 src/sys/arch/hp700/hp700/intr.h:1.12 --- src/sys/arch/hp700/hp700/intr.h:1.11 Sun Dec 5 10:21:18 2010 +++ src/sys/arch/hp700/hp700/intr.h Sun Dec 5 10:27:50 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.11 2010/12/05 10:21:18 skrll Exp $ */ +/* $NetBSD: intr.h,v 1.12 2010/12/05 10:27:50 skrll Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -88,6 +88,5 @@ struct hp700_int_reg *, int); int hp700_intr_allocate_bit(struct hp700_int_reg *); int _hp700_intr_ipl_next(void); -int _hp700_intr_spl_mask(void *); void hp700_intr_init(void); void hp700_intr_dispatch(int, int, struct trapframe *);
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Sun Dec 5 10:47:23 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: intr.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/hp700/hp700/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/intr.c diff -u src/sys/arch/hp700/hp700/intr.c:1.28 src/sys/arch/hp700/hp700/intr.c:1.29 --- src/sys/arch/hp700/hp700/intr.c:1.28 Sun Dec 5 10:27:50 2010 +++ src/sys/arch/hp700/hp700/intr.c Sun Dec 5 10:47:22 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.28 2010/12/05 10:27:50 skrll Exp $ */ +/* $NetBSD: intr.c,v 1.29 2010/12/05 10:47:22 skrll Exp $ */ /* $OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $ */ /* @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.28 2010/12/05 10:27:50 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.29 2010/12/05 10:47:22 skrll Exp $); #define __MUTEX_PRIVATE @@ -190,7 +190,7 @@ panic(hp700_intr_establish: unknown int reg); int_reg-int_reg_bits_map[31 ^ bit_pos] = (INT_REG_BIT_REG | idx); - return (NULL); + return NULL; } /* @@ -215,7 +215,7 @@ int_bit-int_bit_handler = handler; int_bit-int_bit_arg = arg; - return (int_bit); + return int_bit; } /* @@ -234,7 +234,7 @@ break; if (bit_pos = 0) int_reg-int_reg_allocatable_bits = ~mask; - return (bit_pos); + return bit_pos; } /*
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: uebayasi Date: Mon Nov 15 06:24:54 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: mainbus.c Log Message: struct proc * deref needs sys/proc.h. To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 src/sys/arch/hp700/hp700/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.72 src/sys/arch/hp700/hp700/mainbus.c:1.73 --- src/sys/arch/hp700/hp700/mainbus.c:1.72 Fri Nov 12 06:54:56 2010 +++ src/sys/arch/hp700/hp700/mainbus.c Mon Nov 15 06:24:53 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.72 2010/11/12 06:54:56 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.73 2010/11/15 06:24:53 uebayasi Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.72 2010/11/12 06:54:56 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.73 2010/11/15 06:24:53 uebayasi Exp $); #include locators.h #include power.h @@ -70,6 +70,7 @@ #include sys/reboot.h #include sys/extent.h #include sys/mbuf.h +#include sys/proc.h #include uvm/uvm_page.h #include uvm/uvm.h
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Sat Nov 13 07:58:55 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: autoconf.c Log Message: Add some verbose output. From OpenBSD. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/hp700/hp700/autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/autoconf.c diff -u src/sys/arch/hp700/hp700/autoconf.c:1.33 src/sys/arch/hp700/hp700/autoconf.c:1.34 --- src/sys/arch/hp700/hp700/autoconf.c:1.33 Fri Feb 12 16:57:52 2010 +++ src/sys/arch/hp700/hp700/autoconf.c Sat Nov 13 07:58:55 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.33 2010/02/12 16:57:52 skrll Exp $ */ +/* $NetBSD: autoconf.c,v 1.34 2010/11/13 07:58:55 skrll Exp $ */ /* $OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $ */ @@ -86,7 +86,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.33 2010/02/12 16:57:52 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.34 2010/11/13 07:58:55 skrll Exp $); #include opt_kgdb.h #include opt_useleds.h @@ -470,6 +470,7 @@ for (i = 0; i ca-ca_nmodules; i++) { struct confargs nca; + char buf[128]; int error; memset(nca, 0, sizeof(nca)); @@ -511,10 +512,12 @@ nca.ca_naddrs = pdc_find_mod.naddrs; if (nca.ca_naddrs 16) { nca.ca_naddrs = 16; - printf(WARNING: too many (%d) addrs\n, + aprint_error(WARNING: + too many (%d) addrs\n, pdc_find_mod.naddrs); } +aprint_verbose( ADDRS: ); for (ia = 0; !(error = pdc_call((iodcio_t)pdc, 0, PDC_SYSTEM_MAP, PDC_SYSTEM_MAP_FIND_ADDR, pdc_find_addr, im, ia + 1)) ia nca.ca_naddrs; ia++) { @@ -522,17 +525,36 @@ nca.ca_addrs[ia].size = pdc_find_addr.size PGSHIFT; + aprint_verbose( 0x%lx[0x%x], + nca.ca_addrs[ia].addr, + nca.ca_addrs[ia].size); } +aprint_verbose(\n); } } if (!nca.ca_hpa) continue; + aprint_verbose( HPA 0x%lx[0x%x]\n, nca.ca_hpa, + nca.ca_hpasz); + if ((error = pdc_call((iodcio_t)pdc, 0, PDC_IODC, PDC_IODC_READ, pdc_iodc_read, nca.ca_hpa, IODC_DATA, - nca.ca_type, sizeof(nca.ca_type))) 0) + nca.ca_type, sizeof(nca.ca_type))) 0) { + aprint_verbose( iodc_data error %d\n, error); continue; + } + + snprintb(buf, sizeof(buf), PZF_BITS, nca.ca_dp.dp_flags); + aprint_verbose( probing: flags %s bc %d/%d/%d/%d/%d/%d , + buf, + nca.ca_dp.dp_bc[0], nca.ca_dp.dp_bc[1], + nca.ca_dp.dp_bc[2], nca.ca_dp.dp_bc[3], + nca.ca_dp.dp_bc[4], nca.ca_dp.dp_bc[5]); + aprint_verbose(mod %x hpa %lx type %x sv %x\n, + nca.ca_dp.dp_mod, nca.ca_hpa, + nca.ca_type.iodc_type, nca.ca_type.iodc_sv_model); nca.ca_irq = HP700CF_IRQ_UNDEF; nca.ca_pdc_iodc_read = pdc_iodc_read;
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Fri Nov 12 06:54:57 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: mainbus.c Log Message: Add some more machines that need help with autoconf. Slight variation on patch from Sergey Svishchev To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/arch/hp700/hp700/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.71 src/sys/arch/hp700/hp700/mainbus.c:1.72 --- src/sys/arch/hp700/hp700/mainbus.c:1.71 Wed Jun 30 06:33:52 2010 +++ src/sys/arch/hp700/hp700/mainbus.c Fri Nov 12 06:54:56 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.71 2010/06/30 06:33:52 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.72 2010/11/12 06:54:56 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.71 2010/06/30 06:33:52 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.72 2010/11/12 06:54:56 skrll Exp $); #include locators.h #include power.h @@ -1425,6 +1425,11 @@ #endif switch (cpu_hvers) { + case HPPA_BOARD_HPE23: + case HPPA_BOARD_HPE25: + case HPPA_BOARD_HPE35: + case HPPA_BOARD_HPE45: + case HPPA_BOARD_HP809: case HPPA_BOARD_HP819: case HPPA_BOARD_HP829:
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Mon Nov 8 19:59:20 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: Update cpu_model_cpuid to work for E[2345]5 machines. From Sergey Svishchev. To generate a diff of this commit: cvs rdiff -u -r1.88 -r1.89 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.88 src/sys/arch/hp700/hp700/machdep.c:1.89 --- src/sys/arch/hp700/hp700/machdep.c:1.88 Sun Jun 6 12:13:35 2010 +++ src/sys/arch/hp700/hp700/machdep.c Mon Nov 8 19:59:20 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.88 2010/06/06 12:13:35 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.89 2010/11/08 19:59:20 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.88 2010/06/06 12:13:35 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.89 2010/11/08 19:59:20 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -843,6 +843,12 @@ case HPPA_BOARD_HP705: return hpcxs; + case HPPA_BOARD_HPE23: + case HPPA_BOARD_HPE25: + case HPPA_BOARD_HPE35: + case HPPA_BOARD_HPE45: + return hpcxl; + case HPPA_BOARD_HP735_99: case HPPA_BOARD_HP755_99: case HPPA_BOARD_HP755_125:
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Wed Jun 30 06:33:52 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: mainbus.c Log Message: Remove some code that snuck in. To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/arch/hp700/hp700/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.70 src/sys/arch/hp700/hp700/mainbus.c:1.71 --- src/sys/arch/hp700/hp700/mainbus.c:1.70 Tue Jun 1 10:20:29 2010 +++ src/sys/arch/hp700/hp700/mainbus.c Wed Jun 30 06:33:52 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.70 2010/06/01 10:20:29 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.71 2010/06/30 06:33:52 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.70 2010/06/01 10:20:29 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.71 2010/06/30 06:33:52 skrll Exp $); #include locators.h #include power.h @@ -1005,10 +1005,6 @@ panic(mbus_dmamap_sync: bad length); #endif - /* If the whole DMA map is marked as BUS_DMA_COHERENT, do nothing. */ - if ((map-_dm_flags BUS_DMA_COHERENT) != 0) - return; - /* * For a virtually-indexed write-back cache, we need to do the * following things:
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Fri Apr 30 14:32:31 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: Re-formatting. To generate a diff of this commit: cvs rdiff -u -r1.82 -r1.83 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.82 src/sys/arch/hp700/hp700/machdep.c:1.83 --- src/sys/arch/hp700/hp700/machdep.c:1.82 Tue Apr 6 08:09:46 2010 +++ src/sys/arch/hp700/hp700/machdep.c Fri Apr 30 14:32:31 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.82 2010/04/06 08:09:46 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.83 2010/04/30 14:32:31 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.82 2010/04/06 08:09:46 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.83 2010/04/30 14:32:31 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -310,79 +310,92 @@ const struct hppa_cpu_info cpu_types[] = { #ifdef HP7000_CPU { PA7000, NULL, PCX, - hpcx, 0, 0, 1.0, + hpcx, 0, + 0, 1.0, desidhash_x, itlb_x, dtlb_x, itlbna_x, dtlbna_x, tlbd_x, ibtlb_g, NULL, pbtlb_g }, /* XXXNH check */ #endif #ifdef HP7000_CPU { PA7000, NULL, PCXS, - hpcxs, 0, 0, 1.1a, + hpcxs, 0, + 0, 1.1a, desidhash_s, itlb_x, dtlb_x, itlbna_x, dtlbna_x, tlbd_x, ibtlb_g, NULL, pbtlb_g }, /* XXXNH check */ #endif #ifdef HP7100_CPU { PA7100, T-Bird, PCXT, - hpcxt, 0, HPPA_FTRS_BTLBU, 1.1b, + hpcxt, 0, + HPPA_FTRS_BTLBU, 1.1b, desidhash_t, itlb_t, dtlb_t, itlbna_t, dtlbna_t, tlbd_t, ibtlb_g, NULL, pbtlb_g }, #endif #ifdef HP7100LC_CPU { PA7100LC, Hummingbird, PCXL, - hpcxl, HPPA_CPU_PCXL, HPPA_FTRS_BTLBU|HPPA_FTRS_HVT, 1.1c, + hpcxl, HPPA_CPU_PCXL, + HPPA_FTRS_BTLBU|HPPA_FTRS_HVT, 1.1c, desidhash_l, itlb_l, dtlb_l, itlbna_l, dtlbna_l, tlbd_l, ibtlb_g, NULL, pbtlb_g, hpti_g }, #endif #ifdef HP7200_CPU { PA7200, T-Bird, PCXT', - hpcxtp, HPPA_CPU_PCXT2, HPPA_FTRS_BTLBU, 1.1d, + hpcxtp, HPPA_CPU_PCXT2, + HPPA_FTRS_BTLBU, 1.1d, desidhash_t, itlb_t, dtlb_t, itlbna_t, dtlbna_t, tlbd_t, ibtlb_g, NULL, pbtlb_g }, #endif #ifdef HP7300LC_CPU { PA7300LC, Velociraptor, PCXL2, - hpcxl2, HPPA_CPU_PCXL2, HPPA_FTRS_BTLBU|HPPA_FTRS_HVT, 1.1e, + hpcxl2, HPPA_CPU_PCXL2, + HPPA_FTRS_BTLBU|HPPA_FTRS_HVT, 1.1e, desidhash_l, itlb_l, dtlb_l, itlbna_l, dtlbna_l, tlbd_l, ibtlb_g, NULL, pbtlb_g, hpti_g }, #endif #ifdef HP8000_CPU { PA8000, Onyx, PCXU, - hpcxu, HPPA_CPU_PCXU, HPPA_FTRS_W32B, 2.0, + hpcxu, HPPA_CPU_PCXU, + HPPA_FTRS_W32B, 2.0, desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u, ibtlb_u, NULL, pbtlb_u }, #endif #ifdef HP8200_CPU { PA8200, Vulcan, PCXU+, - hpcxup, HPPA_CPU_PCXUP, HPPA_FTRS_W32B, 2.0, + hpcxup, HPPA_CPU_PCXUP, + HPPA_FTRS_W32B, 2.0, desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u, ibtlb_u, NULL, pbtlb_u }, #endif #ifdef HP8500_CPU { PA8500, Barra'Cuda, PCXW, - hpcxw, HPPA_CPU_PCXW, HPPA_FTRS_W32B, 2.0, + hpcxw, HPPA_CPU_PCXW, + HPPA_FTRS_W32B, 2.0, desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u, ibtlb_u, NULL, pbtlb_u }, #endif #ifdef HP8600_CPU { PA8600, Landshark, PCXW+, - hpcxwp, HPPA_CPU_PCXW2 /*XXX NH */, HPPA_FTRS_W32B, 2.0, + hpcxwp, HPPA_CPU_PCXW2 /*XXX NH */, + HPPA_FTRS_W32B, 2.0, desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u, ibtlb_u, NULL, pbtlb_u }, #endif #ifdef HP8700_CPU { PA8700, Piranha, PCXW2, - hpcxw2, HPPA_CPU_PCXW2, HPPA_FTRS_W32B, 2.0, + hpcxw2, HPPA_CPU_PCXW2, + HPPA_FTRS_W32B, 2.0, desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u, ibtlb_u, NULL, pbtlb_u }, #endif #ifdef HP8800_CPU { PA8800, Mako, Make, - mako, HPPA_CPU_PCXW2, HPPA_FTRS_W32B, 2.0, + mako, HPPA_CPU_PCXW2, + HPPA_FTRS_W32B, 2.0, desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u, ibtlb_u, NULL, pbtlb_u }, #endif #ifdef HP8900_CPU { PA8900, Shortfin, Shortfin, - mako, HPPA_CPU_PCXW2, HPPA_FTRS_W32B, 2.0, + mako, HPPA_CPU_PCXW2, + HPPA_FTRS_W32B, 2.0, desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u, ibtlb_u, NULL, pbtlb_u }, #endif
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Fri Apr 30 15:36:45 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: Add HPPA_FTRS_TLBU to 7100LC and 7300LC CPUs. To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.83 src/sys/arch/hp700/hp700/machdep.c:1.84 --- src/sys/arch/hp700/hp700/machdep.c:1.83 Fri Apr 30 14:32:31 2010 +++ src/sys/arch/hp700/hp700/machdep.c Fri Apr 30 15:36:45 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.83 2010/04/30 14:32:31 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.84 2010/04/30 15:36:45 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.83 2010/04/30 14:32:31 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.84 2010/04/30 15:36:45 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -332,7 +332,7 @@ #ifdef HP7100LC_CPU { PA7100LC, Hummingbird, PCXL, hpcxl, HPPA_CPU_PCXL, - HPPA_FTRS_BTLBU|HPPA_FTRS_HVT, 1.1c, + HPPA_FTRS_TLBU | HPPA_FTRS_BTLBU | HPPA_FTRS_HVT, 1.1c, desidhash_l, itlb_l, dtlb_l, itlbna_l, dtlbna_l, tlbd_l, ibtlb_g, NULL, pbtlb_g, hpti_g }, #endif @@ -346,7 +346,7 @@ #ifdef HP7300LC_CPU { PA7300LC, Velociraptor, PCXL2, hpcxl2, HPPA_CPU_PCXL2, - HPPA_FTRS_BTLBU|HPPA_FTRS_HVT, 1.1e, + HPPA_FTRS_TLBU | HPPA_FTRS_BTLBU | HPPA_FTRS_HVT, 1.1e, desidhash_l, itlb_l, dtlb_l, itlbna_l, dtlbna_l, tlbd_l, ibtlb_g, NULL, pbtlb_g, hpti_g }, #endif
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Fri Apr 30 15:39:02 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: mainbus.c Log Message: Add two DPRINTFs To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/arch/hp700/hp700/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.67 src/sys/arch/hp700/hp700/mainbus.c:1.68 --- src/sys/arch/hp700/hp700/mainbus.c:1.67 Fri Apr 23 15:04:09 2010 +++ src/sys/arch/hp700/hp700/mainbus.c Fri Apr 30 15:39:02 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.67 2010/04/23 15:04:09 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.68 2010/04/30 15:39:02 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.67 2010/04/23 15:04:09 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.68 2010/04/30 15:39:02 skrll Exp $); #include locators.h #include power.h @@ -1061,6 +1061,9 @@ int seg; int error; + DPRINTF((%s: size 0x%lx align 0x%lx bdry %0lx segs %p nsegs %d\n, + __func__, size, alignment, boundary, segs, nsegs)); + /* Always round the size. */ size = round_page(size); @@ -1081,6 +1084,9 @@ /* If we don't have the pages. */ if (error) { + DPRINTF((%s: uvm_pglistalloc(%lx, %lx, %lx, 0, 0, %p, %d, %0x) + failed, __func__, size, low, high, mlist, nsegs, + (flags BUS_DMA_NOWAIT) == 0)); free(mlist, M_DEVBUF); return (error); }
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Fri Apr 30 15:49:40 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: mainbus.c Log Message: Note the PA of pages when allocated. Simplify mapping of pages by traversing segs rather than the pageq and calling VM_PAGE_TO_PHYS. Only use PMAP_NOCACHE when hppa_cpu_hastlbu_p. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/arch/hp700/hp700/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.68 src/sys/arch/hp700/hp700/mainbus.c:1.69 --- src/sys/arch/hp700/hp700/mainbus.c:1.68 Fri Apr 30 15:39:02 2010 +++ src/sys/arch/hp700/hp700/mainbus.c Fri Apr 30 15:49:40 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.68 2010/04/30 15:39:02 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.69 2010/04/30 15:49:40 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.68 2010/04/30 15:39:02 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.69 2010/04/30 15:49:40 skrll Exp $); #include locators.h #include power.h @@ -1102,10 +1102,12 @@ free(mlist, M_DEVBUF); return (ENOMEM); } - segs[seg].ds_addr = 0; - segs[seg].ds_len = 0; + segs[seg].ds_addr = pa; + segs[seg].ds_len = PAGE_SIZE; + segs[seg]._ds_mlist = NULL; segs[seg]._ds_va = 0; - } + } else + segs[seg].ds_len += PAGE_SIZE; pa_next = pa + PAGE_SIZE; } *rsegs = seg + 1; @@ -1149,10 +1151,11 @@ mbus_dmamem_map(void *v, bus_dma_segment_t *segs, int nsegs, size_t size, void **kvap, int flags) { - struct vm_page *pg; - struct pglist *pglist; + bus_addr_t addr; vaddr_t va; - paddr_t pa; + int curseg; + u_int pmflags = + hppa_cpu_hastlbu_p() ? PMAP_NOCACHE : 0; const uvm_flag_t kmflags = (flags BUS_DMA_NOWAIT) != 0 ? UVM_KMF_NOWAIT : 0; @@ -1163,20 +1166,21 @@ if (__predict_false(va == 0)) return (ENOMEM); - /* Stash that in the first segment. */ - segs[0]._ds_va = va; *kvap = (void *)va; - /* Map the allocated pages into the chunk. */ - pglist = segs[0]._ds_mlist; - TAILQ_FOREACH(pg, pglist, pageq.queue) { - KASSERT(size != 0); - pa = VM_PAGE_TO_PHYS(pg); - pmap_kenter_pa(va, pa, VM_PROT_READ | VM_PROT_WRITE, - PMAP_NOCACHE); - - va += PAGE_SIZE; - size -= PAGE_SIZE; + for (curseg = 0; curseg nsegs; curseg++) { + segs[curseg]._ds_va = va; + for (addr = segs[curseg].ds_addr; + addr (segs[curseg].ds_addr + segs[curseg].ds_len); ) { + KASSERT(size != 0); + + pmap_kenter_pa(va, addr, VM_PROT_READ | VM_PROT_WRITE, + pmflags); + + addr += PAGE_SIZE; + va += PAGE_SIZE; + size -= PAGE_SIZE; + } } pmap_update(); return (0);
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Thu Apr 15 14:33:22 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: mainbus.c Log Message: printf - aprint_normal To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/arch/hp700/hp700/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.64 src/sys/arch/hp700/hp700/mainbus.c:1.65 --- src/sys/arch/hp700/hp700/mainbus.c:1.64 Fri Apr 2 15:24:18 2010 +++ src/sys/arch/hp700/hp700/mainbus.c Thu Apr 15 14:33:22 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.64 2010/04/02 15:24:18 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.65 2010/04/15 14:33:22 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.64 2010/04/02 15:24:18 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.65 2010/04/15 14:33:22 skrll Exp $); #include locators.h #include power.h @@ -1594,7 +1594,7 @@ aprint_normal( hpa 0x%lx path , ca-ca_hpa); for (n = 0 ; n 6 ; n++) { if ( ca-ca_dp.dp_bc[n] = 0) -printf( %d/, ca-ca_dp.dp_bc[n]); +aprint_normal( %d/, ca-ca_dp.dp_bc[n]); } aprint_normal( %d, ca-ca_dp.dp_mod); if (!pnp ca-ca_irq = 0) {
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Thu Apr 15 14:34:25 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: mainbus.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/arch/hp700/hp700/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.65 src/sys/arch/hp700/hp700/mainbus.c:1.66 --- src/sys/arch/hp700/hp700/mainbus.c:1.65 Thu Apr 15 14:33:22 2010 +++ src/sys/arch/hp700/hp700/mainbus.c Thu Apr 15 14:34:25 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.65 2010/04/15 14:33:22 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.66 2010/04/15 14:34:25 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.65 2010/04/15 14:33:22 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.66 2010/04/15 14:34:25 skrll Exp $); #include locators.h #include power.h @@ -1592,11 +1592,11 @@ pnp, ca-ca_type.iodc_type, ca-ca_type.iodc_sv_model); if (ca-ca_hpa) { aprint_normal( hpa 0x%lx path , ca-ca_hpa); - for (n = 0 ; n 6 ; n++) { - if ( ca-ca_dp.dp_bc[n] = 0) -aprint_normal( %d/, ca-ca_dp.dp_bc[n]); + for (n = 0; n 6; n++) { + if (ca-ca_dp.dp_bc[n] = 0) +aprint_normal(%d/, ca-ca_dp.dp_bc[n]); } - aprint_normal( %d, ca-ca_dp.dp_mod); + aprint_normal(%d, ca-ca_dp.dp_mod); if (!pnp ca-ca_irq = 0) { aprint_normal( irq %d, ca-ca_irq); if (ca-ca_type.iodc_type != HPPA_TYPE_BHA)
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Mon Apr 5 12:56:51 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: locore.S Log Message: Fix register usage in hp700_intr_schedule after previous change (making cpl, ipending, and intr_depth per CPU values). To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/arch/hp700/hp700/locore.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/locore.S diff -u src/sys/arch/hp700/hp700/locore.S:1.45 src/sys/arch/hp700/hp700/locore.S:1.46 --- src/sys/arch/hp700/hp700/locore.S:1.45 Wed Mar 31 12:56:14 2010 +++ src/sys/arch/hp700/hp700/locore.S Mon Apr 5 12:56:51 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.45 2010/03/31 12:56:14 skrll Exp $ */ +/* $NetBSD: locore.S,v 1.46 2010/04/05 12:56:51 skrll Exp $ */ /* $OpenBSD: locore.S,v 1.158 2008/07/28 19:08:46 miod Exp $ */ /* @@ -619,9 +619,9 @@ ldw L_CPU(%t1),%t2 mfctl %eiem, %arg1 mtctl %r0, %eiem ; disable interrupts - ldw CI_IPENDING(%t1), %r1 ; load ipending + ldw CI_IPENDING(%t2), %r1 ; load ipending or %r1, %arg0, %r1 ; or in mask - stw %r1, CI_IPENDING(%t1) ; store ipending + stw %r1, CI_IPENDING(%t2) ; store ipending ldw CI_CPL(%t2), %arg0 ; load cpl andcm,= %r1, %arg0, %r1 ; and ipending with ~cpl b,n spllower_dispatch ; dispatch if we can
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Fri Apr 2 15:24:18 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: mainbus.c Log Message: Change #ifdef DIAGNOSITC tests+panic to KASSERTs. To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/arch/hp700/hp700/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.63 src/sys/arch/hp700/hp700/mainbus.c:1.64 --- src/sys/arch/hp700/hp700/mainbus.c:1.63 Thu Apr 1 12:21:41 2010 +++ src/sys/arch/hp700/hp700/mainbus.c Fri Apr 2 15:24:18 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.63 2010/04/01 12:21:41 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.64 2010/04/02 15:24:18 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.63 2010/04/01 12:21:41 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.64 2010/04/02 15:24:18 skrll Exp $); #include locators.h #include power.h @@ -954,10 +954,7 @@ map-dm_mapsize = 0; map-dm_nsegs = 0; -#ifdef DIAGNOSTIC - if ((m0-m_flags M_PKTHDR) == 0) - panic(_bus_dmamap_load_mbuf: no packet header); -#endif /* DIAGNOSTIC */ + KASSERT(m0-m_flags M_PKTHDR); if (m0-m_pkthdr.len map-_dm_size) return (EINVAL); @@ -1318,15 +1315,10 @@ int i; for (i = 0; i nsegs; i++) { -#ifdef DIAGNOSTIC - if (off PGOFSET) - panic(_bus_dmamem_mmap: offset unaligned); - if (segs[i].ds_addr PGOFSET) - panic(_bus_dmamem_mmap: segment unaligned); - if (segs[i].ds_len PGOFSET) - panic(_bus_dmamem_mmap: segment size not multiple - of page size); -#endif /* DIAGNOSTIC */ + KASSERT((off PGOFSET) == 0); + KASSERT((segs[i].ds_addr PGOFSET) == 0); + KASSERT((segs[i].ds_len PGOFSET) == 0); + if (off = segs[i].ds_len) { off -= segs[i].ds_len; continue;
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Thu Apr 1 12:21:41 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: mainbus.c Log Message: Whitespace. To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys/arch/hp700/hp700/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.62 src/sys/arch/hp700/hp700/mainbus.c:1.63 --- src/sys/arch/hp700/hp700/mainbus.c:1.62 Tue Feb 16 16:56:29 2010 +++ src/sys/arch/hp700/hp700/mainbus.c Thu Apr 1 12:21:41 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.62 2010/02/16 16:56:29 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.63 2010/04/01 12:21:41 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.62 2010/02/16 16:56:29 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.63 2010/04/01 12:21:41 skrll Exp $); #include locators.h #include power.h @@ -1353,7 +1353,7 @@ pmap = vm_map_pmap(vm-vm_map); lastaddr = *lastaddrp; - bmask = ~(map-_dm_boundary - 1); + bmask = ~(map-_dm_boundary - 1); for (seg = *segp; buflen 0; ) { bool ok;
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Tue Mar 30 19:38:52 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: genassym.cf Log Message: Whitespace. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/hp700/hp700/genassym.cf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/genassym.cf diff -u src/sys/arch/hp700/hp700/genassym.cf:1.21 src/sys/arch/hp700/hp700/genassym.cf:1.22 --- src/sys/arch/hp700/hp700/genassym.cf:1.21 Tue Mar 16 16:20:19 2010 +++ src/sys/arch/hp700/hp700/genassym.cf Tue Mar 30 19:38:52 2010 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.21 2010/03/16 16:20:19 skrll Exp $ +# $NetBSD: genassym.cf,v 1.22 2010/03/30 19:38:52 skrll Exp $ # $OpenBSD: genassym.cf,v 1.18 2001/09/20 18:31:14 mickey Exp $ @@ -80,8 +80,8 @@ # hp700_int_reg fields struct hp700_int_reg -member INT_REG_REQ int_reg_req -member INT_REG_BITS_MAP int_reg_bits_map +member INT_REG_REQ int_reg_req +member INT_REG_BITS_MAP int_reg_bits_map export INT_REG_BIT_REG # struct cpu_info fields
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Wed Mar 24 12:38:55 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: intr.c Log Message: Improve panic message. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/hp700/hp700/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/intr.c diff -u src/sys/arch/hp700/hp700/intr.c:1.22 src/sys/arch/hp700/hp700/intr.c:1.23 --- src/sys/arch/hp700/hp700/intr.c:1.22 Thu Mar 11 07:21:24 2010 +++ src/sys/arch/hp700/hp700/intr.c Wed Mar 24 12:38:55 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.22 2010/03/11 07:21:24 skrll Exp $ */ +/* $NetBSD: intr.c,v 1.23 2010/03/24 12:38:55 skrll Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.22 2010/03/11 07:21:24 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.23 2010/03/24 12:38:55 skrll Exp $); #define __MUTEX_PRIVATE @@ -175,7 +175,7 @@ /* Panic on a bad interrupt bit. */ if (bit_pos 0 || bit_pos = HP700_INT_BITS) - panic(hp700_intr_establish: bad interrupt bit); + panic(%s: bad interrupt bit %d, __func__, bit_pos); /* * Panic if this int bit is already handled,
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Thu Mar 11 07:20:16 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: intr.c Log Message: Reformat comments. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hp700/hp700/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/intr.c diff -u src/sys/arch/hp700/hp700/intr.c:1.20 src/sys/arch/hp700/hp700/intr.c:1.21 --- src/sys/arch/hp700/hp700/intr.c:1.20 Sat Jan 16 07:38:56 2010 +++ src/sys/arch/hp700/hp700/intr.c Thu Mar 11 07:20:15 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.20 2010/01/16 07:38:56 skrll Exp $ */ +/* $NetBSD: intr.c,v 1.21 2010/03/11 07:20:15 skrll Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.20 2010/01/16 07:38:56 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.21 2010/03/11 07:20:15 skrll Exp $); #define __MUTEX_PRIVATE @@ -81,18 +81,16 @@ struct hp700_int_reg *int_bit_reg; /* - * The priority level associated with this - * bit, i.e., something like IPL_BIO, - * IPL_NET, etc. + * The priority level associated with this bit, e.g, IPL_BIO, IPL_NET, + * etc. */ int int_bit_ipl; /* - * The spl mask for this bit. This starts out - * as the spl bit assigned to this particular - * interrupt, and later gets fleshed out by the - * mask calculator to be the full mask that we - * need to raise spl to when we get this interrupt. + * The spl mask for this bit. This starts out as the spl bit assigned + * to this particular interrupt, and later gets fleshed out by the mask + * calculator to be the full mask that we need to raise spl to when we + * get this interrupt. */ int int_bit_spl; @@ -100,9 +98,8 @@ struct evcnt int_bit_evcnt; /* - * The interrupt handler and argument for this - * bit. If the argument is NULL, the handler - * gets the trapframe. + * The interrupt handler and argument for this bit. If the argument is + * NULL, the handler gets the trapframe. */ int (*int_bit_handler)(void *); void *int_bit_arg; @@ -248,8 +245,7 @@ } /* - * This returns the next available spl bit. This is not - * intended for wide use. + * This returns the next available spl bit. This is not intended for wide use. */ int _hp700_intr_ipl_next(void) @@ -265,9 +261,9 @@ } /* - * This return the single-bit spl mask for an interrupt. This - * can only be called immediately after hp700_intr_establish, and - * is not intended for wide use. + * This return the single-bit spl mask for an interrupt. This can only be + * called immediately after hp700_intr_establish, and is not intended for wide + * use. */ int _hp700_intr_spl_mask(void *_int_bit) @@ -335,15 +331,13 @@ #endif /* - * Load all mask registers, loading %eiem last. - * This will finally enable interrupts, but since - * cpl and ipending should be -1 and 0, respectively, - * no interrupts will get dispatched until the - * priority level is lowered. + * Load all mask registers, loading %eiem last. This will finally + * enable interrupts, but since cpl and ipending should be -1 and 0, + * respectively, no interrupts will get dispatched until the priority + * level is lowered. * - * Because we're paranoid, we force these values - * for cpl and ipending, even though they should - * be unchanged since hp700_intr_bootstrap(). + * Because we're paranoid, we force these values for cpl and ipending, + * even though they should be unchanged since hp700_intr_bootstrap(). */ cpl = -1; ipending = 0; @@ -367,9 +361,9 @@ } /* - * Service interrupts. This doesn't necessarily dispatch them. - * This is called with %eiem loaded with zero. It's named - * hppa_intr instead of hp700_intr because trap.c calls it. + * Service interrupts. This doesn't necessarily dispatch them. This is called + * with %eiem loaded with zero. It's named hppa_intr instead of hp700_intr + * because trap.c calls it. */ void hppa_intr(struct trapframe *frame) @@ -399,11 +393,10 @@ } /* - * If we interrupted in the middle of mutex_enter(), - * we must patch up the lock owner value quickly if - * we got the interlock. If any of the interrupt - * handlers need to aquire the mutex, they could - * deadlock if the owner value is left unset. + * If we interrupted in the middle of mutex_enter(), we must patch up + * the lock owner value quickly if we got the interlock. If any of the + * interrupt handlers need to aquire the mutex, they could deadlock if + * the owner value is left unset. */ if (frame-tf_iioq_head = (u_int)mutex_enter_crit_start frame-tf_iioq_head = (u_int)mutex_enter_crit_end @@ -419,10 +412,9 @@ } /* - * Read the CPU interrupt register and acknowledge - * all interrupts. Starting with this value, get - * our set of new
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Thu Feb 18 21:30:00 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: locore.S Log Message: Fix up some comments. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/arch/hp700/hp700/locore.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/locore.S diff -u src/sys/arch/hp700/hp700/locore.S:1.39 src/sys/arch/hp700/hp700/locore.S:1.40 --- src/sys/arch/hp700/hp700/locore.S:1.39 Thu Dec 10 05:10:01 2009 +++ src/sys/arch/hp700/hp700/locore.S Thu Feb 18 21:30:00 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.39 2009/12/10 05:10:01 rmind Exp $ */ +/* $NetBSD: locore.S,v 1.40 2010/02/18 21:30:00 skrll Exp $ */ /* $OpenBSD: locore.S,v 1.158 2008/07/28 19:08:46 miod Exp $ */ /* @@ -765,7 +765,7 @@ /* * struct lwp * - * cpu_switchto(struct lwp *curl, struct lwp *newl) + * cpu_switchto(struct lwp *oldl, struct lwp *newl, bool returning) */ .align 32 ENTRY(cpu_switchto,128) @@ -803,7 +803,7 @@ /* * cpu_lwp_fork sets the initial stack to a page above uarea address. - * Check that the stack is above this value for curl. + * Check that the stack is above this value for oldl. */ ldw L_PCB(%arg1), %arg2 ldw PCB_KSP(%arg2), %t1 /* t1 for switch_error */ @@ -826,13 +826,13 @@ /* * save old LWP context * - * arg0: old LWP (curl) + * arg0: old LWP (oldl) * arg1: new LWP (newl) */ - ldw L_PCB(%arg0), %t3 /* curl pcb */ + ldw L_PCB(%arg0), %t3 /* oldl pcb */ stw %sp, PCB_KSP(%t3) - fdc %r0(%t3) /* flush curl pcb - surely fdc PCB_KSP(%t3) */ + fdc %r0(%t3) /* flush oldl pcb - surely fdc PCB_KSP(%t3) */ /* * Save the callee-save registers. We don't need to do @@ -857,7 +857,7 @@ /* * restore new LWP context * - * arg0: old LWP (curl) + * arg0: old LWP (oldl) * arg1: new LWP (newl) */ switch_exited: @@ -909,12 +909,12 @@ /* * Save some caller-saves we want to preserve. * - * We save curl (%arg0) and newl (%arg1) for the benefit of + * We save oldl (%arg0) and newl (%arg1) for the benefit of * lwp_trampoline() for when it calls lwp_startup(). * - * curl (%arg0) is saved as it's the return value + * oldl (%arg0) is saved as it's the return value */ - stw %arg0, HPPA_FRAME_ARG(0)(%r3) /* curl */ + stw %arg0, HPPA_FRAME_ARG(0)(%r3) /* oldl */ stw %arg1, HPPA_FRAME_ARG(1)(%r3) /* newl */ copy %arg1, %arg0 @@ -969,7 +969,7 @@ * the first kernel function to call, and its argument. * * cpu_switchto() also makes sure that %arg0 and %arg1 are (still) - * curl and newl respectively. + * oldl and newl respectively. */ ENTRY_NOPROFILE(lwp_trampoline,HPPA_FRAME_SIZE) /* no return point */
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Thu Feb 18 21:38:32 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: locore.S Log Message: Improve a comment. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/arch/hp700/hp700/locore.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/locore.S diff -u src/sys/arch/hp700/hp700/locore.S:1.40 src/sys/arch/hp700/hp700/locore.S:1.41 --- src/sys/arch/hp700/hp700/locore.S:1.40 Thu Feb 18 21:30:00 2010 +++ src/sys/arch/hp700/hp700/locore.S Thu Feb 18 21:38:32 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.40 2010/02/18 21:30:00 skrll Exp $ */ +/* $NetBSD: locore.S,v 1.41 2010/02/18 21:38:32 skrll Exp $ */ /* $OpenBSD: locore.S,v 1.158 2008/07/28 19:08:46 miod Exp $ */ /* @@ -820,7 +820,7 @@ kstack_ok: #endif - /* If old LWP exited, don't bother. */ + /* If old LWP exited, don't bother saving anything. */ comb,=,n %r0, %arg0, switch_exited /*
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Fri Feb 12 16:57:21 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: autoconf.c Log Message: Typo in comment. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/hp700/hp700/autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/autoconf.c diff -u src/sys/arch/hp700/hp700/autoconf.c:1.31 src/sys/arch/hp700/hp700/autoconf.c:1.32 --- src/sys/arch/hp700/hp700/autoconf.c:1.31 Fri Dec 18 15:49:48 2009 +++ src/sys/arch/hp700/hp700/autoconf.c Fri Feb 12 16:57:21 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.31 2009/12/18 15:49:48 skrll Exp $ */ +/* $NetBSD: autoconf.c,v 1.32 2010/02/12 16:57:21 skrll Exp $ */ /* $OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $ */ @@ -86,7 +86,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.31 2009/12/18 15:49:48 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.32 2010/02/12 16:57:21 skrll Exp $); #include opt_kgdb.h #include opt_useleds.h @@ -348,7 +348,7 @@ boot_device = dev; /* * If the boot device is a PCI device the HPA is the address where the - * firmware has maped the PCI memory of the PCI device. This is quite + * firmware has mapped the PCI memory of the PCI device. This is quite * device dependent, so we compare the DP. It encodes the bus routing * information to the PCI bus bridge in the DP head and the PCI device * and PCI function in the last two DP components. So we compare the
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Fri Feb 12 16:57:52 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: autoconf.c Log Message: Allow elroy to provide boot device. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/arch/hp700/hp700/autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/autoconf.c diff -u src/sys/arch/hp700/hp700/autoconf.c:1.32 src/sys/arch/hp700/hp700/autoconf.c:1.33 --- src/sys/arch/hp700/hp700/autoconf.c:1.32 Fri Feb 12 16:57:21 2010 +++ src/sys/arch/hp700/hp700/autoconf.c Fri Feb 12 16:57:52 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.32 2010/02/12 16:57:21 skrll Exp $ */ +/* $NetBSD: autoconf.c,v 1.33 2010/02/12 16:57:52 skrll Exp $ */ /* $OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $ */ @@ -86,7 +86,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.32 2010/02/12 16:57:21 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.33 2010/02/12 16:57:52 skrll Exp $); #include opt_kgdb.h #include opt_useleds.h @@ -360,7 +360,7 @@ * on a match. In case of a SCSI boot device we have to do the same * check when SCSI devices are attached like on GSC SCSI controllers. */ - if (device_is_a(dev, dino)) { + if (device_is_a(dev, dino) || device_is_a(dev, elroy)) { struct confargs *ca = (struct confargs *)aux; int i, n;
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Fri Feb 12 22:23:40 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: mainbus.c Log Message: Just return if length of zero is passed to bus_dmamap_sync. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/sys/arch/hp700/hp700/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.58 src/sys/arch/hp700/hp700/mainbus.c:1.59 --- src/sys/arch/hp700/hp700/mainbus.c:1.58 Wed Dec 2 13:49:32 2009 +++ src/sys/arch/hp700/hp700/mainbus.c Fri Feb 12 22:23:40 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.58 2009/12/02 13:49:32 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.59 2010/02/12 22:23:40 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.58 2009/12/02 13:49:32 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.59 2010/02/12 22:23:40 skrll Exp $); #include locators.h #include power.h @@ -1101,6 +1101,7 @@ int ops) { int i; + /* * Mixing of PRE and POST operations is not allowed. */ @@ -1112,7 +1113,7 @@ if (offset = map-dm_mapsize) panic(mbus_dmamap_sync: bad offset %lu (map size is %lu), offset, map-dm_mapsize); - if (len == 0 || (offset + len) map-dm_mapsize) + if ((offset + len) map-dm_mapsize) panic(mbus_dmamap_sync: bad length); #endif @@ -1133,7 +1134,7 @@ */ ops = (BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); - if (ops == 0) + if (len == 0 || ops == 0) return; for (i = 0; len != 0 i map-dm_nsegs; i++) {
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Fri Feb 12 22:31:05 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: mainbus.c Log Message: Comment reformating and correction. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/sys/arch/hp700/hp700/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.59 src/sys/arch/hp700/hp700/mainbus.c:1.60 --- src/sys/arch/hp700/hp700/mainbus.c:1.59 Fri Feb 12 22:23:40 2010 +++ src/sys/arch/hp700/hp700/mainbus.c Fri Feb 12 22:31:05 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.59 2010/02/12 22:23:40 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.60 2010/02/12 22:31:05 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.59 2010/02/12 22:23:40 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.60 2010/02/12 22:31:05 skrll Exp $); #include locators.h #include power.h @@ -843,8 +843,8 @@ }; /* - * Common function for DMA map creation. May be called by bus-specific - * DMA map creation functions. + * Common function for DMA map creation. May be called by bus-specific DMA map + * creation functions. */ int mbus_dmamap_create(void *v, bus_size_t size, int nsegments, bus_size_t maxsegsz, @@ -854,16 +854,16 @@ size_t mapsize; /* - * Allocate and initialize the DMA map. The end of the map - * is a variable-sized array of segments, so we allocate enough - * room for them in one shot. + * Allocate and initialize the DMA map. The end of the map is a + * variable-sized array of segments, so we allocate enough room for + * them in one shot. * - * Note we don't preserve the WAITOK or NOWAIT flags. Preservation - * of ALLOCNOW notifies others that we've reserved these resources, - * and they are not to be freed. + * Note we don't preserve the WAITOK or NOWAIT flags. Preservation of + * ALLOCNOW notifies others that we've reserved these resources, and + * they are not to be freed. * - * The bus_dmamap_t includes one bus_dma_segment_t, hence - * the (nsegments - 1). + * The bus_dmamap_t includes one bus_dma_segment_t, hence the + * (nsegments - 1). */ mapsize = sizeof(struct hppa_bus_dmamap) + (sizeof(bus_dma_segment_t) * (nsegments - 1)); @@ -886,8 +886,8 @@ } /* - * Common function for DMA map destruction. May be called by bus-specific - * DMA map destruction functions. + * Common function for DMA map destruction. May be called by bus-specific DMA + * map destruction functions. */ void mbus_dmamap_destroy(void *v, bus_dmamap_t map) @@ -1085,10 +1085,9 @@ mbus_dmamap_unload(void *v, bus_dmamap_t map) { /* - * If this map was loaded with mbus_dmamap_load, - * we don't need to do anything. If this map was - * loaded with mbus_dmamap_load_raw, we also don't - * need to do anything. + * If this map was loaded with mbus_dmamap_load, we don't need to do + * anything. If this map was loaded with mbus_dmamap_load_raw, we also + * don't need to do anything. */ /* Mark the mappings as invalid. */ @@ -1116,17 +1115,21 @@ if ((offset + len) map-dm_mapsize) panic(mbus_dmamap_sync: bad length); #endif + + /* If the whole DMA map is marked as BUS_DMA_COHERENT, do nothing. */ + if ((map-_dm_flags BUS_DMA_COHERENT) != 0) + return; /* - * For a virtually-indexed write-back cache, we need - * to do the following things: + * For a virtually-indexed write-back cache, we need to do the + * following things: * - * PREREAD -- Invalidate the D-cache. We do this - * here in case a write-back is required by the back-end. + * PREREAD -- Invalidate the D-cache. We do this here in case a + * write-back is required by the back-end. * - * PREWRITE -- Write-back the D-cache. Note that if - * we are doing a PREREAD|PREWRITE, we can collapse - * the whole thing into a single Wb-Inv. + * PREWRITE -- Write-back the D-cache. Note that if we are doing + * a PREREAD|PREWRITE, we can collapse the whole thing into a + * single Wb-Inv. * * POSTREAD -- Nothing. * @@ -1159,8 +1162,8 @@ } /* - * Common function for DMA-safe memory allocation. May be called - * by bus-specific DMA memory allocation functions. + * Common function for DMA-safe memory allocation. May be called by bus- + * specific DMA memory allocation functions. */ int mbus_dmamem_alloc(void *v, bus_size_t size, bus_size_t alignment, @@ -1251,16 +1254,14 @@ * Simply keep a pointer around to the linked list, so * bus_dmamap_free() can return it. * - * NOBODY SHOULD TOUCH THE pageq.queue FIELDS WHILE THESE PAGES - * ARE IN OUR CUSTODY. + * Nobody should touch the pageq.queue fields while these pages are in + * our custody. */ segs[0]._ds_mlist = mlist; /* - * We now have physical
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Fri Feb 12 22:34:39 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: mainbus.c Log Message: More comment fixes. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/sys/arch/hp700/hp700/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.60 src/sys/arch/hp700/hp700/mainbus.c:1.61 --- src/sys/arch/hp700/hp700/mainbus.c:1.60 Fri Feb 12 22:31:05 2010 +++ src/sys/arch/hp700/hp700/mainbus.c Fri Feb 12 22:34:39 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.60 2010/02/12 22:31:05 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.61 2010/02/12 22:34:39 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.60 2010/02/12 22:31:05 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.61 2010/02/12 22:34:39 skrll Exp $); #include locators.h #include power.h @@ -939,7 +939,7 @@ } /* - * Like _bus_dmamap_load(), but for mbufs. + * Like bus_dmamap_load(), but for mbufs. */ int mbus_dmamap_load_mbuf(void *v, bus_dmamap_t map, struct mbuf *m0, @@ -981,7 +981,7 @@ } /* - * Like _bus_dmamap_load(), but for uios. + * Like bus_dmamap_load(), but for uios. */ int mbus_dmamap_load_uio(void *v, bus_dmamap_t map, struct uio *uio,
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Sat Jan 16 07:38:56 UTC 2010 Modified Files: src/sys/arch/hp700/hp700: intr.c Log Message: Count interrupts in uvmexp. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hp700/hp700/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/intr.c diff -u src/sys/arch/hp700/hp700/intr.c:1.19 src/sys/arch/hp700/hp700/intr.c:1.20 --- src/sys/arch/hp700/hp700/intr.c:1.19 Mon Nov 30 16:58:40 2009 +++ src/sys/arch/hp700/hp700/intr.c Sat Jan 16 07:38:56 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.19 2009/11/30 16:58:40 skrll Exp $ */ +/* $NetBSD: intr.c,v 1.20 2010/01/16 07:38:56 skrll Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.19 2009/11/30 16:58:40 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.20 2010/01/16 07:38:56 skrll Exp $); #define __MUTEX_PRIVATE @@ -514,7 +514,8 @@ cpl = ncpl | int_bit-int_bit_spl; mtctl(eiem, CR_EIEM); - /* Dispatch the interrupt. */ + /* Count and dispatch the interrupt. */ + uvmexp.intrs++; handled = (*int_bit-int_bit_handler)(arg); #if 0 if (!handled)
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Fri Dec 18 15:49:48 UTC 2009 Modified Files: src/sys/arch/hp700/hp700: autoconf.c Log Message: Add some comments. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/hp700/hp700/autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/autoconf.c diff -u src/sys/arch/hp700/hp700/autoconf.c:1.30 src/sys/arch/hp700/hp700/autoconf.c:1.31 --- src/sys/arch/hp700/hp700/autoconf.c:1.30 Sun Nov 22 19:09:15 2009 +++ src/sys/arch/hp700/hp700/autoconf.c Fri Dec 18 15:49:48 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.30 2009/11/22 19:09:15 mbalmer Exp $ */ +/* $NetBSD: autoconf.c,v 1.31 2009/12/18 15:49:48 skrll Exp $ */ /* $OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $ */ @@ -86,7 +86,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.30 2009/11/22 19:09:15 mbalmer Exp $); +__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.31 2009/12/18 15:49:48 skrll Exp $); #include opt_kgdb.h #include opt_useleds.h @@ -120,7 +120,11 @@ #include hp700/dev/cpudevs.h #include hp700/gsc/gscbusvar.h -register_t kpsw = PSW_Q | PSW_P | PSW_C | PSW_D; +register_t kpsw = + PSW_Q | /* Interrupt State Collection Enable */ + PSW_P | /* Protection Identifier Validation Enable */ + PSW_C | /* Instruction Address Translation Enable */ + PSW_D; /* Data Address Translation Enable */ /* * LED blinking thing
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Wed Dec 2 13:45:13 UTC 2009 Modified Files: src/sys/arch/hp700/hp700: mainbus.c Log Message: Whitespace. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/arch/hp700/hp700/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.56 src/sys/arch/hp700/hp700/mainbus.c:1.57 --- src/sys/arch/hp700/hp700/mainbus.c:1.56 Wed Nov 11 16:08:31 2009 +++ src/sys/arch/hp700/hp700/mainbus.c Wed Dec 2 13:45:13 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.56 2009/11/11 16:08:31 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.57 2009/12/02 13:45:13 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.56 2009/11/11 16:08:31 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.57 2009/12/02 13:45:13 skrll Exp $); #include locators.h #include power.h @@ -396,7 +396,7 @@ * Allocate the region of I/O space. */ error = extent_alloc_subregion1(hp700_io_extent, rstart, rend, size, - align, 0, boundary, EX_NOWAIT, bpa); + align, 0, boundary, EX_NOWAIT, bpa); if (error) return (error);
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Wed Dec 2 13:49:32 UTC 2009 Modified Files: src/sys/arch/hp700/hp700: mainbus.c Log Message: Define DPRINTF and use it. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/arch/hp700/hp700/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.57 src/sys/arch/hp700/hp700/mainbus.c:1.58 --- src/sys/arch/hp700/hp700/mainbus.c:1.57 Wed Dec 2 13:45:13 2009 +++ src/sys/arch/hp700/hp700/mainbus.c Wed Dec 2 13:49:32 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.57 2009/12/02 13:45:13 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.58 2009/12/02 13:49:32 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.57 2009/12/02 13:45:13 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.58 2009/12/02 13:49:32 skrll Exp $); #include locators.h #include power.h @@ -83,6 +83,18 @@ static struct pdc_hpa pdc_hpa PDC_ALIGNMENT; +#ifdef MBUSDEBUG + +#define DPRINTF(s) do { \ + if (mbusdebug) \ + printf s; \ +} while(0) + +int mbusdebug = 1; +#else +#define DPRINTF(s) /* */ +#endif + struct mainbus_softc { device_t sc_dv; @@ -178,6 +190,9 @@ int error; #endif /* USE_BTLB */ + DPRINTF((\n%s(%lx,%lx,%scachable,%p)\n, __func__, + bpa, size, flags? : non, bshp)); + /* * We must be called with a page-aligned address in * I/O space, and with a multiple of the page size. @@ -330,9 +345,9 @@ error = mbus_add_mapping(bpa, size, flags, bshp); *bshp |= offset; if (error) { + DPRINTF((bus_space_map: pa 0x%lx, size 0x%lx failed\n, + bpa, size)); if (extent_free(hp700_io_extent, bpa, size, EX_NOWAIT)) { - printf (bus_space_map: pa 0x%lx, size 0x%lx\n, -bpa, size); printf (bus_space_map: can't free region\n); } } @@ -367,8 +382,8 @@ */ error = extent_free(hp700_io_extent, bpa, size, EX_NOWAIT); if (error) { - printf(bus_space_unmap: ps 0x%lx, size 0x%lx\n, - bpa, size); + DPRINTF((bus_space_unmap: ps 0x%lx, size 0x%lx\n, + bpa, size)); panic(bus_space_unmap: can't free region (%d), error); } } @@ -405,9 +420,9 @@ */ error = mbus_add_mapping(bpa, size, flags, bshp); if (error) { + DPRINTF((bus_space_alloc: pa 0x%lx, size 0x%lx failed\n, + bpa, size)); if (extent_free(hp700_io_extent, bpa, size, EX_NOWAIT)) { - printf(bus_space_alloc: pa 0x%lx, size 0x%lx\n, -bpa, size); printf(bus_space_alloc: can't free region\n); } }
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Tue Dec 1 16:20:52 UTC 2009 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: Add a missing '\n' from a printf. To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.75 src/sys/arch/hp700/hp700/machdep.c:1.76 --- src/sys/arch/hp700/hp700/machdep.c:1.75 Fri Nov 27 03:23:09 2009 +++ src/sys/arch/hp700/hp700/machdep.c Tue Dec 1 16:20:52 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.75 2009/11/27 03:23:09 rmind Exp $ */ +/* $NetBSD: machdep.c,v 1.76 2009/12/01 16:20:52 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.75 2009/11/27 03:23:09 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.76 2009/12/01 16:20:52 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -1640,7 +1640,7 @@ PIM_BUS_BITS); PIM_WORD(\nAssist Check, checks-pim_check_assist, PIM_ASSIST_BITS); - printf(Assist State %u, checks-pim_check_assist_state); + printf(\nAssist State %u, checks-pim_check_assist_state); printf(\nSystem Responder 0x%016lx, (unsigned long)checks-pim_check_responder); printf(\nSystem Requestor 0x%016lx,
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Mon Nov 30 16:58:40 UTC 2009 Modified Files: src/sys/arch/hp700/hp700: intr.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/hp700/hp700/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/intr.c diff -u src/sys/arch/hp700/hp700/intr.c:1.18 src/sys/arch/hp700/hp700/intr.c:1.19 --- src/sys/arch/hp700/hp700/intr.c:1.18 Fri May 8 10:12:55 2009 +++ src/sys/arch/hp700/hp700/intr.c Mon Nov 30 16:58:40 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.18 2009/05/08 10:12:55 skrll Exp $ */ +/* $NetBSD: intr.c,v 1.19 2009/11/30 16:58:40 skrll Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.18 2009/05/08 10:12:55 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.19 2009/11/30 16:58:40 skrll Exp $); #define __MUTEX_PRIVATE @@ -127,7 +127,8 @@ /* Add this structure to the list. */ for (idx = 0; idx HP700_INT_BITS; idx++) - if (hp700_int_regs[idx] == NULL) break; + if (hp700_int_regs[idx] == NULL) + break; if (idx == HP700_INT_BITS) panic(hp700_intr_reg_establish: too many regs); hp700_int_regs[idx] = int_reg; @@ -193,7 +194,8 @@ */ if (handler == NULL) { for (idx = 0; idx HP700_INT_BITS; idx++) - if (hp700_int_regs[idx] == arg) break; + if (hp700_int_regs[idx] == arg) +break; if (idx == HP700_INT_BITS) panic(hp700_intr_establish: unknown int reg); int_reg-int_reg_bits_map[31 ^ bit_pos] = @@ -255,7 +257,8 @@ int idx; for (idx = 0; idx HP700_INT_BITS; idx++) - if (hp700_int_bits[idx].int_bit_reg == NULL) break; + if (hp700_int_bits[idx].int_bit_reg == NULL) + break; if (idx == HP700_INT_BITS) panic(_hp700_intr_spl_bit: too many devices); return idx;
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Fri May 29 08:39:05 UTC 2009 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: Save screen space and make machine check output easier to read (for me) To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.67 src/sys/arch/hp700/hp700/machdep.c:1.68 --- src/sys/arch/hp700/hp700/machdep.c:1.67 Fri May 29 08:37:34 2009 +++ src/sys/arch/hp700/hp700/machdep.c Fri May 29 08:39:05 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.67 2009/05/29 08:37:34 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.68 2009/05/29 08:39:05 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.67 2009/05/29 08:37:34 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.68 2009/05/29 08:39:05 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -1516,8 +1516,8 @@ printf(\n\n\t%s Registers:, name); for (reg_k = 0; reg_k reg_j; reg_k++) printf(%s0x%08x, - (reg_k 3) ? : \n\t, - regarray[reg_k]); +(reg_k 3) ? : \n, +regarray[reg_k]); } /* Print out some interesting registers. */ @@ -1605,28 +1605,23 @@ regarray = regs-pim_regs_sr0; reg_j = 8; } - printf(\n\n\t%s Registers:, name); - for (reg_k = 0; reg_k reg_j; reg_k++) { -printf(%s, - (reg_k 1) ? : \n\t); -if (!(reg_k 1)) - printf(%2d: , reg_k); -printf(0x%016lx, - (unsigned long)regarray[reg_k]); - } - + printf(\n\n%s Registers:, name); + for (reg_k = 0; reg_k reg_j; reg_k++) +printf(%s0x%016lx, + (reg_k 3) ? : \n, + (unsigned long)regarray[reg_k]); } /* Print out some interesting registers. */ - printf(\n\n\tIIA head 0x%lx:0x%016lx\n - \tIIA tail 0x%lx:0x%016lx, + printf(\n\nIIA head 0x%lx:0x%016lx\n + IIA tail 0x%lx:0x%016lx, (unsigned long)regs-pim_regs_cr17, (unsigned long)regs-pim_regs_cr18, (unsigned long)regs-pim_regs_iisq_tail, (unsigned long)regs-pim_regs_iioq_tail); - PIM_WORD(\n\tIPSW, regs-pim_regs_cr22, PSW_BITS); - printf(\n\tSP 0x%lx:0x%016lx\n\tFP 0x%lx:0x%016lx, - (unsigned long)regs-pim_regs_sr0, + PIM_WORD(\nIPSW, regs-pim_regs_cr22, PSW_BITS); + printf(\nSP 0x%lx:0x%016lx\nFP 0x%lx:0x%016lx, + (unsigned long)regs-pim_regs_sr0, (unsigned long)regs-pim_regs_r30, (unsigned long)regs-pim_regs_sr0, (unsigned long)regs-pim_regs_r3); @@ -1634,25 +1629,25 @@ /* If we have check words, display them. */ if (checks != NULL) { - PIM_WORD(\n\n\tCheck Type, checks-pim_check_type, + PIM_WORD(\n\nCheck Type, checks-pim_check_type, PIM_CHECK_BITS); - PIM_WORD(\n\tCPU State, checks-pim_check_cpu_state, + PIM_WORD(\nCPU State, checks-pim_check_cpu_state, PIM_CPU_BITS PIM_CPU_HPMC_BITS); - PIM_WORD(\n\tCache Check, checks-pim_check_cache, + PIM_WORD(\nCache Check, checks-pim_check_cache, PIM_CACHE_BITS); - PIM_WORD(\n\tTLB Check, checks-pim_check_tlb, + PIM_WORD(\nTLB Check, checks-pim_check_tlb, PIM_TLB_BITS); - PIM_WORD(\n\tBus Check, checks-pim_check_bus, + PIM_WORD(\nBus Check, checks-pim_check_bus, PIM_BUS_BITS); - PIM_WORD(\n\tAssist Check, checks-pim_check_assist, + PIM_WORD(\nAssist Check, checks-pim_check_assist, PIM_ASSIST_BITS); - printf(\tAssist State %u, checks-pim_check_assist_state); - printf(\n\tSystem Responder 0x%016lx, - (unsigned long)checks-pim_check_responder); - printf(\n\tSystem Requestor 0x%016lx, - (unsigned long)checks-pim_check_requestor); - printf(\n\tPath Info 0x%08x, - checks-pim_check_path_info); + printf(Assist State %u, checks-pim_check_assist_state); + printf(\nSystem Responder 0x%016lx, + (unsigned long)checks-pim_check_responder); + printf(\nSystem Requestor 0x%016lx, + (unsigned long)checks-pim_check_requestor); + printf(\nPath Info 0x%08x, + checks-pim_check_path_info); } }
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Fri May 29 08:37:34 UTC 2009 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.66 src/sys/arch/hp700/hp700/machdep.c:1.67 --- src/sys/arch/hp700/hp700/machdep.c:1.66 Mon May 18 05:20:46 2009 +++ src/sys/arch/hp700/hp700/machdep.c Fri May 29 08:37:34 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.66 2009/05/18 05:20:46 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.67 2009/05/29 08:37:34 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.66 2009/05/18 05:20:46 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.67 2009/05/29 08:37:34 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -792,9 +792,8 @@ cpu_revision = (*cpu_desidhash)(); /* force strong ordering for now */ - if (hppa_cpu_info-hci_features HPPA_FTRS_W32B) { + if (hppa_cpu_info-hci_features HPPA_FTRS_W32B) kpsw |= PSW_O; - } snprintf(cpu_model, sizeof(cpu_model), HP9000/%s, model);
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Fri May 29 08:44:29 UTC 2009 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: Tidyup error handling around PDC_PIM. CTASSERT - KASSERT To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.68 src/sys/arch/hp700/hp700/machdep.c:1.69 --- src/sys/arch/hp700/hp700/machdep.c:1.68 Fri May 29 08:39:05 2009 +++ src/sys/arch/hp700/hp700/machdep.c Fri May 29 08:44:29 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.68 2009/05/29 08:39:05 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.69 2009/05/29 08:44:29 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.68 2009/05/29 08:39:05 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.69 2009/05/29 08:44:29 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -1656,7 +1656,7 @@ { int pdc_pim_type; const char *name; - int error; + int pimerror, error; /* Do an fcacheall(). */ fcacheall(); @@ -1680,12 +1680,10 @@ /* NOTREACHED */ } - error = pdc_call((iodcio_t)pdc, 0, PDC_PIM, pdc_pim_type, - pdc_pim, pim_data_buffer, sizeof(pim_data_buffer)); - if (error 0) - printf( - WARNING: could not transfer PIM info (%d), error); + pimerror = pdc_call((iodcio_t)pdc, 0, PDC_PIM, pdc_pim_type, + pdc_pim, pim_data_buffer, sizeof(pim_data_buffer)); - CTASSERT(pdc_pim.count = sizeof(pim_data_buffer)); + KASSERT(pdc_pim.count = sizeof(pim_data_buffer)); /* * Reset IO and log errors. @@ -1695,16 +1693,20 @@ * implemented by some machines. */ error = pdc_call((iodcio_t)pdc, 0, PDC_IO, 0, 0, 0, 0); - if (error != PDC_ERR_OK error != PDC_ERR_NOPROC) + if (error != PDC_ERR_OK error != PDC_ERR_NOPROC) /* This seems futile if we can't print to the console. */ panic(PDC_IO failed); printf(\nmachine check: %s, name); - if (hppa_cpu_info-hci_features HPPA_FTRS_W32B) - hppa_pim64_dump(check_type); - else - hppa_pim_dump(check_type); + if (pimerror 0) { + printf( - WARNING: could not transfer PIM info (%d), pimerror); + } else { + if (hppa_cpu_info-hci_features HPPA_FTRS_W32B) + hppa_pim64_dump(check_type); + else + hppa_pim_dump(check_type); + } printf(\n);
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Thu May 21 20:59:11 UTC 2009 Modified Files: src/sys/arch/hp700/hp700: mainbus.c Log Message: Add mjf's d390 to the list of machines that need help finding devices. hmm. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sys/arch/hp700/hp700/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.49 src/sys/arch/hp700/hp700/mainbus.c:1.50 --- src/sys/arch/hp700/hp700/mainbus.c:1.49 Fri May 8 09:33:58 2009 +++ src/sys/arch/hp700/hp700/mainbus.c Thu May 21 20:59:11 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.49 2009/05/08 09:33:58 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.50 2009/05/21 20:59:11 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.49 2009/05/08 09:33:58 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.50 2009/05/21 20:59:11 skrll Exp $); #include locators.h #include power.h @@ -195,6 +195,7 @@ */ *bshp = bpa; +printf(%s: bpa 0x%016llx size 0x%016llx\n, __func__, (unsigned long long)bpa, (unsigned long long)size); /* * Loop while there is space left to map. */ @@ -229,7 +230,7 @@ /* * Enter another single-page mapping. */ - pmap_kenter_pa(bpa, bpa, VM_PROT_READ | VM_PROT_WRITE); + pmap_kenter_pa(bpa, bpa, VM_PROT_READ | VM_PROT_WRITE | PMAP_NC); bpa += PAGE_SIZE; frames--; } @@ -1497,6 +1498,20 @@ bus_space_handle_t ioh; hppa_hpa_t hpabase; + struct iomod_openbsd { +/* SRS (Supervisor Register Set) */ +u_int io_eir; /* (WO) interrupt CPU; set bits in EIR CR */ +u_int io_eim; /* (WO) External Interrupt Message address */ +u_int io_dc_rw; /* write address of IODC to read IODC data */ +u_int io_ii_rw; /* read/clear external intrpt msg (bit-26) */ +u_int io_dma_link;/* pointer to next quad in DMA chain */ +u_int io_dma_command; /* (RO) chain command to exec on next quad */ +u_int io_dma_address; /* (RO) start of DMA */ +u_int io_dma_count; /* (RO) number of bytes remaining to xfer */ +u_int io_flex;/* (WO) HPA flex addr, LSB: bus master flag */ + } *fred; + + sc-sc_dv = self; mb_attached = 1; @@ -1521,8 +1536,19 @@ /* * Local-Broadcast the HPA to all modules on the bus */ +#if 0 + fred = (struct iomod_openbsd *)HPPA_LBCAST; + +fred-io_flex = + (pdc_hpa.hpa FLEX_MASK) | DMA_ENABLE; +#else + fred = (struct iomod_openbsd *)HPPA_LBCAST; + printf(fred-io_flex %p\n, fred-io_flex); ((struct iomod *)(pdc_hpa.hpa FLEX_MASK))[FPA_IOMOD].io_flex = (void *)((pdc_hpa.hpa FLEX_MASK) | DMA_ENABLE); +#endif + + sc-sc_hpa = pdc_hpa.hpa; aprint_normal( [flex %lx]\n, pdc_hpa.hpa FLEX_MASK); @@ -1568,6 +1594,7 @@ case HPPA_BOARD_HP785_C360: case HPPA_BOARD_HP800D: + case HPPA_BOARD_HP821: hpabase = HPPA_FPA; break; default:
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: mjf Date: Sun May 17 18:21:29 UTC 2009 Modified Files: src/sys/arch/hp700/hp700: pim.h Log Message: u_intNN_t - uintNN_t To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hp700/hp700/pim.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/pim.h diff -u src/sys/arch/hp700/hp700/pim.h:1.3 src/sys/arch/hp700/hp700/pim.h:1.4 --- src/sys/arch/hp700/hp700/pim.h:1.3 Sat May 16 16:06:06 2009 +++ src/sys/arch/hp700/hp700/pim.h Sun May 17 18:21:29 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pim.h,v 1.3 2009/05/16 16:06:06 mjf Exp $ */ +/* $NetBSD: pim.h,v 1.4 2009/05/17 18:21:29 mjf Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -45,93 +45,93 @@ struct hp700_pim_regs { /* The general registers. */ - u_int pim_regs_r0; - u_int pim_regs_r1; - u_int pim_regs_r2; - u_int pim_regs_r3; - u_int pim_regs_r4; - u_int pim_regs_r5; - u_int pim_regs_r6; - u_int pim_regs_r7; - u_int pim_regs_r8; - u_int pim_regs_r9; - u_int pim_regs_r10; - u_int pim_regs_r11; - u_int pim_regs_r12; - u_int pim_regs_r13; - u_int pim_regs_r14; - u_int pim_regs_r15; - u_int pim_regs_r16; - u_int pim_regs_r17; - u_int pim_regs_r18; - u_int pim_regs_r19; - u_int pim_regs_r20; - u_int pim_regs_r21; - u_int pim_regs_r22; - u_int pim_regs_r23; - u_int pim_regs_r24; - u_int pim_regs_r25; - u_int pim_regs_r26; - u_int pim_regs_r27; - u_int pim_regs_r28; - u_int pim_regs_r29; - u_int pim_regs_r30; - u_int pim_regs_r31; + uint32_t pim_regs_r0; + uint32_t pim_regs_r1; + uint32_t pim_regs_r2; + uint32_t pim_regs_r3; + uint32_t pim_regs_r4; + uint32_t pim_regs_r5; + uint32_t pim_regs_r6; + uint32_t pim_regs_r7; + uint32_t pim_regs_r8; + uint32_t pim_regs_r9; + uint32_t pim_regs_r10; + uint32_t pim_regs_r11; + uint32_t pim_regs_r12; + uint32_t pim_regs_r13; + uint32_t pim_regs_r14; + uint32_t pim_regs_r15; + uint32_t pim_regs_r16; + uint32_t pim_regs_r17; + uint32_t pim_regs_r18; + uint32_t pim_regs_r19; + uint32_t pim_regs_r20; + uint32_t pim_regs_r21; + uint32_t pim_regs_r22; + uint32_t pim_regs_r23; + uint32_t pim_regs_r24; + uint32_t pim_regs_r25; + uint32_t pim_regs_r26; + uint32_t pim_regs_r27; + uint32_t pim_regs_r28; + uint32_t pim_regs_r29; + uint32_t pim_regs_r30; + uint32_t pim_regs_r31; /* The control registers. */ - u_int pim_regs_cr0; - u_int pim_regs_cr1; - u_int pim_regs_cr2; - u_int pim_regs_cr3; - u_int pim_regs_cr4; - u_int pim_regs_cr5; - u_int pim_regs_cr6; - u_int pim_regs_cr7; - u_int pim_regs_cr8; - u_int pim_regs_cr9; - u_int pim_regs_cr10; - u_int pim_regs_cr11; - u_int pim_regs_cr12; - u_int pim_regs_cr13; - u_int pim_regs_cr14; - u_int pim_regs_cr15; - u_int pim_regs_cr16; - u_int pim_regs_cr17; - u_int pim_regs_cr18; - u_int pim_regs_cr19; - u_int pim_regs_cr20; - u_int pim_regs_cr21; - u_int pim_regs_cr22; - u_int pim_regs_cr23; - u_int pim_regs_cr24; - u_int pim_regs_cr25; - u_int pim_regs_cr26; - u_int pim_regs_cr27; - u_int pim_regs_cr28; - u_int pim_regs_cr29; - u_int pim_regs_cr30; - u_int pim_regs_cr31; + uint32_t pim_regs_cr0; + uint32_t pim_regs_cr1; + uint32_t pim_regs_cr2; + uint32_t pim_regs_cr3; + uint32_t pim_regs_cr4; + uint32_t pim_regs_cr5; + uint32_t pim_regs_cr6; + uint32_t pim_regs_cr7; + uint32_t pim_regs_cr8; + uint32_t pim_regs_cr9; + uint32_t pim_regs_cr10; + uint32_t pim_regs_cr11; + uint32_t pim_regs_cr12; + uint32_t pim_regs_cr13; + uint32_t pim_regs_cr14; + uint32_t pim_regs_cr15; + uint32_t pim_regs_cr16; + uint32_t pim_regs_cr17; + uint32_t pim_regs_cr18; + uint32_t pim_regs_cr19; + uint32_t pim_regs_cr20; + uint32_t pim_regs_cr21; + uint32_t pim_regs_cr22; + uint32_t pim_regs_cr23; + uint32_t pim_regs_cr24; + uint32_t pim_regs_cr25; + uint32_t pim_regs_cr26; + uint32_t pim_regs_cr27; + uint32_t pim_regs_cr28; + uint32_t pim_regs_cr29; + uint32_t pim_regs_cr30; + uint32_t pim_regs_cr31; /* The space registers. */ - u_int pim_regs_sr0; - u_int pim_regs_sr1; - u_int pim_regs_sr2; - u_int pim_regs_sr3; - u_int pim_regs_sr4; - u_int pim_regs_sr5; - u_int pim_regs_sr6; - u_int pim_regs_sr7; + uint32_t pim_regs_sr0; + uint32_t pim_regs_sr1; + uint32_t pim_regs_sr2; + uint32_t pim_regs_sr3; + uint32_t pim_regs_sr4; + uint32_t pim_regs_sr5; + uint32_t pim_regs_sr6; + uint32_t pim_regs_sr7; /* The back entries of the instruction address queues. */ - u_int pim_regs_iisq_tail; - u_int pim_regs_iioq_tail; + uint32_t pim_regs_iisq_tail; + uint32_t pim_regs_iioq_tail; }; /* The PIM data for HPMC and LPMC contains this check information. */ struct hp700_pim_checks { /* The Check Type. */ - u_int pim_check_type; + uint32_t pim_check_type; #define PIM_CHECK_CACHE (1 31) #define PIM_CHECK_TLB (1 30) #define PIM_CHECK_BUS (1 29) @@ -142,7 +142,7 @@ * The CPU State. In addition to the common PIM_CPU_ * bits defined below, some fields are HPMC-specific. */ - u_int
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Mon May 18 05:19:15 UTC 2009 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: Whitespace. To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.64 src/sys/arch/hp700/hp700/machdep.c:1.65 --- src/sys/arch/hp700/hp700/machdep.c:1.64 Sat May 16 16:06:06 2009 +++ src/sys/arch/hp700/hp700/machdep.c Mon May 18 05:19:15 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.64 2009/05/16 16:06:06 mjf Exp $ */ +/* $NetBSD: machdep.c,v 1.65 2009/05/18 05:19:15 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.64 2009/05/16 16:06:06 mjf Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.65 2009/05/18 05:19:15 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -265,7 +265,6 @@ struct vm_map *mb_map = NULL; struct vm_map *phys_map = NULL; - void delay_init(void); static inline void fall(int, int, int, int, int); void dumpsys(void); @@ -358,7 +357,7 @@ #endif #ifdef HP8200_CPU { PA8200, Vulcan, PCXU+, - hpcxup,HPPA_CPU_PCXUP, HPPA_FTRS_W32B, 2.0, + hpcxup, HPPA_CPU_PCXUP, HPPA_FTRS_W32B, 2.0, desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u, ibtlb_u, NULL, pbtlb_u }, #endif
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Mon May 18 05:20:46 UTC 2009 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: Remove stray printf. To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/arch/hp700/hp700/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.65 src/sys/arch/hp700/hp700/machdep.c:1.66 --- src/sys/arch/hp700/hp700/machdep.c:1.65 Mon May 18 05:19:15 2009 +++ src/sys/arch/hp700/hp700/machdep.c Mon May 18 05:20:46 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.65 2009/05/18 05:19:15 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.66 2009/05/18 05:20:46 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.65 2009/05/18 05:19:15 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.66 2009/05/18 05:20:46 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -1022,7 +1022,6 @@ hpti_g(vaddr_t hpt, vsize_t hptsize) { -printf(%s: called %p %08x\n, __func__, (void *)hpt, (uint32_t)hptsize); return pdc_call((iodcio_t)pdc, 0, PDC_TLB, PDC_TLB_CONFIG, pdc_hwtlb, hpt, hptsize, PDC_TLB_CURRPDE); }
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: mjf Date: Sat May 16 16:06:06 UTC 2009 Modified Files: src/sys/arch/hp700/hp700: machdep.c pim.h Log Message: Add PA-RISC 2.0 PIM support. Fix the HPMC exception handler so that, if we're running on a PA-RISC 2.0 machine, we use the 64-bit PIM data structures. There was also a bug in the HPMC exception handler that stopped output being written to the console after we'd taken the exception. We need to make a PDC_IO pdc call to reset I/O. To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/arch/hp700/hp700/machdep.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hp700/hp700/pim.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.63 src/sys/arch/hp700/hp700/machdep.c:1.64 --- src/sys/arch/hp700/hp700/machdep.c:1.63 Wed May 13 14:33:42 2009 +++ src/sys/arch/hp700/hp700/machdep.c Sat May 16 16:06:06 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.63 2009/05/13 14:33:42 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.64 2009/05/16 16:06:06 mjf 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.63 2009/05/13 14:33:42 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.64 2009/05/16 16:06:06 mjf Exp $); #include opt_cputype.h #include opt_ddb.h @@ -1455,12 +1455,20 @@ * an LPMC, or a TOC. The check type is passed in as a trap * type, one of T_HPMC, T_LPMC, or T_INTERRUPT (for TOC). */ -static char pim_data_buffer[4096]; /* XXX assumed to be big enough */ +static char pim_data_buffer[896] __attribute__((__aligned__(8))); static char in_check = 0; -void -hppa_machine_check(int check_type) + +#define PIM_WORD(name, word, bits) \ +do { \ + snprintb(bitmask_buffer, sizeof(bitmask_buffer),\ + bits, word);\ + printf(%s %s, name, bitmask_buffer); \ +} while (/* CONSTCOND */ 0) + + +static inline void +hppa_pim_dump(int check_type) { - int pdc_pim_type; struct hp700_pim_hpmc *hpmc; struct hp700_pim_lpmc *lpmc; struct hp700_pim_toc *toc; @@ -1470,37 +1478,20 @@ int reg_i, reg_j, reg_k; char bitmask_buffer[64]; const char *name; - int error; -#define PIM_WORD(name, word, bits) \ -do { \ - snprintb(bitmask_buffer, sizeof(bitmask_buffer),\ - bits, word);\ - printf(%s %s, name, bitmask_buffer); \ -} while (/* CONSTCOND */ 0) - /* Do an fcacheall(). */ - fcacheall(); - - /* Dispatch on the check type. */ regs = NULL; checks = NULL; switch (check_type) { case T_HPMC: - name = HPMC; - pdc_pim_type = PDC_PIM_HPMC; hpmc = (struct hp700_pim_hpmc *) pim_data_buffer; regs = hpmc-pim_hpmc_regs; checks = hpmc-pim_hpmc_checks; break; case T_LPMC: - name = LPMC; - pdc_pim_type = PDC_PIM_LPMC; lpmc = (struct hp700_pim_lpmc *) pim_data_buffer; checks = lpmc-pim_lpmc_checks; break; case T_INTERRUPT: - name = TOC; - pdc_pim_type = PDC_PIM_TOC; toc = (struct hp700_pim_toc *) pim_data_buffer; regs = toc-pim_toc_regs; break; @@ -1508,11 +1499,6 @@ panic(unknown machine check type); /* NOTREACHED */ } - printf(\nmachine check: %s, name); - error = pdc_call((iodcio_t)pdc, 0, PDC_PIM, pdc_pim_type, - pdc_pim, pim_data_buffer, sizeof(pim_data_buffer)); - if (error 0) - printf( - WARNING: could not transfer PIM info (%d), error); /* If we have register arrays, display them. */ if (regs != NULL) { @@ -1538,7 +1524,8 @@ } /* Print out some interesting registers. */ - printf(\n\n\tIIA 0x%x:0x%08x 0x%x:0x%08x, + printf(\n\n\tIIA head 0x%x:0x%08x\n + \tIIA tail 0x%x:0x%08x, regs-pim_regs_cr17, regs-pim_regs_cr18, regs-pim_regs_iisq_tail, regs-pim_regs_iioq_tail); PIM_WORD(\n\tIPSW, regs-pim_regs_cr22, PSW_BITS); @@ -1569,6 +1556,164 @@ printf(\n\tPath Info 0x%08x, checks-pim_check_path_info); } +} + +static inline void +hppa_pim64_dump(int check_type) +{ + struct hp700_pim64_hpmc *hpmc; + struct hp700_pim64_lpmc *lpmc; + struct hp700_pim64_toc *toc; + struct hp700_pim64_regs *regs; + struct hp700_pim64_checks *checks; + int reg_i, reg_j, reg_k; + uint64_t *regarray; + char bitmask_buffer[64]; + const char *name; + + regs = NULL; + checks = NULL; + switch (check_type) { + case T_HPMC: + hpmc = (struct hp700_pim64_hpmc *) pim_data_buffer; + regs = hpmc-pim_hpmc_regs; + checks = hpmc-pim_hpmc_checks; + break; + case T_LPMC: + lpmc = (struct hp700_pim64_lpmc *) pim_data_buffer; + checks = lpmc-pim_lpmc_checks; + break; + case T_INTERRUPT: + toc = (struct hp700_pim64_toc *) pim_data_buffer; + regs = toc-pim_toc_regs; + break; + default: + panic(unknown machine check type); + /* NOTREACHED */ + } + + /* If we have register arrays, display them. */ + if (regs != NULL) { + for (reg_i = 0; reg_i 3; reg_i++) { + if (reg_i == 0) { +name = General; +
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Thu May 7 06:41:19 UTC 2009 Modified Files: src/sys/arch/hp700/hp700: locore.S Log Message: Wrap some wide comments. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/hp700/hp700/locore.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/locore.S diff -u src/sys/arch/hp700/hp700/locore.S:1.31 src/sys/arch/hp700/hp700/locore.S:1.32 --- src/sys/arch/hp700/hp700/locore.S:1.31 Thu Apr 30 07:01:26 2009 +++ src/sys/arch/hp700/hp700/locore.S Thu May 7 06:41:19 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.31 2009/04/30 07:01:26 skrll Exp $ */ +/* $NetBSD: locore.S,v 1.32 2009/05/07 06:41:19 skrll Exp $ */ /* $OpenBSD: locore.S,v 1.158 2008/07/28 19:08:46 miod Exp $ */ /* @@ -211,7 +211,10 @@ ldil L%esym,%r1 stw %arg3,R%esym(%r1) - /* Put page aligned %arg3 into %t3. It is the start of available memory. */ + /* + * Put page aligned %arg3 into %t3. It is the start of available + * memory. + */ ldo NBPG-1(%arg3), %t3 dep %r0, 31, PGSHIFT, %t3 @@ -253,8 +256,8 @@ /* * Setup various pointers. * - * First free memory is %t3 plus normal U space. The last page of USPACE - * is the redzone if DIAGNOSTIC (see param.h). + * First free memory is %t3 plus normal U space. The last page of + * USPACE is the redzone if DIAGNOSTIC (see param.h). */ ldil L%USPACE, %r4 add %t3, %r4, %r4