Index: arm64/broadcom/bcm2835/files.bcm2837 =================================================================== --- arm64/broadcom/bcm2835/files.bcm2837 (nonexistent) +++ arm64/broadcom/bcm2835/files.bcm2837 (working copy) @@ -0,0 +1,22 @@ +arm/broadcom/bcm2835/bcm2835_bsc.c optional bcm2835_bsc +arm/broadcom/bcm2835/bcm2835_common.c optional fdt +arm/broadcom/bcm2835/bcm2835_cpufreq.c standard +arm/broadcom/bcm2835/bcm2835_dma.c standard +arm/broadcom/bcm2835/bcm2835_fb.c optional sc +arm/broadcom/bcm2835/bcm2835_fbd.c optional vt +arm/broadcom/bcm2835/bcm2835_gpio.c optional gpio +arm/broadcom/bcm2835/bcm2835_intr.c standard +#arm/broadcom/bcm2835/bcm2835_machdep.c standard +arm/broadcom/bcm2835/bcm2835_mbox.c standard +arm/broadcom/bcm2835/bcm2835_rng.c optional random +arm/broadcom/bcm2835/bcm2835_sdhci.c optional sdhci +arm/broadcom/bcm2835/bcm2835_spi.c optional bcm2835_spi +#arm/broadcom/bcm2835/bcm2835_systimer.c standard +arm/broadcom/bcm2835/bcm2835_vcio.c standard +arm/broadcom/bcm2835/bcm2835_wdog.c standard +arm/broadcom/bcm2835/bcm283x_dwc_fdt.c optional dwcotg fdt +arm/broadcom/bcm2835/bcm2836.c standard + +kern/kern_clocksource.c standard +# arm/arm/platform_if.m standard +dev/mbox/mbox_if.m standard Index: arm64/broadcom/bcm2835/std.bcm2837 =================================================================== --- arm64/broadcom/bcm2835/std.bcm2837 (nonexistent) +++ arm64/broadcom/bcm2835/std.bcm2837 (working copy) @@ -0,0 +1,10 @@ +# $FreeBSD: head/sys/arm/broadcom/bcm2835/std.bcm2836 295885 2016-02-22 11:47:28Z skra $ + +#machine arm64 +#cpu CPU_CORTEXA +#makeoptions CONF_CFLAGS="-march=armv8" +options SOC_BCM2837 + +#options IPI_IRQ_START=76 + +files "../broadcom/bcm2835/files.bcm2837" Index: arm64/conf/RPI3 =================================================================== --- arm64/conf/RPI3 (nonexistent) +++ arm64/conf/RPI3 (working copy) @@ -0,0 +1,147 @@ +# +# +# RPI3 -- Custom configuration for the Raspberry Pi 3 +# +# 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: head/sys/arm64/conf/RPI3 $ + +ident RPI3 +cpu ARM64 + +#include "std.armv7" +include "../broadcom/bcm2835/std.bcm2837" + +options INTRNG + +#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +#makeoptions WITH_CTF=1 # Run ctfconvert(1) for DTrace support + +options SCHED_ULE # ULE scheduler +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options IPSEC # IP (v4/v6) security +options SCTP # Stream Control Transmission Protocol +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +#options QUOTA # Enable disk quotas for UFS +options MD_ROOT # MD is a potential root device +options NFSCL # Network Filesystem Client +#options NFSD # Network Filesystem Server +#options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options GEOM_PART_GPT # GUID Partition Tables. +options GEOM_RAID # Soft RAID functionality. +options GEOM_LABEL # Provides labelization +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) support +options STACK # stack(9) support +options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) +options VFP # Floating-point support + +options ROOTDEVNAME=\"ufs:mmcsd0s2\" +#options SMP + +# Debugging support. Always need this: +options KDB # Enable kernel debugger support. +options KDB_TRACE # Print a stack trace for a panic. +# For full debugger support use (turn off in stable branch): +options DDB # Support DDB. +options DEADLKRES # Enable the deadlock resolver +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +options WITNESS # Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones + +# SPI +device spibus +device bcm2835_spi + +# MMC/SD/SDIO Card slot support +# this does not build on RPI3 (64 bit vs. 32 bit problem) +# device sdhci +device mmc # mmc/sd bus +device mmcsd # mmc/sd flash cards + +# Serial (COM) ports +device uart # Generic UART driver +device uart_ns8250 # ns8250-type UART driver +device pl011 + +# USB support +options USB_DEBUG # enable debug msgs +device usb # USB Bus (required) +device dwcotg # DWC OTG controller + +# USB storage support +device scbus +device da +device umass + +# USB ethernet support +device smcphy +device mii +device smsc + +# Comment following lines for boot console on serial port +device vt +device kbdmux +device ukbd # Keyboard + +# GPIO +device gpio +device fdt_pinctrl + +# I2C +device iicbus +device bcm2835_bsc + +# Interrupt controllers + +# Pseudo devices. +device bpf +device loop # Network loopback +device random # Entropy device +device ether # Ethernet support +device vlan # 802.1Q VLAN support +device tun # Packet tunnel. +device md # Memory "disks" +device gif # IPv6 and IPv4 tunneling +device firmware # firmware assist module +device psci # Support for ARM PSCI + +# EXT_RESOURCES pseudo devices +options EXT_RESOURCES +device clk +device phy +device hwreset +#device regulator + +options FDT + +# The crypto framework is required by IPSEC +device crypto # Required by IPSEC +makeoptions MODULES_OVERRIDE="" Index: arm64/include/vm.h =================================================================== --- arm64/include/vm.h (revision 307001) +++ arm64/include/vm.h (working copy) @@ -35,5 +35,9 @@ #define VM_MEMATTR_WRITE_BACK 2 #define VM_MEMATTR_DEFAULT VM_MEMATTR_WRITE_BACK +#ifdef _KERNEL +/* Don't export aliased VM_MEMATTR to userland */ +#define VM_MEMATTR_WRITE_COMBINING VM_MEMATTR_UNCACHEABLE /* for DRM */ +#endif #endif /* !_MACHINE_VM_H_ */ Index: arm/broadcom/bcm2835/bcm2835_vcbus.h =================================================================== --- arm/broadcom/bcm2835/bcm2835_vcbus.h (revision 307001) +++ arm/broadcom/bcm2835/bcm2835_vcbus.h (working copy) @@ -37,7 +37,7 @@ #define BCM2835_VCBUS_IO_BASE 0x7E000000 #define BCM2835_VCBUS_SDRAM_UNCACHED 0xC0000000 -#ifdef SOC_BCM2836 +#if defined(SOC_BCM2836) || defined(SOC_BCM2837) #define BCM2835_ARM_IO_BASE 0x3f000000 #define BCM2835_VCBUS_SDRAM_BASE BCM2835_VCBUS_SDRAM_UNCACHED #else Index: conf/options.arm64 =================================================================== --- conf/options.arm64 (revision 307001) +++ conf/options.arm64 (working copy) @@ -9,5 +9,6 @@ # SoC Support SOC_ALLWINNER_A64 opt_soc.h +SOC_BCM2837 opt_global.h SOC_CAVM_THUNDERX opt_soc.h SOC_HISI_HI6220 opt_soc.h