svn commit: r353641 - head/sys/arm64/arm64

2019-10-16 Thread Andrew Turner
Author: andrew Date: Wed Oct 16 13:30:28 2019 New Revision: 353641 URL: https://svnweb.freebsd.org/changeset/base/353641 Log: Use tables to store the information to decode the arm64 ID registers. Arm updates these with each new architecture revision. To help keep them updated use a collec

Re: svn commit: r353640 - head/sys/kern

2019-10-23 Thread Andrew Turner
> On 22 Oct 2019, at 16:50, Alan Somers <mailto:asom...@freebsd.org>> wrote: > > On Wed, Oct 16, 2019 at 7:21 AM Andrew Turner <mailto:and...@freebsd.org>> wrote: > Author: andrew > Date: Wed Oct 16 13:21:01 2019 > New Revision: 353640 > URL: https://s

svn commit: r353920 - head/sys/arm64/arm64

2019-10-23 Thread Andrew Turner
Author: andrew Date: Wed Oct 23 13:21:15 2019 New Revision: 353920 URL: https://svnweb.freebsd.org/changeset/base/353920 Log: Stop enabling interrupts when reentering kdb on arm64 When we raise a data abort from the kernel we need to enable interrupts, however we shouldn't be doing this w

svn commit: r354070 - head/sys/arm64/arm64

2019-10-25 Thread Andrew Turner
Author: andrew Date: Fri Oct 25 14:30:27 2019 New Revision: 354070 URL: https://svnweb.freebsd.org/changeset/base/354070 Log: Make special register names lowercase so they don't conflict with future ID register macros. MFC after:2 weeks Sponsored by: DARPA, AFRL Modified: head/sy

svn commit: r354072 - head/sys/arm64/include

2019-10-25 Thread Andrew Turner
Author: andrew Date: Fri Oct 25 14:46:09 2019 New Revision: 354072 URL: https://svnweb.freebsd.org/changeset/base/354072 Log: Remove the arm4 ID register masks, they are not needed after r353641. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/include/armreg.h Modified: head/sys/arm6

svn commit: r354170 - in head/sys: arm64/arm64 arm64/include libkern

2019-10-30 Thread Andrew Turner
Author: andrew Date: Wed Oct 30 10:06:57 2019 New Revision: 354170 URL: https://svnweb.freebsd.org/changeset/base/354170 Log: Rename the macros to extract a single arm64 ID field. Because of the previous naming scheme the old ID_AA64PFR0_EL1 macro collided with a potential macro for the r

svn commit: r354171 - head/sys/arm64/arm64

2019-10-30 Thread Andrew Turner
Author: andrew Date: Wed Oct 30 10:13:14 2019 New Revision: 354171 URL: https://svnweb.freebsd.org/changeset/base/354171 Log: Add two files missed in r354170 Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/identcpu.c head/sys/arm64/arm64/machdep.c Modified: head/sys/arm64/arm

svn commit: r354173 - head/sys/crypto/armv8

2019-10-30 Thread Andrew Turner
Author: andrew Date: Wed Oct 30 10:41:10 2019 New Revision: 354173 URL: https://svnweb.freebsd.org/changeset/base/354173 Log: Fix the armv8 crypto driver after r354170. Sponsored by: DARPA, AFRL Modified: head/sys/crypto/armv8/armv8_crypto.c Modified: head/sys/crypto/armv8/armv8_crypto.

svn commit: r354174 - head/sys/arm64/arm64

2019-10-30 Thread Andrew Turner
Author: andrew Date: Wed Oct 30 10:42:52 2019 New Revision: 354174 URL: https://svnweb.freebsd.org/changeset/base/354174 Log: Use an array of handlers in the data and instruction aborts Previously we would call data_abort on all data and instruction aborts however this is incorrect for mo

svn commit: r354175 - in head/sys: arm64/arm64 arm64/include conf

2019-10-30 Thread Andrew Turner
Author: andrew Date: Wed Oct 30 10:51:24 2019 New Revision: 354175 URL: https://svnweb.freebsd.org/changeset/base/354175 Log: Update the debug monitor handling to work after userspace has started The debug monitor register state is now stored in a struct and updated when required. Current

svn commit: r354176 - head/sys/arm64/include

2019-10-30 Thread Andrew Turner
Author: andrew Date: Wed Oct 30 12:33:36 2019 New Revision: 354176 URL: https://svnweb.freebsd.org/changeset/base/354176 Log: Move the MRS instruction decode macros to armreg.h These instructions are used to access the registers described in armreg.h, and will be used in a future change t

svn commit: r354177 - in head/sys: arm64/arm64 dev/hwpmc

2019-10-30 Thread Andrew Turner
Author: andrew Date: Wed Oct 30 12:47:00 2019 New Revision: 354177 URL: https://svnweb.freebsd.org/changeset/base/354177 Log: Use a lowercase name for arm64 special registers so they don't conflict with macros of the same name. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/d

svn commit: r354178 - in head/sys/arm64: arm64 include

2019-10-30 Thread Andrew Turner
Author: andrew Date: Wed Oct 30 13:45:40 2019 New Revision: 354178 URL: https://svnweb.freebsd.org/changeset/base/354178 Log: Allow the userspace ID register fields to be read from the kernel To allow consistent values to be used in both the kernel and userspace create a function for thes

svn commit: r354179 - in head/sys/arm64: arm64 include

