head	1.12;
access;
symbols
	netbsd-10-2-RELEASE:1.10.4.1
	netbsd-9-5-RELEASE:1.6
	netbsd-11-0-RELEASE:1.11
	netbsd-11-0-RC7:1.11
	netbsd-11-0-RC6:1.11
	netbsd-11-0-RC5:1.11
	netbsd-11-0-RC4:1.11
	netbsd-11-0-RC3:1.11
	netbsd-11-0-RC2:1.11
	netbsd-11-0-RC1:1.11
	perseant-exfatfs-base-20250801:1.11
	netbsd-11:1.11.0.8
	netbsd-11-base:1.11
	netbsd-10-1-RELEASE:1.10.4.1
	perseant-exfatfs-base-20240630:1.11
	perseant-exfatfs:1.11.0.6
	perseant-exfatfs-base:1.11
	netbsd-9-4-RELEASE:1.6
	netbsd-10-0-RELEASE:1.10.4.1
	netbsd-10-0-RC6:1.10.4.1
	netbsd-10-0-RC5:1.10.4.1
	netbsd-10-0-RC4:1.10.4.1
	netbsd-10-0-RC3:1.10.4.1
	netbsd-10-0-RC2:1.10.4.1
	thorpej-ifq:1.11.0.4
	thorpej-ifq-base:1.11
	thorpej-altq-separation:1.11.0.2
	thorpej-altq-separation-base:1.11
	netbsd-10-0-RC1:1.10.4.1
	netbsd-10:1.10.0.4
	netbsd-10-base:1.10
	bouyer-sunxi-drm:1.10.0.2
	bouyer-sunxi-drm-base:1.10
	netbsd-9-3-RELEASE:1.6
	thorpej-i2c-spi-conf2:1.9.0.12
	thorpej-i2c-spi-conf2-base:1.9
	thorpej-futex2:1.9.0.10
	thorpej-futex2-base:1.9
	thorpej-cfargs2:1.9.0.8
	thorpej-cfargs2-base:1.9
	cjep_sun2x-base1:1.9
	cjep_sun2x:1.9.0.6
	cjep_sun2x-base:1.9
	cjep_staticlib_x-base1:1.9
	netbsd-9-2-RELEASE:1.6
	cjep_staticlib_x:1.9.0.4
	cjep_staticlib_x-base:1.9
	thorpej-i2c-spi-conf:1.9.0.2
	thorpej-i2c-spi-conf-base:1.9
	thorpej-cfargs:1.8.0.4
	thorpej-cfargs-base:1.9
	thorpej-futex:1.8.0.2
	thorpej-futex-base:1.9
	netbsd-9-1-RELEASE:1.6
	bouyer-xenpvh-base2:1.7
	phil-wifi-20200421:1.7
	bouyer-xenpvh-base1:1.7
	phil-wifi-20200411:1.7
	bouyer-xenpvh:1.7.0.4
	bouyer-xenpvh-base:1.7
	is-mlppp:1.7.0.2
	is-mlppp-base:1.7
	phil-wifi-20200406:1.7
	ad-namecache-base3:1.7
	netbsd-9-0-RELEASE:1.6
	netbsd-9-0-RC2:1.6
	ad-namecache-base2:1.7
	ad-namecache-base1:1.6
	ad-namecache:1.6.0.6
	ad-namecache-base:1.6
	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
	isaki-audio2:1.6.0.2
	isaki-audio2-base:1.6
	pgoyette-compat-merge-20190127:1.1.2.4
	pgoyette-compat-20190127:1.6
	pgoyette-compat-20190118:1.6
	pgoyette-compat-1226:1.6
	pgoyette-compat-1126:1.6
	pgoyette-compat-1020:1.3
	pgoyette-compat-0930:1.1
	pgoyette-compat-0906:1.1
	pgoyette-compat-0728:1.1
	phil-wifi:1.1.0.4
	phil-wifi-base:1.1
	pgoyette-compat-0625:1.1
	pgoyette-compat-0521:1.1
	pgoyette-compat-0502:1.1
	pgoyette-compat-0422:1.1
	pgoyette-compat-0415:1.1
	pgoyette-compat:1.1.0.2
	pgoyette-compat-0407:1.1;
