Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch No need for SOC_VIRT, the default arm platform will...



details:   https://anonhg.NetBSD.org/src/rev/476611d6dd40
branches:  trunk
changeset: 372180:476611d6dd40
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sat Oct 29 13:59:57 2022 +0000

description:
No need for SOC_VIRT, the default arm platform will take care of things.

diffstat:

 sys/arch/arm/virt/files.virt         |    9 --
 sys/arch/arm/virt/virt_platform.c    |  129 -----------------------------------
 sys/arch/arm/virt/virt_platform.h    |   40 ----------
 sys/arch/evbarm/conf/GENERIC         |    3 +-
 sys/arch/evbarm/conf/GENERIC64       |    3 +-
 sys/arch/evbarm/conf/files.generic   |    3 +-
 sys/arch/evbarm/conf/files.generic64 |    3 +-
 7 files changed, 4 insertions(+), 186 deletions(-)

diffs (260 lines):

diff -r fb7384ef7eae -r 476611d6dd40 sys/arch/arm/virt/files.virt
--- a/sys/arch/arm/virt/files.virt      Sat Oct 29 13:59:04 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r fb7384ef7eae -r 476611d6dd40 sys/arch/arm/virt/virt_platform.c
--- a/sys/arch/arm/virt/virt_platform.c Sat Oct 29 13:59:04 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -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@localhost>
- * 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 -r fb7384ef7eae -r 476611d6dd40 sys/arch/arm/virt/virt_platform.h
--- a/sys/arch/arm/virt/virt_platform.h Sat Oct 29 13:59:04 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -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@localhost>
- * 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 -r fb7384ef7eae -r 476611d6dd40 sys/arch/evbarm/conf/GENERIC
--- a/sys/arch/evbarm/conf/GENERIC      Sat Oct 29 13:59:04 2022 +0000
+++ b/sys/arch/evbarm/conf/GENERIC      Sat Oct 29 13:59:57 2022 +0000
@@ -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_V3S
 options        SOC_SUN9I_A80
 options        SOC_TEGRA124
-options        SOC_VIRT
 options        SOC_ZYNQ7000
 
 options        MULTIPROCESSOR
diff -r fb7384ef7eae -r 476611d6dd40 sys/arch/evbarm/conf/GENERIC64
--- a/sys/arch/evbarm/conf/GENERIC64    Sat Oct 29 13:59:04 2022 +0000
+++ b/sys/arch/evbarm/conf/GENERIC64    Sat Oct 29 13:59:57 2022 +0000
@@ -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_H5
 options        SOC_SUN50I_H6
 options        SOC_TEGRA210
-options        SOC_VIRT
 options        MULTIPROCESSOR
 
 pseudo-device  openfirm        # /dev/openfirm
diff -r fb7384ef7eae -r 476611d6dd40 sys/arch/evbarm/conf/files.generic
--- a/sys/arch/evbarm/conf/files.generic        Sat Oct 29 13:59:04 2022 +0000
+++ b/sys/arch/evbarm/conf/files.generic        Sat Oct 29 13:59:57 2022 +0000
@@ -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/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 -r fb7384ef7eae -r 476611d6dd40 sys/arch/evbarm/conf/files.generic64
--- a/sys/arch/evbarm/conf/files.generic64      Sat Oct 29 13:59:04 2022 +0000
+++ b/sys/arch/evbarm/conf/files.generic64      Sat Oct 29 13:59:57 2022 +0000
@@ -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/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"
 
 #



Home | Main Index | Thread Index | Old Index