2019-10-30 Thread Andrew Turner
Author: andrew Date: Wed Oct 30 14:05:50 2019 New Revision: 354179 URL: https://svnweb.freebsd.org/changeset/base/354179 Log: Allow exceptions to be masked when in userspace We may want to mask exceptions when in userspace. This was previously impossible as threads are created with all ex

svn commit: r354193 - head/sys/arm64/arm64

2019-10-30 Thread Andrew Turner
Author: andrew Date: Wed Oct 30 17:32:35 2019 New Revision: 354193 URL: https://svnweb.freebsd.org/changeset/base/354193 Log: Set the userspace execute never bit on kernel mappings. Arm64 allows us to create execute only mappings. To make sure userspace is unable to accidentally execute k

svn commit: r354285 - in head/sys/arm64: arm64 include

2019-11-03 Thread Andrew Turner
Author: andrew Date: Sun Nov 3 15:42:08 2019 New Revision: 354285 URL: https://svnweb.freebsd.org/changeset/base/354285 Log: Add support for setting hardware breakpoints from ptrace on arm64. Implement get/fill_dbregs on arm64. This is used by ptrace with the PT_GETDBREGS and PT_SETDBREG

svn commit: r354325 - head/sys/arm64/include

2019-11-03 Thread Andrew Turner
Author: andrew Date: Sun Nov 3 22:17:49 2019 New Revision: 354325 URL: https://svnweb.freebsd.org/changeset/base/354325 Log: Move the struct debug_monitor_state out of _KERNEL. Some userland libraries incude machine/pcb.h and this needs the full definition of struct debug_monitor_state.

svn commit: r354451 - head/sys/sys

2019-11-07 Thread Andrew Turner
Author: andrew Date: Thu Nov 7 17:21:17 2019 New Revision: 354451 URL: https://svnweb.freebsd.org/changeset/base/354451 Log: Add the missing volatile qualifier in atomic_store_ptr MFC after:1 week Sponsored by: DARPA, AFRL Modified: head/sys/sys/atomic_common.h Modified: head/sys

svn commit: r354452 - head/sys/arm64/include

2019-11-07 Thread Andrew Turner
Author: andrew Date: Thu Nov 7 17:34:44 2019 New Revision: 354452 URL: https://svnweb.freebsd.org/changeset/base/354452 Log: Add more 8 and 16 bit variants of the the atomic(9) functions on arm64. These are direct copies of the 32 bit functions, adjusted ad needed. While here fix atomic_

svn commit: r354851 - head/sys/arm64/include

2019-11-19 Thread Andrew Turner
Author: andrew Date: Tue Nov 19 10:57:44 2019 New Revision: 354851 URL: https://svnweb.freebsd.org/changeset/base/354851 Log: Fix the definition of bus_space_read_stream_8 on arm64. This is currently unused, however will be when the Kernel Concurrency Sanitizer (KCSAN) is imported from Ne

svn commit: r354852 - head/sys/arm64/arm64

2019-11-19 Thread Andrew Turner
Author: andrew Date: Tue Nov 19 13:25:46 2019 New Revision: 354852 URL: https://svnweb.freebsd.org/changeset/base/354852 Log: Allow ptrace to set the probram counter on arm64. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/machdep.c Modified: head/sys/arm64/arm64/machdep.c ===

svn commit: r354853 - head/sys/arm64/arm64

2019-11-19 Thread Andrew Turner
Author: andrew Date: Tue Nov 19 13:28:59 2019 New Revision: 354853 URL: https://svnweb.freebsd.org/changeset/base/354853 Log: Return 0 from ptrace_set_pc as it now completes successfully. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/machdep.c Modified: head/sys/arm64/arm64/m

svn commit: r354894 - in head/sys: kern sys

2019-11-20 Thread Andrew Turner
Author: andrew Date: Wed Nov 20 14:37:48 2019 New Revision: 354894 URL: https://svnweb.freebsd.org/changeset/base/354894 Log: Import the NetBSD Kernel Concurrency Sanitizer (KCSAN) runtime. KCSAN is a tool to find concurrent memory access that may race each other. After a determined numbe

svn commit: r354905 - head/sys/vm

2019-11-20 Thread Andrew Turner
Author: andrew Date: Wed Nov 20 17:49:58 2019 New Revision: 354905 URL: https://svnweb.freebsd.org/changeset/base/354905 Log: Use atomic_load_16 to load aflags as it's a uint16_t after r354820. Sponsored by: DARPA, AFRL Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ===

svn commit: r354907 - head/sys/vm

2019-11-20 Thread Andrew Turner
Author: andrew Date: Wed Nov 20 18:00:43 2019 New Revision: 354907 URL: https://svnweb.freebsd.org/changeset/base/354907 Log: As with r354905 use uint16_t to store aflags on the stack and as function arguments as the aflags size in vm_page_t has increased. Sponsored by: DARPA, AFRL Modif

svn commit: r354942 - in head/sys: amd64/amd64 amd64/conf amd64/include arm64/arm64 arm64/conf arm64/include conf kern libkern modules sys x86/include x86/x86

2019-11-21 Thread Andrew Turner
opt_zstdio.h # Sanitizers COVERAGE opt_global.h KCOV +KCSAN opt_global.h KUBSAN opt_global.h # POSIX kernel options Modified: head/sys/kern/subr_csan.c ====== --- head/sys/kern/subr_csan.c

