CVS commit: src/sys/arch/zaurus/zaurus
Module Name:src Committed By: christos Date: Mon Jun 21 03:05:24 UTC 2021 Modified Files: src/sys/arch/zaurus/zaurus: autoconf.c Log Message: fix proplib deprecation To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/zaurus/zaurus/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/zaurus/zaurus/autoconf.c diff -u src/sys/arch/zaurus/zaurus/autoconf.c:1.13 src/sys/arch/zaurus/zaurus/autoconf.c:1.14 --- src/sys/arch/zaurus/zaurus/autoconf.c:1.13 Wed Nov 13 12:48:03 2019 +++ src/sys/arch/zaurus/zaurus/autoconf.c Sun Jun 20 23:05:24 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.13 2019/11/13 17:48:03 tsutsui Exp $ */ +/* $NetBSD: autoconf.c,v 1.14 2021/06/21 03:05:24 christos Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.13 2019/11/13 17:48:03 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.14 2021/06/21 03:05:24 christos Exp $"); #include "opt_md.h" @@ -227,7 +227,7 @@ device_register(device_t dev, void *aux) */ if (device_is_a(dev, "iic") && device_is_a(dev->dv_parent, "ziic")) { - (void)prop_dictionary_set_cstring_nocopy(device_properties(dev), + (void)prop_dictionary_set_string_nocopy(device_properties(dev), I2C_PROP_INDIRECT_PROBE_STRATEGY, I2C_PROBE_STRATEGY_NONE); } }
CVS commit: src/sys/arch/zaurus/zaurus
Module Name:src Committed By: christos Date: Fri Mar 29 20:27:45 UTC 2019 Modified Files: src/sys/arch/zaurus/zaurus: machdep.c Log Message: Yes, we need to load symbols, but we don't need the whole DDB infrastructure for that. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/arch/zaurus/zaurus/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/zaurus/zaurus/machdep.c diff -u src/sys/arch/zaurus/zaurus/machdep.c:1.39 src/sys/arch/zaurus/zaurus/machdep.c:1.40 --- src/sys/arch/zaurus/zaurus/machdep.c:1.39 Sun Oct 28 10:30:33 2018 +++ src/sys/arch/zaurus/zaurus/machdep.c Fri Mar 29 16:27:45 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.39 2018/10/28 14:30:33 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.40 2019/03/29 20:27:45 christos Exp $ */ /* $OpenBSD: zaurus_machdep.c,v 1.25 2006/06/20 18:24:04 todd Exp $ */ /* @@ -107,7 +107,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.39 2018/10/28 14:30:33 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.40 2019/03/29 20:27:45 christos Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -1109,9 +1109,13 @@ initarm(void *arg) md_root_setconf(memory_disk, sizeof memory_disk); #endif -#if NKSYMS || defined(DDB) || defined(MODULAR) - /* Firmware doesn't load symbols. */ +#if NKSYMS || defined(MODULAR) +# ifdef DDB ddb_init(0, NULL, NULL); +# else + /* Firmware doesn't load symbols. */ + ksyms_addsyms_elf(0, NULL, NULL); +# endif #endif #ifdef KGDB
CVS commit: src/sys/arch/zaurus/zaurus
Module Name:src Committed By: dholland Date: Tue May 31 04:14:12 UTC 2016 Modified Files: src/sys/arch/zaurus/zaurus: machdep.c Log Message: PR 51196 David Binderman: simplify redundant conditional. (yet another copy) To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/zaurus/zaurus/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/zaurus/zaurus/machdep.c diff -u src/sys/arch/zaurus/zaurus/machdep.c:1.35 src/sys/arch/zaurus/zaurus/machdep.c:1.36 --- src/sys/arch/zaurus/zaurus/machdep.c:1.35 Sun Aug 18 21:42:16 2013 +++ src/sys/arch/zaurus/zaurus/machdep.c Tue May 31 04:14:12 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.35 2013/08/18 21:42:16 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.36 2016/05/31 04:14:12 dholland Exp $ */ /* $OpenBSD: zaurus_machdep.c,v 1.25 2006/06/20 18:24:04 todd Exp $ */ /* @@ -107,7 +107,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.35 2013/08/18 21:42:16 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.36 2016/05/31 04:14:12 dholland Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -1205,7 +1205,7 @@ gettrailer(char *arg) *options++ = '\0'; /* trim leading blanks */ - while (*options && *options == ' ') + while (*options == ' ') options++; return options;
CVS commit: src/sys/arch/zaurus/zaurus
Module Name:src Committed By: skrll Date: Sat Mar 8 17:05:09 UTC 2014 Modified Files: src/sys/arch/zaurus/zaurus: kloader_machdep.c Log Message: Remove unused variable To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/zaurus/zaurus/kloader_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/zaurus/zaurus/kloader_machdep.c diff -u src/sys/arch/zaurus/zaurus/kloader_machdep.c:1.6 src/sys/arch/zaurus/zaurus/kloader_machdep.c:1.7 --- src/sys/arch/zaurus/zaurus/kloader_machdep.c:1.6 Sat Jan 21 18:56:51 2012 +++ src/sys/arch/zaurus/zaurus/kloader_machdep.c Sat Mar 8 17:05:08 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kloader_machdep.c,v 1.6 2012/01/21 18:56:51 nonaka Exp $ */ +/* $NetBSD: kloader_machdep.c,v 1.7 2014/03/08 17:05:08 skrll Exp $ */ /*- * Copyright (C) 2009-2012 NONAKA Kimihiro non...@netbsd.org @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kloader_machdep.c,v 1.6 2012/01/21 18:56:51 nonaka Exp $); +__KERNEL_RCSID(0, $NetBSD: kloader_machdep.c,v 1.7 2014/03/08 17:05:08 skrll Exp $); #include debug_kloader.h @@ -78,7 +78,7 @@ kloader_zaurus_jump(kloader_bootfunc_t f extern char KERNEL_BASE_virt[]; void (*bootinfop)(void *, void *); uint32_t *bootmagicp; - vaddr_t top, ptr; + vaddr_t ptr; struct bootinfo *bootinfo; struct btinfo_howto *bi_howto; struct btinfo_rootdevice *bi_rootdv; @@ -96,7 +96,7 @@ kloader_zaurus_jump(kloader_bootfunc_t f memset(bootmagicp, 0, BOOTARGS_BUFSIZ); bootinfo = (struct bootinfo *)(bootmagicp + 1); bootinfo-nentries = 0; - top = ptr = (vaddr_t)bootinfo-info; + ptr = (vaddr_t)bootinfo-info; /* pass to howto for new kernel */ bi_howto = (struct btinfo_howto *)ptr;
CVS commit: src/sys/arch/zaurus/zaurus
Module Name:src Committed By: nonaka Date: Sun Aug 12 17:25:32 UTC 2012 Modified Files: src/sys/arch/zaurus/zaurus: machdep.c zaurus_reg.h Log Message: To reset the watchdog timer in SL-C7x0/SL-C860. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/zaurus/zaurus/machdep.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/zaurus/zaurus/zaurus_reg.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/zaurus/zaurus/machdep.c diff -u src/sys/arch/zaurus/zaurus/machdep.c:1.31 src/sys/arch/zaurus/zaurus/machdep.c:1.32 --- src/sys/arch/zaurus/zaurus/machdep.c:1.31 Sun Jul 29 00:07:06 2012 +++ src/sys/arch/zaurus/zaurus/machdep.c Sun Aug 12 17:25:32 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.31 2012/07/29 00:07:06 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.32 2012/08/12 17:25:32 nonaka Exp $ */ /* $OpenBSD: zaurus_machdep.c,v 1.25 2006/06/20 18:24:04 todd Exp $ */ /* @@ -107,7 +107,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.31 2012/07/29 00:07:06 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.32 2012/08/12 17:25:32 nonaka Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -163,6 +163,8 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v #include arm/xscale/pxa2x0var.h #include arm/xscale/pxa2x0_gpio.h +#include arm/sa11x0/sa11x0_ostvar.h + #include arch/zaurus/zaurus/zaurus_reg.h #include arch/zaurus/zaurus/zaurus_var.h @@ -457,11 +459,16 @@ zaurus_restart(void) /* External reset circuit presumably asserts nRESET_GPIO. */ pxa2x0_gpio_set_function(89, GPIO_OUT | GPIO_SET); - } else if (ZAURUS_ISC860) { - /* XXX not yet */ - printf(zaurus_restart() for C7x0 is not implemented yet.\n); + } else { + /* SL-C7x0/SL-C860 */ + /* Clear all reset status */ + ioreg_write(ZAURUS_POWMAN_VBASE + POWMAN_RCSR, + POWMAN_HWR|POWMAN_WDR|POWMAN_SMR|POWMAN_GPR); + + /* watchdog reset */ + saost_reset(); } - delay(1 * 1000* 1000); /* wait 1s */ + delay(1 * 1000 * 1000); /* wait 1s */ } static inline pd_entry_t * @@ -546,6 +553,12 @@ static const struct pmap_devmap zaurus_d _S(4 * COM_NPORTS), VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, +{ + ZAURUS_POWMAN_VBASE, + _A(PXA2X0_POWMAN_BASE), + _S(PXA2X0_POWMAN_SIZE), + VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, +}, {0, 0, 0, 0, 0,} }; Index: src/sys/arch/zaurus/zaurus/zaurus_reg.h diff -u src/sys/arch/zaurus/zaurus/zaurus_reg.h:1.4 src/sys/arch/zaurus/zaurus/zaurus_reg.h:1.5 --- src/sys/arch/zaurus/zaurus/zaurus_reg.h:1.4 Sun Jan 29 10:12:42 2012 +++ src/sys/arch/zaurus/zaurus/zaurus_reg.h Sun Aug 12 17:25:32 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: zaurus_reg.h,v 1.4 2012/01/29 10:12:42 tsutsui Exp $ */ +/* $NetBSD: zaurus_reg.h,v 1.5 2012/08/12 17:25:32 nonaka Exp $ */ /* $OpenBSD: zaurus_reg.h,v 1.7 2005/12/14 14:39:38 uwe Exp $ */ /* NetBSD: lubbock_reg.h,v 1.1 2003/06/18 10:51:15 bsh Exp */ @@ -49,7 +49,8 @@ #define ZAURUS_FFUART_VBASE 0xfd60 #define ZAURUS_BTUART_VBASE 0xfd70 #define ZAURUS_STUART_VBASE 0xfd80 -#define ZAURUS_VBASE_FREE 0xfd90 +#define ZAURUS_POWMAN_VBASE 0xfd90 +#define ZAURUS_VBASE_FREE 0xfda0 #define ioreg_read(a) (*(volatile uint32_t *)(a)) #define ioreg_write(a,v) (*(volatile uint32_t *)(a)=(v))
CVS commit: src/sys/arch/zaurus/zaurus
Module Name:src Committed By: mlelstv Date: Wed Jun 13 20:04:30 UTC 2012 Modified Files: src/sys/arch/zaurus/zaurus: autoconf.c Log Message: Make detection of root on wedges (dk(4)) machine independent. Remove MD code for zaurus. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/zaurus/zaurus/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/zaurus/zaurus/autoconf.c diff -u src/sys/arch/zaurus/zaurus/autoconf.c:1.10 src/sys/arch/zaurus/zaurus/autoconf.c:1.11 --- src/sys/arch/zaurus/zaurus/autoconf.c:1.10 Thu May 5 08:46:12 2011 +++ src/sys/arch/zaurus/zaurus/autoconf.c Wed Jun 13 20:04:30 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.10 2011/05/05 08:46:12 nonaka Exp $ */ +/* $NetBSD: autoconf.c,v 1.11 2012/06/13 20:04:30 mlelstv Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.10 2011/05/05 08:46:12 nonaka Exp $); +__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.11 2012/06/13 20:04:30 mlelstv Exp $); #include opt_md.h @@ -48,7 +48,6 @@ __KERNEL_RCSID(0, $NetBSD: autoconf.c,v #include machine/bootinfo.h #include machine/config_hook.h -static void handle_wedges(device_t dv, int par); static int is_valid_disk(device_t dv); static int match_bootdisk(device_t dv, struct btinfo_bootdisk *bid); static void findroot(void); @@ -69,17 +68,6 @@ cpu_configure(void) spl0(); } -static void -handle_wedges(device_t dv, int par) -{ - - if (config_handle_wedges(dv, par) == 0) - return; - - booted_device = dv; - booted_partition = par; -} - static int is_valid_disk(device_t dv) { @@ -168,7 +156,8 @@ findroot(void) if (strncmp(cd-cf_name, biv-devname, len) == 0 biv-devname[len] - '0' == cd-cf_unit) { -handle_wedges(dv, biv-devname[len + 1] - 'a'); +booted_device = dv; +booted_partition = biv-devname[len + 1] - 'a'; break; } } @@ -205,7 +194,8 @@ findroot(void) device_xname(dv)); continue; } - handle_wedges(dv, bid-partition); + booted_device = dv; + booted_partition = bid-partition; } deviter_release(di);
CVS commit: src/sys/arch/zaurus/zaurus
Module Name:src Committed By: nonaka Date: Tue Jan 17 15:48:33 UTC 2012 Modified Files: src/sys/arch/zaurus/zaurus: kloader_zaurus.S Log Message: fix struct kloader_bootinfo address. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/zaurus/zaurus/kloader_zaurus.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/zaurus/zaurus/kloader_zaurus.S diff -u src/sys/arch/zaurus/zaurus/kloader_zaurus.S:1.1 src/sys/arch/zaurus/zaurus/kloader_zaurus.S:1.2 --- src/sys/arch/zaurus/zaurus/kloader_zaurus.S:1.1 Wed Mar 11 09:02:05 2009 +++ src/sys/arch/zaurus/zaurus/kloader_zaurus.S Tue Jan 17 15:48:33 2012 @@ -1,7 +1,7 @@ -/* $NetBSD: kloader_zaurus.S,v 1.1 2009/03/11 09:02:05 nonaka Exp $ */ +/* $NetBSD: kloader_zaurus.S,v 1.2 2012/01/17 15:48:33 nonaka Exp $ */ /*- - * Copyright (c) 2009 NONAKA Kimihiro non...@netbsd.org + * Copyright (c) 2009-2012 NONAKA Kimihiro non...@netbsd.org * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -56,9 +56,9 @@ */ .global _C_LABEL(kloader_zaurus_boot) _C_LABEL(kloader_zaurus_boot): - mov r0, r12 /* r12: kbi */ - bic r12, r12, #0xff00 - orr r12, r12, #0xa000 + mov sp, r0 /* sp: kbi */ + bic sp, sp, #0xff00 /* clear upper 8 bits */ + orr sp, sp, #0xa000 /* OR in physical base address */ /* We will go ahead and disable the MMU here. */ adr r8, .Lmmuoff @@ -105,15 +105,13 @@ _C_LABEL(kloader_zaurus_boot): bl .Lputcrlf #endif - /* set temporary stack pointer */ + /* Set kernel entry */ + ldr r0, [sp] + + /* Set temporary stack pointer */ ldr sp, .Lstack_addr /* Jump to kernel entry */ -#if 0 /* XXX */ - ldr r0, [r12] /* kbi-entry */ -#else - ldr r0, .Lstart_addr -#endif mov pc, r0 99: b 99b @@ -121,9 +119,6 @@ _C_LABEL(kloader_zaurus_boot): .Lstack_addr: .word 0xa0004000 -.Lstart_addr: - .word 0xa020 - #ifdef PROGRESS .Lprogress: mov r0, #0x2e /*'.'*/
CVS commit: src/sys/arch/zaurus/zaurus
Module Name:src Committed By: nonaka Date: Sun Nov 20 04:07:50 UTC 2011 Modified Files: src/sys/arch/zaurus/zaurus: kloader_machdep.c Log Message: compile again. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/zaurus/zaurus/kloader_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/zaurus/zaurus/kloader_machdep.c diff -u src/sys/arch/zaurus/zaurus/kloader_machdep.c:1.3 src/sys/arch/zaurus/zaurus/kloader_machdep.c:1.4 --- src/sys/arch/zaurus/zaurus/kloader_machdep.c:1.3 Sun Mar 15 02:23:52 2009 +++ src/sys/arch/zaurus/zaurus/kloader_machdep.c Sun Nov 20 04:07:50 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: kloader_machdep.c,v 1.3 2009/03/15 02:23:52 nonaka Exp $ */ +/* $NetBSD: kloader_machdep.c,v 1.4 2011/11/20 04:07:50 nonaka Exp $ */ /*- * Copyright (c) 2009 NONAKA Kimihiro non...@netbsd.org @@ -27,12 +27,13 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kloader_machdep.c,v 1.3 2009/03/15 02:23:52 nonaka Exp $); +__KERNEL_RCSID(0, $NetBSD: kloader_machdep.c,v 1.4 2011/11/20 04:07:50 nonaka Exp $); #include debug_kloader.h #include sys/param.h #include sys/systm.h +#include sys/device.h #include sys/disklabel.h #include machine/kloader.h
CVS commit: src/sys/arch/zaurus/zaurus
Module Name:src Committed By: nonaka Date: Sat Nov 12 04:39:20 UTC 2011 Modified Files: src/sys/arch/zaurus/zaurus: machdep.c Log Message: SL-C700 has PXA250 step B instead of PXA250 step A. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/zaurus/zaurus/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/zaurus/zaurus/machdep.c diff -u src/sys/arch/zaurus/zaurus/machdep.c:1.26 src/sys/arch/zaurus/zaurus/machdep.c:1.27 --- src/sys/arch/zaurus/zaurus/machdep.c:1.26 Tue Jul 19 15:11:49 2011 +++ src/sys/arch/zaurus/zaurus/machdep.c Sat Nov 12 04:39:19 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.26 2011/07/19 15:11:49 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.27 2011/11/12 04:39:19 nonaka Exp $ */ /* $OpenBSD: zaurus_machdep.c,v 1.25 2006/06/20 18:24:04 todd Exp $ */ /* @@ -107,7 +107,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.26 2011/07/19 15:11:49 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.27 2011/11/12 04:39:19 nonaka Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -713,7 +713,7 @@ initarm(void *arg) zaurus_gpioconf = pxa27x_zaurus_gpioconf; } else { zaurusmod = ZAURUS_C860; /* SL-C7x0/860 */ - if (cputype == CPU_ID_PXA250A) { + if (cputype == CPU_ID_PXA250B) { /* SL-C700 */ memsize = 0x0200; /* 32MB */ }
CVS commit: src/sys/arch/zaurus/zaurus
Module Name:src Committed By: nonaka Date: Thu Jun 23 11:28:53 UTC 2011 Modified Files: src/sys/arch/zaurus/zaurus: machdep.c Log Message: Reduced the use of the magic number. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/zaurus/zaurus/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/zaurus/zaurus/machdep.c diff -u src/sys/arch/zaurus/zaurus/machdep.c:1.23 src/sys/arch/zaurus/zaurus/machdep.c:1.24 --- src/sys/arch/zaurus/zaurus/machdep.c:1.23 Sun Jun 19 16:20:09 2011 +++ src/sys/arch/zaurus/zaurus/machdep.c Thu Jun 23 11:28:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.23 2011/06/19 16:20:09 nonaka Exp $ */ +/* $NetBSD: machdep.c,v 1.24 2011/06/23 11:28:53 nonaka Exp $ */ /* $OpenBSD: zaurus_machdep.c,v 1.25 2006/06/20 18:24:04 todd Exp $ */ /* @@ -107,7 +107,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.23 2011/06/19 16:20:09 nonaka Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.24 2011/06/23 11:28:53 nonaka Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -179,8 +179,11 @@ #endif /* Kernel text starts 2MB in from the bottom of the kernel address space. */ -#define KERNEL_TEXT_BASE (KERNEL_BASE + 0x0020) -#define KERNEL_VM_BASE (KERNEL_BASE + 0x0400) +#define KERNEL_TEXT_OFFSET 0x0020 +#define KERNEL_TEXT_BASE (KERNEL_BASE + KERNEL_TEXT_OFFSET) +#ifndef KERNEL_VM_BASE +#define KERNEL_VM_BASE (KERNEL_BASE + 0x0100) +#endif /* * The range 0xc400 - 0xcfff is available for kernel VM space @@ -235,10 +238,10 @@ #define KERNEL_PT_SYS 0 /* Page table for mapping proc0 zero page */ #define KERNEL_PT_KERNEL 1 /* Page table for mapping kernel */ -#define KERNEL_PT_KERNEL_NUM 32 +#define KERNEL_PT_KERNEL_NUM ((KERNEL_VM_BASE - KERNEL_BASE) 22) #define KERNEL_PT_VMDATA (KERNEL_PT_KERNEL + KERNEL_PT_KERNEL_NUM) /* Page tables for mapping kernel VM */ -#define KERNEL_PT_VMDATA_NUM 8 /* start with 32MB of KVM */ +#define KERNEL_PT_VMDATA_NUM 4 /* start with 16MB of KVM */ #define NUM_KERNEL_PTS (KERNEL_PT_VMDATA + KERNEL_PT_VMDATA_NUM) pv_addr_t kernel_pt_table[NUM_KERNEL_PTS]; @@ -262,7 +265,8 @@ struct bootinfo *bootinfo; struct btinfo_howto *bi_howto; -#define BOOTINFO_PAGE (0xa020UL - PAGE_SIZE) +#define KERNEL_BASE_PHYS (PXA2X0_SDRAM0_START + KERNEL_TEXT_OFFSET) +#define BOOTINFO_PAGE (KERNEL_BASE_PHYS - PAGE_SIZE) /* Prototypes */ void consinit(void); @@ -576,8 +580,8 @@ if (virt) { /* XXX scoop1 registers are not page-aligned! */ - int ofs = C3000_SCOOP1_BASE - trunc_page(C3000_SCOOP1_BASE); - p = (volatile uint16_t *)(ZAURUS_SCOOP1_VBASE + ofs + SCOOP_GPWR); + int o = C3000_SCOOP1_BASE - trunc_page(C3000_SCOOP1_BASE); + p = (volatile uint16_t *)(ZAURUS_SCOOP1_VBASE + o + SCOOP_GPWR); } else { p = (volatile uint16_t *)(C3000_SCOOP1_BASE + SCOOP_GPWR); } @@ -585,33 +589,27 @@ *p = ~(1 SCOOP1_IR_ON); } -int hw_isc1000(int virt); -int hw_isc1000(int virt) +static int +hw_isc1000(void) { - u_long baseaddr; + /* XXX scoop1 registers are not page-aligned! */ + const u_long baseaddr = ZAURUS_SCOOP1_VBASE + + (C3000_SCOOP1_BASE - trunc_page(C3000_SCOOP1_BASE)); uint16_t mcr, cdr, csr, cpr, ccr, irr, irm, imr, isr; uint16_t gpcr, gpwr, gprr; - if (virt) { - /* XXX scoop1 registers are not page-aligned! */ - int ofs = C3000_SCOOP1_BASE - trunc_page(C3000_SCOOP1_BASE); - baseaddr = ZAURUS_SCOOP1_VBASE + ofs; - } else { - baseaddr = C3000_SCOOP1_BASE; - } - - mcr = *(volatile uint16_t *)(baseaddr + SCOOP_MCR); - cdr = *(volatile uint16_t *)(baseaddr + SCOOP_CDR); - csr = *(volatile uint16_t *)(baseaddr + SCOOP_CSR); - cpr = *(volatile uint16_t *)(baseaddr + SCOOP_CPR); - ccr = *(volatile uint16_t *)(baseaddr + SCOOP_CCR); - irr = *(volatile uint16_t *)(baseaddr + SCOOP_IRR); - irm = *(volatile uint16_t *)(baseaddr + SCOOP_IRM); - imr = *(volatile uint16_t *)(baseaddr + SCOOP_IMR); - isr = *(volatile uint16_t *)(baseaddr + SCOOP_ISR); - gpcr = *(volatile uint16_t *)(baseaddr + SCOOP_GPCR); - gpwr = *(volatile uint16_t *)(baseaddr + SCOOP_GPWR); - gprr = *(volatile uint16_t *)(baseaddr + SCOOP_GPRR); + mcr = ioreg16_read(baseaddr + SCOOP_MCR); + cdr = ioreg16_read(baseaddr + SCOOP_CDR); + csr = ioreg16_read(baseaddr + SCOOP_CSR); + cpr = ioreg16_read(baseaddr + SCOOP_CPR); + ccr = ioreg16_read(baseaddr + SCOOP_CCR); + irr = ioreg16_read(baseaddr + SCOOP_IRR); + irm = ioreg16_read(baseaddr + SCOOP_IRM); + imr = ioreg16_read(baseaddr + SCOOP_IMR); + isr = ioreg16_read(baseaddr + SCOOP_ISR); + gpcr = ioreg16_read(baseaddr + SCOOP_GPCR); + gpwr = ioreg16_read(baseaddr + SCOOP_GPWR); + gprr = ioreg16_read(baseaddr + SCOOP_GPRR); if (mcr == 0 cdr == 0 csr == 0 cpr == 0 ccr == 0 irr == 0 irm == 0 imr == 0 isr == 0 @@ -677,15 +675,15 @@ * Examine the boot args string for options we need to
CVS commit: src/sys/arch/zaurus/zaurus
Module Name:src Committed By: nonaka Date: Thu May 5 08:46:12 UTC 2011 Modified Files: src/sys/arch/zaurus/zaurus: autoconf.c Log Message: Don't check device numbers. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/zaurus/zaurus/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/zaurus/zaurus/autoconf.c diff -u src/sys/arch/zaurus/zaurus/autoconf.c:1.9 src/sys/arch/zaurus/zaurus/autoconf.c:1.10 --- src/sys/arch/zaurus/zaurus/autoconf.c:1.9 Thu Nov 5 18:17:34 2009 +++ src/sys/arch/zaurus/zaurus/autoconf.c Thu May 5 08:46:12 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.9 2009/11/05 18:17:34 dyoung Exp $ */ +/* $NetBSD: autoconf.c,v 1.10 2011/05/05 08:46:12 nonaka Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.9 2009/11/05 18:17:34 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.10 2011/05/05 08:46:12 nonaka Exp $); #include opt_md.h @@ -192,15 +192,8 @@ continue; if (is_valid_disk(dv)) { -/* - * Don't trust BIOS device numbers, try - * to match the information passed by the - * boot loader instead. - */ -if ((bid-biosdev 0x80) == 0 || -match_bootdisk(dv, bid) == 0) - continue; -goto bootdisk_found; +if (match_bootdisk(dv, bid)) + goto bootdisk_found; } continue;