Module Name: src Committed By: matt Date: Tue Jul 30 22:23:45 UTC 2013
Modified Files: src/sys/arch/evbarm/beagle: beagle_machdep.c Log Message: Actually, only copy the uboot args if they are within the amount of ram we mapped. If they aren't we'd fault trying to access them. It's too early to grab a VA to map them so we just punt for now. XXX To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/arch/evbarm/beagle/beagle_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/evbarm/beagle/beagle_machdep.c diff -u src/sys/arch/evbarm/beagle/beagle_machdep.c:1.53 src/sys/arch/evbarm/beagle/beagle_machdep.c:1.54 --- src/sys/arch/evbarm/beagle/beagle_machdep.c:1.53 Tue Jul 30 20:45:44 2013 +++ src/sys/arch/evbarm/beagle/beagle_machdep.c Tue Jul 30 22:23:45 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: beagle_machdep.c,v 1.53 2013/07/30 20:45:44 matt Exp $ */ +/* $NetBSD: beagle_machdep.c,v 1.54 2013/07/30 22:23:45 matt Exp $ */ /* * Machine dependent functions for kernel setup for TI OSK5912 board. @@ -125,7 +125,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: beagle_machdep.c,v 1.53 2013/07/30 20:45:44 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: beagle_machdep.c,v 1.54 2013/07/30 22:23:45 matt Exp $"); #include "opt_machdep.h" #include "opt_ddb.h" @@ -562,10 +562,12 @@ initarm(void *arg) arm32_kernel_vm_init(KERNEL_VM_BASE, ARM_VECTORS_LOW, 0, devmap, mapallmem_p); +#ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS /* "bootargs" env variable is passed as 4th argument to kernel */ - if ((uboot_args[3] & 0xe0000000) == 0x80000000) { + if (uboot_args[3] - 0x80000000 < ram_size) { strlcpy(bootargs, (char *)uboot_args[3], sizeof(bootargs)); } +#endif boot_args = bootargs; parse_mi_bootargs(boot_args);