Module Name:    src
Committed By:   gavan
Date:           Sun Aug  2 11:20:38 UTC 2009

Modified Files:
        src/sys/arch/acorn32/stand/boot32: boot32.c
        src/sys/arch/acorn32/stand/lib: riscoscalls.h

Log Message:
Don't reset devices if booting an Iyonix. It's fine for acorn32 devices
because we know how to configure all of the hardware, but as we don't know
how to configure the Iyonix graphics card we must rely on RISC OS to do
it for us.

While we're here, space separate the kernel arguments. It's a bit hard
parsing them in the kernel when they're all run together.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/acorn32/stand/boot32/boot32.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/acorn32/stand/lib/riscoscalls.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/acorn32/stand/boot32/boot32.c
diff -u src/sys/arch/acorn32/stand/boot32/boot32.c:1.36 src/sys/arch/acorn32/stand/boot32/boot32.c:1.37
--- src/sys/arch/acorn32/stand/boot32/boot32.c:1.36	Wed Mar 18 16:00:08 2009
+++ src/sys/arch/acorn32/stand/boot32/boot32.c	Sun Aug  2 11:20:37 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot32.c,v 1.36 2009/03/18 16:00:08 cegger Exp $	*/
+/*	$NetBSD: boot32.c,v 1.37 2009/08/02 11:20:37 gavan Exp $	*/
 
 /*-
  * Copyright (c) 2002 Reinoud Zandijk
@@ -712,9 +712,13 @@
 	strcpy(bconfig->args, "");
 	for (i = start_args; i < argc; i++) {
 		if (strncmp(argv[i], "root=",5) ==0) root_specified = 1;
+		if (i > start_args)
+			strcat(bconfig->args, " ");
 		strcat(bconfig->args, argv[i]);
 	}
 	if (!root_specified) {
+		if (start_args < argc)
+			strcat(bconfig->args, " ");
 		strcat(bconfig->args, "root=");
 		strcat(bconfig->args, DEFAULT_ROOT);
 	}
@@ -766,6 +770,7 @@
 main(int argc, char **argv)
 {
 	int howto, start_args, ret;
+	int class;
 
 	printf("\n\n");
 	printf(">> %s, Revision %s\n", bootprog_name, bootprog_rev);
@@ -855,8 +860,11 @@
 	/* dismount all filesystems */
 	xosfscontrol_shutdown();
 
-	/* reset devices, well they try to anyway */
-	service_pre_reset();
+	os_readsysinfo_platform_class(&class, NULL, NULL);
+	if (class != osreadsysinfo_Platform_Pace) {
+		/* reset devices, well they try to anyway */
+		service_pre_reset();
+	}
 
 	start_kernel(
 		/* r0 relocation code page (V)	*/ relocate_code_page->logical,

Index: src/sys/arch/acorn32/stand/lib/riscoscalls.h
diff -u src/sys/arch/acorn32/stand/lib/riscoscalls.h:1.10 src/sys/arch/acorn32/stand/lib/riscoscalls.h:1.11
--- src/sys/arch/acorn32/stand/lib/riscoscalls.h:1.10	Sun Mar  4 05:59:07 2007
+++ src/sys/arch/acorn32/stand/lib/riscoscalls.h	Sun Aug  2 11:20:37 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: riscoscalls.h,v 1.10 2007/03/04 05:59:07 christos Exp $	*/
+/*	$NetBSD: riscoscalls.h,v 1.11 2009/08/02 11:20:37 gavan Exp $	*/
 
 /*-
  * Copyright (c) 2001 Ben Harris
@@ -194,11 +194,21 @@
 #define OSReadSysInfo_ReadMonitorInfo		0x01
 #define OSReadSysInfo_ReadChipPresenceAndId	0x02
 #define OSReadSysInfo_ReadSuperIOFeatures	0x03
+#define OSReadSysInfo_ReadPlatformClass		0x08
 
 #define osreadsysinfo_IOEB_ASIC_PRESENT		0x01
 #define osreadsysinfo_SUPERIO_PRESENT		0x02
 #define osreadsysinfo_LCD_ASIC_PRESENT		0x04
 
+#define osreadsysinfo_Platform_Unknown		0x00
+#define osreadsysinfo_Platform_RiscPC		0x01
+#define osreadsysinfo_Platform_A7000		0x02
+#define osreadsysinfo_Platform_A7000Plus	0x03
+#define osreadsysinfo_Platform_Phoebe		0x04
+#define osreadsysinfo_Platform_Pace		0x05
+#define osreadsysinfo_Platform_VirtualRPC	0x06
+#define osreadsysinfo_Platform_A9		0x07
+
 #ifndef __ASSEMBLER__
 extern void os_readsysinfo(int what, int *r0, int *r1, int *r2, int *r3, int *r4);
 #define os_readsysinfo_configured_screensize(s) \
@@ -216,6 +226,9 @@
 #define os_readsysinfo_superio_features(basic, extra) \
 	os_readsysinfo(OSReadSysInfo_ReadSuperIOFeatures, (basic), (extra), 0, 0, 0)
 
+#define os_readsysinfo_platform_class(class, flags, feature) \
+	os_readsysinfo(OSReadSysInfo_ReadPlatformClass, (class), (flags), (feature), 0, 0)
+
 #endif
 
 /* OS_Memory */

Reply via email to