Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Aug 2012 14:41:48 -0600
From:      Ian Lepore <freebsd@damnhippie.dyndns.org>
To:        Oleksandr Tymoshenko <gonzo@bluezbox.com>
Cc:        "freebsd-arm@FreeBSD.org" <freebsd-arm@freebsd.org>
Subject:   Re: projects/armv6 merge
Message-ID:  <1344717708.1186.20.camel@revolution.hippie.lan>
In-Reply-To: <D36543E2-2AC1-495A-8514-73F43607F2C4@bluezbox.com>
References:  <50256231.3030008@bluezbox.com> <CD231BAC-93E9-4EA1-89C1-8D299CDA581A@bsdimp.com> <D36543E2-2AC1-495A-8514-73F43607F2C4@bluezbox.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-f/hWeORR/e9y3n0JsxuD
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

On Fri, 2012-08-10 at 23:44 -0700, Oleksandr Tymoshenko wrote:
> Total patch is huge, so although it's PITA indeed here is 
> initial batch of patches. I split diff into several patches. 
> Some of them have known problems but I guess it's enough to get
> ball rolling:

After applying all your patches to a fresh -current (r239193), I had to
make the attached changes to get a DB-88F6XXX kernel to build.  

Once built, that kernel boots on my dreamplug to the point of loading
the mge driver, then it hangs.  That doesn't suprise me, that was the
exact behavior of -current for me about a week ago.  I have a set of
local patches that add the dreamplug support, I'll be getting them
integrated soon (well, after I'm done watching the baseball game) so I
can get the dreamplug all the way up and running with your changes.

-- Ian


--=-f/hWeORR/e9y3n0JsxuD
Content-Disposition: attachment; filename="changeset_11.diff"
Content-Type: text/x-patch; name="changeset_11.diff"; charset="us-ascii"
Content-Transfer-Encoding: 7bit

files:       Makefile.inc1
description:
Quickly work around an installworld glitch caused by the new Heimdal/kerberos
makefiles using cmp and cp to install files instead of install -C.


diff -r 25742f1019fe -r b784bd72ba93 Makefile.inc1
--- a/Makefile.inc1	Sat Aug 11 10:34:22 2012 -0600
+++ b/Makefile.inc1	Sat Aug 11 13:53:31 2012 -0600
@@ -620,7 +620,7 @@ installcheck_UGID:
 _zoneinfo=	zic tzsetup
 .endif
 
-ITOOLS=	[ awk cap_mkdb cat chflags chmod chown \
+ITOOLS=	[ awk cap_mkdb cat chflags chmod chown cmp cp \
 	date echo egrep find grep ${_install-info} \
 	ln lockf make mkdir mtree mv pwd_mkdb rm sed sh sysctl \
 	test true uname wc ${_zoneinfo}


--=-f/hWeORR/e9y3n0JsxuD
Content-Disposition: attachment; filename="changeset_12.diff"
Content-Type: text/x-patch; name="changeset_12.diff"; charset="us-ascii"
Content-Transfer-Encoding: 7bit

files:       sys/arm/lpc/lpc_machdep.c sys/arm/mv/mv_machdep.c
description:
Add missing brace.  Comment out definition of proc0_tf, because it's already
defined in arm/machdep.c.

Maybe it's the definition in arm/machdep.c that has to go, but if so then a
whole lot of other <soc>_machdep.c files need to have the definition added.


diff -r b784bd72ba93 -r e0ef78658faf sys/arm/lpc/lpc_machdep.c
--- a/sys/arm/lpc/lpc_machdep.c	Sat Aug 11 13:53:31 2012 -0600
+++ b/sys/arm/lpc/lpc_machdep.c	Sat Aug 11 13:58:38 2012 -0600
@@ -148,7 +148,7 @@ struct pv_addr undstack;
 struct pv_addr abtstack;
 struct pv_addr kernelstack;
 
-static struct trapframe proc0_tf;
+//static struct trapframe proc0_tf;
 
 static struct mem_region availmem_regions[FDT_MEM_REGIONS];
 static int availmem_regions_sz;
diff -r b784bd72ba93 -r e0ef78658faf sys/arm/mv/mv_machdep.c
--- a/sys/arm/mv/mv_machdep.c	Sat Aug 11 13:53:31 2012 -0600
+++ b/sys/arm/mv/mv_machdep.c	Sat Aug 11 13:58:38 2012 -0600
@@ -139,7 +139,7 @@ struct pv_addr kernelstack;
 
 void set_stackptrs(int cpu);
 
-static struct trapframe proc0_tf;
+//static struct trapframe proc0_tf;
 static struct mem_region availmem_regions[FDT_MEM_REGIONS];
 static int availmem_regions_sz;
 
@@ -804,7 +804,7 @@ platform_devmap_init(void)
 			 * Check space: each PCI node will consume 2 devmap
 			 * entries.
 			 */
-			if (i + 1 >= FDT_DEVMAP_MAX)
+			if (i + 1 >= FDT_DEVMAP_MAX) {
 				return (ENOMEM);
 			}
 


--=-f/hWeORR/e9y3n0JsxuD
Content-Disposition: attachment; filename="changeset_13.diff"
Content-Type: text/x-patch; name="changeset_13.diff"; charset="us-ascii"
Content-Transfer-Encoding: 7bit

files:       sys/arm/arm/cpufunc.c
description:
Remove CPU_ID_ARM926ES, because it's not defined and I can't find the right
value for it (the ARM documents website is down).  I did find words saying
the 926ES has no MMU, so we probably can't support it anyway.


diff -r e0ef78658faf -r f1fd43249c62 sys/arm/arm/cpufunc.c
--- a/sys/arm/arm/cpufunc.c	Sat Aug 11 13:58:38 2012 -0600
+++ b/sys/arm/arm/cpufunc.c	Sat Aug 11 14:00:29 2012 -0600
@@ -1297,7 +1297,7 @@ set_cpufuncs()
 		get_cachetype_cp15();
 		pmap_pte_init_generic();
 		goto out;
-	} else if (cputype == CPU_ID_ARM926EJS  || cputype == CPU_ID_ARM926ES ||
+	} else if (cputype == CPU_ID_ARM926EJS ||
 	    cputype == CPU_ID_ARM1026EJS) {
 		cpufuncs = armv5_ec_cpufuncs;
 		get_cachetype_cp15();


--=-f/hWeORR/e9y3n0JsxuD
Content-Disposition: attachment; filename="changeset_14.diff"
Content-Type: text/x-patch; name="changeset_14.diff"; charset="us-ascii"
Content-Transfer-Encoding: 7bit

files:       sys/arm/mv/mv_pci.c
description:
Follow some macro changes in mvwin.h...  It looks like the macros are changing
to support multiple PCI devices on a SoC, but it's not clear to me how to
come up with a device number from the fdt info, so just to get the code to
compile in its current state, hard-code device number 0.


diff -r f1fd43249c62 -r f03dd6afe884 sys/arm/mv/mv_pci.c
--- a/sys/arm/mv/mv_pci.c	Sat Aug 11 14:00:29 2012 -0600
+++ b/sys/arm/mv/mv_pci.c	Sat Aug 11 14:02:30 2012 -0600
@@ -240,17 +240,17 @@ mv_pcib_attach(device_t self)
 	parnode = OF_parent(node);
 	if (fdt_is_compatible(node, "mrvl,pcie")) {
 		sc->sc_type = MV_TYPE_PCIE;
-		sc->sc_mem_win_target = MV_WIN_PCIE_MEM_TARGET;
-		sc->sc_mem_win_attr = MV_WIN_PCIE_MEM_ATTR;
-		sc->sc_io_win_target = MV_WIN_PCIE_IO_TARGET;
-		sc->sc_io_win_attr = MV_WIN_PCIE_IO_ATTR;
+		sc->sc_mem_win_target = MV_WIN_PCIE_TARGET(0);
+		sc->sc_mem_win_attr = MV_WIN_PCIE_MEM_ATTR(0);
+		sc->sc_io_win_target = MV_WIN_PCIE_TARGET(0);
+		sc->sc_io_win_attr = MV_WIN_PCIE_IO_ATTR(0);
 #ifdef SOC_MV_ORION
 	} else if (fdt_is_compatible(node, "mrvl,pci")) {
 		sc->sc_type = MV_TYPE_PCI;
-		sc->sc_mem_win_target = MV_WIN_PCI_MEM_TARGET;
-		sc->sc_mem_win_attr = MV_WIN_PCI_MEM_ATTR;
-		sc->sc_io_win_target = MV_WIN_PCI_IO_TARGET;
-		sc->sc_io_win_attr = MV_WIN_PCI_IO_ATTR;
+		sc->sc_mem_win_target = MV_WIN_PCI_TARGET(0);
+		sc->sc_mem_win_attr = MV_WIN_PCI_MEM_ATTR(0);
+		sc->sc_io_win_target = MV_WIN_PCI_TARGET(0);
+		sc->sc_io_win_attr = MV_WIN_PCI_IO_ATTR(0);
 #endif
 	} else
 		return (ENXIO);


--=-f/hWeORR/e9y3n0JsxuD
Content-Disposition: attachment; filename="changeset_15.diff"
Content-Type: text/x-patch; name="changeset_15.diff"; charset="us-ascii"
Content-Transfer-Encoding: 7bit

files:       sys/arm/mv/mvwin.h
description:
Remove duplicate definitions.

I'm pretty sure there are other problems in this file, this is just the
minimum required to make things compile.


diff -r f03dd6afe884 -r 4b9e39d44841 sys/arm/mv/mvwin.h
--- a/sys/arm/mv/mvwin.h	Sat Aug 11 14:02:30 2012 -0600
+++ b/sys/arm/mv/mvwin.h	Sat Aug 11 14:06:39 2012 -0600
@@ -63,12 +63,6 @@
  * External devices: 0x80000000, 1 GB (VA == PA)
  * Includes Device Bus, PCI and PCIE.
  */
-#define MV_PCIE_IO_PHYS_BASE	(MV_PHYS_BASE + MV_SIZE)
-#define MV_PCIE_IO_BASE		MV_PCIE_IO_PHYS_BASE
-#define MV_PCIE_IO_SIZE		(1024 * 1024)
-#define MV_PCI_IO_PHYS_BASE	(MV_PCIE_IO_PHYS_BASE + MV_PCIE_IO_SIZE)
-#define MV_PCI_IO_BASE		MV_PCI_IO_PHYS_BASE
-#define MV_PCI_IO_SIZE		(1024 * 1024)
 
 #if defined(SOC_MV_ORION)
 #define MV_PCI_PORTS	2	/* 1x PCI + 1x PCIE */


--=-f/hWeORR/e9y3n0JsxuD
Content-Disposition: attachment; filename="changeset_16.diff"
Content-Type: text/x-patch; name="changeset_16.diff"; charset="us-ascii"
Content-Transfer-Encoding: 7bit

files:       sys/arm/mv/discovery/files.db78xxx sys/arm/mv/kirkwood/files.kirkwood sys/arm/mv/orion/files.db88f5xxx sys/arm/mv/orion/files.ts7800
description:
Fix kernel link glitch -- no irq support functions.

It looks like the new armada support added an mpic.c file and removed ic.c
from arm/mv/files.mv, so now either ic.c or mpic.c has to be in each SoC
type's file list.  This adds ic.c to all the older SoCs.


diff -r 4b9e39d44841 -r e86ec901161b sys/arm/mv/discovery/files.db78xxx
--- a/sys/arm/mv/discovery/files.db78xxx	Sat Aug 11 14:06:39 2012 -0600
+++ b/sys/arm/mv/discovery/files.db78xxx	Sat Aug 11 14:09:23 2012 -0600
@@ -1,3 +1,5 @@
 # $FreeBSD: head/sys/arm/mv/discovery/files.db78xxx 209131 2010-06-13 13:28:53Z raj $
 
 arm/mv/discovery/discovery.c	standard
+arm/mv/ic.c			standard
+
diff -r 4b9e39d44841 -r e86ec901161b sys/arm/mv/kirkwood/files.kirkwood
--- a/sys/arm/mv/kirkwood/files.kirkwood	Sat Aug 11 14:06:39 2012 -0600
+++ b/sys/arm/mv/kirkwood/files.kirkwood	Sat Aug 11 14:09:23 2012 -0600
@@ -1,4 +1,5 @@
 # $FreeBSD: head/sys/arm/mv/kirkwood/files.kirkwood 196533 2009-08-25 09:39:11Z raj $
 
+arm/mv/ic.c			standard
 arm/mv/rtc.c			standard
 arm/mv/kirkwood/kirkwood.c	standard
diff -r 4b9e39d44841 -r e86ec901161b sys/arm/mv/orion/files.db88f5xxx
--- a/sys/arm/mv/orion/files.db88f5xxx	Sat Aug 11 14:06:39 2012 -0600
+++ b/sys/arm/mv/orion/files.db88f5xxx	Sat Aug 11 14:09:23 2012 -0600
@@ -1,4 +1,5 @@
 # $FreeBSD: head/sys/arm/mv/orion/files.db88f5xxx 183840 2008-10-13 20:07:13Z raj $
 
+arm/mv/ic.c			standard
 arm/mv/orion/orion.c		standard
 arm/mv/orion/db88f5xxx.c	standard
diff -r 4b9e39d44841 -r e86ec901161b sys/arm/mv/orion/files.ts7800
--- a/sys/arm/mv/orion/files.ts7800	Sat Aug 11 14:06:39 2012 -0600
+++ b/sys/arm/mv/orion/files.ts7800	Sat Aug 11 14:09:23 2012 -0600
@@ -1,4 +1,5 @@
 # $FreeBSD: head/sys/arm/mv/orion/files.ts7800 220653 2011-04-15 13:37:43Z philip $
 
+arm/mv/ic.c			standard
 arm/mv/orion/orion.c	standard
 


--=-f/hWeORR/e9y3n0JsxuD--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1344717708.1186.20.camel>