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

2020-12-08 Thread Andrew Turner
Author: andrew Date: Tue Dec 8 15:51:05 2020 New Revision: 368445 URL: https://svnweb.freebsd.org/changeset/base/368445 Log: Use a macro to find the offset of kern_ttbr0 Rather than hard coding the offset of kern_ttbr0 within arm64_bootparams use a macro like the other fields. Spons

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

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: 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: 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: 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

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: 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

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: 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: 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: 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: 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: 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: 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: 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: 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: 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: r366111 - head/sys/arm64/arm64

2020-09-24 Thread Andrew Turner
Author: andrew Date: Thu Sep 24 10:42:28 2020 New Revision: 366111 URL: https://svnweb.freebsd.org/changeset/base/366111 Log: Clean up the arm64 bus_dma_run_filter - We can exit the loop as soon as the filter check passes. - The alignment check has already passed so there is no need to

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

2020-09-24 Thread Andrew Turner
Author: andrew Date: Thu Sep 24 10:40:49 2020 New Revision: 366110 URL: https://svnweb.freebsd.org/changeset/base/366110 Log: Ensure arm64 DMA alignment is passed from parents to children This ensures the alignment check will take these alignments into account. Sponsored by: Innovate U

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

2020-09-24 Thread Andrew Turner
Author: andrew Date: Thu Sep 24 07:17:05 2020 New Revision: 366106 URL: https://svnweb.freebsd.org/changeset/base/366106 Log: Bounce in more cases in the arm64 busdma We need to use a bounce buffer when the memory we are operating on is not aligned to a cacheline, and not aligned to the m

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

2020-09-24 Thread Andrew Turner
Author: andrew Date: Thu Sep 24 07:13:13 2020 New Revision: 366105 URL: https://svnweb.freebsd.org/changeset/base/366105 Log: Ensure we always align and size arm64 busdma allocations to a cacheline This will ensure nothing modifies the cacheline while DMA is in progress so we won't need t

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

2020-09-24 Thread Andrew Turner
Author: andrew Date: Thu Sep 24 07:07:54 2020 New Revision: 366103 URL: https://svnweb.freebsd.org/changeset/base/366103 Log: Add a coherent flag on the arm64 dma map struct Use it to decide if we can skip cache management. While here remove the DMAMAP_COULD_BOUNCE flag as it's unneede

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

2020-09-24 Thread Andrew Turner
Author: andrew Date: Thu Sep 24 07:03:26 2020 New Revision: 366102 URL: https://svnweb.freebsd.org/changeset/base/366102 Log: Add bounce helpers to the arm64 busdma Add helper functions to the arm64 busdma for common cases of checking if we may need to bounce, and if we must bounce for a

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

2020-09-15 Thread Andrew Turner
Author: andrew Date: Tue Sep 15 14:15:04 2020 New Revision: 365750 URL: https://svnweb.freebsd.org/changeset/base/365750 Log: Use ATTR_DEFAULT in the arm64 locore.S We can use ATTR_DEFAULT directly in locore.S as it fits within an orr instruction operand. Sponsored by: Innovate UK M

svn commit: r365727 - in head/usr.bin: . gprof

2020-09-14 Thread Andrew Turner
Author: andrew Date: Mon Sep 14 16:18:53 2020 New Revision: 365727 URL: https://svnweb.freebsd.org/changeset/base/365727 Log: Cleanups for gprof: * Remove identical or almost identical headers * Only build aout.c on amd64 and i386. None of the the other current architectures ever s

Re: svn commit: r365726 - in head: cddl/lib/libzfs cddl/lib/libzpool lib/libpmc share/mk sys/conf tests/sys/kern usr.bin/gcore

2020-09-14 Thread Andrew Turner
> On 14 Sep 2020, at 17:12, Andrew Turner wrote: > > Author: andrew > Date: Mon Sep 14 16:12:28 2020 > New Revision: 365726 > URL: https://svnweb.freebsd.org/changeset/base/365726 > > Log: > Use MACHINE_CPUARCH when checking for arm64 > > Use MACHINE_CPU

svn commit: r365726 - in head: cddl/lib/libzfs cddl/lib/libzpool lib/libpmc share/mk sys/conf tests/sys/kern usr.bin/gcore

2020-09-14 Thread Andrew Turner
Author: andrew Date: Mon Sep 14 16:12:28 2020 New Revision: 365726 URL: https://svnweb.freebsd.org/changeset/base/365726 Log: Use MACHINE_CPUARCH when checking for arm64 Use MACHINE_CPUARCH with arm64 (aarch64) when we build code that could run on any 64-bit Arm instruction set. This will

