Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/evbarm bump VCPROP_MAXCMDLINE to 1024, use this ins...
details: https://anonhg.NetBSD.org/src/rev/eb2a46cfe4f5
branches: trunk
changeset: 330926:eb2a46cfe4f5
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Fri Jul 25 11:39:34 2014 +0000
description:
bump VCPROP_MAXCMDLINE to 1024, use this instead of MAX_BOOT_STRING for sizing boot_args, and allow for overriding VCPROP_MAXCMDLINE in kernel config. Fixes cmdline parsing with newer firmware
(required for B+)
diffstat:
sys/arch/evbarm/conf/files.rpi | 5 ++++-
sys/arch/evbarm/rpi/rpi_machdep.c | 7 ++++---
sys/arch/evbarm/rpi/vcprop.h | 8 ++++++--
3 files changed, 14 insertions(+), 6 deletions(-)
diffs (78 lines):
diff -r 786af6857416 -r eb2a46cfe4f5 sys/arch/evbarm/conf/files.rpi
--- a/sys/arch/evbarm/conf/files.rpi Fri Jul 25 11:22:50 2014 +0000
+++ b/sys/arch/evbarm/conf/files.rpi Fri Jul 25 11:39:34 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.rpi,v 1.4 2013/09/05 07:08:09 skrll Exp $
+# $NetBSD: files.rpi,v 1.5 2014/07/25 11:39:34 jmcneill Exp $
#
# Raspberry Pi
#
@@ -19,3 +19,6 @@
device vcmbox: sysmon_envsys
attach vcmbox at bcmmboxbus
file arch/evbarm/rpi/rpi_vcmbox.c vcmbox
+
+# Maximum command-line length
+defparam opt_vcprop.h VCPROP_MAXCMDLINE
diff -r 786af6857416 -r eb2a46cfe4f5 sys/arch/evbarm/rpi/rpi_machdep.c
--- a/sys/arch/evbarm/rpi/rpi_machdep.c Fri Jul 25 11:22:50 2014 +0000
+++ b/sys/arch/evbarm/rpi/rpi_machdep.c Fri Jul 25 11:39:34 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rpi_machdep.c,v 1.42 2014/07/16 23:54:32 jmcneill Exp $ */
+/* $NetBSD: rpi_machdep.c,v 1.43 2014/07/25 11:39:34 jmcneill Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,12 +30,13 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.42 2014/07/16 23:54:32 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.43 2014/07/25 11:39:34 jmcneill Exp $");
#include "opt_evbarm_boardtype.h"
#include "opt_ddb.h"
#include "opt_kgdb.h"
#include "opt_arm_debug.h"
+#include "opt_vcprop.h"
#include "sdhc.h"
#include "bcmdwctwo.h"
@@ -103,7 +104,7 @@
extern int KERNEL_BASE_virt[];
BootConfig bootconfig; /* Boot config storage */
-static char bootargs[MAX_BOOT_STRING];
+static char bootargs[VCPROP_MAXCMDLINE];
char *boot_args = NULL;
static void rpi_bootparams(void);
diff -r 786af6857416 -r eb2a46cfe4f5 sys/arch/evbarm/rpi/vcprop.h
--- a/sys/arch/evbarm/rpi/vcprop.h Fri Jul 25 11:22:50 2014 +0000
+++ b/sys/arch/evbarm/rpi/vcprop.h Fri Jul 25 11:39:34 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vcprop.h,v 1.8 2013/04/17 06:12:42 skrll Exp $ */
+/* $NetBSD: vcprop.h,v 1.9 2014/07/25 11:39:34 jmcneill Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -36,6 +36,8 @@
#ifndef _EVBARM_RPI_VCPROP_H_
#define _EVBARM_RPI_VCPROP_H_
+#include "opt_vcprop.h"
+
struct vcprop_tag {
uint32_t vpt_tag;
#define VCPROPTAG_NULL 0x00000000
@@ -154,7 +156,9 @@
struct vcprop_clock clk[VCPROP_MAXCLOCKS];
};
-#define VCPROP_MAXCMDLINE 256
+#ifndef VCPROP_MAXCMDLINE
+#define VCPROP_MAXCMDLINE 1024
+#endif
struct vcprop_tag_cmdline {
struct vcprop_tag tag;
uint8_t cmdline[VCPROP_MAXCMDLINE];
Home |
Main Index |
Thread Index |
Old Index