svn commit: r354945 - head/sys/amd64/amd64

2019-11-21 Thread Andrew Turner
Author: andrew Date: Thu Nov 21 12:29:20 2019 New Revision: 354945 URL: https://svnweb.freebsd.org/changeset/base/354945 Log: Fix for style(9): use parentheses around return statements. Reported by: kib Sponsored by: DARPA, AFRL Modified: head/sys/amd64/amd64/machdep.c Modified: head

svn commit: r354946 - head/sys/kern

2019-11-21 Thread Andrew Turner
Author: andrew Date: Thu Nov 21 13:12:58 2019 New Revision: 354946 URL: https://svnweb.freebsd.org/changeset/base/354946 Log: Fix the bus_space functions with KCSAN on arm64. Arm64 doesn't define the bus_space_set_multi_stream and bus_space_set_region_stream functions. Don't try to define

svn commit: r354947 - in head/sys: amd64/include arm64/include kern

2019-11-21 Thread Andrew Turner
Author: andrew Date: Thu Nov 21 13:22:23 2019 New Revision: 354947 URL: https://svnweb.freebsd.org/changeset/base/354947 Log: Add kcsan_md_unsupported from NetBSD. It's used to ignore virtual addresses that may have a different physical address depending on the CPU. Sponsored by: DAR

svn commit: r354952 - head/sys/kern

2019-11-21 Thread Andrew Turner
Author: andrew Date: Thu Nov 21 13:59:01 2019 New Revision: 354952 URL: https://svnweb.freebsd.org/changeset/base/354952 Log: Disable KCSAN within a panic. The kernel is single threaded at this point and the panic is more important. Sponsored by: DARPA, AFRL Modified: head/sys/ker

svn commit: r355132 - head/stand/efi/loader

2019-11-27 Thread Andrew Turner
Author: andrew Date: Wed Nov 27 16:52:46 2019 New Revision: 355132 URL: https://svnweb.freebsd.org/changeset/base/355132 Log: Support kernels larger than EFI_STAGING_SIZE in loader.efi With a very large kernel or module the staging area may be too small to hold it. When this is the case t

Re: svn commit: r355145 - head/sys/arm64/arm64

2019-11-28 Thread Andrew Turner
> On 28 Nov 2019, at 08:48, Michal Meloun wrote: > > > > On 27.11.2019 21:33, Alan Cox wrote: >> Author: alc >> Date: Wed Nov 27 20:33:49 2019 >> New Revision: 355145 >> URL: https://svnweb.freebsd.org/changeset/base/355145 >> >> Log: >> There is no reason why we need to pin the underlying

svn commit: r355213 - head/sys/arm64/arm64

2019-11-29 Thread Andrew Turner
Author: andrew Date: Fri Nov 29 16:14:32 2019 New Revision: 355213 URL: https://svnweb.freebsd.org/changeset/base/355213 Log: Use the VM_MEMATTR macros to describe the MAIR offsets. Remove the duplicate macros that defined a subset of the VM_MEMATTR values. While here use VM_MEMATTR macro

Re: svn commit: r346295 - in head/sys: arm/allwinner arm/altera/socfpga arm/amlogic/aml8726 arm/annapurna/alpine arm/broadcom/bcm2835 arm/freescale/imx arm/freescale/vybrid arm/mv arm/nvidia/tegra124

2019-09-03 Thread Andrew Turner
> On 16 Apr 2019, at 22:04, Emmanuel Vadot wrote: > > Author: manu > Date: Tue Apr 16 20:04:22 2019 > New Revision: 346295 > URL: https://svnweb.freebsd.org/changeset/base/346295 > > Log: > arm: Add kern_clocksource.c directly in files.arm > > This files is needed and included in all our co

Re: svn commit: r346295 - in head/sys: arm/allwinner arm/altera/socfpga arm/amlogic/aml8726 arm/annapurna/alpine arm/broadcom/bcm2835 arm/freescale/imx arm/freescale/vybrid arm/mv arm/nvidia/tegra124

2019-09-03 Thread Andrew Turner
> On 17 Apr 2019, at 17:52, Ian Lepore wrote: > > On Wed, 2019-04-17 at 11:23 +0200, Andrew Turner wrote: >>> On 16 Apr 2019, at 22:04, Emmanuel Vadot wrote: >>> >>> Author: manu >>> Date: Tue Apr 16 20:04:22 2019 >>> New Revision: 346

Re: svn commit: r351831 - in head: . stand/efi/boot1 stand/efi/gptboot tools/build/mk

2019-09-06 Thread Andrew Turner
> On 4 Sep 2019, at 21:55, Rebecca Cran wrote: > > Author: bcran > Date: Wed Sep 4 20:55:48 2019 > New Revision: 351831 > URL: https://svnweb.freebsd.org/changeset/base/351831 > > Log: > The efifat files are no longer used: remove the code to build them I use them in a Jenkins instance to te

svn commit: r352796 - head/sys/kern

2019-09-27 Thread Andrew Turner
Author: andrew Date: Fri Sep 27 16:22:28 2019 New Revision: 352796 URL: https://svnweb.freebsd.org/changeset/base/352796 Log: Check the vfs option length is valid before accessing through When a VFS option passed to nmount is present but NULL the kernel will place an empty option in its i