svn commit: r365709 - head/sys/dev/gpio

2020-09-14 Thread Andrew Turner
Author: andrew Date: Mon Sep 14 08:59:16 2020 New Revision: 365709 URL: https://svnweb.freebsd.org/changeset/base/365709 Log: Allow for interrupts on pl061 children Add enough infrastructure for interrupts on children of the pl061 GPIO controller. As gpiobus already provided these the pl0

svn commit: r365579 - in head/sys: arm64/include dev/gpio

2020-09-10 Thread Andrew Turner
Author: andrew Date: Thu Sep 10 14:58:46 2020 New Revision: 365579 URL: https://svnweb.freebsd.org/changeset/base/365579 Log: Move the pl061 acpi attachment earlier As the pl061 driver can be an interrupt controller attach it earlier in the boot so other drivers can use it. Use a new

Re: svn commit: r365578 - head/stand/efi/loader/arch/arm64

2020-09-10 Thread Andrew Turner
ay. > > On Thu, Sep 10, 2020, at 9:13 AM, Andrew Turner wrote: >> Author: andrew >> Date: Thu Sep 10 14:13:49 2020 >> New Revision: 365578 >> URL: https://svnweb.freebsd.org/changeset/base/365578 >> >> Log: >> Ignore the .interp section in the arm64

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

2020-09-10 Thread Andrew Turner
Author: andrew Date: Thu Sep 10 14:13:49 2020 New Revision: 365578 URL: https://svnweb.freebsd.org/changeset/base/365578 Log: Ignore the .interp section in the arm64 EFI loader When building the loader an unneeded .interp section may be added. Move this to the unused section region so off

svn commit: r365559 - head/sys/dev/gpio

2020-09-10 Thread Andrew Turner
Author: andrew Date: Thu Sep 10 09:50:43 2020 New Revision: 365559 URL: https://svnweb.freebsd.org/changeset/base/365559 Log: Switch the name of the pl061 driver to gpio We need it to be named gpio for gpiobus to work. Sponsored by: Innovate UK Modified: head/sys/dev/gpio/pl061.c

svn commit: r365558 - head/sys/dev/gpio

2020-09-10 Thread Andrew Turner
Author: andrew Date: Thu Sep 10 09:42:37 2020 New Revision: 365558 URL: https://svnweb.freebsd.org/changeset/base/365558 Log: Only manage ofw gpio providers on ofw systems On arm64 we may boot via ACPI. In this case we will still try to manage the gpio providers as if we are using FDT. Fi

svn commit: r365557 - head/sys/dev/gpio

2020-09-10 Thread Andrew Turner
Author: andrew Date: Thu Sep 10 09:37:30 2020 New Revision: 365557 URL: https://svnweb.freebsd.org/changeset/base/365557 Log: Use the correct variable to check which interrupt mode to use In the PL061 driver we incorrectly used the mask rather than mode to find how to configure the interr

svn commit: r365451 - head/sys/conf

2020-09-08 Thread Andrew Turner
Author: andrew Date: Tue Sep 8 11:46:33 2020 New Revision: 365451 URL: https://svnweb.freebsd.org/changeset/base/365451 Log: Move gpio and hwpmc to the correct place in files.arm64 Sponsored by: Innovate UK Modified: head/sys/conf/files.arm64 Modified: head/sys/conf/files.arm64 ===

svn commit: r365450 - in head/sys: arm64/conf conf dev/gpio

