CVS commit: [netbsd-7] src/sys/arch/macppc/stand/ofwboot

2018-11-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Nov 18 19:41:38 UTC 2018

Modified Files:
src/sys/arch/macppc/stand/ofwboot [netbsd-7]: ofdev.c version

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1651):

sys/arch/macppc/stand/ofwboot/version: revision 1.14
sys/arch/macppc/stand/ofwboot/ofdev.c: revision 1.27

Fix boot failure from installation floppies.  PR port-macppc/53727

Also bump version to denote a visible fix.

Should be pulled up to netbsd-8 and netbsd-7.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.26.14.1 src/sys/arch/macppc/stand/ofwboot/ofdev.c
cvs rdiff -u -r1.13 -r1.13.34.1 src/sys/arch/macppc/stand/ofwboot/version

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/macppc/stand/ofwboot/ofdev.c
diff -u src/sys/arch/macppc/stand/ofwboot/ofdev.c:1.26 src/sys/arch/macppc/stand/ofwboot/ofdev.c:1.26.14.1
--- src/sys/arch/macppc/stand/ofwboot/ofdev.c:1.26	Sun Feb 19 12:02:55 2012
+++ src/sys/arch/macppc/stand/ofwboot/ofdev.c	Sun Nov 18 19:41:37 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofdev.c,v 1.26 2012/02/19 12:02:55 tsutsui Exp $	*/
+/*	$NetBSD: ofdev.c,v 1.26.14.1 2018/11/18 19:41:37 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -437,10 +437,11 @@ devopen(struct open_file *of, const char
 		ofdev.type = OFDEV_DISK;
 		ofdev.bsize = DEV_BSIZE;
 		/* First try to find a disklabel without partitions */
-		if (strategy(&ofdev, F_READ,
-			 LABELSECTOR, DEV_BSIZE, buf, &nread) != 0
-		|| nread != DEV_BSIZE
-		|| getdisklabel(buf, &label)) {
+		if (!floppyboot &&
+		(strategy(&ofdev, F_READ,
+			  LABELSECTOR, DEV_BSIZE, buf, &nread) != 0
+		 || nread != DEV_BSIZE
+		 || getdisklabel(buf, &label))) {
 			/* Else try APM or MBR partitions */
 			struct drvr_map *map = (struct drvr_map *)buf;
 

Index: src/sys/arch/macppc/stand/ofwboot/version
diff -u src/sys/arch/macppc/stand/ofwboot/version:1.13 src/sys/arch/macppc/stand/ofwboot/version:1.13.34.1
--- src/sys/arch/macppc/stand/ofwboot/version:1.13	Sun Oct 17 15:33:04 2010
+++ src/sys/arch/macppc/stand/ofwboot/version	Sun Nov 18 19:41:37 2018
@@ -1,4 +1,4 @@
-$NetBSD: version,v 1.13 2010/10/17 15:33:04 phx Exp $
+$NetBSD: version,v 1.13.34.1 2018/11/18 19:41:37 martin Exp $
 
 1.1:		Initial revision from NetBSD/powerpc.
 1.2:		Use MI loadfile().
@@ -14,3 +14,4 @@ $NetBSD: version,v 1.13 2010/10/17 15:33
 1.11:		Check floppyboot and disable LOAD_NOTE to avoid backward seek.
 1.12:		Read Apple Partition Map to find the root partition, when
 		no OF path was specified.
+1.13:		Fix boot failure of installation floppies



CVS commit: [netbsd-7] src/sys/arch/macppc/stand/ofwboot

2015-07-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jul 30 10:22:12 UTC 2015

Modified Files:
src/sys/arch/macppc/stand/ofwboot [netbsd-7]: Locore.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #893):
sys/arch/macppc/stand/ofwboot/Locore.c: revision 1.26
Don't set garbages into BAT registers, which was broken in rev 1.25.
Should fix PR port-macppc/50018 (though there is no response for 3 weeks),
and should be pulled up to netbsd-7.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.25.4.1 src/sys/arch/macppc/stand/ofwboot/Locore.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/macppc/stand/ofwboot/Locore.c
diff -u src/sys/arch/macppc/stand/ofwboot/Locore.c:1.25 src/sys/arch/macppc/stand/ofwboot/Locore.c:1.25.4.1
--- src/sys/arch/macppc/stand/ofwboot/Locore.c:1.25	Wed Feb 26 21:42:40 2014
+++ src/sys/arch/macppc/stand/ofwboot/Locore.c	Thu Jul 30 10:22:12 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: Locore.c,v 1.25 2014/02/26 21:42:40 macallan Exp $	*/
+/*	$NetBSD: Locore.c,v 1.25.4.1 2015/07/30 10:22:12 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -75,6 +75,7 @@ __asm(
 "   cmpi0,1,%r0,0x02  	\n" /* 601 CPU = 0x0001 */
 "   blt 1f		\n" /* skip over non-601 BAT setup */
 	/*non PPC 601 BATs*/
+"	li	%r0,0		\n"
 "	mtibatu	0,%r0		\n"
 "	mtibatu	1,%r0		\n"
 "	mtibatu	2,%r0		\n"
@@ -93,7 +94,8 @@ __asm(
 "	b 2f			\n"
 
 	/* PPC 601 BATs*/
-"1:	mtibatu	0,%r0		\n"
+"1:	li	%r0,0		\n"
+"	mtibatu	0,%r0		\n"
 "  	mtibatu 1,%r0   \n"
 "  	mtibatu 2,%r0   \n"
 "  	mtibatu 3,%r0   \n"



CVS commit: [netbsd-7] src/sys/arch/macppc/stand/ofwboot

2015-01-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 11 13:02:41 UTC 2015

Modified Files:
src/sys/arch/macppc/stand/ofwboot [netbsd-7]: boot.h

Log Message:
Pull up following revision(s) (requested by chs in ticket #405):
sys/arch/macppc/stand/ofwboot/boot.h: revision 1.5
Force main into .text


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.14.1 src/sys/arch/macppc/stand/ofwboot/boot.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/macppc/stand/ofwboot/boot.h
diff -u src/sys/arch/macppc/stand/ofwboot/boot.h:1.4 src/sys/arch/macppc/stand/ofwboot/boot.h:1.4.14.1
--- src/sys/arch/macppc/stand/ofwboot/boot.h:1.4	Sun Feb 19 12:02:55 2012
+++ src/sys/arch/macppc/stand/ofwboot/boot.h	Sun Jan 11 13:02:41 2015
@@ -5,7 +5,7 @@
 
 typedef void (*boot_entry_t)(int, int, int (*)(void *), void *, u_int);
 
-void main(void);
+void main(void) __section(".text");
 
 #define MAXBOOTPATHLEN	256
 extern char bootdev[MAXBOOTPATHLEN];