head	1.9;
access;
symbols
	netbsd-11-0-RC4:1.9
	netbsd-11-0-RC3:1.9
	netbsd-11-0-RC2:1.9
	netbsd-11-0-RC1:1.9
	perseant-exfatfs-base-20250801:1.9
	netbsd-11:1.9.0.26
	netbsd-11-base:1.9
	netbsd-10-1-RELEASE:1.9
	perseant-exfatfs-base-20240630:1.9
	perseant-exfatfs:1.9.0.24
	perseant-exfatfs-base:1.9
	netbsd-8-3-RELEASE:1.4
	netbsd-9-4-RELEASE:1.6
	netbsd-10-0-RELEASE:1.9
	netbsd-10-0-RC6:1.9
	netbsd-10-0-RC5:1.9
	netbsd-10-0-RC4:1.9
	netbsd-10-0-RC3:1.9
	netbsd-10-0-RC2:1.9
	thorpej-ifq:1.9.0.22
	thorpej-ifq-base:1.9
	thorpej-altq-separation:1.9.0.20
	thorpej-altq-separation-base:1.9
	netbsd-10-0-RC1:1.9
	netbsd-10:1.9.0.18
	netbsd-10-base:1.9
	bouyer-sunxi-drm:1.9.0.16
	bouyer-sunxi-drm-base:1.9
	netbsd-9-3-RELEASE:1.6
	thorpej-i2c-spi-conf2:1.9.0.14
	thorpej-i2c-spi-conf2-base:1.9
	thorpej-futex2:1.9.0.12
	thorpej-futex2-base:1.9
	thorpej-cfargs2:1.9.0.10
	thorpej-cfargs2-base:1.9
	cjep_sun2x-base1:1.9
	cjep_sun2x:1.9.0.8
	cjep_sun2x-base:1.9
	cjep_staticlib_x-base1:1.9
	netbsd-9-2-RELEASE:1.6
	cjep_staticlib_x:1.9.0.6
	cjep_staticlib_x-base:1.9
	thorpej-i2c-spi-conf:1.9.0.4
	thorpej-i2c-spi-conf-base:1.9
	thorpej-cfargs:1.9.0.2
	thorpej-cfargs-base:1.9
	thorpej-futex:1.8.0.8
	thorpej-futex-base:1.9
	netbsd-9-1-RELEASE:1.6
	bouyer-xenpvh-base2:1.8
	phil-wifi-20200421:1.8
	bouyer-xenpvh-base1:1.8
	phil-wifi-20200411:1.8
	bouyer-xenpvh:1.8.0.6
	bouyer-xenpvh-base:1.8
	is-mlppp:1.8.0.4
	is-mlppp-base:1.8
	phil-wifi-20200406:1.8
	netbsd-8-2-RELEASE:1.4
	ad-namecache-base3:1.8
	netbsd-9-0-RELEASE:1.6
	netbsd-9-0-RC2:1.6
	ad-namecache-base2:1.8
	ad-namecache-base1:1.8
	ad-namecache:1.8.0.2
	ad-namecache-base:1.8
	netbsd-9-0-RC1:1.6
	phil-wifi-20191119:1.6
	netbsd-9:1.6.0.4
	netbsd-9-base:1.6
	phil-wifi-20190609:1.6
	netbsd-8-1-RELEASE:1.4
	netbsd-8-1-RC1:1.4
	isaki-audio2:1.6.0.2
	isaki-audio2-base:1.6
	pgoyette-compat-merge-20190127:1.5.2.1
	pgoyette-compat-20190127:1.6
	pgoyette-compat-20190118:1.6
	pgoyette-compat-1226:1.6
	pgoyette-compat-1126:1.6
	pgoyette-compat-1020:1.6
	pgoyette-compat-0930:1.5
	pgoyette-compat-0906:1.5
	netbsd-7-2-RELEASE:1.3.12.1
	pgoyette-compat-0728:1.5
	netbsd-8-0-RELEASE:1.4
	phil-wifi:1.5.0.4
	phil-wifi-base:1.5
	pgoyette-compat-0625:1.5
	netbsd-8-0-RC2:1.4
	pgoyette-compat-0521:1.5
	pgoyette-compat-0502:1.5
	pgoyette-compat-0422:1.5
	netbsd-8-0-RC1:1.4
	pgoyette-compat-0415:1.5
	pgoyette-compat-0407:1.5
	pgoyette-compat-0330:1.5
	pgoyette-compat-0322:1.5
	pgoyette-compat-0315:1.5
	netbsd-7-1-2-RELEASE:1.3.12.1
	pgoyette-compat:1.5.0.2
	pgoyette-compat-base:1.5
	netbsd-7-1-1-RELEASE:1.3.12.1
	tls-maxphys-base-20171202:1.4
	matt-nb8-mediatek:1.4.0.14
	matt-nb8-mediatek-base:1.4
	nick-nhusb-base-20170825:1.4
	perseant-stdc-iso10646:1.4.0.12
	perseant-stdc-iso10646-base:1.4
	netbsd-8:1.4.0.10
	netbsd-8-base:1.4
	prg-localcount2-base3:1.4
	prg-localcount2-base2:1.4
	prg-localcount2-base1:1.4
	prg-localcount2:1.4.0.8
	prg-localcount2-base:1.4
	pgoyette-localcount-20170426:1.4
	bouyer-socketcan-base1:1.4
	jdolecek-ncq:1.4.0.6
	jdolecek-ncq-base:1.4
	pgoyette-localcount-20170320:1.4
	netbsd-7-1:1.3.12.1.0.6
	netbsd-7-1-RELEASE:1.3.12.1
	netbsd-7-1-RC2:1.3.12.1
	nick-nhusb-base-20170204:1.4
	netbsd-7-nhusb-base-20170116:1.3.12.1
	bouyer-socketcan:1.4.0.4
	bouyer-socketcan-base:1.4
	pgoyette-localcount-20170107:1.4
	netbsd-7-1-RC1:1.3.12.1
	nick-nhusb-base-20161204:1.4
	pgoyette-localcount-20161104:1.4
	netbsd-7-0-2-RELEASE:1.3.12.1
	nick-nhusb-base-20161004:1.4
	localcount-20160914:1.4
	netbsd-7-nhusb:1.3.12.1.0.4
	netbsd-7-nhusb-base:1.3.12.1
	pgoyette-localcount-20160806:1.4
	pgoyette-localcount-20160726:1.4
	pgoyette-localcount:1.4.0.2
	pgoyette-localcount-base:1.4
	nick-nhusb-base-20160907:1.4
	nick-nhusb-base-20160529:1.4
	netbsd-7-0-1-RELEASE:1.3.12.1
	nick-nhusb-base-20160422:1.4
	nick-nhusb-base-20160319:1.4
	nick-nhusb-base-20151226:1.4
	netbsd-7-0:1.3.12.1.0.2
	netbsd-7-0-RELEASE:1.3.12.1
	nick-nhusb-base-20150921:1.4
	netbsd-7-0-RC3:1.3.12.1
	netbsd-7-0-RC2:1.3.12.1
	netbsd-7-0-RC1:1.3.12.1
	nick-nhusb-base-20150606:1.4
	nick-nhusb-base-20150406:1.4
	nick-nhusb:1.3.0.14
	nick-nhusb-base:1.3
	netbsd-6-0-6-RELEASE:1.1.2.2
	netbsd-6-1-5-RELEASE:1.1.2.3
	netbsd-7:1.3.0.12
	netbsd-7-base:1.3
	yamt-pagecache-base9:1.3
	yamt-pagecache-tag8:1.1.6.3
	netbsd-6-1-4-RELEASE:1.1.2.3
	netbsd-6-0-5-RELEASE:1.1.2.2
	tls-earlyentropy:1.3.0.10
	tls-earlyentropy-base:1.3
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.3
	riastradh-drm2-base3:1.3
	netbsd-6-1-3-RELEASE:1.1.2.3
	netbsd-6-0-4-RELEASE:1.1.2.2
	netbsd-6-1-2-RELEASE:1.1.2.3
	netbsd-6-0-3-RELEASE:1.1.2.2
	rmind-smpnet-nbase:1.3
	netbsd-6-1-1-RELEASE:1.1.2.3
	riastradh-drm2-base2:1.3
	riastradh-drm2-base1:1.3
	riastradh-drm2:1.3.0.8
	riastradh-drm2-base:1.3
	rmind-smpnet:1.3.0.2
	rmind-smpnet-base:1.3
	netbsd-6-1:1.1.2.3.0.2
	netbsd-6-0-2-RELEASE:1.1.2.2
	netbsd-6-1-RELEASE:1.1.2.3
	khorben-n900:1.3.0.6
	netbsd-6-1-RC4:1.1.2.3
	netbsd-6-1-RC3:1.1.2.3
	agc-symver:1.3.0.4
	agc-symver-base:1.3
	netbsd-6-1-RC2:1.1.2.3
	netbsd-6-1-RC1:1.1.2.3
	yamt-pagecache-base8:1.2
	netbsd-6-0-1-RELEASE:1.1.2.2
	yamt-pagecache-base7:1.2
	matt-nb6-plus-nbase:1.1.2.2
	yamt-pagecache:1.1.0.6
	yamt-pagecache-base6:1.1
	netbsd-6-0:1.1.2.2.0.4
	netbsd-6-0-RELEASE:1.1.2.2
	netbsd-6-0-RC2:1.1.2.2
	tls-maxphys:1.1.0.4
	tls-maxphys-base:1.3
	matt-nb6-plus:1.1.2.2.0.2
	matt-nb6-plus-base:1.1.2.2
	netbsd-6-0-RC1:1.1.2.2
	netbsd-6:1.1.0.2;