locks; strict;
comment	@# @;


1.12
date	2026.05.11.19.38.21;	author yurix;	state Exp;
branches;
next	1.11;
commitid	SMNdZemZvRwiSqFG;

1.11
date	2023.07.03.17.05.10;	author jakllsch;	state Exp;
branches;
next	1.10;
commitid	IxamebodaZhGxnvE;

1.10
date	2021.09.03.21.58.36;	author andvar;	state Exp;
branches
	1.10.4.1;
next	1.9;
commitid	xOW0iDI74ekgEy7D;

1.9
date	2021.03.21.09.00.55;	author skrll;	state Exp;
branches;
next	1.8;
commitid	vkzuuuVBySjRF9MC;

1.8
date	2020.08.14.16.18.37;	author skrll;	state Exp;
branches
	1.8.2.1
	1.8.4.1;
next	1.7;
commitid	30EziavyEy1h83kC;

1.7
date	2020.01.25.18.10.11;	author skrll;	state Exp;
branches;
next	1.6;
commitid	YmxsrjAn9yGOf6UB;

1.6
date	2018.11.14.11.02.52;	author jmcneill;	state Exp;
branches
	1.6.6.1;
next	1.5;
commitid	GD0yBLa5fGw8WTZA;

1.5
date	2018.11.10.19.35.19;	author martin;	state Exp;
branches;
next	1.4;
commitid	nKEVR3ayHRNKTqZA;

1.4
date	2018.11.10.16.19.58;	author martin;	state Exp;
branches;
next	1.3;
commitid	fsg0S4v6A3rOOpZA;

1.3
date	2018.10.18.09.01.54;	author skrll;	state Exp;
branches;
next	1.2;
commitid	0r6pPkie0NRL4qWA;

1.2
date	2018.10.08.10.22.17;	author skrll;	state Exp;
branches;
next	1.1;
commitid	lHfn2wpGiUvST8VA;

1.1
date	2018.04.01.04.35.04;	author ryo;	state Exp;
branches
	1.1.2.1
	1.1.4.1;
next	;
commitid	Rbo0y8tEIcKr5HwA;

1.10.4.1
date	2023.07.07.19.00.24;	author martin;	state Exp;
branches;
next	;
commitid	kEvgR3ah1qIZ3UvE;

1.8.2.1
date	2021.04.03.22.28.22;	author thorpej;	state Exp;
branches;
next	;
commitid	1gqS07EfPjskJTNC;

1.8.4.1
date	2021.04.03.21.44.42;	author thorpej;	state Exp;
branches;
next	;
commitid	KB7Cr288FrZluTNC;

1.6.6.1
date	2020.01.25.22.38.39;	author ad;	state Exp;
branches;
next	;
commitid	ethRERRmx7bMJ7UB;

1.1.2.1
date	2018.04.01.04.35.04;	author pgoyette;	state dead;
branches;
next	1.1.2.2;
commitid	ZMkKSYuBapz7LsxA;

1.1.2.2
date	2018.04.07.04.12.12;	author pgoyette;	state Exp;
branches;
next	1.1.2.3;
commitid	ZMkKSYuBapz7LsxA;

1.1.2.3
date	2018.10.20.06.58.27;	author pgoyette;	state Exp;
branches;
next	1.1.2.4;
commitid	mTSoqZEZ4arHnFWA;

1.1.2.4
date	2018.11.26.01.52.21;	author pgoyette;	state Exp;
branches;
next	;
commitid	Zj4q5SspGdKXto1B;

1.1.4.1
date	2019.06.10.22.06.05;	author christos;	state Exp;
branches;
next	1.1.4.2;
commitid	jtc8rnCzWiEEHGqB;

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


desc
@@


1.12
log
@arm/generic: use generic setstatclockrate

This allows us to get rid of the weak symbol hack in a9tmr since GENERIC is the only configuration with both a9tmr and gtmr active in one configuration. Configurations without __HAVE_GENERIC_SETSTATCLOCKRATE still get a setstatclockrate from the ifdef.
@
text
@#	$NetBSD: std.generic,v 1.11 2023/07/03 17:05:10 jakllsch Exp $
#
# 	generic NetBSD/evbarm with FDT support

