CVS commit: src/sys/arch/epoc32/epoc32
Module Name:src Committed By: skrll Date: Sat Jul 24 07:59:10 UTC 2021 Modified Files: src/sys/arch/epoc32/epoc32: intr.c Log Message: #include for COHERENCY_UNIT To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/epoc32/epoc32/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/epoc32/epoc32/intr.c diff -u src/sys/arch/epoc32/epoc32/intr.c:1.2 src/sys/arch/epoc32/epoc32/intr.c:1.3 --- src/sys/arch/epoc32/epoc32/intr.c:1.2 Sun Aug 18 21:57:01 2013 +++ src/sys/arch/epoc32/epoc32/intr.c Sat Jul 24 07:59:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.2 2013/08/18 21:57:01 matt Exp $ */ +/* $NetBSD: intr.c,v 1.3 2021/07/24 07:59:10 skrll Exp $ */ /* * Copyright (c) 2012 KIYOHARA Takashi * All rights reserved. @@ -26,8 +26,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.2 2013/08/18 21:57:01 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.3 2021/07/24 07:59:10 skrll Exp $"); +#include #include #include
CVS commit: src/sys/arch/epoc32/include
Module Name:src Committed By: skrll Date: Thu Jul 23 19:25:14 UTC 2020 Modified Files: src/sys/arch/epoc32/include: intr.h Log Message: unifdef -U_LKM To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/epoc32/include/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/epoc32/include/intr.h diff -u src/sys/arch/epoc32/include/intr.h:1.1 src/sys/arch/epoc32/include/intr.h:1.2 --- src/sys/arch/epoc32/include/intr.h:1.1 Sun Apr 28 12:11:26 2013 +++ src/sys/arch/epoc32/include/intr.h Thu Jul 23 19:25:14 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.1 2013/04/28 12:11:26 kiyohara Exp $ */ +/* $NetBSD: intr.h,v 1.2 2020/07/23 19:25:14 skrll Exp $ */ /* * Copyright (c) 2001, 2003 Wasabi Systems, Inc. @@ -66,21 +66,11 @@ #include -#if defined(_LKM) - -int _splraise(int); -int _spllower(int); -void splx(int); - -#else /* _LKM */ - #define PIC_MAXSOURCES 16 #define PIC_MAXMAXSOURCES 16 #include -#endif /* _LKM */ - #define splsoft() _splraise(IPL_SOFT) typedef uint8_t ipl_t;
CVS commit: src/sys/arch/epoc32/conf
Module Name:src Committed By: mrg Date: Sun Aug 12 09:27:02 UTC 2018 Modified Files: src/sys/arch/epoc32/conf: Makefile.epoc32.inc Log Message: conditionally set MACHINE_ARCH to arm, like other makefiles. fixes epoc32 builds. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/epoc32/conf/Makefile.epoc32.inc 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/epoc32/conf/Makefile.epoc32.inc diff -u src/sys/arch/epoc32/conf/Makefile.epoc32.inc:1.5 src/sys/arch/epoc32/conf/Makefile.epoc32.inc:1.6 --- src/sys/arch/epoc32/conf/Makefile.epoc32.inc:1.5 Tue Aug 25 02:38:15 2015 +++ src/sys/arch/epoc32/conf/Makefile.epoc32.inc Sun Aug 12 09:27:02 2018 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile.epoc32.inc,v 1.5 2015/08/25 02:38:15 uebayasi Exp $ +# $NetBSD: Makefile.epoc32.inc,v 1.6 2018/08/12 09:27:02 mrg Exp $ -MACHINE_ARCH= arm +MACHINE_ARCH?= arm CPPFLAGS+= -D${MACHINE} SYSTEM_FIRST_OBJ= epoc32_start.o
CVS commit: src/sys/arch/epoc32/stand/e32boot/include
Module Name:src Committed By: christos Date: Thu May 24 17:07:51 UTC 2018 Modified Files: src/sys/arch/epoc32/stand/e32boot/include: elf.h Log Message: sync with HEAD. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/epoc32/stand/e32boot/include/elf.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/epoc32/stand/e32boot/include/elf.h diff -u src/sys/arch/epoc32/stand/e32boot/include/elf.h:1.3 src/sys/arch/epoc32/stand/e32boot/include/elf.h:1.4 --- src/sys/arch/epoc32/stand/e32boot/include/elf.h:1.3 Fri Jan 3 11:40:58 2014 +++ src/sys/arch/epoc32/stand/e32boot/include/elf.h Thu May 24 13:07:51 2018 @@ -1,5 +1,4 @@ -/* $NetBSD: elf.h,v 1.3 2014/01/03 16:40:58 dsl Exp $ */ -@@ +/* $NetBSD: elf.h,v 1.4 2018/05/24 17:07:51 christos Exp $ */ /*- * Copyright (c) 1994 The NetBSD Foundation, Inc. @@ -41,14 +40,18 @@ * http://www.sco.com/developers/gabi/latest/ch4.eheader.html */ -typedef unsigned char uint8_t; -typedef unsigned short int uint16_t; -typedef unsigned int uint32_t; -typedef unsigned long long int uint64_t; -typedef signed char int8_t; -typedef int int32_t; -typedef long long int int64_t; - +#if defined(_KERNEL) || defined(_STANDALONE) +#include +#else +#include +#include +#endif /* _KERNEL || _STANDALONE */ + +#if HAVE_NBTOOL_CONFIG_H +#include +#else +#include +#endif typedef uint8_t Elf_Byte; @@ -206,7 +209,8 @@ typedef struct { #define EM_386 3 /* Intel 80386 */ #define EM_68K 4 /* Motorola 68000 */ #define EM_88K 5 /* Motorola 88000 */ -#define EM_486 6 /* Intel 80486 */ +#define EM_486 6 /* Intel 80486 [old] */ +#define EM_IAMCU 6 /* Intel MCU. */ #define EM_860 7 /* Intel 80860 */ #define EM_MIPS 8 /* MIPS I Architecture */ #define EM_S370 9 /* Amdahl UTS on System/370 */ @@ -278,7 +282,8 @@ typedef struct { #define EM_MN10300 89 /* Matsushita MN10300 */ #define EM_MN10200 90 /* Matsushita MN10200 */ #define EM_PJ 91 /* picoJava */ -#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */ +#define EM_OR1K 92 /* OpenRISC 32-bit embedded processor */ +#define EM_OPENRISC EM_OR1K #define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */ #define EM_XTENSA 94 /* Tensilica Xtensa Architecture */ #define EM_VIDEOCORE 95 /* Alphamosaic VideoCore processor */ @@ -297,9 +302,17 @@ typedef struct { #define EM_SEP 108 /* Sharp embedded microprocessor */ #define EM_ARCA 109 /* Arca RISC microprocessor */ #define EM_UNICORE 110 /* UNICORE from PKU-Unity Ltd. and MPRC Peking University */ +#define EM_ALTERA_NIOS2 113 /* Altera Nios II soft-core processor */ +#define EM_AARCH64 183 /* AArch64 64-bit ARM microprocessor */ +#define EM_AVR32 185 /* Atmel Corporation 32-bit microprocessor family*/ +#define EM_TILE64 187 /* Tilera TILE64 multicore architecture family */ +#define EM_TILEPRO 188 /* Tilera TILEPro multicore architecture family */ +#define EM_MICROBLAZE 189 /* Xilinx MicroBlaze 32-bit RISC soft processor core */ +#define EM_TILEGX 192 /* Tilera TILE-GX multicore architecture family */ +#define EM_Z80 220 /* Zilog Z80 */ +#define EM_RISCV 243 /* RISC-V */ /* Unofficial machine types follow */ -#define EM_AVR32 6317 /* used by NetBSD/avr32 */ #define EM_ALPHA_EXP 36902 /* used by NetBSD/alpha; obsolete */ #define EM_NUM 36903 @@ -351,6 +364,7 @@ typedef struct { #define PT_HIPROC 0x7fff #define PT_MIPS_REGINFO 0x7000 +#define PT_MIPS_ABIFLAGS 0x7003 /* p_flags */ #define PF_R 0x4 /* Segment is readable */ @@ -413,8 +427,16 @@ typedef struct { #define SHT_NUM 19 #define SHT_LOOS 0x6000 /* Operating system specific range */ +#define SHT_GNU_INCREMENTAL_INPUTS 0x6fff4700 /* GNU incremental build data */ +#define SHT_LOSUNW 0x6ff4 +#define SHT_SUNW_dof 0x6ff4 +#define SHT_GNU_ATTRIBUTES 0x6ff5 /* GNU object attributes */ +#define SHT_SUNW_cap 0x6ff5 +#define SHT_SUNW_SIGNATURE 0x6ff6 #define SHT_GNU_HASH 0x6ff6 /* GNU style symbol hash table */ +#define SHT_GNU_LIBLIST 0x6ff7 /* GNU list of prelink dependencies */ #define SHT_SUNW_move 0x6ffa +#define SHT_SUNW_COMDAT 0x6ffb #define SHT_SUNW_syminfo 0x6ffc #define SHT_SUNW_verdef 0x6ffd /* Versions defined by file */ #define SHT_GNU_verdef SHT_SUNW_verdef @@ -422,9 +444,20 @@ typedef struct { #define SHT_GNU_verneed SHT_SUNW_verneed #define SHT_SUNW_versym 0x6fff /* Symbol versions */ #define SHT_GNU_versym SHT_SUNW_versym +#define SHT_HISUNW 0x6fff #define SHT_HIOS 0x6fff #define SHT_LOPROC 0x7000 /* Processor-specific range */ #define SHT_AMD64_UNWIND 0x7001 /* unwind information */ +#define SHT_ARM_EXIDX 0x7001 /* exception index table */ +#define SHT_ARM_PREEMPTMAP 0x7002 /* BPABI DLL dynamic linking + * pre-emption map */
CVS commit: src/sys/arch/epoc32/conf
Module Name:src Committed By: martin Date: Wed Dec 14 14:01:10 UTC 2016 Modified Files: src/sys/arch/epoc32/conf: GENERIC Log Message: Comment out spkr at audio, as audio is commented out too To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/epoc32/conf/GENERIC 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/epoc32/conf/GENERIC diff -u src/sys/arch/epoc32/conf/GENERIC:1.11 src/sys/arch/epoc32/conf/GENERIC:1.12 --- src/sys/arch/epoc32/conf/GENERIC:1.11 Tue Dec 13 20:42:17 2016 +++ src/sys/arch/epoc32/conf/GENERIC Wed Dec 14 14:01:10 2016 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.11 2016/12/13 20:42:17 christos Exp $ +# $NetBSD: GENERIC,v 1.12 2016/12/14 14:01:10 martin Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/epoc32/conf/std.epoc32" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.11 $" +#ident "GENERIC-$Revision: 1.12 $" maxusers 32 # estimated number of users @@ -167,8 +167,7 @@ wskbd* at epockbd? #tp* at spi* # ADS7843 Touch screen #audio* at audio? - -spkr* at audio? # PC speaker (synthesized) +#spkr* at audio? # PC speaker (synthesized) # External devices
CVS commit: src/sys/arch/epoc32/stand/e32boot/ldd
Module Name:src Committed By: christos Date: Mon Feb 1 17:44:19 UTC 2016 Modified Files: src/sys/arch/epoc32/stand/e32boot/ldd: epoc32.cpp epoc32.h Log Message: PR/50740: David Binderman: Provide a copy constructor. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/epoc32/stand/e32boot/ldd/epoc32.cpp \ src/sys/arch/epoc32/stand/e32boot/ldd/epoc32.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/epoc32/stand/e32boot/ldd/epoc32.cpp diff -u src/sys/arch/epoc32/stand/e32boot/ldd/epoc32.cpp:1.1 src/sys/arch/epoc32/stand/e32boot/ldd/epoc32.cpp:1.2 --- src/sys/arch/epoc32/stand/e32boot/ldd/epoc32.cpp:1.1 Sun Apr 28 08:11:27 2013 +++ src/sys/arch/epoc32/stand/e32boot/ldd/epoc32.cpp Mon Feb 1 12:44:19 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: epoc32.cpp,v 1.1 2013/04/28 12:11:27 kiyohara Exp $ */ +/* $NetBSD: epoc32.cpp,v 1.2 2016/02/01 17:44:19 christos Exp $ */ /* * Copyright (c) 2013 KIYOHARA Takashi * All rights reserved. @@ -57,6 +57,11 @@ AllowAllDomains(void) __asm("mcr p15, 0, %0, c3, c0" : : "r"(domains)); } +EPOC32::EPOC32(const EPOC32& c) +{ + cpu = c.cpu; +} + EPOC32::EPOC32(void) { TUint procid; Index: src/sys/arch/epoc32/stand/e32boot/ldd/epoc32.h diff -u src/sys/arch/epoc32/stand/e32boot/ldd/epoc32.h:1.1 src/sys/arch/epoc32/stand/e32boot/ldd/epoc32.h:1.2 --- src/sys/arch/epoc32/stand/e32boot/ldd/epoc32.h:1.1 Sun Apr 28 08:11:27 2013 +++ src/sys/arch/epoc32/stand/e32boot/ldd/epoc32.h Mon Feb 1 12:44:19 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: epoc32.h,v 1.1 2013/04/28 12:11:27 kiyohara Exp $ */ +/* $NetBSD: epoc32.h,v 1.2 2016/02/01 17:44:19 christos Exp $ */ /* * Copyright (c) 2013 KIYOHARA Takashi * All rights reserved. @@ -30,6 +30,7 @@ class EPOC32 { private: CPU *cpu; + EPOC32(const EPOC32 &); public: EPOC32(void);
CVS commit: src/sys/arch/epoc32/conf
Module Name:src Committed By: uebayasi Date: Thu Aug 20 06:21:02 UTC 2015 Modified Files: src/sys/arch/epoc32/conf: Makefile.epoc32.inc Log Message: Clean up ${LINKSCRIPT} and ${KERNLDSCRIPT}. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/epoc32/conf/Makefile.epoc32.inc 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/epoc32/conf/Makefile.epoc32.inc diff -u src/sys/arch/epoc32/conf/Makefile.epoc32.inc:1.2 src/sys/arch/epoc32/conf/Makefile.epoc32.inc:1.3 --- src/sys/arch/epoc32/conf/Makefile.epoc32.inc:1.2 Sat Nov 15 14:25:22 2014 +++ src/sys/arch/epoc32/conf/Makefile.epoc32.inc Thu Aug 20 06:21:02 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.epoc32.inc,v 1.2 2014/11/15 14:25:22 uebayasi Exp $ +# $NetBSD: Makefile.epoc32.inc,v 1.3 2015/08/20 06:21:02 uebayasi Exp $ MACHINE_ARCH= arm CPPFLAGS+= -D${MACHINE} @@ -8,14 +8,16 @@ SYSTEM_FIRST_SFILE= ${THISARM}/epoc32/ep KERNEL_BASE_VIRT= $(LOADADDRESS) -LINKSCRIPT= -T ldscript +KERNLDSCRIPT= ldscript +LINKSCRIPT= -T ${KERNLDSCRIPT} -EXTRA_CLEAN+= netbsd.map assym.d ldscript tmp - -netbsd: ldscript # XXX +EXTRA_CLEAN+= netbsd.map assym.d ${KERNLDSCRIPT} tmp # generate ldscript from common template -ldscript: ${THISARM}/conf/ldscript.epoc32 ${THISARM}/conf/Makefile.epoc32.inc Makefile +${KERNLDSCRIPT}: \ +${THISARM}/conf/ldscript.epoc32 \ +${THISARM}/conf/Makefile.epoc32.inc \ +Makefile ${TOOL_SED} -e 's/@KERNEL_BASE_PHYS@/${KERNEL_BASE_PHYS}/' \ -e 's/@KERNEL_BASE_VIRT@/${KERNEL_BASE_VIRT}/' \ ${THISARM}/conf/ldscript.epoc32 tmp mv tmp $@
CVS commit: src/sys/arch/epoc32/conf
Module Name:src Committed By: uebayasi Date: Fri Aug 21 04:00:48 UTC 2015 Modified Files: src/sys/arch/epoc32/conf: ldscript.epoc32 Log Message: Simplify this by deciding load address at one place. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/epoc32/conf/ldscript.epoc32 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/epoc32/conf/ldscript.epoc32 diff -u src/sys/arch/epoc32/conf/ldscript.epoc32:1.4 src/sys/arch/epoc32/conf/ldscript.epoc32:1.5 --- src/sys/arch/epoc32/conf/ldscript.epoc32:1.4 Thu Aug 20 07:00:48 2015 +++ src/sys/arch/epoc32/conf/ldscript.epoc32 Fri Aug 21 04:00:48 2015 @@ -1,28 +1,24 @@ -/* $NetBSD: ldscript.epoc32,v 1.4 2015/08/20 07:00:48 uebayasi Exp $ */ +/* $NetBSD: ldscript.epoc32,v 1.5 2015/08/21 04:00:48 uebayasi Exp $ */ OUTPUT_ARCH(arm) ENTRY(KERNEL_BASE_phys) SECTIONS { - KERNEL_BASE_phys = @KERNEL_BASE_PHYS@; - KERNEL_BASE_virt = @KERNEL_BASE_VIRT@; - /* Kernel start: */ - .start (KERNEL_BASE_phys) : + .start : { *(.start) - } =0 + } /* Read-only sections, merged into text segment: */ - .text (KERNEL_BASE_virt + SIZEOF(.start)) : - AT (LOADADDR(.start) + SIZEOF(.start)) + .text : { *(.text) *(.text.*) *(.stub) *(.glue_7t) *(.glue_7) *(.rodata) *(.rodata.*) - } =0 + } .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } PROVIDE (__exidx_start = .); .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } @@ -34,14 +30,12 @@ SECTIONS boundary. */ . = ALIGN(0x8000); .data: - AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text))) { __data_start = . ; *(.data) *(.data.*) } .sdata : - AT (LOADADDR(.data) + (ADDR(.sdata) - ADDR(.data))) { *(.sdata) *(.sdata.*) @@ -81,3 +75,19 @@ SECTIONS KEEP(*(.note.netbsd.ident)); } } +SECTIONS +{ + KERNEL_BASE_phys = @KERNEL_BASE_PHYS@; + KERNEL_BASE_virt = @KERNEL_BASE_VIRT@; + + .start (KERNEL_BASE_phys) : + { +*(.start) + } =0 + + .text (KERNEL_BASE_virt + SIZEOF(.start)) : + AT (LOADADDR(.start) + SIZEOF(.start)) + { +*(.text) + } =0 +}
CVS commit: src/sys/arch/epoc32/conf
Module Name:src Committed By: uebayasi Date: Sat Nov 15 14:25:22 UTC 2014 Modified Files: src/sys/arch/epoc32/conf: Makefile.epoc32.inc Log Message: Use LINKSCRIPT. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/epoc32/conf/Makefile.epoc32.inc 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/epoc32/conf/Makefile.epoc32.inc diff -u src/sys/arch/epoc32/conf/Makefile.epoc32.inc:1.1 src/sys/arch/epoc32/conf/Makefile.epoc32.inc:1.2 --- src/sys/arch/epoc32/conf/Makefile.epoc32.inc:1.1 Sun Apr 28 12:11:25 2013 +++ src/sys/arch/epoc32/conf/Makefile.epoc32.inc Sat Nov 15 14:25:22 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.epoc32.inc,v 1.1 2013/04/28 12:11:25 kiyohara Exp $ +# $NetBSD: Makefile.epoc32.inc,v 1.2 2014/11/15 14:25:22 uebayasi Exp $ MACHINE_ARCH= arm CPPFLAGS+= -D${MACHINE} @@ -8,7 +8,7 @@ SYSTEM_FIRST_SFILE= ${THISARM}/epoc32/ep KERNEL_BASE_VIRT= $(LOADADDRESS) -LINKFLAGS= -T ldscript +LINKSCRIPT= -T ldscript EXTRA_CLEAN+= netbsd.map assym.d ldscript tmp
CVS commit: src/sys/arch/epoc32/epoc32
Module Name:src Committed By: matt Date: Sun Aug 18 21:57:01 UTC 2013 Modified Files: src/sys/arch/epoc32/epoc32: intr.c machdep.c Log Message: Fix arm/locore.h lossage To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/epoc32/epoc32/intr.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/epoc32/epoc32/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/epoc32/epoc32/intr.c diff -u src/sys/arch/epoc32/epoc32/intr.c:1.1 src/sys/arch/epoc32/epoc32/intr.c:1.2 --- src/sys/arch/epoc32/epoc32/intr.c:1.1 Sun Apr 28 12:11:26 2013 +++ src/sys/arch/epoc32/epoc32/intr.c Sun Aug 18 21:57:01 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.1 2013/04/28 12:11:26 kiyohara Exp $ */ +/* $NetBSD: intr.c,v 1.2 2013/08/18 21:57:01 matt Exp $ */ /* * Copyright (c) 2012 KIYOHARA Takashi * All rights reserved. @@ -26,11 +26,12 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.1 2013/04/28 12:11:26 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.2 2013/08/18 21:57:01 matt Exp $); #include sys/systm.h +#include sys/cpu.h -#include machine/cpu.h +#include arm/locore.h #include arm/pic/picvar.h Index: src/sys/arch/epoc32/epoc32/machdep.c diff -u src/sys/arch/epoc32/epoc32/machdep.c:1.2 src/sys/arch/epoc32/epoc32/machdep.c:1.3 --- src/sys/arch/epoc32/epoc32/machdep.c:1.2 Thu Jun 20 13:40:09 2013 +++ src/sys/arch/epoc32/epoc32/machdep.c Sun Aug 18 21:57:01 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.2 2013/06/20 13:40:09 kiyohara Exp $ */ +/* $NetBSD: machdep.c,v 1.3 2013/08/18 21:57:01 matt Exp $ */ /* * Copyright (c) 2012, 2013 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.2 2013/06/20 13:40:09 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.3 2013/08/18 21:57:01 matt Exp $); #include clpscom.h #include clpslcd.h @@ -50,10 +50,13 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v #include uvm/uvm_extern.h +#include dev/cons.h +#include dev/md.h + +#include arm/locore.h +#include arm/undefined.h #include arm/arm32/machdep.h #include arm/arm32/pmap.h -#include arm/cpufunc.h -#include arm/undefined.h #include machine/bootconfig.h #include machine/bootinfo.h @@ -64,9 +67,6 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v #include epoc32/windermere/windermerereg.h #include epoc32/dev/epockbdvar.h -#include dev/cons.h -#include dev/md.h - #include machine/db_machdep.h #include ddb/db_extern.h
CVS commit: src/sys/arch/epoc32
Module Name:src Committed By: kiyohara Date: Tue Jun 25 13:56:59 UTC 2013 Modified Files: src/sys/arch/epoc32/conf: GENERIC files.epoc32 src/sys/arch/epoc32/epoc32: external.c Log Message: Configuration of external devices move to GENERIC. External bus does't know attaching devices. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/epoc32/conf/GENERIC \ src/sys/arch/epoc32/conf/files.epoc32 cvs rdiff -u -r1.1 -r1.2 src/sys/arch/epoc32/epoc32/external.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/epoc32/conf/GENERIC diff -u src/sys/arch/epoc32/conf/GENERIC:1.1 src/sys/arch/epoc32/conf/GENERIC:1.2 --- src/sys/arch/epoc32/conf/GENERIC:1.1 Sun Apr 28 12:11:25 2013 +++ src/sys/arch/epoc32/conf/GENERIC Tue Jun 25 13:56:59 2013 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.1 2013/04/28 12:11:25 kiyohara Exp $ +# $NetBSD: GENERIC,v 1.2 2013/06/25 13:56:59 kiyohara Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include arch/epoc32/conf/std.epoc32 #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.1 $ +#ident GENERIC-$Revision: 1.2 $ maxusers 32 # estimated number of users @@ -157,7 +157,6 @@ wsdisplay* at wmlcd? console ? epockbd* at clpssoc? epockbd* at windermere? -#epockbd* at external? addr 0x1030, 0x1004 wskbd* at epockbd? #spi* at clpsssi* @@ -167,7 +166,12 @@ wskbd* at epockbd? #audio* at audio? # External devices -etna* at external?# ETNA Controller + +#epockbd* at external? addr 0x1030 addr2 0x1004 # Series 7 + +# ETNA Controller +etna* at external? addr 0x2000 addr2 0x4000 irq 5 # 5mx +etna* at external? addr 0x5000 addr2 0x3000 irq 5 # 5mx Pro pcmcia* at etna? wdc* at pcmcia? # CF Index: src/sys/arch/epoc32/conf/files.epoc32 diff -u src/sys/arch/epoc32/conf/files.epoc32:1.1 src/sys/arch/epoc32/conf/files.epoc32:1.2 --- src/sys/arch/epoc32/conf/files.epoc32:1.1 Sun Apr 28 12:11:25 2013 +++ src/sys/arch/epoc32/conf/files.epoc32 Tue Jun 25 13:56:59 2013 @@ -21,7 +21,7 @@ device internal { }: pic, pic_splfuncs attach internal at mainbus file arch/epoc32/epoc32/internal.c internal -device external { } +device external {[addr = -1], [addr2 = -1], [irq = -1]} attach external at mainbus file arch/epoc32/epoc32/external.c external file arch/epoc32/epoc32/external_io.c external Index: src/sys/arch/epoc32/epoc32/external.c diff -u src/sys/arch/epoc32/epoc32/external.c:1.1 src/sys/arch/epoc32/epoc32/external.c:1.2 --- src/sys/arch/epoc32/epoc32/external.c:1.1 Sun Apr 28 12:11:26 2013 +++ src/sys/arch/epoc32/epoc32/external.c Tue Jun 25 13:56:59 2013 @@ -1,6 +1,6 @@ -/* $NetBSD: external.c,v 1.1 2013/04/28 12:11:26 kiyohara Exp $ */ +/* $NetBSD: external.c,v 1.2 2013/06/25 13:56:59 kiyohara Exp $ */ /* - * Copyright (c) 2012 KIYOHARA Takashi + * Copyright (c) 2012, 2013 KIYOHARA Takashi * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: external.c,v 1.1 2013/04/28 12:11:26 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: external.c,v 1.2 2013/06/25 13:56:59 kiyohara Exp $); #include sys/param.h #include sys/bus.h @@ -35,24 +35,18 @@ __KERNEL_RCSID(0, $NetBSD: external.c,v #include machine/epoc32.h +#include locators.h + extern struct bus_space external_bs_tag; static int external_match(device_t, cfdata_t, void *); static void external_attach(device_t parent, device_t self, void *aux); +static int external_search(device_t, cfdata_t, const int *, void *); static int external_print(void *, const char *); CFATTACH_DECL_NEW(external, 0, external_match, external_attach, NULL, NULL); -static const struct { - const char *name; - bus_addr_t addr; - bus_addr_t addr2; - int irq; -} knowndevs[] = { - { etna, 0x2000, 0x4000, 5 }, /* 5mx */ - { etna, 0x5000, 0x3000, 5 }, /* 5mx pro */ -}; /* ARGSUSED */ static int @@ -66,21 +60,28 @@ external_match(device_t parent, cfdata_t static void external_attach(device_t parent, device_t self, void *aux) { - struct external_attach_args aa; - int i; aprint_naive(\n); aprint_normal(\n); - for (i = 0; i __arraycount(knowndevs); i++) { - aa.name = knowndevs[i].name; - aa.iot = external_bs_tag; - aa.addr = knowndevs[i].addr; - aa.addr2 = knowndevs[i].addr2; - aa.irq = knowndevs[i].irq; - config_found_sm_loc(self, external, NULL, aa, - external_print, NULL); - } + config_search_ia(external_search, self, external, NULL); +} + +/* ARGSUSED */ +static int +external_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux) +{ + struct external_attach_args aa; + + aa.name = cf-cf_name; + aa.iot = external_bs_tag; + aa.addr = cf-cf_loc[EXTERNALCF_ADDR]; + aa.addr2 = cf-cf_loc[EXTERNALCF_ADDR2]; + aa.irq =
CVS commit: src/sys/arch/epoc32/epoc32
Module Name:src Committed By: kiyohara Date: Sat Jun 22 13:32:54 UTC 2013 Modified Files: src/sys/arch/epoc32/epoc32: external_io.c external_io_asm.S Log Message: Fix bus_space_{read,write}_region_2. Remove bus_space_{read,write}_2. ARM7 can't read/write half word access. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/epoc32/epoc32/external_io.c \ src/sys/arch/epoc32/epoc32/external_io_asm.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/epoc32/epoc32/external_io.c diff -u src/sys/arch/epoc32/epoc32/external_io.c:1.1 src/sys/arch/epoc32/epoc32/external_io.c:1.2 --- src/sys/arch/epoc32/epoc32/external_io.c:1.1 Sun Apr 28 12:11:26 2013 +++ src/sys/arch/epoc32/epoc32/external_io.c Sat Jun 22 13:32:54 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: external_io.c,v 1.1 2013/04/28 12:11:26 kiyohara Exp $ */ +/* $NetBSD: external_io.c,v 1.2 2013/06/22 13:32:54 kiyohara Exp $ */ /* * Copyright (c) 1997 Mark Brinicombe. @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: external_io.c,v 1.1 2013/04/28 12:11:26 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: external_io.c,v 1.2 2013/06/22 13:32:54 kiyohara Exp $); #include sys/param.h #include sys/systm.h @@ -74,7 +74,7 @@ struct bus_space external_bs_tag = { /* read (single) */ external_bs_r_1, - external_bs_r_2, + bs_notimpl_bs_r_2, external_bs_r_4, bs_notimpl_bs_r_8, @@ -92,7 +92,7 @@ struct bus_space external_bs_tag = { /* write (single) */ external_bs_w_1, - external_bs_w_2, + bs_notimpl_bs_w_2, external_bs_w_4, bs_notimpl_bs_w_8, @@ -130,7 +130,8 @@ struct bus_space external_bs_tag = { /* bus space functions */ int -external_bs_subregion(void *t, bus_space_handle_t bsh, bus_size_t offset, bus_size_t size, bus_space_handle_t *nbshp) +external_bs_subregion(void *t, bus_space_handle_t bsh, bus_size_t offset, + bus_size_t size, bus_space_handle_t *nbshp) { *nbshp = bsh + offset; @@ -154,8 +155,13 @@ external_bs_rr_2(void *cookie, bus_space { int i; - for (i = 0; i count; i++) - datap[i] = external_bs_r_2(cookie, bsh, offset + i); + for (i = 0; count - i 1 i count; i += 2) + *(uint32_t *)(datap[i]) = + external_bs_r_4(cookie, bsh, offset + (i 1)); + for (; i count; i++) + datap[i] = + external_bs_r_1(cookie, bsh, offset + (i 1)) | + external_bs_r_1(cookie, bsh, offset + (i 1) + 1); } void @@ -173,9 +179,16 @@ external_bs_wr_2(void *cookie, bus_space bus_size_t offset, uint16_t const *datap, bus_size_t count) { int i; + uint16_t v; - for (i = 0; i count; i++) - external_bs_w_2(cookie, bsh, offset + i, datap[i]); + for (i = 0; count - i 1 i count; i += 2) + external_bs_w_4(cookie, bsh, offset + (i 1), + *(const uint32_t *)(datap[i])); + for (; i count; i++) { + v = datap[i]; + external_bs_w_1(cookie, bsh, offset + (i 1), v 0xff); + external_bs_w_1(cookie, bsh, offset + (i 1) + 1, v 8); + } } void @@ -194,6 +207,11 @@ external_bs_sr_2(void *cookie, bus_space { int i; - for (i = 0; i count; i++) - external_bs_w_2(cookie, bsh, offset + i, value); + for (i = 0; count - i 1 i count; i += 2) + external_bs_w_4(cookie, bsh, offset + (i 1), + value | (value 16)); + for (; i count; i++) { + external_bs_w_1(cookie, bsh, offset + (i 1), value 0xff); + external_bs_w_1(cookie, bsh, offset + (i 1) + 1, value 8); + } } Index: src/sys/arch/epoc32/epoc32/external_io_asm.S diff -u src/sys/arch/epoc32/epoc32/external_io_asm.S:1.1 src/sys/arch/epoc32/epoc32/external_io_asm.S:1.2 --- src/sys/arch/epoc32/epoc32/external_io_asm.S:1.1 Sun Apr 28 12:11:26 2013 +++ src/sys/arch/epoc32/epoc32/external_io_asm.S Sat Jun 22 13:32:54 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: external_io_asm.S,v 1.1 2013/04/28 12:11:26 kiyohara Exp $ */ +/* $NetBSD: external_io_asm.S,v 1.2 2013/06/22 13:32:54 kiyohara Exp $ */ /* * Copyright (c) 1997 Mark Brinicombe. @@ -47,13 +47,6 @@ ENTRY(external_bs_r_1) ldrb r0, [r1, r2] mov pc, lr -ENTRY(external_bs_r_2) - mov r2, r2, lsl r0 - ldr r0, [r1, r2] - bic r0, r0, #0xff00 - bic r0, r0, #0x00ff - mov pc, lr - ENTRY(external_bs_r_4) mov r2, r2, lsl r0 ldr r0, [r1, r2] @@ -68,13 +61,6 @@ ENTRY(external_bs_w_1) strb r3, [r1, r2] mov pc, lr -ENTRY(external_bs_w_2) - mov r3, r3, lsl #16 - orr r3, r3, r3, lsr #16 - mov r2, r2, lsl r0 - str r3, [r1, r2] - mov pc, lr - ENTRY(external_bs_w_4) mov r2, r2, lsl r0 str r3, [r1, r2]
CVS commit: src/sys/arch/epoc32/dev
Module Name:src Committed By: kiyohara Date: Sat Jun 22 13:36:17 UTC 2013 Modified Files: src/sys/arch/epoc32/dev: etna.c Log Message: Series 5 avoids access into I/O space. I don't know this reason... To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/epoc32/dev/etna.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/epoc32/dev/etna.c diff -u src/sys/arch/epoc32/dev/etna.c:1.1 src/sys/arch/epoc32/dev/etna.c:1.2 --- src/sys/arch/epoc32/dev/etna.c:1.1 Sun Apr 28 12:11:25 2013 +++ src/sys/arch/epoc32/dev/etna.c Sat Jun 22 13:36:16 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: etna.c,v 1.1 2013/04/28 12:11:25 kiyohara Exp $ */ +/* $NetBSD: etna.c,v 1.2 2013/06/22 13:36:16 kiyohara Exp $ */ /* * Copyright (c) 2012 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: etna.c,v 1.1 2013/04/28 12:11:25 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: etna.c,v 1.2 2013/06/22 13:36:16 kiyohara Exp $); #include sys/param.h #include sys/bus.h @@ -341,6 +341,13 @@ etna_io_alloc(pcmcia_chipset_handle_t pc bus_size_t align, struct pcmcia_io_handle *pcihp) { struct etna_softc *sc = (struct etna_softc *)pch; + extern char epoc32_model[]; + + /* + * X: Series 5 can't allocate I/O map??? + */ + if (strcmp(epoc32_model, SERIES5 R1) == 0) + return -1; memset(pcihp, 0, sizeof(*pcihp)); pcihp-iot = sc-sc_iot;
CVS commit: src/sys/arch/epoc32/dev
Module Name:src Committed By: kiyohara Date: Sat Jun 22 13:53:30 UTC 2013 Modified Files: src/sys/arch/epoc32/dev: epockbd.c Log Message: Calculate correct response from keyboard. Some machines responds ugly scan code. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/epoc32/dev/epockbd.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/epoc32/dev/epockbd.c diff -u src/sys/arch/epoc32/dev/epockbd.c:1.1 src/sys/arch/epoc32/dev/epockbd.c:1.2 --- src/sys/arch/epoc32/dev/epockbd.c:1.1 Sun Apr 28 12:11:25 2013 +++ src/sys/arch/epoc32/dev/epockbd.c Sat Jun 22 13:53:30 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: epockbd.c,v 1.1 2013/04/28 12:11:25 kiyohara Exp $ */ +/* $NetBSD: epockbd.c,v 1.2 2013/06/22 13:53:30 kiyohara Exp $ */ /* * Copyright (c) 2013 KIYOHARA Takashi * All rights reserved. @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: epockbd.c,v 1.1 2013/04/28 12:11:25 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: epockbd.c,v 1.2 2013/06/22 13:53:30 kiyohara Exp $); #include sys/param.h #include sys/bus.h @@ -182,6 +182,13 @@ epockbd_cngetc(void *conscookie, u_int * struct epockbd_softc *sc = conscookie; uint8_t cmd, key, mask; int column, row; +#if 1 + /* + * For some machines which return a strange response, it calculates + * using this variable. + */ + int pc = 0, pr = 0; +#endif *type = 0; *data = 0; @@ -197,12 +204,23 @@ epockbd_cngetc(void *conscookie, u_int * if (sc-sc_state[column] != key) { row = sc-sc_state[column] ^ key; sc-sc_state[column] = key; - if (*data == 0) { +#if 1 + if (*data == 0 || + (row == pr pc == 0 + column == sc-sc_kbd_ncolumn - 1)) +#else + if (*data == 0) +#endif + { if (key row) *type = WSCONS_EVENT_KEY_DOWN; else *type = WSCONS_EVENT_KEY_UP; *data = EPOC2WS_KBD_DATA(row, column); +#if 1 +pc = column; +pr = row; +#endif } } }
CVS commit: src/sys/arch/epoc32/stand/e32boot
Module Name:src Committed By: kiyohara Date: Thu Jun 20 13:36:48 UTC 2013 Modified Files: src/sys/arch/epoc32/stand/e32boot/exe: e32boot.cpp netbsd.cpp version src/sys/arch/epoc32/stand/e32boot/include: netbsd.h Log Message: Support boot argument for kernel. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/epoc32/stand/e32boot/exe/e32boot.cpp \ src/sys/arch/epoc32/stand/e32boot/exe/netbsd.cpp \ src/sys/arch/epoc32/stand/e32boot/exe/version cvs rdiff -u -r1.1 -r1.2 src/sys/arch/epoc32/stand/e32boot/include/netbsd.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/epoc32/stand/e32boot/exe/e32boot.cpp diff -u src/sys/arch/epoc32/stand/e32boot/exe/e32boot.cpp:1.1 src/sys/arch/epoc32/stand/e32boot/exe/e32boot.cpp:1.2 --- src/sys/arch/epoc32/stand/e32boot/exe/e32boot.cpp:1.1 Sun Apr 28 12:11:26 2013 +++ src/sys/arch/epoc32/stand/e32boot/exe/e32boot.cpp Thu Jun 20 13:36:48 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: e32boot.cpp,v 1.1 2013/04/28 12:11:26 kiyohara Exp $ */ +/* $NetBSD: e32boot.cpp,v 1.2 2013/06/20 13:36:48 kiyohara Exp $ */ /* * Copyright (c) 2012, 2013 KIYOHARA Takashi * All rights reserved. @@ -131,6 +131,7 @@ E32BootL(void) struct btinfo_common *bootinfo; struct btinfo_model *model; struct btinfo_video *video; + struct btinfo_bootargs *bootargs; console = Console::NewL(E32BootName, TSize(KConsFullScreen, KConsFullScreen)); @@ -160,6 +161,8 @@ E32BootL(void) console-Printf(_L(\n)); + bootargs = + (struct btinfo_bootargs *)FindBootInfoL(bootinfo, BTINFO_BOOTARGS); TRAP(err, netbsd = LoadNetBSDL()); if (err != KErrNone) User::Leave(err); @@ -167,6 +170,12 @@ E32BootL(void) return; console-Printf(_L(\nLoaded\n)); + int n, m; + n = sizeof(bootargs-bootargs); + m = (*netbsd-GetArgs()).Length(); + Mem::Copy(bootargs-bootargs, (*netbsd-GetArgs())[0], n m ? n : m); + bootargs-bootargs[n m ? n - 1 : m] = '\0'; + netbsd-ParseHeader(); /* Load logical device(kernel part of e32boot). */ @@ -220,13 +229,15 @@ LOCAL_C NetBSD * LoadNetBSDL(void) { NetBSD *netbsd = NULL; - TBufKMaxCommandLine input; + TBufKMaxCommandLine input, *args; TPtrC Default = _L(C:\\netbsd); TPtrC Prompt = _L(Boot: ); TInt pos, err; TBool retry; input.Zero(); + args = new TBufKMaxCommandLine; + args-Zero(); retry = false; console-Printf(Prompt); console-Printf(_L([)); @@ -264,19 +275,29 @@ LoadNetBSDL(void) break; } if (gChar == EKeyEnter) { - if (input.Length() 0) { -TBufCKMaxCommandLine kernel = -TBufCKMaxCommandLine(input); + input.TrimAll(); + if (input[0] == '-') +input.Swap(*args); + for (int i = 0; i input.Length(); i++) +if (input[i] == ' ') { + args-Copy(input); + input.SetLength(i); + args-Delete(0, i + 1); + break; +} + args-ZeroTerminate(); -TRAP(err, netbsd = NetBSD::New(kernel)); + if (input.Length() 0) { +TRAP(err, netbsd = NetBSD::New(input, *args)); } else { -TRAP(err, netbsd = NetBSD::New(Default)); +TRAP(err, netbsd = NetBSD::New(Default, *args)); } if (err == 0 netbsd != NULL) break; console-Printf(_L(\nLoad failed: %d\n), err); input.Zero(); + args-Zero(); console-Printf(Prompt); pos = 0; retry = true; @@ -306,6 +327,7 @@ CreateBootInfo(TAny *buf) struct btinfo_model *model; struct btinfo_memory *memory; struct btinfo_video *video; + struct btinfo_bootargs *bootargs; struct memmap *memmap; TUint memsize; TUint i; @@ -361,6 +383,12 @@ CreateBootInfo(TAny *buf) common = (memory + 1)-common; } + common-len = sizeof(struct btinfo_bootargs); + common-type = BTINFO_BOOTARGS; + bootargs = (struct btinfo_bootargs *)common; + bootargs-bootargs[0] = '\0'; + common = (bootargs + 1)-common; + common-len = 0; common-type = BTINFO_NONE; Index: src/sys/arch/epoc32/stand/e32boot/exe/netbsd.cpp diff -u src/sys/arch/epoc32/stand/e32boot/exe/netbsd.cpp:1.1 src/sys/arch/epoc32/stand/e32boot/exe/netbsd.cpp:1.2 --- src/sys/arch/epoc32/stand/e32boot/exe/netbsd.cpp:1.1 Sun Apr 28 12:11:26 2013 +++ src/sys/arch/epoc32/stand/e32boot/exe/netbsd.cpp Thu Jun 20 13:36:48 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd.cpp,v 1.1 2013/04/28 12:11:26 kiyohara Exp $ */ +/* $NetBSD: netbsd.cpp,v 1.2 2013/06/20 13:36:48 kiyohara Exp $ */ /* * Copyright (c) 2012 KIYOHARA Takashi * All rights reserved. @@ -76,6 +76,16 @@ NetBSD::New(const TDesC aFilename) return netbsd; } +NetBSD * +NetBSD::New(const TDesC aFilename, const TDesC aArgs) +{ + NetBSD *netbsd = New(aFilename); + + netbsd-Args = aArgs; + + return netbsd; +} + void ELF::ParseHeader(void) Index: src/sys/arch/epoc32/stand/e32boot/exe/version diff -u src/sys/arch/epoc32/stand/e32boot/exe/version:1.1 src/sys/arch/epoc32/stand/e32boot/exe/version:1.2 --- src/sys/arch/epoc32/stand/e32boot/exe/version:1.1 Sun Apr 28
CVS commit: src/sys/arch/epoc32/include
Module Name:src Committed By: kiyohara Date: Thu Jun 20 13:38:03 UTC 2013 Modified Files: src/sys/arch/epoc32/include: bootinfo.h Log Message: Support boot argument for kernel. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/epoc32/include/bootinfo.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/epoc32/include/bootinfo.h diff -u src/sys/arch/epoc32/include/bootinfo.h:1.1 src/sys/arch/epoc32/include/bootinfo.h:1.2 --- src/sys/arch/epoc32/include/bootinfo.h:1.1 Sun Apr 28 12:11:25 2013 +++ src/sys/arch/epoc32/include/bootinfo.h Thu Jun 20 13:38:03 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: bootinfo.h,v 1.1 2013/04/28 12:11:25 kiyohara Exp $ */ +/* $NetBSD: bootinfo.h,v 1.2 2013/06/20 13:38:03 kiyohara Exp $ */ /* * Copyright (c) 2012 KIYOHARA Takashi * All rights reserved. @@ -40,6 +40,7 @@ struct btinfo_common { #define BTINFO_MODEL 1 #define BTINFO_MEMORY 2 #define BTINFO_VIDEO 3 +#define BTINFO_BOOTARGS 4 #define BTINFO_MAX_SIZE 512 @@ -60,6 +61,11 @@ struct btinfo_video { int width; int height; }; + +struct btinfo_bootargs { + struct btinfo_common common; + char bootargs[256]; +}; #endif /* _LOCORE */ #endif /* _EPOC32_BOOTINFO_H_ */
CVS commit: src/sys/arch/epoc32/epoc32
Module Name:src Committed By: kiyohara Date: Thu Jun 20 13:40:09 UTC 2013 Modified Files: src/sys/arch/epoc32/epoc32: autoconf.c machdep.c Log Message: Support boothowto. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/epoc32/epoc32/autoconf.c \ src/sys/arch/epoc32/epoc32/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/epoc32/epoc32/autoconf.c diff -u src/sys/arch/epoc32/epoc32/autoconf.c:1.1 src/sys/arch/epoc32/epoc32/autoconf.c:1.2 --- src/sys/arch/epoc32/epoc32/autoconf.c:1.1 Sun Apr 28 12:11:26 2013 +++ src/sys/arch/epoc32/epoc32/autoconf.c Thu Jun 20 13:40:09 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.1 2013/04/28 12:11:26 kiyohara Exp $ */ +/* $NetBSD: autoconf.c,v 1.2 2013/06/20 13:40:09 kiyohara Exp $ */ /* * Copyright (c) 2013 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.1 2013/04/28 12:11:26 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.2 2013/06/20 13:40:09 kiyohara Exp $); #include sys/systm.h #include sys/types.h @@ -71,4 +71,8 @@ device_register(device_t dev, void *aux) prop_dictionary_set_uint32(dict, height, epoc32_fb_height); prop_dictionary_set_uint32(dict, addr, epoc32_fb_addr); } + + if (booted_device == NULL) + if (device_is_a(dev, wd)) + booted_device = dev; } Index: src/sys/arch/epoc32/epoc32/machdep.c diff -u src/sys/arch/epoc32/epoc32/machdep.c:1.1 src/sys/arch/epoc32/epoc32/machdep.c:1.2 --- src/sys/arch/epoc32/epoc32/machdep.c:1.1 Sun Apr 28 12:11:26 2013 +++ src/sys/arch/epoc32/epoc32/machdep.c Thu Jun 20 13:40:09 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.1 2013/04/28 12:11:26 kiyohara Exp $ */ +/* $NetBSD: machdep.c,v 1.2 2013/06/20 13:40:09 kiyohara Exp $ */ /* * Copyright (c) 2012, 2013 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.1 2013/04/28 12:11:26 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.2 2013/06/20 13:40:09 kiyohara Exp $); #include clpscom.h #include clpslcd.h @@ -84,6 +84,7 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v BootConfig bootconfig; /* Boot config storage */ +static char bootargs[256]; char *boot_args = NULL; vm_offset_t physical_start; @@ -170,6 +171,7 @@ initarm(void *arg) struct btinfo_model *model = NULL; struct btinfo_memory *memory = NULL; struct btinfo_video *video = NULL; + struct btinfo_bootargs *args = NULL; u_int l1pagetable, _end_physical; int loop, loop1, n, i; @@ -211,6 +213,20 @@ initarm(void *arg) epoc32_fb_width = video-width; epoc32_fb_height = video-height; break; + + case BTINFO_BOOTARGS: + args = (struct btinfo_bootargs *)btinfo; + btinfo = (args + 1)-common; + memcpy(bootargs, args-bootargs, + min(sizeof(bootargs), sizeof(args-bootargs))); + bootargs[sizeof(bootargs) - 1] = '\0'; + boot_args = bootargs; + break; + + default: +#define NEXT_BOOTINFO(bi) (struct btinfo_common *)((char *)bi + (bi)-len) + + btinfo = NEXT_BOOTINFO(btinfo); } } if (bootconfig.dramblocks == 0) @@ -218,6 +234,9 @@ initarm(void *arg) consinit(); + if (boot_args != NULL) + parse_mi_bootargs(boot_args); + physical_start = bootconfig.dram[0].address; physical_freestart = bootconfig.dram[0].address; physical_freeend = KERNEL_TEXT_BASE;
CVS commit: src/sys/arch/epoc32/dev
Module Name:src Committed By: kiyohara Date: Thu Jun 20 13:42:02 UTC 2013 Modified Files: src/sys/arch/epoc32/dev: epockbdmap.h Log Message: Add DE and FR keymap. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/epoc32/dev/epockbdmap.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/epoc32/dev/epockbdmap.h diff -u src/sys/arch/epoc32/dev/epockbdmap.h:1.1 src/sys/arch/epoc32/dev/epockbdmap.h:1.2 --- src/sys/arch/epoc32/dev/epockbdmap.h:1.1 Sun Apr 28 12:11:25 2013 +++ src/sys/arch/epoc32/dev/epockbdmap.h Thu Jun 20 13:42:02 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: epockbdmap.h,v 1.1 2013/04/28 12:11:25 kiyohara Exp $ */ +/* $NetBSD: epockbdmap.h,v 1.2 2013/06/20 13:42:02 kiyohara Exp $ */ /* * Copyright (c) 2013 KIYOHARA Takashi * All rights reserved. @@ -46,7 +46,7 @@ static const keysym_t epockbd_keysym_us[ KC(13), KS_8, KS_asterisk, KS_bracketright, KC(14), KS_7, KS_ampersand, KS_bracketleft, // KC(15), Play -KC(17), KS_y, KS_voidSymbol, KS_asterisk, +KC(17), KS_y, KS_Y, KS_asterisk, KC(18), KS_t, KC(19), KS_r, KC(20), KS_e, @@ -92,23 +92,92 @@ static const keysym_t epockbd_keysym_us[ static const keysym_t epockbd_keysym_uk[] = { /* pos normal shifted altgr */ -KC(3), KS_4, KS_dollar, KS_at, -KC(4), KS_3, KS_sterling, KS_backslash, -KC(5), KS_2, KS_quotedbl, KS_numbersign, +KC(3), KS_4, KS_dollar, KS_at, KS_Cmd_Screen3, +KC(4), KS_3, KS_sterling, KS_backslash, KS_Cmd_Screen2, +KC(5), KS_2, KS_quotedbl, KS_numbersign, KS_Cmd_Screen1, KC(9), KS_apostrophe, KS_asciitilde, KS_colon, KC(26), KS_l, KS_L, KS_semicolon, KC(42), KS_period, KS_question, KS_plus, KC(59), KS_comma, KS_slash, KS_Help, }; +static const keysym_t epockbd_keysym_de[] = { +/* pos normal shifted altgr shift+altgr */ +KC(1), KS_6, KS_ampersand, KS_greater, +KC(3), KS_4, KS_dollar, KS_asciitilde, KS_Cmd_Screen3, +KC(4), KS_3, KS_section, KS_backslash, KS_Cmd_Screen2, +KC(5), KS_2, KS_quotedbl, KS_slash, KS_Cmd_Screen1, +KC(9), KS_numbersign, KS_asterisk, KS_equal, +KC(11), KS_0, KS_apostrophe, KS_braceright, +KC(12), KS_9, KS_parenright, KS_braceleft, +KC(13), KS_8, KS_parenleft, KS_bracketright, +KC(14), KS_7, KS_question, KS_bracketleft, +KC(19), KS_r, KS_R, KS_masculine, +KC(20), KS_e, KS_E, KS_currency, +KC(21), KS_w, KS_W, KS_asciicircum, +KC(22), KS_q, KS_Q, KS_at, +KC(26), KS_l, KS_L, KS_minus, +KC(27), KS_p, KS_P, KS_ssharp, +KC(28), KS_o, KS_O, KS_diaeresis, +KC(29), KS_i, KS_I, KS_mu, +KC(30), KS_u, KS_U, KS_udiaeresis, +KC(31), KS_Menu, +KC(37), KS_a, KS_A, KS_adiaeresis, +KC(42), KS_comma, KS_semicolon, +KC(43), KS_m, +KC(44), KS_k, KS_K, KS_plus, +KC(45), KS_j, KS_J, KS_slash, +KC(47), KS_Mode_switch, KS_Multi_key, +KC(50), KS_b, KS_B, KS_dead_caron, +KC(51), KS_v, KS_V, KS_dead_breve, +KC(52), KS_c, KS_C, KS_acute, +KC(54), KS_y, KS_Y, KS_diaeresis, +KC(59), KS_period, KS_colon, +}; + +static const keysym_t epockbd_keysym_fr[] = { +/* pos normal shifted altgr shift+altgr */ +KC(1), KS_6, KS_dollar, KS_parenright, +KC(2), KS_5, KS_degree, KS_parenleft, +KC(3), KS_4, KS_dead_tilde, KS_apostrophe, KS_Cmd_Screen3, +KC(4), KS_3, KS_numbersign, KS_quotedbl, KS_Cmd_Screen2, +KC(5), KS_2, KS_percent, KS_eacute, KS_Cmd_Screen1, +KC(6), KS_1, KS_exclam, KS_ampersand, KS_Cmd_Screen0, +KC(9), KS_m, KS_M, KS_minus, +KC(11), KS_0, KS_at, KS_agrave, +KC(12), KS_9, KS_dead_circumflex, KS_ccedilla, +KC(13), KS_8, KS_backslash, KS_underscore, +KC(14), KS_7, KS_sterling, KS_eacute, +KC(17), KS_y, KS_Y, KS_braceright, +KC(18), KS_t, KS_T, KS_braceleft, +KC(19), KS_r, KS_R, KS_bracketright, +KC(20), KS_e, KS_E, KS_bracketleft, +KC(21), KS_z, KS_Z, KS_greater, +KC(22), KS_a, KS_A, KS_less, +KC(26), KS_l, KS_L, KS_plus, +KC(28), KS_o, +KC(29), KS_i, KS_I, KS_bar, +KC(30), KS_u, KS_U, KS_ugrave, +KC(37), KS_q, +KC(42), KS_period, KS_semicolon, KS_slash, +KC(43), KS_question, KS_comma, +KC(44), KS_k, KS_K, KS_KP_Divide, +KC(50), KS_b, KS_B, KS_dead_circumflex, +KC(51), KS_v, KS_V, KS_dead_tilde, +KC(52), KS_c, KS_C, KS_apostrophe, +KC(53), KS_x, KS_X, KS_grave, +KC(54), KS_w, KS_W, KS_dead_diaeresis, +KC(59), KS_colon, KS_mu, +}; + #define KBD_MAP(name, base, map) \ { name, base, sizeof(map)/sizeof(keysym_t), map } struct wscons_keydesc epockbd_keydesctab[] = { KBD_MAP(KB_UK, KB_US, epockbd_keysym_uk), KBD_MAP(KB_US, 0,
CVS commit: src/sys/arch/epoc32/stand/e32boot/exe
Module Name:src Committed By: kiyohara Date: Thu Jun 20 15:30:00 UTC 2013 Modified Files: src/sys/arch/epoc32/stand/e32boot/exe: e32boot.cpp Log Message: Fix fault when 0 byte copy. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/epoc32/stand/e32boot/exe/e32boot.cpp 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/epoc32/stand/e32boot/exe/e32boot.cpp diff -u src/sys/arch/epoc32/stand/e32boot/exe/e32boot.cpp:1.2 src/sys/arch/epoc32/stand/e32boot/exe/e32boot.cpp:1.3 --- src/sys/arch/epoc32/stand/e32boot/exe/e32boot.cpp:1.2 Thu Jun 20 13:36:48 2013 +++ src/sys/arch/epoc32/stand/e32boot/exe/e32boot.cpp Thu Jun 20 15:30:00 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: e32boot.cpp,v 1.2 2013/06/20 13:36:48 kiyohara Exp $ */ +/* $NetBSD: e32boot.cpp,v 1.3 2013/06/20 15:30:00 kiyohara Exp $ */ /* * Copyright (c) 2012, 2013 KIYOHARA Takashi * All rights reserved. @@ -173,7 +173,9 @@ E32BootL(void) int n, m; n = sizeof(bootargs-bootargs); m = (*netbsd-GetArgs()).Length(); - Mem::Copy(bootargs-bootargs, (*netbsd-GetArgs())[0], n m ? n : m); + if (m 0) + Mem::Copy(bootargs-bootargs, (*netbsd-GetArgs())[0], + n m ? n : m); bootargs-bootargs[n m ? n - 1 : m] = '\0'; netbsd-ParseHeader();
CVS commit: src/sys/arch/epoc32/stand
Module Name:src Committed By: matt Date: Wed May 1 22:57:37 UTC 2013 Modified Files: src/sys/arch/epoc32/stand: Makefile Makefile.inc src/sys/arch/epoc32/stand/e32boot: Makefile.inc src/sys/arch/epoc32/stand/e32boot/exe: Makefile src/sys/arch/epoc32/stand/e32boot/ldd: Makefile Log Message: Cleanup. bsd.init.mk include ../Machine.inc so don't do it again. For now, restrict this to epoc32 because of the external tools needed To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/epoc32/stand/Makefile \ src/sys/arch/epoc32/stand/Makefile.inc cvs rdiff -u -r1.1 -r1.2 src/sys/arch/epoc32/stand/e32boot/Makefile.inc cvs rdiff -u -r1.2 -r1.3 src/sys/arch/epoc32/stand/e32boot/exe/Makefile cvs rdiff -u -r1.2 -r1.3 src/sys/arch/epoc32/stand/e32boot/ldd/Makefile 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/epoc32/stand/Makefile diff -u src/sys/arch/epoc32/stand/Makefile:1.1 src/sys/arch/epoc32/stand/Makefile:1.2 --- src/sys/arch/epoc32/stand/Makefile:1.1 Sun Apr 28 12:11:27 2013 +++ src/sys/arch/epoc32/stand/Makefile Wed May 1 22:57:37 2013 @@ -1,7 +1,11 @@ -# $NetBSD: Makefile,v 1.1 2013/04/28 12:11:27 kiyohara Exp $ +# $NetBSD: Makefile,v 1.2 2013/05/01 22:57:37 matt Exp $ -.include bsd.own.mk +.include bsd.endian.mk + +.if ${MACHINE} == epoc32 ${TARGET_ENDIANNESS} == 1234 SUBDIR+= e32boot +.endif + .include bsd.subdir.mk Index: src/sys/arch/epoc32/stand/Makefile.inc diff -u src/sys/arch/epoc32/stand/Makefile.inc:1.1 src/sys/arch/epoc32/stand/Makefile.inc:1.2 --- src/sys/arch/epoc32/stand/Makefile.inc:1.1 Sun Apr 28 12:11:27 2013 +++ src/sys/arch/epoc32/stand/Makefile.inc Wed May 1 22:57:37 2013 @@ -1,3 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.1 2013/04/28 12:11:27 kiyohara Exp $ +# $NetBSD: Makefile.inc,v 1.2 2013/05/01 22:57:37 matt Exp $ BINDIR= /usr/mdec +MACHINE= epoc32 Index: src/sys/arch/epoc32/stand/e32boot/Makefile.inc diff -u src/sys/arch/epoc32/stand/e32boot/Makefile.inc:1.1 src/sys/arch/epoc32/stand/e32boot/Makefile.inc:1.2 --- src/sys/arch/epoc32/stand/e32boot/Makefile.inc:1.1 Sun Apr 28 12:11:27 2013 +++ src/sys/arch/epoc32/stand/e32boot/Makefile.inc Wed May 1 22:57:37 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.1 2013/04/28 12:11:27 kiyohara Exp $ +# $NetBSD: Makefile.inc,v 1.2 2013/05/01 22:57:37 matt Exp $ # Require pkgsrc/cross/psion-gcc. ARM_EPOC_PE_GCC?= /usr/pkg/bin/arm-epoc-pe-gcc @@ -24,11 +24,11 @@ check_psion_utils: @false .endif -check_psion_utils: +check_psion_sdk: .if !exists(${EPOC32_SDKDIR}/include/e32base.h) @echo Error: File does not exist: ${EPOC32_SDKDIR}/include/e32base.h @echo Please build and install pkgsrc/cross/psion-sdk-e32. @false .endif -check_epoc32_cross: check_psion_gcc check_psion_utils check_psion_utils +check_epoc32_cross: check_psion_gcc check_psion_utils check_psion_sdk Index: src/sys/arch/epoc32/stand/e32boot/exe/Makefile diff -u src/sys/arch/epoc32/stand/e32boot/exe/Makefile:1.2 src/sys/arch/epoc32/stand/e32boot/exe/Makefile:1.3 --- src/sys/arch/epoc32/stand/e32boot/exe/Makefile:1.2 Wed May 1 13:15:26 2013 +++ src/sys/arch/epoc32/stand/e32boot/exe/Makefile Wed May 1 22:57:37 2013 @@ -1,6 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2013/05/01 13:15:26 kiyohara Exp $ - -.include ../Makefile.inc +# $NetBSD: Makefile,v 1.3 2013/05/01 22:57:37 matt Exp $ .include bsd.own.mk .include bsd.sys.mk @@ -44,6 +42,7 @@ LIBS+=$(EPOC32_LIBRARY_PATH)/WS32.LIB all: check_epoc32_cross $(PROG) $(PROG): $(OBJS) $(IN) + ${_MKTARGET_LINK} $(LD) -s --base-file $(PROG:.exe=.bas) \ -o $@ --whole-archive $(IN) --no-whole-archive $(LIBS) TMP=. $(EXTERNAL_TOOLCHAIN)/bin/$(MACHINE_GNU_PLATFORM)-dlltool \ Index: src/sys/arch/epoc32/stand/e32boot/ldd/Makefile diff -u src/sys/arch/epoc32/stand/e32boot/ldd/Makefile:1.2 src/sys/arch/epoc32/stand/e32boot/ldd/Makefile:1.3 --- src/sys/arch/epoc32/stand/e32boot/ldd/Makefile:1.2 Wed May 1 13:15:26 2013 +++ src/sys/arch/epoc32/stand/e32boot/ldd/Makefile Wed May 1 22:57:37 2013 @@ -1,6 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2013/05/01 13:15:26 kiyohara Exp $ - -.include ../Makefile.inc +# $NetBSD: Makefile,v 1.3 2013/05/01 22:57:37 matt Exp $ .include bsd.own.mk .include bsd.sys.mk