locks; strict;
comment	@# @;


1.9
date	2020.12.01.04.18.26;	author rin;	state Exp;
branches;
next	1.8;
commitid	Gr6UYosdfQqEEZxC;

1.8
date	2019.12.16.14.32.14;	author skrll;	state Exp;
branches
	1.8.8.1;
next	1.7;
commitid	oIXKjVXLyZSskWOB;

1.7
date	2019.12.16.11.00.30;	author skrll;	state Exp;
branches;
next	1.6;
commitid	qoYUrKI4yyo38VOB;

1.6
date	2018.10.18.09.01.54;	author skrll;	state Exp;
branches;
next	1.5;
commitid	0r6pPkie0NRL4qWA;

1.5
date	2017.12.10.21.38.26;	author skrll;	state Exp;
branches
	1.5.2.1
	1.5.4.1;
next	1.4;
commitid	swFz856cExziloiA;

1.4
date	2015.02.28.09.34.34;	author skrll;	state Exp;
branches;
next	1.3;
commitid	p4Y4t2UGzj3OZKby;

1.3
date	2013.02.09.20.48.38;	author christos;	state Exp;
branches
	1.3.12.1
	1.3.14.1;
next	1.2;

1.2
date	2012.12.10.05.02.14;	author matt;	state Exp;
branches;
next	1.1;

