diff options
| author | jmcneill <jmcneill@NetBSD.org> | 2022-10-29 13:59:57 +0000 |
|---|---|---|
| committer | jmcneill <jmcneill@NetBSD.org> | 2022-10-29 13:59:57 +0000 |
| commit | 4e4233dee082f359bb8bc436835197f8748ada4c (patch) | |
| tree | 670b3ca5f84b76abfea6797ddc2a92e4cb898aba /sys | |
| parent | f86da3c02e9287cd057f7e419b78488e9f3d1612 (diff) | |
No need for SOC_VIRT, the default arm platform will take care of things.
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/arch/arm/virt/files.virt | 9 | ||||
| -rw-r--r-- | sys/arch/arm/virt/virt_platform.c | 129 | ||||
| -rw-r--r-- | sys/arch/arm/virt/virt_platform.h | 40 | ||||
| -rw-r--r-- | sys/arch/evbarm/conf/GENERIC | 3 | ||||
| -rw-r--r-- | sys/arch/evbarm/conf/GENERIC64 | 3 | ||||
| -rw-r--r-- | sys/arch/evbarm/conf/files.generic | 3 | ||||
| -rw-r--r-- | sys/arch/evbarm/conf/files.generic64 | 3 |
7 files changed, 4 insertions, 186 deletions
diff --git a/sys/arch/arm/virt/files.virt b/sys/arch/arm/virt/files.virt deleted file mode 100644 index 77e47762d8a..00000000000 --- a/sys/arch/arm/virt/files.virt +++ /dev/null @@ -1,9 +0,0 @@ -# $NetBSD: files.virt,v 1.1 2018/06/14 10:56:39 jmcneill Exp $ -# -# Configuration info for QEMU virtual boards. -# -# - -file arch/arm/virt/virt_platform.c soc_virt - -defflag opt_soc.h SOC_VIRT diff --git a/sys/arch/arm/virt/virt_platform.c b/sys/arch/arm/virt/virt_platform.c deleted file mode 100644 index d6149f2d9d0..00000000000 --- a/sys/arch/arm/virt/virt_platform.c +++ /dev/null @@ -1,129 +0,0 @@ -/* $NetBSD: virt_platform.c,v 1.14 2021/04/24 23:36:29 thorpej Exp $ */ - -/*- - * Copyright (c) 2018 Jared McNeill <jmcneill@invisible.ca> - * 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 ``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 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_soc.h" -#include "opt_multiprocessor.h" - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: virt_platform.c,v 1.14 2021/04/24 23:36:29 thorpej Exp $"); - -#include <sys/param.h> -#include <sys/bus.h> -#include <sys/cpu.h> -#include <sys/device.h> -#include <sys/termios.h> - -#include <dev/fdt/fdtvar.h> -#include <arm/fdt/arm_fdtvar.h> - -#include <uvm/uvm_extern.h> - -#include <machine/bootconfig.h> -#include <arm/cpufunc.h> -#include <arm/locore.h> - -#include <evbarm/dev/plcomreg.h> -#include <evbarm/dev/plcomvar.h> - -#include <dev/ic/ns16550reg.h> -#include <dev/ic/comreg.h> - -#include <arm/cortex/gtmr_var.h> - -#include <arm/arm/psci.h> -#include <arm/fdt/psci_fdtvar.h> - -#include <arm/virt/virt_platform.h> - -#define VIRT_UART_BASE 0x09000000 - -void virt_platform_early_putchar(char); - -void __noasan -virt_platform_early_putchar(char c) -{ - volatile uint32_t *uartaddr = cpu_earlydevice_va_p() ? - (volatile uint32_t *)VIRT_CORE_PTOV(VIRT_UART_BASE) : - (volatile uint32_t *)VIRT_UART_BASE; - - while ((le32toh(uartaddr[PL01XCOM_FR / 4]) & PL01X_FR_TXFF) != 0) - continue; - - uartaddr[PL01XCOM_DR / 4] = htole32(c); - dsb(sy); - - while ((le32toh(uartaddr[PL01XCOM_FR / 4]) & PL01X_FR_TXFE) == 0) - continue; -} - -static const struct pmap_devmap * -virt_platform_devmap(void) -{ - static const struct pmap_devmap devmap[] = { - DEVMAP_ENTRY(VIRT_CORE_VBASE, - VIRT_CORE_PBASE, - VIRT_CORE_SIZE), - DEVMAP_ENTRY_END - }; - - return devmap; -} - -static void -virt_platform_init_attach_args(struct fdt_attach_args *faa) -{ - extern struct arm32_bus_dma_tag arm_generic_dma_tag; - extern struct bus_space arm_generic_bs_tag; - - faa->faa_bst = &arm_generic_bs_tag; - faa->faa_dmat = &arm_generic_dma_tag; -} - -static void -virt_platform_device_register(device_t self, void *aux) -{ -} - -static u_int -virt_platform_uart_freq(void) -{ - return 24000000; -} - -static const struct arm_platform virt_platform = { - .ap_devmap = virt_platform_devmap, - .ap_bootstrap = arm_fdt_cpu_bootstrap, - .ap_init_attach_args = virt_platform_init_attach_args, - .ap_device_register = virt_platform_device_register, - .ap_reset = psci_fdt_reset, - .ap_delay = gtmr_delay, - .ap_uart_freq = virt_platform_uart_freq, - .ap_mpstart = arm_fdt_cpu_mpstart, -}; - -ARM_PLATFORM(virt, "linux,dummy-virt", &virt_platform); diff --git a/sys/arch/arm/virt/virt_platform.h b/sys/arch/arm/virt/virt_platform.h deleted file mode 100644 index e13f3615d3c..00000000000 --- a/sys/arch/arm/virt/virt_platform.h +++ /dev/null @@ -1,40 +0,0 @@ -/* $NetBSD: virt_platform.h,v 1.2 2018/09/29 15:49:38 jmcneill Exp $ */ - -/*- - * Copyright (c) 2018 Jared McNeill <jmcneill@invisible.ca> - * 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 ``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 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. - */ - -#ifndef _ARM_VIRT_PLATFORM_H -#define _ARM_VIRT_PLATFORM_H - -#include <arch/evbarm/fdt/platform.h> - -#define VIRT_CORE_VBASE KERNEL_IO_VBASE -#define VIRT_CORE_PBASE 0x08000000 -#define VIRT_CORE_SIZE 0x08000000 - -#define VIRT_CORE_PTOV(p) (((p) - VIRT_CORE_PBASE) + VIRT_CORE_VBASE) - -#endif /* _ARM_VIRT_PLATFORM_H */ diff --git a/sys/arch/evbarm/conf/GENERIC b/sys/arch/evbarm/conf/GENERIC index 91271a3e761..9a9587f9413 100644 --- a/sys/arch/evbarm/conf/GENERIC +++ b/sys/arch/evbarm/conf/GENERIC @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC,v 1.111 2022/10/28 20:37:47 jmcneill Exp $ +# $NetBSD: GENERIC,v 1.112 2022/10/29 13:59:57 jmcneill Exp $ # # GENERIC ARM (aarch32) kernel # @@ -29,7 +29,6 @@ options SOC_SUN8I_H3 options SOC_SUN8I_V3S options SOC_SUN9I_A80 options SOC_TEGRA124 -options SOC_VIRT options SOC_ZYNQ7000 options MULTIPROCESSOR diff --git a/sys/arch/evbarm/conf/GENERIC64 b/sys/arch/evbarm/conf/GENERIC64 index 7d89f6b64fe..da77d3af879 100644 --- a/sys/arch/evbarm/conf/GENERIC64 +++ b/sys/arch/evbarm/conf/GENERIC64 @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC64,v 1.205 2022/08/23 05:40:46 ryo Exp $ +# $NetBSD: GENERIC64,v 1.206 2022/10/29 13:59:57 jmcneill Exp $ # # GENERIC ARM (aarch64) kernel # @@ -24,7 +24,6 @@ options SOC_SUN50I_A64 options SOC_SUN50I_H5 options SOC_SUN50I_H6 options SOC_TEGRA210 -options SOC_VIRT options MULTIPROCESSOR pseudo-device openfirm # /dev/openfirm diff --git a/sys/arch/evbarm/conf/files.generic b/sys/arch/evbarm/conf/files.generic index 15ffdb5fab8..001ca560cfa 100644 --- a/sys/arch/evbarm/conf/files.generic +++ b/sys/arch/evbarm/conf/files.generic @@ -1,4 +1,4 @@ -# $NetBSD: files.generic,v 1.13 2021/12/18 16:31:06 riastradh Exp $ +# $NetBSD: files.generic,v 1.14 2022/10/29 13:59:57 jmcneill Exp $ # # A generic (aarch32) kernel configuration info # @@ -28,7 +28,6 @@ include "arch/arm/samsung/files.exynos" include "arch/arm/sunxi/files.sunxi" include "arch/arm/ti/files.ti" include "arch/arm/vexpress/files.vexpress" -include "arch/arm/virt/files.virt" include "arch/arm/xilinx/files.zynq" # diff --git a/sys/arch/evbarm/conf/files.generic64 b/sys/arch/evbarm/conf/files.generic64 index 007c80639e1..4ef90f05e76 100644 --- a/sys/arch/evbarm/conf/files.generic64 +++ b/sys/arch/evbarm/conf/files.generic64 @@ -1,4 +1,4 @@ -# $NetBSD: files.generic64,v 1.19 2021/09/13 23:31:23 jmcneill Exp $ +# $NetBSD: files.generic64,v 1.20 2022/10/29 13:59:57 jmcneill Exp $ # # A generic (aarch64) kernel configuration info # @@ -19,7 +19,6 @@ include "arch/arm/nxp/files.imx" include "arch/arm/rockchip/files.rockchip" include "arch/arm/samsung/files.exynos" include "arch/arm/sunxi/files.sunxi" -include "arch/arm/virt/files.virt" include "arch/arm/sociox/files.sociox" # |