svn commit: r348322 - head/sys/kern

2019-05-28 Thread Andrew Turner
Author: andrew Date: Tue May 28 09:12:15 2019 New Revision: 348322 URL: https://svnweb.freebsd.org/changeset/base/348322 Log: Teach the kernel KUBSAN runtime about alignment_assumption This checks the alignment of a given pointer is sufficient for the requested alignment asked for. This f

svn commit: r348323 - head/sys/sys

2019-05-28 Thread Andrew Turner
Author: andrew Date: Tue May 28 10:55:59 2019 New Revision: 348323 URL: https://svnweb.freebsd.org/changeset/base/348323 Log: The alignment is passed into contigmalloc_domainset in the 7th argument. KUBSAN was complaining the pointer contigmalloc_domainset returned was misaligned. Fix thi

Re: svn commit: r348521 - in head: . etc sys/conf sys/modules usr.bin/login usr.sbin/services_mkdb

2019-06-03 Thread Andrew Turner
> On 3 Jun 2019, at 00:38, Maxim Sobolev wrote: > > Author: sobomax > Date: Sun Jun 2 23:38:19 2019 > New Revision: 348521 > URL: https://svnweb.freebsd.org/changeset/base/348521 > > Log: > Fix several places where tool name has been hardcoded: > > install -> ${INSTALL} > mtree ->

svn commit: r350112 - in head/sys/arm64: arm64 include

2019-07-18 Thread Andrew Turner
Author: andrew Date: Thu Jul 18 13:58:04 2019 New Revision: 350112 URL: https://svnweb.freebsd.org/changeset/base/350112 Log: Rename arm64 macros in preperation for a script to generate them. I have a script to generate most of the ID_AA64* macros from the Arm XML source [1]. In preperati

svn commit: r350241 - head/sys/arm64/include

2019-07-23 Thread Andrew Turner
Author: andrew Date: Tue Jul 23 14:40:37 2019 New Revision: 350241 URL: https://svnweb.freebsd.org/changeset/base/350241 Log: Ensure the arm64 ID register fields are 64 bit types. Previously only some of the ID register fields were 64 bit. To allow for a script to generate these mark them

svn commit: r350242 - head/sys/arm64/include

2019-07-23 Thread Andrew Turner
Author: andrew Date: Tue Jul 23 14:52:46 2019 New Revision: 350242 URL: https://svnweb.freebsd.org/changeset/base/350242 Log: As with r350241 use the new UL macro on the main register mask. MFC after:1 week Sponsored by: DARPA, AFRL Modified: head/sys/arm64/include/armreg.h Modifi

svn commit: r351027 - head/share/mk

2019-08-14 Thread Andrew Turner
Author: andrew Date: Wed Aug 14 14:31:17 2019 New Revision: 351027 URL: https://svnweb.freebsd.org/changeset/base/351027 Log: Enable BSD_CRTBEGIN on powerpc In r342974 jhibbits added support to build crtsavres.o. This was the blocker for BSD_CRTBEGIN to be enabled there. As such enable th

svn commit: r362273 - head/sys/arm64/include

2020-06-17 Thread Andrew Turner
Author: andrew Date: Wed Jun 17 11:56:10 2020 New Revision: 362273 URL: https://svnweb.freebsd.org/changeset/base/362273 Log: Add all the TCR_EL1 fields These will be used when adding support for new Armv8 extensions. Sponsored by: Innovate UK Modified: head/sys/arm64/include/armreg

svn commit: r362284 - head/sys/arm64/arm64

2020-06-17 Thread Andrew Turner
Author: andrew Date: Wed Jun 17 19:45:05 2020 New Revision: 362284 URL: https://svnweb.freebsd.org/changeset/base/362284 Log: Support pmap_extract_and_hold on arm64 stage 2 mappings Sponsored by: Innovate UK Differential Revision:https://reviews.freebsd.org/D24469 Modified: hea

svn commit: r362285 - head/sys/dev/pci

2020-06-17 Thread Andrew Turner
Author: andrew Date: Wed Jun 17 19:56:17 2020 New Revision: 362285 URL: https://svnweb.freebsd.org/changeset/base/362285 Log: Clean up the pci host generic driver - Support Prefetchable Memory. - Use the correct rman when allocating memory and ioports. - Translate PCI addresses in bu

svn commit: r362295 - head/sys/dev/pci

2020-06-17 Thread Andrew Turner
Author: andrew Date: Thu Jun 18 06:21:00 2020 New Revision: 362295 URL: https://svnweb.freebsd.org/changeset/base/362295 Log: Stop assuming we can print rman_res_t with %lx This is not the case on armv6 and armv7, where we also build this driver. Fix by casting through uintmax_t and using

svn commit: r362397 - head/sys/dev/pci

2020-06-19 Thread Andrew Turner
Author: andrew Date: Fri Jun 19 18:00:20 2020 New Revision: 362397 URL: https://svnweb.freebsd.org/changeset/base/362397 Log: Use the correct address when creating pci resources When the PCI and CPU physical addresses are identical it doesn't matter which is used to create the resources,

svn commit: r362489 - head/sys/arm/broadcom/bcm2835

2020-06-22 Thread Andrew Turner
Author: andrew Date: Mon Jun 22 08:12:21 2020 New Revision: 362489 URL: https://svnweb.freebsd.org/changeset/base/362489 Log: Fix reboot command on the Raspberry Pi series. The Raspbery Pi computers do not properly implement PSCI. The canonical way to reset them is to set a watchdog timer

