Module Name: src Committed By: dholland Date: Mon May 30 17:43:46 UTC 2016
Modified Files: src/sys/arch/evbarm/imx7: imx7_machdep.c Log Message: If MEMSIZE isn't set, #error instead of proceeding using uninitialized stack garbage as the memory size. Please improve as needed; I don't know anything about this hardware. PR 51150 from David Binderman. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/imx7/imx7_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/imx7/imx7_machdep.c diff -u src/sys/arch/evbarm/imx7/imx7_machdep.c:1.2 src/sys/arch/evbarm/imx7/imx7_machdep.c:1.3 --- src/sys/arch/evbarm/imx7/imx7_machdep.c:1.2 Thu May 19 05:15:51 2016 +++ src/sys/arch/evbarm/imx7/imx7_machdep.c Mon May 30 17:43:46 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: imx7_machdep.c,v 1.2 2016/05/19 05:15:51 ryo Exp $ */ +/* $NetBSD: imx7_machdep.c,v 1.3 2016/05/30 17:43:46 dholland Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: imx7_machdep.c,v 1.2 2016/05/19 05:15:51 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imx7_machdep.c,v 1.3 2016/05/30 17:43:46 dholland Exp $"); #include "opt_evbarm_boardtype.h" #include "opt_arm_debug.h" @@ -211,6 +211,12 @@ initarm(void *arg) #ifdef MEMSIZE memsize = MEMSIZE * 1024 * 1024; +#else +/* + * Ugh... but this is better than proceeding using an uninitialized + * value in memsize, as the code did before I added this branch... + */ +#error "MEMSIZE not set" #endif bootconfig.dramblocks = 1;