1.1
date	2012.07.26.06.21.57;	author skrll;	state Exp;
branches
	1.1.2.1
	1.1.4.1
	1.1.6.1;
next	;

1.8.8.1
date	2020.12.14.14.37.51;	author thorpej;	state Exp;
branches;
next	;
commitid	S4HwP6n7zzL3FIzC;

1.5.2.1
date	2018.10.20.06.58.27;	author pgoyette;	state Exp;
branches;
next	;
commitid	mTSoqZEZ4arHnFWA;

1.5.4.1
date	2019.06.10.22.06.05;	author christos;	state Exp;
branches;
next	1.5.4.2;
commitid	jtc8rnCzWiEEHGqB;

1.5.4.2
date	2020.04.08.14.07.34;	author martin;	state Exp;
branches;
next	;
commitid	Qli2aW9E74UFuA3C;

1.3.12.1
date	2015.03.11.20.22.56;	author snj;	state Exp;
branches;
next	;
commitid	Cfnabnt1nJYveedy;

1.3.14.1
date	2015.04.06.15.17.55;	author skrll;	state Exp;
branches;
next	;
commitid	pz01Zhy7RP6iGxgy;

1.1.2.1
date	2012.07.26.06.21.57;	author jdc;	state dead;
branches;
next	1.1.2.2;