svn commit: r362493 - head/sys/dev/pci

2020-06-22 Thread Andrew Turner
Author: andrew Date: Mon Jun 22 10:49:50 2020 New Revision: 362493 URL: https://svnweb.freebsd.org/changeset/base/362493 Log: Translaate the PCI address when activating a resource When the PCI address != physical address we need to translate from the former to the latter before passing to

svn commit: r362726 - in head/sys/arm64: arm64 include

2020-06-28 Thread Andrew Turner
Author: andrew Date: Sun Jun 28 15:03:07 2020 New Revision: 362726 URL: https://svnweb.freebsd.org/changeset/base/362726 Log: Use EFI memory map to determine attributes for Acpi mappings on arm64. AcpiOsMapMemory is used for device memory when e.g. an _INI method wants to access physical

svn commit: r362777 - in head/sys/arm64: arm64 include

2020-06-29 Thread Andrew Turner
Author: andrew Date: Mon Jun 29 09:08:36 2020 New Revision: 362777 URL: https://svnweb.freebsd.org/changeset/base/362777 Log: Create a kernel arm64 ID register view In preparation for using ifuncs in the kernel is is useful to have a common view of the arm64 ID registers across all CPUs.

svn commit: r362778 - head/sys/arm64/arm64

2020-06-29 Thread Andrew Turner
Author: andrew Date: Mon Jun 29 09:37:07 2020 New Revision: 362778 URL: https://svnweb.freebsd.org/changeset/base/362778 Log: Fix the spelling of identify in the arm64 identcpu code Sponsored by: Innovate UK Modified: head/sys/arm64/arm64/identcpu.c Modified: head/sys/arm64/arm64/identc

svn commit: r362803 - in head/sys: conf dev/usb/controller mips/mediatek

2020-06-30 Thread Andrew Turner
Author: andrew Date: Tue Jun 30 15:58:29 2020 New Revision: 362803 URL: https://svnweb.freebsd.org/changeset/base/362803 Log: Add dwc_otg_acpi Create an acpi attachment for the DWC USB OTG device. This is present in the Raspberry Pi 4 in the USB-C port normally used to power the board. So

svn commit: r362834 - head/sys/kern

2020-07-01 Thread Andrew Turner
Author: andrew Date: Wed Jul 1 12:07:28 2020 New Revision: 362834 URL: https://svnweb.freebsd.org/changeset/base/362834 Log: Simplify the flow when getting/setting an isrc Rather than unlocking and returning we can just perform the needed action only when the interrupt source is valid an

svn commit: r362837 - head/sys/arm64/arm64

2020-07-01 Thread Andrew Turner
Author: andrew Date: Wed Jul 1 15:17:45 2020 New Revision: 362837 URL: https://svnweb.freebsd.org/changeset/base/362837 Log: Read the arm64 ID registers earlier in the boot process. Also move parsing the registers to just after the secondary CPUs have started. This means the kernel regis

svn commit: r362841 - head/sys/arm64/include

2020-07-01 Thread Andrew Turner
Author: andrew Date: Wed Jul 1 16:17:51 2020 New Revision: 362841 URL: https://svnweb.freebsd.org/changeset/base/362841 Log: Move ID reading signatures to a better header The functions to read the common user and kernel ID registers should be in cpu.h rather than undefined.h as they are

svn commit: r362845 - in head/sys/arm64: arm64 include

2020-07-01 Thread Andrew Turner
Author: andrew Date: Wed Jul 1 16:57:57 2020 New Revision: 362845 URL: https://svnweb.freebsd.org/changeset/base/362845 Log: Read the CPU 0 arm64 ID registers early in initarm We also update the kernel view early in the boot. This will allow the use of the common kernel view in ifunc res

svn commit: r362944 - in head/sys: amd64/amd64 arm64/arm64 kern sys

2020-07-05 Thread Andrew Turner
Author: andrew Date: Sun Jul 5 14:38:22 2020 New Revision: 362944 URL: https://svnweb.freebsd.org/changeset/base/362944 Log: Rerun kernel ifunc resolvers after all CPUs have started On architectures that use RELA relocations it is safe to rerun the ifunc resolvers on after all CPUs have

svn commit: r362954 - in head/sys: arm/broadcom/bcm2835 conf dev/pci

2020-07-06 Thread Andrew Turner
Author: andrew Date: Mon Jul 6 08:51:55 2020 New Revision: 362954 URL: https://svnweb.freebsd.org/changeset/base/362954 Log: Add a driver for bcm2838 PCI express controller This adds support for the Broadcom bcm2711 PCI express controller, found on the Raspberry Pi 4 (aka the bcm2838 SoC

svn commit: r363047 - in head/sys: arm/broadcom/bcm2835 conf

2020-07-09 Thread Andrew Turner
ier: BSD-2-Clause + * + * Copyright (c) 2020 Andrew Turner + * + * This work was supported by Innovate UK project 105694, "Digital Security + * by Design (DSbD) Technology Platform Prototype". + * + * Redistribution and use in source and binary forms, with or without + * modification, are per

svn commit: r363073 - head/sys/arm/broadcom/bcm2835

