Index: head/sys/arm/annapurna/alpine/alpine_common.c
===================================================================
--- head/sys/arm/annapurna/alpine/alpine_common.c (revision 320642)
+++ head/sys/arm/annapurna/alpine/alpine_common.c (revision 320643)
@@ -1,159 +1,72 @@
/*-
* Copyright (c) 2013 Ruslan Bukin
* Copyright (c) 2015 Semihalf.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*/
#include
__FBSDID("$FreeBSD$");
#include "opt_platform.h"
#include
#include
#include
#include
#include
#include
#include
#include
#include
-#define WDTLOAD 0x000
-#define LOAD_MIN 0x00000001
-#define LOAD_MAX 0xFFFFFFFF
-#define WDTVALUE 0x004
-#define WDTCONTROL 0x008
-/* control register masks */
-#define INT_ENABLE (1 << 0)
-#define RESET_ENABLE (1 << 1)
-#define WDTLOCK 0xC00
-#define UNLOCK 0x1ACCE551
-#define LOCK 0x00000001
-
-extern bus_addr_t al_devmap_pa;
-
-static int alpine_get_wdt_base(uint32_t *pbase, uint32_t *psize);
+#ifndef INTRNG
static int alpine_pic_decode_fdt(uint32_t iparent, uint32_t *intr,
int *interrupt, int *trig, int *pol);
-int alpine_get_devmap_base(bus_addr_t *pa, bus_addr_t *size);
-
-int alpine_get_devmap_base(bus_addr_t *pa, bus_addr_t *size)
-{
- phandle_t node;
-
- if ((node = OF_finddevice("/")) == 0)
- return (ENXIO);
-
- if ((node = fdt_find_compatible(node, "simple-bus", 1)) == 0)
- return (ENXIO);
-
- return fdt_get_range(node, 0, pa, size);
-}
-
-static int
-alpine_get_wdt_base(uint32_t *pbase, uint32_t *psize)
-{
- phandle_t node;
- u_long base = 0;
- u_long size = 0;
-
- if (pbase == NULL || psize == NULL)
- return (EINVAL);
-
- if ((node = OF_finddevice("/")) == -1)
- return (EFAULT);
-
- if ((node = fdt_find_compatible(node, "simple-bus", 1)) == 0)
- return (EFAULT);
-
- if ((node =
- fdt_find_compatible(node, "arm,sp805", 1)) == 0)
- return (EFAULT);
-
- if (fdt_regsize(node, &base, &size))
- return (EFAULT);
-
- *pbase = base;
- *psize = size;
-
- return (0);
-}
-
-void
-cpu_reset(void)
-{
- uint32_t wdbase, wdsize;
- bus_addr_t wdbaddr;
- int ret;
-
- ret = alpine_get_wdt_base(&wdbase, &wdsize);
- if (ret) {
- printf("Unable to get WDT base, do power down manually...");
- goto infinite;
- }
-
- ret = bus_space_map(fdtbus_bs_tag, al_devmap_pa + wdbase,
- wdsize, 0, &wdbaddr);
- if (ret) {
- printf("Unable to map WDT base, do power down manually...");
- goto infinite;
- }
-
- bus_space_write_4(fdtbus_bs_tag, wdbaddr, WDTLOCK, UNLOCK);
- bus_space_write_4(fdtbus_bs_tag, wdbaddr, WDTLOAD, LOAD_MIN);
- bus_space_write_4(fdtbus_bs_tag, wdbaddr, WDTCONTROL, INT_ENABLE | RESET_ENABLE);
-
-infinite:
- while (1) {}
-}
-
-#ifndef INTRNG
static int
alpine_pic_decode_fdt(uint32_t iparent, uint32_t *intr, int *interrupt,
int *trig, int *pol)
{
int rv = 0;
rv = gic_decode_fdt(iparent, intr, interrupt, trig, pol);
if (rv == 0) {
/* This was recognized as our PIC and decoded. */
interrupt = FDT_MAP_IRQ(iparent, interrupt);
/* Configure the interrupt if callback provided */
if (arm_config_irq)
(*arm_config_irq)(*interrupt, *trig, *pol);
}
return (rv);
}
fdt_pic_decode_t fdt_pic_table[] = {
&alpine_pic_decode_fdt,
NULL
};
#endif
Index: head/sys/arm/annapurna/alpine/alpine_machdep.c
===================================================================
--- head/sys/arm/annapurna/alpine/alpine_machdep.c (revision 320642)
+++ head/sys/arm/annapurna/alpine/alpine_machdep.c (revision 320643)
@@ -1,91 +1,162 @@
/*-
* Copyright (c) 2013 Ruslan Bukin
* Copyright (c) 2015 Semihalf
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*/
+#include "opt_ddb.h"
+#include "opt_platform.h"
+
#include
__FBSDID("$FreeBSD$");
#include
#include
#include
-#include
-#include
#include
#include
#include
#include
-#include /* For trapframe_t, used in */
-#include
-#include
#include
+#include
-#include "opt_ddb.h"
-#include "opt_platform.h"
+#include
+#include
-#define DEVMAP_MAX_VA_ADDRESS 0xF0000000
+#include
+
+#include "platform_if.h"
+
+#define WDTLOAD 0x000
+#define LOAD_MIN 0x00000001
+#define LOAD_MAX 0xFFFFFFFF
+#define WDTVALUE 0x004
+#define WDTCONTROL 0x008
+/* control register masks */
+#define INT_ENABLE (1 << 0)
+#define RESET_ENABLE (1 << 1)
+#define WDTLOCK 0xC00
+#define UNLOCK 0x1ACCE551
+#define LOCK 0x00000001
+
bus_addr_t al_devmap_pa;
bus_addr_t al_devmap_size;
-int alpine_get_devmap_base(bus_addr_t *pa, bus_addr_t *size);
-
-vm_offset_t
-platform_lastaddr(void)
+static int
+alpine_get_devmap_base(bus_addr_t *pa, bus_addr_t *size)
{
+ phandle_t node;
- return (DEVMAP_MAX_VA_ADDRESS);
-}
+ if ((node = OF_finddevice("/")) == 0)
+ return (ENXIO);
-void
-platform_probe_and_attach(void)
-{
+ if ((node = fdt_find_compatible(node, "simple-bus", 1)) == 0)
+ return (ENXIO);
+ return fdt_get_range(node, 0, pa, size);
}
-void
-platform_gpio_init(void)
+static int
+alpine_get_wdt_base(uint32_t *pbase, uint32_t *psize)
{
+ phandle_t node;
+ u_long base = 0;
+ u_long size = 0;
-}
+ if (pbase == NULL || psize == NULL)
+ return (EINVAL);
-void
-platform_late_init(void)
-{
+ if ((node = OF_finddevice("/")) == -1)
+ return (EFAULT);
+ if ((node = fdt_find_compatible(node, "simple-bus", 1)) == 0)
+ return (EFAULT);
+
+ if ((node =
+ fdt_find_compatible(node, "arm,sp805", 1)) == 0)
+ return (EFAULT);
+
+ if (fdt_regsize(node, &base, &size))
+ return (EFAULT);
+
+ *pbase = base;
+ *psize = size;
+
+ return (0);
}
/*
* Construct devmap table with DT-derived config data.
*/
-int
-platform_devmap_init(void)
+static int
+alpine_devmap_init(platform_t plat)
{
alpine_get_devmap_base(&al_devmap_pa, &al_devmap_size);
devmap_add_entry(al_devmap_pa, al_devmap_size);
return (0);
}
+
+static void
+alpine_cpu_reset(platform_t plat)
+{
+ uint32_t wdbase, wdsize;
+ bus_addr_t wdbaddr;
+ int ret;
+
+ ret = alpine_get_wdt_base(&wdbase, &wdsize);
+ if (ret) {
+ printf("Unable to get WDT base, do power down manually...");
+ goto infinite;
+ }
+
+ ret = bus_space_map(fdtbus_bs_tag, al_devmap_pa + wdbase,
+ wdsize, 0, &wdbaddr);
+ if (ret) {
+ printf("Unable to map WDT base, do power down manually...");
+ goto infinite;
+ }
+
+ bus_space_write_4(fdtbus_bs_tag, wdbaddr, WDTLOCK, UNLOCK);
+ bus_space_write_4(fdtbus_bs_tag, wdbaddr, WDTLOAD, LOAD_MIN);
+ bus_space_write_4(fdtbus_bs_tag, wdbaddr, WDTCONTROL,
+ INT_ENABLE | RESET_ENABLE);
+
+infinite:
+ while (1) {}
+}
+
+static platform_method_t alpine_methods[] = {
+ PLATFORMMETHOD(platform_devmap_init, alpine_devmap_init),
+ PLATFORMMETHOD(platform_cpu_reset, alpine_cpu_reset),
+
+#ifdef SMP
+ PLATFORMMETHOD(platform_mp_start_ap, alpine_mp_start_ap),
+ PLATFORMMETHOD(platform_mp_setmaxid, alpine_mp_setmaxid),
+#endif
+ PLATFORMMETHOD_END,
+};
+FDT_PLATFORM_DEF(alpine, "alpine", 0, "annapurna,alpine", 200);
Index: head/sys/arm/annapurna/alpine/alpine_machdep_mp.c
===================================================================
--- head/sys/arm/annapurna/alpine/alpine_machdep_mp.c (revision 320642)
+++ head/sys/arm/annapurna/alpine/alpine_machdep_mp.c (revision 320643)
@@ -1,249 +1,252 @@
/*-
* Copyright (c) 2013 Ruslan Bukin
* Copyright (c) 2015 Semihalf
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*/
#include
__FBSDID("$FreeBSD$");
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
+#include
#include
#include
#include
#include
+#include
+
#define AL_CPU_RESUME_WATERMARK_REG 0x00
#define AL_CPU_RESUME_FLAGS_REG 0x04
#define AL_CPU_RESUME_PCPU_RADDR_REG(cpu) (0x08 + 0x04 + 8*(cpu))
#define AL_CPU_RESUME_PCPU_FLAGS(cpu) (0x08 + 8*(cpu))
/* Per-CPU flags */
#define AL_CPU_RESUME_FLG_PERCPU_DONT_RESUME (1 << 2)
/* The expected magic number for validating the resume addresses */
#define AL_CPU_RESUME_MAGIC_NUM 0xf0e1d200
#define AL_CPU_RESUME_MAGIC_NUM_MASK 0xffffff00
/* The expected minimal version number for validating the capabilities */
#define AL_CPU_RESUME_MIN_VER 0x000000c3
#define AL_CPU_RESUME_MIN_VER_MASK 0x000000ff
/* Field controlling the boot-up of companion cores */
#define AL_NB_INIT_CONTROL (0x8)
#define AL_NB_CONFIG_STATUS_PWR_CTRL(cpu) (0x2020 + (cpu)*0x100)
extern bus_addr_t al_devmap_pa;
extern bus_addr_t al_devmap_size;
extern void mpentry(void);
static int platform_mp_get_core_cnt(void);
static int alpine_get_cpu_resume_base(u_long *pbase, u_long *psize);
static int alpine_get_nb_base(u_long *pbase, u_long *psize);
static boolean_t alpine_validate_cpu(u_int, phandle_t, u_int, pcell_t *);
static boolean_t
alpine_validate_cpu(u_int id, phandle_t child, u_int addr_cell, pcell_t *reg)
{
return ofw_bus_node_is_compatible(child, "arm,cortex-a15");
}
static int
platform_mp_get_core_cnt(void)
{
static int ncores = 0;
int nchilds;
uint32_t reg;
/* Calculate ncores value only once */
if (ncores)
return (ncores);
reg = cp15_l2ctlr_get();
ncores = CPUV7_L2CTLR_NPROC(reg);
nchilds = ofw_cpu_early_foreach(alpine_validate_cpu, false);
/* Limit CPUs if DTS has configured less than available */
if ((nchilds > 0) && (nchilds < ncores)) {
printf("SMP: limiting number of active CPUs to %d out of %d\n",
nchilds, ncores);
ncores = nchilds;
}
return (ncores);
}
void
-platform_mp_setmaxid(void)
+alpine_mp_setmaxid(platform_t plat)
{
mp_ncpus = platform_mp_get_core_cnt();
mp_maxid = mp_ncpus - 1;
}
static int
alpine_get_cpu_resume_base(u_long *pbase, u_long *psize)
{
phandle_t node;
u_long base = 0;
u_long size = 0;
if (pbase == NULL || psize == NULL)
return (EINVAL);
if ((node = OF_finddevice("/")) == -1)
return (EFAULT);
if ((node =
ofw_bus_find_compatible(node, "annapurna-labs,al-cpu-resume")) == 0)
return (EFAULT);
if (fdt_regsize(node, &base, &size))
return (EFAULT);
*pbase = base;
*psize = size;
return (0);
}
static int
alpine_get_nb_base(u_long *pbase, u_long *psize)
{
phandle_t node;
u_long base = 0;
u_long size = 0;
if (pbase == NULL || psize == NULL)
return (EINVAL);
if ((node = OF_finddevice("/")) == -1)
return (EFAULT);
if ((node =
ofw_bus_find_compatible(node, "annapurna-labs,al-nb-service")) == 0)
return (EFAULT);
if (fdt_regsize(node, &base, &size))
return (EFAULT);
*pbase = base;
*psize = size;
return (0);
}
void
-platform_mp_start_ap(void)
+alpine_mp_start_ap(platform_t plat)
{
uint32_t physaddr;
vm_offset_t vaddr;
uint32_t val;
uint32_t start_mask;
u_long cpu_resume_base;
u_long nb_base;
u_long cpu_resume_size;
u_long nb_size;
bus_addr_t cpu_resume_baddr;
bus_addr_t nb_baddr;
int a;
if (alpine_get_cpu_resume_base(&cpu_resume_base, &cpu_resume_size))
panic("Couldn't resolve cpu_resume_base address\n");
if (alpine_get_nb_base(&nb_base, &nb_size))
panic("Couldn't resolve_nb_base address\n");
/* Proceed with start addresses for additional CPUs */
if (bus_space_map(fdtbus_bs_tag, al_devmap_pa + cpu_resume_base,
cpu_resume_size, 0, &cpu_resume_baddr))
panic("Couldn't map CPU-resume area");
if (bus_space_map(fdtbus_bs_tag, al_devmap_pa + nb_base,
nb_size, 0, &nb_baddr))
panic("Couldn't map NB-service area");
/* Proceed with start addresses for additional CPUs */
val = bus_space_read_4(fdtbus_bs_tag, cpu_resume_baddr,
AL_CPU_RESUME_WATERMARK_REG);
if (((val & AL_CPU_RESUME_MAGIC_NUM_MASK) != AL_CPU_RESUME_MAGIC_NUM) ||
((val & AL_CPU_RESUME_MIN_VER_MASK) < AL_CPU_RESUME_MIN_VER)) {
panic("CPU-resume device is not compatible");
}
vaddr = (vm_offset_t)mpentry;
physaddr = pmap_kextract(vaddr);
for (a = 1; a < platform_mp_get_core_cnt(); a++) {
/* Power up the core */
bus_space_write_4(fdtbus_bs_tag, nb_baddr,
AL_NB_CONFIG_STATUS_PWR_CTRL(a), 0);
mb();
/* Enable resume */
val = bus_space_read_4(fdtbus_bs_tag, cpu_resume_baddr,
AL_CPU_RESUME_PCPU_FLAGS(a));
val &= ~AL_CPU_RESUME_FLG_PERCPU_DONT_RESUME;
bus_space_write_4(fdtbus_bs_tag, cpu_resume_baddr,
AL_CPU_RESUME_PCPU_FLAGS(a), val);
mb();
/* Set resume physical address */
bus_space_write_4(fdtbus_bs_tag, cpu_resume_baddr,
AL_CPU_RESUME_PCPU_RADDR_REG(a), physaddr);
mb();
}
/* Release cores from reset */
if (bus_space_map(fdtbus_bs_tag, al_devmap_pa + nb_base,
nb_size, 0, &nb_baddr))
panic("Couldn't map NB-service area");
start_mask = (1 << platform_mp_get_core_cnt()) - 1;
/* Release cores from reset */
val = bus_space_read_4(fdtbus_bs_tag, nb_baddr, AL_NB_INIT_CONTROL);
val |= start_mask;
bus_space_write_4(fdtbus_bs_tag, nb_baddr, AL_NB_INIT_CONTROL, val);
dsb();
bus_space_unmap(fdtbus_bs_tag, nb_baddr, nb_size);
bus_space_unmap(fdtbus_bs_tag, cpu_resume_baddr, cpu_resume_size);
}
Index: head/sys/arm/annapurna/alpine/alpine_mp.h
===================================================================
--- head/sys/arm/annapurna/alpine/alpine_mp.h (nonexistent)
+++ head/sys/arm/annapurna/alpine/alpine_mp.h (revision 320643)
@@ -0,0 +1,35 @@
+/*-
+ * Copyright (c) 2017 Andrew Turner
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _ANNAPURNA_ALPINE_MP_H_
+#define _ANNAPURNA_ALPINE_MP_H_
+
+void alpine_mp_start_ap(platform_t plat);
+void alpine_mp_setmaxid(platform_t plat);
+
+#endif /* _ANNAPURNA_ALPINE_MP_H_ */
Property changes on: head/sys/arm/annapurna/alpine/alpine_mp.h
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+FreeBSD=%H
\ No newline at end of property
Index: head/sys/arm/conf/ALPINE
===================================================================
--- head/sys/arm/conf/ALPINE (revision 320642)
+++ head/sys/arm/conf/ALPINE (revision 320643)
@@ -1,84 +1,86 @@
# Kernel configuration for Alpine Board.
#
# For more information on this file, please read the config(5) manual page,
# and/or the handbook section on Kernel Configuration Files:
#
# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
#
# The handbook is also available locally in /usr/share/doc/handbook
# if you've installed the doc distribution, otherwise always see the
# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
# latest information.
#
# An exhaustive list of options and more detailed explanations of the
# device lines is also present in the ../../conf/NOTES and NOTES files.
# If you are in doubt as to the purpose or necessity of a line, check first
# in NOTES.
#
# $FreeBSD$
ident ALPINE
include "std.armv6"
include "../annapurna/alpine/std.alpine"
makeoptions MODULES_OVERRIDE=""
makeoptions WERROR="-Werror"
options SCHED_4BSD # 4BSD scheduler
options SMP # Enable multiple cores
+options PLATFORM
+options PLATFORM_SMP
# Interrupt controller
device gic
options INTRNG
# Annapurna Alpine drivers
device al_ccu # Alpine Cache Coherency Unit
device al_nb_service # Alpine North Bridge Service
device al_iofic # I/O Fabric Interrupt Controller
device al_serdes # Serializer/Deserializer
device al_udma # Universal DMA
# Pseudo devices
device loop
device random
device pty
device md
device gpio
# ATA controllers
device ahci # AHCI-compatible SATA controllers
device ata # Legacy ATA/SATA controllers
# ATA/SCSI peripherals
device scbus # SCSI bus (required for ATA/SCSI)
device ch # SCSI media changers
device da # Direct Access (disks)
device sa # Sequential Access (tape etc)
device cd # CD
device pass # Passthrough device (direct ATA/SCSI access)
device ses # Enclosure Services (SES and SAF-TE)
#device ctl # CAM Target Layer
# Serial ports
device uart
# PCI/PCIE
device pci
device pci_host_generic
device al_pci # Annapurna Alpine PCI-E
# Ethernet
device ether
device mii
device bpf
device al_eth # Annapurna Alpine Ethernet NIC
options DEVICE_POLLING
# USB ethernet support, requires miibus
device miibus
#FDT
options FDT
options FDT_DTB_STATIC
makeoptions FDT_DTS_FILE=annapurna-alpine.dts