CVS commit: src/sys/arch/epoc32/epoc32

2021-07-24 Thread Nick Hudson
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/epoc32

2013-08-18 Thread Matt Thomas
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  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 
-__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 
+#include 
 
-#include 
+#include 
 
 #include 
 

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 
-__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 
 
+#include 
+#include 
+
+#include 
+#include 
 #include 
 #include 
-#include 
-#include 
 
 #include 
 #include 
@@ -64,9 +67,6 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 
 #include 
 #include 
 
-#include 
-#include 
-
 #include 
 #include 
 



CVS commit: src/sys/arch/epoc32/epoc32

2013-06-22 Thread KIYOHARA Takashi
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 
-__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 
 #include 
@@ -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/epoc32

2013-06-20 Thread KIYOHARA Takashi
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 
-__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 
 #include 
@@ -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 
-__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;