2020-07-10 Thread Andrew Turner
Author: andrew Date: Fri Jul 10 09:34:47 2020 New Revision: 363073 URL: https://svnweb.freebsd.org/changeset/base/363073 Log: Split long lines in the Raspberry Pi FB driver Sponsored by: Innovate UK Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Modified: head/sys/arm/broadcom/bc

svn commit: r363191 - head/sys/arm64/arm64

2020-07-14 Thread Andrew Turner
Author: andrew Date: Tue Jul 14 18:50:48 2020 New Revision: 363191 URL: https://svnweb.freebsd.org/changeset/base/363191 Log: Print the arm64 registers in more exception handling panics It can be useful to get a dump of all registers when investigating why we received an exception that we

svn commit: r363272 - head/sys/cddl/dev/dtrace/aarch64

2020-07-17 Thread Andrew Turner
Author: andrew Date: Fri Jul 17 14:39:07 2020 New Revision: 363272 URL: https://svnweb.freebsd.org/changeset/base/363272 Log: Don't overflow the trap frame when accessing lr or xzr. When emulating a load pair or store pair in dtrace on arm64 we need to copy the data between the stack and

svn commit: r363390 - head/sys/dev/virtio/mmio

2020-07-21 Thread Andrew Turner
Author: andrew Date: Tue Jul 21 14:25:36 2020 New Revision: 363390 URL: https://svnweb.freebsd.org/changeset/base/363390 Log: Only write to VIRTIO_MMIO_GUEST_PAGE_SIZE with virtio mmio version 1 This register is only defined for the legacy v1 interface so only write to it when interacting

svn commit: r363636 - in head/sys: conf dev/smc

2020-07-28 Thread Andrew Turner
--- head/sys/dev/smc/if_smc_fdt.c Tue Jul 28 07:07:38 2020 (r363635, copy source) +++ head/sys/dev/smc/if_smc_acpi.c Tue Jul 28 09:29:56 2020 (r363636) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2008 Benno Rice * All rights reserved. + * Copyright (c) 2020 Andrew Turner

svn commit: r363637 - head/sys/arm/broadcom/bcm2835

2020-07-28 Thread Andrew Turner
Author: andrew Date: Tue Jul 28 09:46:58 2020 New Revision: 363637 URL: https://svnweb.freebsd.org/changeset/base/363637 Log: Enable use of the regulator in the Broadcom SDHCI controller This will be needed before a future GPIO controller driver is added as the later enables regulators th

svn commit: r363639 - head/sys/arm/broadcom/bcm2835

2020-07-28 Thread Andrew Turner
Author: andrew Date: Tue Jul 28 10:37:58 2020 New Revision: 363639 URL: https://svnweb.freebsd.org/changeset/base/363639 Log: Have the bcm2835 firmware driver depend on the mailbox driver The firmware driver uses the mailbox driver to communicate with the firmware. Make this a more formal

svn commit: r363640 - head/sys/arm/broadcom/bcm2835

2020-07-28 Thread Andrew Turner
Author: andrew Date: Tue Jul 28 10:40:00 2020 New Revision: 363640 URL: https://svnweb.freebsd.org/changeset/base/363640 Log: Move the bcm2835 mailbox driver earlier in the boot This will be needed before the firmware driver is loaded Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.

svn commit: r363641 - head/sys/arm/broadcom/bcm2835

2020-07-28 Thread Andrew Turner
Author: andrew Date: Tue Jul 28 10:41:43 2020 New Revision: 363641 URL: https://svnweb.freebsd.org/changeset/base/363641 Log: Revert r363639 so I can use a more correct commit message Modified: head/sys/arm/broadcom/bcm2835/bcm2835_firmware.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_f

svn commit: r363642 - head/sys/arm/broadcom/bcm2835

2020-07-28 Thread Andrew Turner
Author: andrew Date: Tue Jul 28 10:43:52 2020 New Revision: 363642 URL: https://svnweb.freebsd.org/changeset/base/363642 Log: Move the bcm2835 firmware driver earlier in the boot. It will be needed by other eaarly drivers. While here make the dependency of the mailbox formal with MODUL

svn commit: r363643 - head/sys/arm/broadcom/bcm2835

2020-07-28 Thread Andrew Turner
Author: andrew Date: Tue Jul 28 10:45:29 2020 New Revision: 363643 URL: https://svnweb.freebsd.org/changeset/base/363643 Log: Switch the bcm2835 cpufreq driver to use the firmware interface Use the new Raspberry Pi firmware driver in the cpufreq driver. It is intended all drivers that nee

svn commit: r363645 - head/sys/arm/broadcom/bcm2835

2020-07-28 Thread Andrew Turner
Author: andrew Date: Tue Jul 28 11:13:37 2020 New Revision: 363645 URL: https://svnweb.freebsd.org/changeset/base/363645 Log: Aadd Raspberry Pi firmware messages to manage GPIOs Some GPIOs are managed by an external IO expaandder through the firmware. Add the message details for these.

svn commit: r363647 - head/sys/arm/broadcom/bcm2835

2020-07-28 Thread Andrew Turner
Author: andrew Date: Tue Jul 28 11:32:45 2020 New Revision: 363647 URL: https://svnweb.freebsd.org/changeset/base/363647 Log: Add a workaround for a bug when setting the Raspberry GIO config and state The Raspberry Pi GPIO config and state messages incorrectly return with the tag length s