2020-09-08 Thread Andrew Turner
l061_acpi_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, pl061_acpi_probe), + DEVMETHOD(device_attach,pl061_acpi_attach), + + DEVMETHOD_END +}; + +DEFINE_CLASS_1(pl061, pl061_acpi_driver, pl061_acpi_methods, +sizeof(struct pl061_softc), p

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

2020-09-03 Thread Andrew Turner
Author: andrew Date: Thu Sep 3 10:11:12 2020 New Revision: 365296 URL: https://svnweb.freebsd.org/changeset/base/365296 Log: Switch to an empty ttbr0 pagetable when the MMU is enabled We don't need these pagetables after the early boot. Remove the chance we write to memory we didn't expe

svn commit: r365247 - head/share/mk

2020-09-02 Thread Andrew Turner
Author: andrew Date: Wed Sep 2 11:53:26 2020 New Revision: 365247 URL: https://svnweb.freebsd.org/changeset/base/365247 Log: When CPUTYPE is an architecture name use -march Allow architecture names to be passed in to the build system via CPUTYPE. This allows the user to use values such a

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

2020-09-02 Thread Andrew Turner
Author: andrew Date: Wed Sep 2 09:04:08 2020 New Revision: 365234 URL: https://svnweb.freebsd.org/changeset/base/365234 Log: Partially revert r365069. This whitespace was intentionally added to help differentiate the different register groups within this file. While here add missing

Re: svn commit: r365054 - in head/sys: conf dev/sdhci

2020-09-01 Thread Andrew Turner
> On 1 Sep 2020, at 17:17, Marcin Wojtas wrote: > > Author: mw > Date: Tue Sep 1 16:17:21 2020 > New Revision: 365054 > URL: https://svnweb.freebsd.org/changeset/base/365054 > > Log: > Introduce the SDHCI driver for NXP QorIQ Layerscape SoCs > > Implement support for an eSDHC controller f

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

2020-09-01 Thread Andrew Turner
Author: andrew Date: Tue Sep 1 14:50:43 2020 New Revision: 365039 URL: https://svnweb.freebsd.org/changeset/base/365039 Log: Ensure the tlbi has completed before setting SCTLR When enabling the MMU on arm64 we need to ensure the tlb invalidation has completed before setting the enable bi

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

2020-09-01 Thread Andrew Turner
Author: andrew Date: Tue Sep 1 11:02:43 2020 New Revision: 365031 URL: https://svnweb.freebsd.org/changeset/base/365031 Log: Support stage 2 arm64 pmap in more places Add support for stage 2 pmap to pmap_pte_dirty, pmap_release, and more of pmap_enter. This adds support in all placess I

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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: r362263 - in head: . contrib/opencsd/decoder/include/common contrib/opencsd/decoder/include/i_dec contrib/opencsd/decoder/include/mem_acc contrib/opencsd/decoder/include/opencsd contrib...

2020-06-17 Thread Andrew Turner
Author: andrew Date: Wed Jun 17 10:42:20 2020 New Revision: 362263 URL: https://svnweb.freebsd.org/changeset/base/362263 Log: Update opencsd to 0.14.2 Sponsored by: Innovate UK Added: head/contrib/opencsd/decoder/include/common/ocsd_gen_elem_stack.h - copied unchanged from r362220,

svn commit: r362220 - in head/contrib/opencsd: . decoder/build decoder/docs decoder/tests

2020-06-16 Thread Andrew Turner
Author: andrew Date: Tue Jun 16 08:59:44 2020 New Revision: 362220 URL: https://svnweb.freebsd.org/changeset/base/362220 Log: Re-add opencsd as a vendor import from the dist directory Sponsored by: Innovate UK Added: head/contrib/opencsd/ - copied from r353392, vendor/opencsd/dist/

svn commit: r362219 - head/contrib/opencsd

2020-06-16 Thread Andrew Turner
Author: andrew Date: Tue Jun 16 08:57:13 2020 New Revision: 362219 URL: https://svnweb.freebsd.org/changeset/base/362219 Log: Remove opencsd so I can re-import it with the correct ancestry Sponsored by: Innovate UK Deleted: head/contrib/opencsd/ __

svn commit: r362195 - head/contrib/opencsd

2020-06-15 Thread Andrew Turner
Author: andrew Date: Mon Jun 15 13:03:01 2020 New Revision: 362195 URL: https://svnweb.freebsd.org/changeset/base/362195 Log: Bootstrap mergeinfo for OpenCSD Sponsored by: Innovate UK Modified: Directory Properties: head/contrib/opencsd/ (props changed)

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

2020-06-12 Thread Andrew Turner
Author: andrew Date: Fri Jun 12 10:43:21 2020 New Revision: 362091 URL: https://svnweb.freebsd.org/changeset/base/362091 Log: Teach the arm64 vfp.h about struct thread. Ensure struct thread is defined in vfp.h. In some cases it is not and stops the kernel from building. Sponsored by:

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

2020-06-10 Thread Andrew Turner
Author: andrew Date: Wed Jun 10 09:31:37 2020 New Revision: 362008 URL: https://svnweb.freebsd.org/changeset/base/362008 Log: Fix the efi serial console in the Arm models. On some UEFI implementations the ConsOut EFI variable is not a device path end type so we never move to the next node

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

2020-05-27 Thread Andrew Turner
Author: andrew Date: Wed May 27 08:00:38 2020 New Revision: 361547 URL: https://svnweb.freebsd.org/changeset/base/361547 Log: Support creating and using arm64 pmap at stage 2 Add minimal support for creating stage 2 IPA -> PA mappings. For this we need to: - Create a new vmid set to

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

2020-05-19 Thread Andrew Turner
Author: andrew Date: Tue May 19 16:04:27 2020 New Revision: 361259 URL: https://svnweb.freebsd.org/changeset/base/361259 Log: Stop performing a full icache sync when the DIC and IDC flags are set The DIC and IDC bits in the CTR_EL0 register signal to the kernel when it can relax the instr

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

2020-05-19 Thread Andrew Turner
Author: andrew Date: Tue May 19 15:27:20 2020 New Revision: 361258 URL: https://svnweb.freebsd.org/changeset/base/361258 Log: Create MSI/MSI-X isrcs as needed in the GICv3 ITS driver Previously we would create an isrc for each MSI/MSI-X interrupt. This causes issues for other interrupt so

svn commit: r361216 - head/usr.sbin/acpi/acpidump

2020-05-18 Thread Andrew Turner
Author: andrew Date: Mon May 18 15:05:59 2020 New Revision: 361216 URL: https://svnweb.freebsd.org/changeset/base/361216 Log: Allow the FACS and XFACS to be zero in acpidump. These are allowed to be zero when the hardware reduced APCI flag is set Sponsored by: Innovate UK Differentia

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

2020-05-15 Thread Andrew Turner
Author: andrew Date: Fri May 15 13:33:48 2020 New Revision: 361076 URL: https://svnweb.freebsd.org/changeset/base/361076 Log: Remove arm64_idcache_wbinv_range as it's unused. Sponsored by: Innovate UK Modified: head/sys/arm64/arm64/cpufunc_asm.S head/sys/arm64/include/cpufunc.h Modifi

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

2020-05-12 Thread Andrew Turner
Author: andrew Date: Tue May 12 21:00:13 2020 New Revision: 360990 URL: https://svnweb.freebsd.org/changeset/base/360990 Log: Fix the name reported when the core supports a 64-bit CCIDX Modified: head/sys/arm64/arm64/identcpu.c Modified: head/sys/arm64/arm64/identcpu.c ==

svn commit: r360655 - head/stand/efi/boot1

2020-05-05 Thread Andrew Turner
Author: andrew Date: Tue May 5 10:01:10 2020 New Revision: 360655 URL: https://svnweb.freebsd.org/changeset/base/360655 Log: Fix the EFI_DEBUG case, prio_str is only used when EFI_DEBUG is unset. Sponsored by: Innovate UK Modified: head/stand/efi/boot1/proto.c Modified: head/stand/efi/

svn commit: r360654 - head/stand/efi/boot1

2020-05-05 Thread Andrew Turner
Author: andrew Date: Tue May 5 09:42:26 2020 New Revision: 360654 URL: https://svnweb.freebsd.org/changeset/base/360654 Log: As with r352446 align blocks in boot1.efi We need to ensure the buffers are aligned before passing them to ReadBlocks. Assume 512 bytes is enough for now. Rev

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

2020-04-24 Thread Andrew Turner
Author: andrew Date: Fri Apr 24 11:03:15 2020 New Revision: 360249 URL: https://svnweb.freebsd.org/changeset/base/360249 Log: Remove PCI_IO_WINDOW_OFFSET from the pci host generic fdt attachment. It doesn't seem to be needed, and breaks booting under bhyve/arm64. Discussed with:

svn commit: r360247 - head/stand

2020-04-24 Thread Andrew Turner
Author: andrew Date: Fri Apr 24 10:03:11 2020 New Revision: 360247 URL: https://svnweb.freebsd.org/changeset/base/360247 Log: Build the arm64 loader with -ffixed-x18 This stops the compiler from using the x18 register. Some UEFI implementations assume this will be preserved when calling t

svn commit: r359505 - head/usr.sbin/jail

2020-04-01 Thread Andrew Turner
Author: andrew Date: Wed Apr 1 09:51:29 2020 New Revision: 359505 URL: https://svnweb.freebsd.org/changeset/base/359505 Log: Use memmove to copy within a buffer jail(8) would try to use strcpy to remove the interface from the start of an IP address. This is undefined, and on arm64 will r

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

2020-03-06 Thread Andrew Turner
Author: andrew Date: Fri Mar 6 16:00:35 2020 New Revision: 358709 URL: https://svnweb.freebsd.org/changeset/base/358709 Log: Add more are64 special register fields Obtained from:https://github.com/FreeBSD-UPB/freebsd Modified: head/sys/arm64/include/armreg.h Modified: head/sys/

  1   2   3   4   5   6   7   8   9   10   >