machine		evbarm arm
include		"conf/std"
include		"arch/arm/conf/std.arm"		# arch standard options

options 	EXEC_ELF32
options 	EXEC_SCRIPT

# Architecture options
options 	ARM32

options 	ARM_GENERIC_TODR
options 	ARM_HAS_VBAR
options 	ARM_INTR_IMPL="<arch/arm/fdt/fdt_intr.h>"
options 	DRAM_BLOCKS=256
options 	EVBARM_BOARDTYPE="evbarm"
options 	FDT				# Flattened Device Tree support
options 	FPU_VFP
options 	MODULAR
options 	MODULAR_DEFAULT_AUTOLOAD
options 	PCI_NETBSD_CONFIGURE
options 	TPIDRPRW_IS_CURLWP
options 	__BUS_SPACE_HAS_STREAM_METHODS
options 	__HAVE_CPU_COUNTER
options 	__HAVE_CPU_UAREA_ALLOC_IDLELWP
options 	__HAVE_FAST_SOFTINTS		# should be in types.h
options 	__HAVE_GENERIC_SETSTATCLOCKRATE
options 	__HAVE_GENERIC_START
options 	__HAVE_GENERIC_CPU_INITCLOCKS
options 	__HAVE_PCI_CONF_HOOK
options 	__HAVE_PCI_MSI_MSIX

makeoptions	BOARDMKFRAG="${THISARM}/conf/mk.generic"

# initrd support
options 	MEMORY_DISK_HOOKS
options 	MEMORY_DISK_DYNAMIC
pseudo-device 	md

# Prevent the addition of a command line -DKERNEL_BASE_VOFFSET= as it
# is done at runtime.
makeoptions	KERNEL_VOFFSET_RUNTIME=1

# The physical address is chosen by u-boot and determined by armv6_start.S.
# The 64 byte offset is due to u-boot header.
makeoptions	KERNEL_BASE_PHYS="0x00000040"
makeoptions	KERNEL_BASE_VIRT="0x80000040"

# General options
options 	CHILD_MAX=1024	# 160 is too few
options 	OPEN_MAX=1024	# 128 is too few
@


1.11
log
@Enable MEMORY_DISK_DYNAMIC & co. to match std.generic64

Allows loading of ramdisk.fs via u-boot initrd (to run sysinst)
@
text
@d1 1
a1 1
#	$NetBSD: std.generic,v 1.10 2021/09/03 21:58:36 andvar Exp $
d30 1
@


1.10
log
@s/opions/options/
@
text
@d1 1
a1 1
#	$NetBSD: std.generic,v 1.9 2021/03/21 09:00:55 skrll Exp $
d37 5
@