svn commit: r363660 - head/sys/arm/broadcom/bcm2835

2020-07-29 Thread Andrew Turner
Author: andrew Date: Wed Jul 29 08:24:40 2020 New Revision: 363660 URL: https://svnweb.freebsd.org/changeset/base/363660 Log: Only try managing the regulator when EXT_RESOURCES is defined Not all Raspberry Pi kernel configs define EXT_RESOURCES. Check for this before trying to manage the

svn commit: r363795 - in head/sys: arm/broadcom/bcm2835 conf dev/usb/controller

2020-08-03 Thread Andrew Turner
Author: andrew Date: Mon Aug 3 10:19:50 2020 New Revision: 363795 URL: https://svnweb.freebsd.org/changeset/base/363795 Log: Handle Raspberry Pi 4 xhci firmware loading. The newer hardware revisions of the Raspberry Pi 4 removed the ability of the VIA VL805 xhci controller to load its ow

svn commit: r363799 - head/sys/dev/fdt

2020-08-03 Thread Andrew Turner
Author: andrew Date: Mon Aug 3 16:26:10 2020 New Revision: 363799 URL: https://svnweb.freebsd.org/changeset/base/363799 Log: Allow child classes of simplebus to call attach directly Reduce code duplication when a bus is subclassed from simplebus by allowing them to call simplebus_attach

svn commit: r363800 - head/sys/arm/broadcom/bcm2835

2020-08-03 Thread Andrew Turner
Author: andrew Date: Mon Aug 3 16:43:40 2020 New Revision: 363800 URL: https://svnweb.freebsd.org/changeset/base/363800 Log: Allow the Raspberry Pi firmware driver to be a bus There are child nodes in the device tree, e.g. the Raspberry Pi firmware GPIO device. Add support for this to be

svn commit: r363802 - in head/sys: arm/broadcom/bcm2835 conf

2020-08-03 Thread Andrew Turner
Author: andrew Date: Mon Aug 3 17:18:12 2020 New Revision: 363802 URL: https://svnweb.freebsd.org/changeset/base/363802 Log: Add a GPIO driver for the Raspberry Pi firmware GPIOs These exist on the Raspberry Pi 3 and 4 and control and external IO expander. Reviewed by: manu Spons

svn commit: r363909 - in head/sys: arm64/conf riscv/conf

2020-08-05 Thread Andrew Turner
Author: andrew Date: Wed Aug 5 11:54:51 2020 New Revision: 363909 URL: https://svnweb.freebsd.org/changeset/base/363909 Log: Add DDB_CTF to the arm64 and riscv kernel configs This allows DTrace fbt probes to find arguments. Sponsored by: Innovate UK Modified: head/sys/arm64/conf/GE

svn commit: r364153 - in head: lib/libpmc sys/arm64/include sys/dev/hwpmc sys/sys

2020-08-12 Thread Andrew Turner
Author: andrew Date: Wed Aug 12 10:17:17 2020 New Revision: 364153 URL: https://svnweb.freebsd.org/changeset/base/364153 Log: Add support for Cortex-A76/Neoverse-N1 to hwpmc This adds support for the Cortex-A76 and Neoverse-N1 PMU counters to pmc. While here add more PMCR_IDCODE values

svn commit: r364393 - head/sys/kern

2020-08-19 Thread Andrew Turner
Author: andrew Date: Wed Aug 19 14:11:25 2020 New Revision: 364393 URL: https://svnweb.freebsd.org/changeset/base/364393 Log: Mark COVERAGE and KCOV as part of KCSAN While not strictly true this stops them from trying to use the KCSAN atomic hooks and allows these to be compiled into the

svn commit: r366665 - in head: sys/arm64/arm64 tests/sys/vm

2020-10-13 Thread Andrew Turner
Author: andrew Date: Tue Oct 13 10:26:15 2020 New Revision: 35 URL: https://svnweb.freebsd.org/changeset/base/35 Log: Fix write only mappings on arm64 When trapping on a wrote access to a buffer the kernel has mapped as write only we should only pass the VM_PROT_WRITE flag. Previo

svn commit: r366666 - head/sys/sys

2020-10-13 Thread Andrew Turner
Author: andrew Date: Tue Oct 13 10:31:12 2020 New Revision: 36 URL: https://svnweb.freebsd.org/changeset/base/36 Log: Bump __FreeBSD_version for the fix to arm64 write-only mappings Sponsored by: Innovate UK Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h =

svn commit: r366670 - head/stand/efi/loader/arch/arm64

2020-10-13 Thread Andrew Turner
Author: andrew Date: Tue Oct 13 16:51:05 2020 New Revision: 366670 URL: https://svnweb.freebsd.org/changeset/base/366670 Log: Use adrp in the arm64 efi loader On startup the arm64 efi loaders need to know PC-relative addresses. Previously we used the adr instruction to find this address,

svn commit: r366706 - head/sys/arm64/arm64

2020-10-14 Thread Andrew Turner
Author: andrew Date: Wed Oct 14 15:31:42 2020 New Revision: 366706 URL: https://svnweb.freebsd.org/changeset/base/366706 Log: Remove direct user access from the arm64 copyinstr These already use the load variant that simulates userspace access. Remove the macros that enable normal loads a

svn commit: r366831 - head/sys/arm64/arm64