1.1.2.2
date	2012.08.09.06.36.44;	author jdc;	state Exp;
branches;
next	1.1.2.3;

1.1.2.3
date	2013.02.13.01.36.14;	author riz;	state Exp;
branches;
next	;

1.1.4.1
date	2013.02.25.00.28.35;	author tls;	state Exp;
branches;
next	1.1.4.2;

1.1.4.2
date	2017.12.03.11.36.03;	author jdolecek;	state Exp;
branches;
next	;
commitid	XcIYRZTAh1LmerhA;

1.1.6.1
date	2012.07.26.06.21.57;	author yamt;	state dead;
branches;
next	1.1.6.2;

1.1.6.2
date	2012.10.30.17.19.21;	author yamt;	state Exp;
branches;
next	1.1.6.3;

1.1.6.3
date	2013.01.16.05.32.52;	author yamt;	state Exp;
branches;
next	1.1.6.4;

1.1.6.4
date	2014.05.22.11.39.40;	author yamt;	state Exp;
branches;
next	;
commitid	VUUXuyNWnt3AKwBx;


desc
@@


1.9
log
@Link RPI and RPI2 kernels in BE8 format for big-endian variants.
@
text
@#	$NetBSD: mk.rpi,v 1.8 2019/12/16 14:32:14 skrll Exp $

.if !empty(MACHINE_ARCH:M*eb)
EXTRA_LINKFLAGS+=	--be8
.endif

SYSTEM_FIRST_OBJ=	armv6_start.o
SYSTEM_FIRST_SFILE=	${ARM}/arm/armv6_start.S

_OSRELEASE!=		${HOST_SH} $S/conf/osrelease.sh

KERNEL_BASE_PHYS=0x00008000
KERNEL_BASE_VIRT=0x80008000

SYSTEM_LD_TAIL_EXTRA+=; \
	echo ${OBJCOPY} -S -O binary $@@ $@@.img; \
	${OBJCOPY} -S -O binary $@@ $@@.img;

EXTRA_KERNELS+= ${KERNELS:@@.KERNEL.@@${.KERNEL.}.img@@}
@


1.8
log
@Be consistent with RPI 32-bit and 64-kernels and use .img for the file
to give to the firmware to boot
@
text
@d1 5
a5 1
#	$NetBSD: mk.rpi,v 1.7 2019/12/16 11:00:30 skrll Exp $
@


1.8.8.1
log
@Sync w/ HEAD.
@
text
@d1 1
a1 5
#	$NetBSD: mk.rpi,v 1.9 2020/12/01 04:18:26 rin Exp $

.if !empty(MACHINE_ARCH:M*eb)
EXTRA_LINKFLAGS+=	--be8
.endif
@


1.7
log
@Update to new RaspberryPi firware

commit 0c01dbefba45a08c47f8538d5a071a0fba6b7e83
Author: popcornmix <popcornmix@@gmail.com>
Date:   Wed Dec 11 15:30:08 2019 +0000

and include firmware for RPI4

Firmware has bee updated to support mainline linux kernels as described in
https://github.com/raspberrypi/linux/issues/3237
@
text
@d1 1
a1 1
#	$NetBSD: mk.rpi,v 1.6 2018/10/18 09:01:54 skrll Exp $
d12 2
a13 2
	echo ${OBJCOPY} -S -O binary $@@ $@@.bin; \
	${OBJCOPY} -S -O binary $@@ $@@.bin;
d15 1
a15 1
EXTRA_KERNELS+= ${KERNELS:@@.KERNEL.@@${.KERNEL.}.bin@@}
@


1.6
log
@Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors.  AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested.  Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@@ and aymeric@@ for testing on parallella and nanosoc
respectively
@
text
@d1 1
a1 1
#	$NetBSD: mk.rpi,v 1.5 2017/12/10 21:38:26 skrll Exp $
a10 2
MKKNLIMG=		${THISARM}/compile/rpi-mkknlimg.sh

