From owner-svn-src-stable@freebsd.org Mon Apr 2 22:02:51 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4F83F4F8EF; Mon, 2 Apr 2018 22:02:50 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9A0D474B8F; Mon, 2 Apr 2018 22:02:50 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 951951B7DE; Mon, 2 Apr 2018 22:02:50 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w32M2oZL028120; Mon, 2 Apr 2018 22:02:50 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w32M2nfB028113; Mon, 2 Apr 2018 22:02:49 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201804022202.w32M2nfB028113@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 2 Apr 2018 22:02:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331890 - in stable/11/sys/arm: arm xscale/i8134x X-SVN-Group: stable-11 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: in stable/11/sys/arm: arm xscale/i8134x X-SVN-Commit-Revision: 331890 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2018 22:02:51 -0000 Author: gonzo Date: Mon Apr 2 22:02:49 2018 New Revision: 331890 URL: https://svnweb.freebsd.org/changeset/base/331890 Log: MFC r305094, r305096-r305097 r305094 by cognet: Garbage collect bits forgotten in r295267. r305096 by cognet: Some old arm ports don't load the kernel at the beginning of the memory, because the bootloader, ie redboot, won't let them do so, and so used the memory before the kernel for early memory allocation, such as pagetables, stacks, etc... Make a bit of an effort to try to get that memory mapped. r305097 by cognet: Nuke obio_bs_tag, it was used before it was initialized, and arm_base_bs_tag is the same, anyway. Modified: stable/11/sys/arm/arm/cpufunc_asm_xscale_c3.S stable/11/sys/arm/arm/locore-v4.S stable/11/sys/arm/xscale/i8134x/crb_machdep.c stable/11/sys/arm/xscale/i8134x/obio.c stable/11/sys/arm/xscale/i8134x/obiovar.h stable/11/sys/arm/xscale/i8134x/uart_cpu_i81342.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/arm/cpufunc_asm_xscale_c3.S ============================================================================== --- stable/11/sys/arm/arm/cpufunc_asm_xscale_c3.S Mon Apr 2 21:48:29 2018 (r331889) +++ stable/11/sys/arm/arm/cpufunc_asm_xscale_c3.S Mon Apr 2 22:02:49 2018 (r331890) @@ -364,8 +364,6 @@ ENTRY(xscalec3_setttb) #ifdef CACHE_CLEAN_BLOCK_INTR msr cpsr_fsxc, r3 -#else - str r2, [r3] #endif RET END(xscalec3_setttb) Modified: stable/11/sys/arm/arm/locore-v4.S ============================================================================== --- stable/11/sys/arm/arm/locore-v4.S Mon Apr 2 21:48:29 2018 (r331889) +++ stable/11/sys/arm/arm/locore-v4.S Mon Apr 2 22:02:49 2018 (r331890) @@ -194,6 +194,16 @@ Lunmapped: ldr r2, =(KERNVIRTADDR) mov r3, #64 bl build_pagetables +#if defined(PHYSADDR) && (KERNVIRTADDR != KERNBASE) +/* + * If the kernel wasn't loaded at the beginning of the ram, map the memory + * before the kernel too, as some ports use that for pagetables, stack, etc... + */ + ldr r1, =PHYSADDR + ldr r2, =KERNBASE + ldr r3, =((KERNVIRTADDR - KERNBASE) / L1_S_SIZE) + bl build_pagetables +#endif /* Create a device mapping for early_printf if specified. */ #if defined(SOCDEV_PA) && defined(SOCDEV_VA) Modified: stable/11/sys/arm/xscale/i8134x/crb_machdep.c ============================================================================== --- stable/11/sys/arm/xscale/i8134x/crb_machdep.c Mon Apr 2 21:48:29 2018 (r331889) +++ stable/11/sys/arm/xscale/i8134x/crb_machdep.c Mon Apr 2 22:02:49 2018 (r331890) @@ -286,7 +286,7 @@ initarm(struct arm_boot_params *abp) cpu_setup(); i80321_calibrate_delay(); - i81342_sdram_bounds(obio_bs_tag, IOP34X_VADDR, &memstart, &memsize); + i81342_sdram_bounds(arm_base_bs_tag, IOP34X_VADDR, &memstart, &memsize); physmem = memsize / PAGE_SIZE; cninit(); /* Set stack for exception handlers */ Modified: stable/11/sys/arm/xscale/i8134x/obio.c ============================================================================== --- stable/11/sys/arm/xscale/i8134x/obio.c Mon Apr 2 21:48:29 2018 (r331889) +++ stable/11/sys/arm/xscale/i8134x/obio.c Mon Apr 2 22:02:49 2018 (r331890) @@ -56,8 +56,6 @@ __FBSDID("$FreeBSD$"); #include #include -bus_space_tag_t obio_bs_tag; - static int obio_probe(device_t dev) { @@ -69,8 +67,7 @@ obio_attach(device_t dev) { struct obio_softc *sc = device_get_softc(dev); - obio_bs_tag = arm_base_bs_tag; - sc->oba_st = obio_bs_tag; + sc->oba_st = arm_base_bs_tag; sc->oba_rman.rm_type = RMAN_ARRAY; sc->oba_rman.rm_descr = "OBIO I/O"; if (rman_init(&sc->oba_rman) != 0 || Modified: stable/11/sys/arm/xscale/i8134x/obiovar.h ============================================================================== --- stable/11/sys/arm/xscale/i8134x/obiovar.h Mon Apr 2 21:48:29 2018 (r331889) +++ stable/11/sys/arm/xscale/i8134x/obiovar.h Mon Apr 2 22:02:49 2018 (r331890) @@ -50,6 +50,5 @@ struct obio_softc { struct rman oba_irq_rman; }; -extern bus_space_tag_t obio_bs_tag; #endif /* _IQ80321_OBIOVAR_H_ */ Modified: stable/11/sys/arm/xscale/i8134x/uart_cpu_i81342.c ============================================================================== --- stable/11/sys/arm/xscale/i8134x/uart_cpu_i81342.c Mon Apr 2 21:48:29 2018 (r331889) +++ stable/11/sys/arm/xscale/i8134x/uart_cpu_i81342.c Mon Apr 2 22:02:49 2018 (r331890) @@ -54,14 +54,14 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) di->ops = uart_getops(&uart_ns8250_class); di->bas.chan = 0; - di->bas.bst = obio_bs_tag; + di->bas.bst = arm_base_bs_tag; di->bas.regshft = 2; di->bas.rclk = 33334000; di->baudrate = 115200; di->databits = 8; di->stopbits = 1; di->parity = UART_PARITY_NONE; - uart_bus_space_io = obio_bs_tag; + uart_bus_space_io = arm_base_bs_tag; uart_bus_space_mem = NULL; di->bas.bsh = IOP34X_UART0_VADDR; return (0);