2020-10-19 Thread Andrew Turner
Author: andrew Date: Mon Oct 19 12:06:16 2020 New Revision: 366831 URL: https://svnweb.freebsd.org/changeset/base/366831 Log: Move the arm64 userspace access checks to macros In the functions that copy between userspace and kernel space we check the user space address is valid before perf

svn commit: r366832 - head/sys/arm64/arm64

2020-10-19 Thread Andrew Turner
Author: andrew Date: Mon Oct 19 12:46:03 2020 New Revision: 366832 URL: https://svnweb.freebsd.org/changeset/base/366832 Log: Split the common arm64 fu* and su* asm to a macro As these are mostly identical split out the common code to a macro. Sponsored by: Innovate UK Modified: hea

svn commit: r366836 - head/sys/arm64/arm64

2020-10-19 Thread Andrew Turner
Author: andrew Date: Mon Oct 19 15:52:42 2020 New Revision: 366836 URL: https://svnweb.freebsd.org/changeset/base/366836 Log: Remove unused labels from the arm64 casueword* These are unused so can be removed. While here renumber the remaining label to be 1. Sponsored by: Innovate UK

svn commit: r367320 - head/sys/arm64/arm64

2020-11-04 Thread Andrew Turner
Author: andrew Date: Wed Nov 4 10:21:30 2020 New Revision: 367320 URL: https://svnweb.freebsd.org/changeset/base/367320 Log: Allow the creation of 3 level page tables on arm64 The stage 2 arm64 page tables may need to start at a lower level. This is because we may only be able to map a l

svn commit: r367325 - head/sys/arm64/include

2020-11-04 Thread Andrew Turner
Author: andrew Date: Wed Nov 4 11:48:08 2020 New Revision: 367325 URL: https://svnweb.freebsd.org/changeset/base/367325 Log: Add the pmap.h changes missed in r367320 Reported by: bz Sponsored by: Innovate UK Modified: head/sys/arm64/include/pmap.h Modified: head/sys/arm64/include/pm

svn commit: r367365 - head/sys/arm64/arm64

2020-11-05 Thread Andrew Turner
Author: andrew Date: Thu Nov 5 09:55:55 2020 New Revision: 367365 URL: https://svnweb.freebsd.org/changeset/base/367365 Log: Stop trying to bounce in memory allocated by bus dma Memory allocated by bus_dmamem_alloc will take into account any alignment requirements of the CPU it's running

svn commit: r367754 - head/sys/arm64/arm64

2020-11-17 Thread Andrew Turner
Author: andrew Date: Tue Nov 17 10:17:18 2020 New Revision: 367754 URL: https://svnweb.freebsd.org/changeset/base/367754 Log: Allow the GICv3 ACPI driver to attach to a GICv4 The same driver works on both, allow the driver to attach to a GICv4 controller with the ACPI attachment. Rep

Re: svn commit: r367754 - head/sys/arm64/arm64

2020-11-17 Thread Andrew Turner
> On 17 Nov 2020, at 10:17, Andrew Turner wrote: > > Author: andrew > Date: Tue Nov 17 10:17:18 2020 > New Revision: 367754 > URL: https://svnweb.freebsd.org/changeset/base/367754 > > Log: > Allow the GICv3 ACPI driver to attach to a GICv4 > > The sam

svn commit: r367755 - head/sys/arm64/arm64

2020-11-17 Thread Andrew Turner
Author: andrew Date: Tue Nov 17 10:27:42 2020 New Revision: 367755 URL: https://svnweb.freebsd.org/changeset/base/367755 Log: Stop calling gic_v3_detach when we haven't called gic_v3_attach The former tries to dereference memory allocated by the latter. If counting the redistributor fails

svn commit: r367841 - head/sys/arm64/arm64

2020-11-19 Thread Andrew Turner
Author: andrew Date: Thu Nov 19 09:26:51 2020 New Revision: 367841 URL: https://svnweb.freebsd.org/changeset/base/367841 Log: Fall back to use the GICR address from the generic interrupt struct When there is no ACPI redistributor sub-table in the MADT we need to fall back to use the GICR

svn commit: r368156 - head/sys/dev/pci

2020-11-29 Thread Andrew Turner
Author: andrew Date: Sun Nov 29 16:22:33 2020 New Revision: 368156 URL: https://svnweb.freebsd.org/changeset/base/368156 Log: Only set the PCI bus end when we are reducing it We read the bus end value from the _CRS method. On some systems we need to further limit it based on the MCFG tabl

svn commit: r368416 - head/sys/arm64/arm64

2020-12-07 Thread Andrew Turner
Author: andrew Date: Mon Dec 7 17:54:49 2020 New Revision: 368416 URL: https://svnweb.freebsd.org/changeset/base/368416 Log: Ensure the boot CPU is CPU 0 on arm64 We assume the boot CPU is always CPU 0 on arm64. To allow for this reserve cpuid 0 for the boot CPU in the ACPI and FDT cases

svn commit: r368444 - head/sys/arm64/arm64

2020-12-08 Thread Andrew Turner
Author: andrew Date: Tue Dec 8 15:41:18 2020 New Revision: 368444 URL: https://svnweb.freebsd.org/changeset/base/368444 Log: Free the arm64 bootparams memory after initarm This is only needed in initarm, we can return this memory to the stack used by mi_startup. Sponsored by: Inniva

<    1   2   3   4   5   6   7   8   9   10   >