d13 1
a13 3
	${OBJCOPY} -S -O binary $@@ $@@.bin; \
	echo ${MKKNLIMG} $@@.bin $@@.img; \
	${HOST_SH} ${MKKNLIMG} $@@.bin $@@.img;
d15 1
a15 1
EXTRA_KERNELS+= ${KERNELS:@@.KERNEL.@@${.KERNEL.}.img@@}
@


1.5
log
@FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
@
text
@d1 1
a1 1
#	$NetBSD: mk.rpi,v 1.4 2015/02/28 09:34:34 skrll Exp $
d3 2
a4 2
SYSTEM_FIRST_OBJ=	rpi_start.o
SYSTEM_FIRST_SFILE=	${THISARM}/rpi/rpi_start.S
a7 2
GENASSYM_EXTRAS+=	${THISARM}/rpi/genassym.cf

@


1.5.4.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: mk.rpi,v 1.6 2018/10/18 09:01:54 skrll Exp $
d3 2
a4 2
SYSTEM_FIRST_OBJ=	armv6_start.o
SYSTEM_FIRST_SFILE=	${ARM}/arm/armv6_start.S
d8 2
@


1.5.4.2
log
@Merge changes from current as of 20200406
@
text
@d1 1
a1 1
#	$NetBSD$
d11 2
d14 4
a17 2
	echo ${OBJCOPY} -S -O binary $@@ $@@.img; \
	${OBJCOPY} -S -O binary $@@ $@@.img;
@


1.5.2.1
log
@Sync with head
@
text
@d1 1
a1 1
#	$NetBSD: mk.rpi,v 1.6 2018/10/18 09:01:54 skrll Exp $
d3 2
a4 2
SYSTEM_FIRST_OBJ=	armv6_start.o
SYSTEM_FIRST_SFILE=	${ARM}/arm/armv6_start.S
d8 2
@


1.4
log
@Initial RPI2 support - it doesn't work yet. The generic timer gets messed
up somehow.

This commit changes the KVA layout of the RPI.
@
text
@d1 1
a1 1
#	$NetBSD: mk.rpi,v 1.3 2013/02/09 20:48:38 christos Exp $
d13 2
d17 3
a19 1
	${OBJCOPY} -S -O binary $@@ $@@.bin
d21 1
a21 1
EXTRA_KERNELS+= ${KERNELS:@@.KERNEL.@@${.KERNEL.}.bin@@}
@


1.3
log
@name the kernel like other evbarms
@
text
@d1 1
a1 3
#	$NetBSD: mk.rpi,v 1.2 2012/12/10 05:02:14 matt Exp $

CPPFLAGS+= -march=armv6z -mtune=arm1176jzf-s -mfpu=vfp
d11 1
a11 1
KERNEL_BASE_VIRT=0xc0008000
@


1.3.14.1
log
@Sync with HEAD
@
text
@d1 3
a3 1
#	$NetBSD: mk.rpi,v 1.4 2015/02/28 09:34:34 skrll Exp $
d13 1
a13 1
KERNEL_BASE_VIRT=0x80008000
@