1.10.4.1
log
@Pull up following revision(s) (requested by jakllsch in ticket #227):

	sys/arch/evbarm/conf/std.generic: revision 1.11

Enable MEMORY_DISK_DYNAMIC & co. to match std.generic64

Allows loading of ramdisk.fs via u-boot initrd (to run sysinst)
@
text
@d1 1
a1 1
#	$NetBSD: std.generic,v 1.10 2021/09/03 21:58:36 andvar Exp $
a36 5
# initrd support
options 	MEMORY_DISK_HOOKS
options 	MEMORY_DISK_DYNAMIC
pseudo-device 	md

@


1.9
log
@-DKERNEL_BASE_VOFFSET= has annoyed me for the last time...

Introduce KERNEL_VOFFSET_RUNTIME which prevents the addition of
-DKERNEL_BASE_VOFFSET= to the command line and use it on the
__HAVE_GENERIC_START kernels which do runtime calculation of the
offset.
@
text
@d1 1
a1 1
#	$NetBSD: std.generic,v 1.8 2020/08/14 16:18:37 skrll Exp $
d12 1
a12 1
# Architecture opions
@


1.8
log
@Mirror the changes to aarch64 and

- Switch to TPIDRPRW_IS_CURLWP, because curlwp is accessed much more often
  by MI code.  It also makes curlwp preemption safe,

- Make ASTs operate per-LWP rather than per-CPU, otherwise sometimes LWPs
  can see spurious ASTs (which doesn't cause a problem, it just means some
  time may be wasted).

- Make sure ASTs are always set on the same CPU as the target LWP, and
  delivered via IPI if posted from a remote CPU so that they are resolved
  quickly.

- Add some cache line padding to struct cpu_info.

- Add a memory barrier in a couple of places where ci_curlwp is set.  This
  is needed whenever an LWP that is resuming on the CPU could hold an
  adaptive mutex.  The barrier needs to drain the CPU's store buffer, so
  that the update to ci_curlwp becomes globally visible before the LWP can
  resume and call mutex_exit().
@
text
@d1 1
a1 1
#	$NetBSD: std.generic,v 1.7 2020/01/25 18:10:11 skrll Exp $
d37 4
@


1.8.2.1
log
@Sync with HEAD.
@
text
@d1 1
a1 1
#	$NetBSD: std.generic,v 1.9 2021/03/21 09:00:55 skrll Exp $
a36 4
# Prevent the addition of a command line -DKERNEL_BASE_VOFFSET= as it
# is done at runtime.
makeoptions	KERNEL_VOFFSET_RUNTIME=1

@


1.8.4.1
log
@Sync with HEAD.
@
text
@d1 1
a1 1
#	$NetBSD: std.generic,v 1.9 2021/03/21 09:00:55 skrll Exp $
a36 4
# Prevent the addition of a command line -DKERNEL_BASE_VOFFSET= as it
# is done at runtime.
makeoptions	KERNEL_VOFFSET_RUNTIME=1

@


1.7
log
@Sort
@
text
@d1 1
a1 1
#	$NetBSD: std.generic,v 1.6 2018/11/14 11:02:52 jmcneill Exp $
d25 1
a25 1
options 	TPIDRPRW_IS_CURCPU
@


1.6
log
@Define __HAVE_PCI_MSI_MSIX
@
text
@d1 1
a1 1
#	$NetBSD: std.generic,v 1.5 2018/11/10 19:35:19 martin Exp $
d29 1
a31 1
options 	__HAVE_FAST_SOFTINTS		# should be in types.h
@


1.6.6.1
log
@Sync with head.
@
text
@d1 1
a1 1
#	$NetBSD: std.generic,v 1.7 2020/01/25 18:10:11 skrll Exp $
a28 1
options 	__HAVE_FAST_SOFTINTS		# should be in types.h
d31 1
@


1.5
log
@Revert previous - not needed here, I got lost in the include maze
@
text
@d1 1
a1 1
#	$NetBSD: std.generic,v 1.4 2018/11/10 16:19:58 martin Exp $
d33 1
@


1.4
log
@Add options NTP and enable clockctl.
@
text
@d1 1
a1 1
#	$NetBSD: std.generic,v 1.3 2018/10/18 09:01:54 skrll Exp $
a43 3

options 	NTP		# NTP phase/frequency locked loop

@


1.3
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: std.generic,v 1.2 2018/10/08 10:22:17 skrll Exp $
d44 3
@


1.2
log
@Sort options.

No functional change.
@
text
@d1 1
a1 1
#	$NetBSD: std.generic,v 1.1 2018/04/01 04:35:04 ryo Exp $
d9 3
d14 1
d29 2
d36 5
@


1.1
log
@Add initial support for ARMv8 (AARCH64) (by nisimura@@ and ryo@@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@@, jmcneill@@)
@
text
@d1 1
a1 1
#	$NetBSD$
d11 1
a11 6

options 	__BUS_SPACE_HAS_STREAM_METHODS
options 	__HAVE_CPU_COUNTER
options 	__HAVE_CPU_UAREA_ALLOC_IDLELWP
options 	__HAVE_FAST_SOFTINTS		# should be in types.h
options 	__HAVE_PCI_CONF_HOOK
a13 1
options 	ARM_GENERIC_TODR
d22 6
a32 1

@


1.1.4.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: std.generic,v 1.6 2018/11/14 11:02:52 jmcneill Exp $
a8 3
options 	EXEC_ELF32
options 	EXEC_SCRIPT

d12 5
a16 1
options 	ARM_GENERIC_TODR
d19 1
a27 9
options 	__BUS_SPACE_HAS_STREAM_METHODS
options 	__HAVE_CPU_COUNTER
options 	__HAVE_CPU_UAREA_ALLOC_IDLELWP
options 	__HAVE_GENERIC_START
options 	__HAVE_GENERIC_CPU_INITCLOCKS
options 	__HAVE_FAST_SOFTINTS		# should be in types.h
options 	__HAVE_PCI_CONF_HOOK
options 	__HAVE_PCI_MSI_MSIX

a29 5
# The physical address is chosen by u-boot and determined by armv6_start.S.
# The 64 byte offset is due to u-boot header.
makeoptions	KERNEL_BASE_PHYS="0x00000040"
makeoptions	KERNEL_BASE_VIRT="0x80000040"

d33 1
@


1.1.4.2
log
@Merge changes from current as of 20200406
@
text
@d1 1
a1 1
#	$NetBSD$
a28 1
options 	__HAVE_FAST_SOFTINTS		# should be in types.h
d31 1
@


1.1.2.1
log
@file std.generic was added on branch pgoyette-compat on 2018-04-07 04:12:12 +0000
@
text
@d1 33
@


1.1.2.2
log
@Sync with HEAD.  77 conflicts resolved - all of them $NetBSD$
@
text
@a0 33
#	$NetBSD: std.generic,v 1.1 2018/04/01 04:35:04 ryo Exp $
#
# 	generic NetBSD/evbarm with FDT support

machine		evbarm arm
include		"conf/std"
include		"arch/arm/conf/std.arm"		# arch standard options

# Architecture opions
options 	ARM32

options 	__BUS_SPACE_HAS_STREAM_METHODS
options 	__HAVE_CPU_COUNTER
options 	__HAVE_CPU_UAREA_ALLOC_IDLELWP
options 	__HAVE_FAST_SOFTINTS		# should be in types.h
options 	__HAVE_PCI_CONF_HOOK
options 	ARM_HAS_VBAR
options 	ARM_INTR_IMPL="<arch/arm/fdt/fdt_intr.h>"
options 	ARM_GENERIC_TODR
options 	DRAM_BLOCKS=256
options 	EVBARM_BOARDTYPE="evbarm"
options 	FDT				# Flattened Device Tree support
options 	FPU_VFP
options 	MODULAR
options 	MODULAR_DEFAULT_AUTOLOAD
options 	PCI_NETBSD_CONFIGURE
options 	TPIDRPRW_IS_CURCPU
makeoptions	BOARDMKFRAG="${THISARM}/conf/mk.generic"

# General options
options 	CHILD_MAX=1024	# 160 is too few
options 	OPEN_MAX=1024	# 128 is too few

@


1.1.2.3
log
@Sync with head
@
text
@d1 1
a1 1
#	$NetBSD: std.generic,v 1.3 2018/10/18 09:01:54 skrll Exp $
a8 3
options 	EXEC_ELF32
options 	EXEC_SCRIPT

d12 5
a16 1
options 	ARM_GENERIC_TODR
d19 1
a27 8
options 	__BUS_SPACE_HAS_STREAM_METHODS
options 	__HAVE_CPU_COUNTER
options 	__HAVE_CPU_UAREA_ALLOC_IDLELWP
options 	__HAVE_GENERIC_START
options 	__HAVE_GENERIC_CPU_INITCLOCKS
options 	__HAVE_FAST_SOFTINTS		# should be in types.h
options 	__HAVE_PCI_CONF_HOOK

a29 5
# The physical address is chosen by u-boot and determined by armv6_start.S.
# The 64 byte offset is due to u-boot header.
makeoptions	KERNEL_BASE_PHYS="0x00000040"
makeoptions	KERNEL_BASE_VIRT="0x80000040"

d33 1
@


1.1.2.4
log
@Sync with HEAD, resolve a couple of conflicts
@
text
@d1 1
a1 1
#	$NetBSD: std.generic,v 1.6 2018/11/14 11:02:52 jmcneill Exp $
a32 1
options 	__HAVE_PCI_MSI_MSIX
@


