#       $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_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