1.3.12.1
log
@Pull up following revision(s) (requested by skrll in ticket #582):
	distrib/utils/embedded/conf/rpi.conf: revision 1.27
	etc/etc.evbarm/Makefile.inc: revision 1.70
	sys/arch/arm/broadcom/bcm2835_intr.c: revision 1.5-1.7
	sys/arch/arm/broadcom/bcm2835_obio.c: revision 1.23, 1.24
	sys/arch/arm/broadcom/bcm2835_space.c: revision 1.8
	sys/arch/arm/broadcom/bcm2835reg.h: revision 1.14
	sys/arch/arm/broadcom/bcm2835var.h: revision 1.2
	sys/arch/arm/broadcom/files.bcm2835: revision 1.24
	sys/arch/arm/cortex/a9_mpsubr.S: revision 1.30
	sys/arch/arm/cortex/armperiph.c: revision 1.8, 1.9
	sys/arch/arm/cortex/gtmr.c: revision 1.9
	sys/arch/arm/cortex/gtmr_var.h: revision 1.5
	sys/arch/arm/cortex/mpcore_var.h: revision 1.3
	sys/arch/arm/include/cpu.h: revision 1.84
	sys/arch/evbarm/conf/RPI2: revision 1.1, 1.2
	sys/arch/evbarm/conf/RPI2_INSTALL: revision 1.1
	sys/arch/evbarm/conf/RPI: revision 1.59, 1.60
	sys/arch/evbarm/conf/mk.rpi: revision 1.4
	sys/arch/evbarm/conf/std.rpi: revisions 1.16-1.19 via patch
	sys/arch/evbarm/rpi/genassym.cf: revision 1.2
	sys/arch/evbarm/rpi/rpi.h: revision 1.4
	sys/arch/evbarm/rpi/rpi2_start.S: revision 1.1
	sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.57, 1.58 via patch
	sys/arch/evbarm/rpi/rpi_start.S: revision 1.13
Move some options into std.rpi
--
Add __HAVE_MM_MD_CACHE_ALIASING
Pull up following revision(s) (requested by skrll in ticket #582):
Fix TPIDRPRW_IS_CURLWP builds.
--
A MULTIPROCESSOR kernel requires TPIDRPRW_IS_CURCPU.
--
Use TPIDRPRW_IS_CURLWP as it's a slight code reduction and performance
improvement.
Initial RPI2 support - it doesn't work yet. The generic timer gets messed
up somehow.
This commit changes the KVA layout of the RPI.
--
Make this compile where gtmr isn't used.
--
Spin up the non-boot CPUs, but don't allow cpu_boot_secondary_processors
to see them for now.
RPI2 nows works well with only the boot cpu.
--
Appease a KASSERT - will be remove when MULTIPROCESSOR RPI2 is fixed.
--
Add RPI2 to kernels build for both earmv[67].
Use the earmv6 built kernels to create an image that can be used on both
RPI and RPI2
--
Add an RPI2_INSTALL
@
text
@d1 3
a3 1
#	$NetBSD: mk.rpi,v 1.3 2013/02/09 20:48:38 christos Exp $
d13 1
a13 1
KERNEL_BASE_VIRT=0x80008000
@


1.2
log
@Add -mfpu=vfp since these are arm11
@
text
@d1 1
a1 1
#	$NetBSD: mk.rpi,v 1.1 2012/07/26 06:21:57 skrll Exp $
d16 4
a19 2
	echo ${OBJCOPY} -S -O binary $@@ kernel.img; \
	${OBJCOPY} -S -O binary $@@ kernel.img
@


1.1
log
@Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.
@
text
@d1 1
a1 1
#	$NetBSD$
d3 1
a3 1
CPPFLAGS+= -march=armv6z -mtune=arm1176jzf-s
@


1.1.4.1
log
@resync with head
@
text
@d1 1
a1 1
#	$NetBSD: mk.rpi,v 1.1 2012/07/26 06:21:57 skrll Exp $
d3 1
a3 1
CPPFLAGS+= -march=armv6z -mtune=arm1176jzf-s -mfpu=vfp
d16 2
a17 4
	echo ${OBJCOPY} -S -O binary $@@ $@@.bin; \
	${OBJCOPY} -S -O binary $@@ $@@.bin

EXTRA_KERNELS+= ${KERNELS:@@.KERNEL.@@${.KERNEL.}.bin@@}
@


1.1.4.2
log
@update from HEAD
@
text
@d1 3
a3 1
#	$NetBSD$
d13 1
a13 1
KERNEL_BASE_VIRT=0x80008000
@


1.1.6.1
log
@file mk.rpi was added on branch yamt-pagecache on 2012-10-30 17:19:21 +0000
@
text
@d1 17
@


1.1.6.2
log
@sync with head
@
text
@a0 17
#	$NetBSD$

CPPFLAGS+= -march=armv6z -mtune=arm1176jzf-s

SYSTEM_FIRST_OBJ=	rpi_start.o
SYSTEM_FIRST_SFILE=	${THISARM}/rpi/rpi_start.S

_OSRELEASE!=		${HOST_SH} $S/conf/osrelease.sh

GENASSYM_EXTRAS+=	${THISARM}/rpi/genassym.cf

KERNEL_BASE_PHYS=0x00008000
KERNEL_BASE_VIRT=0xc0008000

SYSTEM_LD_TAIL_EXTRA+=; \
	echo ${OBJCOPY} -S -O binary $@@ kernel.img; \
	${OBJCOPY} -S -O binary $@@ kernel.img
@


1.1.6.3
log
@sync with (a bit old) head
@
text
@d1 1
a1 1
#	$NetBSD: mk.rpi,v 1.1.6.2 2012/10/30 17:19:21 yamt Exp $
d3 1
a3 1
CPPFLAGS+= -march=armv6z -mtune=arm1176jzf-s -mfpu=vfp
@


1.1.6.4
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@d1 1
a1 1
#	$NetBSD: mk.rpi,v 1.1.6.3 2013/01/16 05:32:52 yamt Exp $
d16 2
a17 4
	echo ${OBJCOPY} -S -O binary $@@ $@@.bin; \
	${OBJCOPY} -S -O binary $@@ $@@.bin

EXTRA_KERNELS+= ${KERNELS:@@.KERNEL.@@${.KERNEL.}.bin@@}
@


1.1.2.1
log
@file mk.rpi was added on branch netbsd-6 on 2012-08-09 06:36:44 +0000
@
text
@d1 17
@


1.1.2.2
log
@Pull up revisions:
  src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
  src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
  src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
  src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
  src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
  src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
  src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
  src/sys/arch/arm/arm32/cpu.c revision 1.79
  src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
  src/sys/arch/arm/arm32/pmap.c revision 1.229
  src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
  src/sys/arch/arm/include/cpu.h revision 1.64
  src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
  src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
  src/sys/arch/arm/conf/files.arm revision 1.106
  src/sys/arch/arm/include/cpufunc.h revision 1.57
  src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
  src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
  src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
  src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
  src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
  src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
  src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
  src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
  src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
  src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
  src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
  src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
  src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
  src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
  src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
  src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
  src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
  src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
  src/sys/arch/evbarm/Makefile revision 1.9
  src/sys/arch/evbarm/conf/RPI revision 1.1
  src/sys/arch/evbarm/conf/files.rpi revision 1.1
  src/sys/arch/evbarm/conf/mk.rpi revision 1.1
  src/sys/arch/evbarm/conf/std.rpi revision 1.1
  src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
  src/sys/arch/evbarm/rpi/rpi.h revision 1.1
  src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
  src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
  src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t.  Update the locking to match
com(4) in the few places it didn't already.

DOH.  Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
@
text
@a0 17
#	$NetBSD$

CPPFLAGS+= -march=armv6z -mtune=arm1176jzf-s

SYSTEM_FIRST_OBJ=	rpi_start.o
SYSTEM_FIRST_SFILE=	${THISARM}/rpi/rpi_start.S

_OSRELEASE!=		${HOST_SH} $S/conf/osrelease.sh

GENASSYM_EXTRAS+=	${THISARM}/rpi/genassym.cf

KERNEL_BASE_PHYS=0x00008000
KERNEL_BASE_VIRT=0xc0008000

SYSTEM_LD_TAIL_EXTRA+=; \
	echo ${OBJCOPY} -S -O binary $@@ kernel.img; \
	${OBJCOPY} -S -O binary $@@ kernel.img
@


1.1.2.3
log
@Pull up following revision(s) (requested by skrll in ticket #813):

etc/MAKEDEV.tmpl					1.160
etc/etc.evbarm/MAKEDEV.conf				1.9
external/broadcom/rpi-firmware/dist/LICENCE.broadcom	1.1
external/broadcom/rpi-firmware/dist/bootcode.bin	1.1
external/broadcom/rpi-firmware/dist/bootcode.bin	1.2
external/broadcom/rpi-firmware/dist/fixup.dat		1.1
external/broadcom/rpi-firmware/dist/fixup.dat		1.2
external/broadcom/rpi-firmware/dist/fixup_cd.dat	1.1
external/broadcom/rpi-firmware/dist/fixup_cd.dat	1.2
external/broadcom/rpi-firmware/dist/start.elf		1.1
external/broadcom/rpi-firmware/dist/start.elf		1.2
external/broadcom/rpi-firmware/dist/start_cd.elf	1.1
external/broadcom/rpi-firmware/dist/start_cd.elf	1.2
sys/arch/arm/broadcom/bcm2835_bsc.c			1.1 via patch
sys/arch/arm/broadcom/bcm2835_bscreg.h			1.1 via patch
sys/arch/arm/broadcom/bcm2835_dotg.c			1.1 via patch
sys/arch/arm/broadcom/bcm2835_emmc.c			1.7 via patch
sys/arch/arm/broadcom/bcm2835_genfb.c			1.4 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.c		1.2 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.h		1.1 via patch
sys/arch/arm/broadcom/bcm2835_gpioreg.h			1.1 via patch
sys/arch/arm/broadcom/bcm2835_intr.c			1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox.c			1.5 via patch
sys/arch/arm/broadcom/bcm2835_mbox.h			1.4 via patch
sys/arch/arm/broadcom/bcm2835_obio.c			1.17 via patch
sys/arch/arm/broadcom/bcm2835_pm.c			1.2 via patch
sys/arch/arm/broadcom/bcm2835_rng.c			1.3 via patch
sys/arch/arm/broadcom/bcm2835_space.c			1.5 via patch
sys/arch/arm/broadcom/bcm2835_spi.c			1.1 via patch
sys/arch/arm/broadcom/bcm2835_spireg.h			1.1 via patch
sys/arch/arm/broadcom/bcm2835_tmr.c			1.3 via patch
sys/arch/arm/broadcom/bcm2835reg.h			1.10 via patch
sys/arch/arm/broadcom/files.bcm2835			1.14 via patch
sys/arch/evbarm/conf/RPI				1.23 via patch
sys/arch/evbarm/conf/files.rpi				1.3 via patch
sys/arch/evbarm/conf/mk.rpi				1.2 via patch
sys/arch/evbarm/conf/std.rpi				1.4 via patch
sys/arch/evbarm/rpi/rpi_machdep.c			1.34 via patch
sys/arch/evbarm/rpi/rpi_start.S				1.7 via patch
sys/arch/evbarm/rpi/rpi_vcmbox.c			1.2 via patch
sys/arch/evbarm/rpi/vcio.h				1.1 via patch
sys/arch/evbarm/rpi/vcprop.h				1.7 via patch
sys/conf/files						patch
sys/dev/sdmmc/sdhc.c					1.43
sys/dev/sdmmc/sdhcvar.h					1.13
sys/dev/usb/dwc_otg.c					1.45 via patch
sys/dev/usb/dwc_otgreg.h				1.5 via patch
sys/dev/usb/dwc_otgvar.h				1.11 via patch
sys/dev/usb/files.usb					1.126 via patch
sys/dev/usb/if_smsc.c					1.7 via patch
sys/dev/usb/if_smscreg.h				1.1 via patch
sys/dev/usb/if_smscvar.h				1.1 via patch
sys/dev/usb/usbdevices.config				patch
sys/dev/usb/usbdevs					1.633 via patch
sys/dev/usb/usbdevs.h					regen
sys/dev/usb/usbdevs_data.h				regen
sys/dev/wscons/wsconsio.h				1.105,1.107 via patch
sys/dev/wscons/wsdisplayvar.h				1.50
sys/dev/wscons/wsdisplay_util.c				1.2
sys/dev/videomode/edid.c				1.12 via patch

	Greatly improved Raspberry Pi support.  USB and onboard
	Ethernet should work.
	[skrll, ticket #813]
@
text
@d1 1
a1 1
#	$NetBSD: mk.rpi,v 1.2 2012/12/10 05:02:14 matt Exp $
d3 1
a3 1
CPPFLAGS+= -march=armv6z -mtune=arm1176jzf-s -mfpu=vfp
@


