NetBSD Problem Report #48096
From www@NetBSD.org Mon Jul 29 17:51:15 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id CCBA170B1C
for <gnats-bugs@gnats.NetBSD.org>; Mon, 29 Jul 2013 17:51:15 +0000 (UTC)
Message-Id: <20130729175114.5792170BCC@mollari.NetBSD.org>
Date: Mon, 29 Jul 2013 17:51:14 +0000 (UTC)
From: dennis.c.ferguson@gmail.com
Reply-To: dennis.c.ferguson@gmail.com
To: gnats-bugs@NetBSD.org
Subject: arm/BEAGLEBONE machdep.frequency.current sysctl node missing
X-Send-Pr-Version: www-1.0
>Number: 48096
>Category: port-arm
>Synopsis: arm/BEAGLEBONE machdep.frequency.current sysctl node missing
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: port-arm-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jul 29 17:55:00 +0000 2013
>Closed-Date: Fri Sep 30 08:24:42 +0000 2016
>Last-Modified: Fri Sep 30 08:24:42 +0000 2016
>Originator: Dennis Ferguson
>Release: 6.99.23
>Organization:
>Environment:
NetBSD beagle4.to.akit-ferguson.com 6.99.23 NetBSD 6.99.23 (BEAGLEBONE) #0: Fri Jul 26 11:32:33 EDT 2013 keenan@ts1.to.mistimed.ca:/usr/obj/sys/arch/evbarm/compile/BEAGLEBONE evbarm
>Description:
Early in the boot of a BEAGLEBONE kernel on a BeagleBone Black I see this:
NetBSD 6.99.23 (BEAGLEBONE) #0: Fri Jul 26 11:32:33 EDT 2013
keenan@ts1.to.mistimed.ca:/usr/obj/sys/arch/evbarm/compile/BEAGLEBONE
total memory = 512 MB
avail memory = 498 MB
sysctl_createv: sysctl_locate(current) returned 2
timecounter: Timecounters tick every 10.000 msec
The sysctl_createv: line indicates that a call to sysctl_createv() has failed. The missing node turns out to be machdep.frequency.current, i.e. sysctl -a returns:
...
machdep.powersave = 1
machdep.frequency.available = 550 600 650 700 720 800 900 1000
machdep.cpu_arch = 7A
...
This is inconvenient since, while the BeagleBone Black CPU should run at 1000 MHz (independent of how the power is supplied), it comes out of the bootstrap at 550 MHz and the missing node means there is no way to change that.
Note that eyeball inspection suggests that mpu_current_frequency_sysctl_helper() in sys/arch/arm/omap/am335x_prcm.c may never have been run in its current form. The 1000 in the first KASSERT() should probably be 1000000.
>How-To-Repeat:
Boot a BEAGLEBONE kernel on appropriate hardware (a BB Black, at least).
Notice the sysctl_createv: message.
Notice the missing machdep.frequency.current sysctl node.
>Fix:
I don't know. I stared at the offending call to sysctl_createv() for a very long time and couldn't see anything wrong with it.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback
State-Changed-By: matt@NetBSD.org
State-Changed-When: Thu, 01 Aug 2013 00:35:59 +0000
State-Changed-Why:
I committed a few fixes which allows the sysctl to work.
The problem with the sysctl_createv call was a missing comma
before CTL_CREATE.
From: Dennis Ferguson <dennis.c.ferguson@gmail.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: port-arm/48096 (arm/BEAGLEBONE machdep.frequency.current sysctl node missing)
Date: Mon, 5 Aug 2013 12:56:20 -0400
On 31 Jul, 2013, at 20:36 , matt@netbsd.org wrote:
> I committed a few fixes which allows the sysctl to work.
> The problem with the sysctl_createv call was a missing comma
> before CTL_CREATE.
That fixed the immediate problem, thanks, but is probably
insufficient to actually change the frequency since MPU
frequency changes apparently require accompanying voltage
changes to the MPU VDD. The AM3359 lists these values for
the revision "blank" parts (I think this is the BB):
MHz Volts
275 1.100
500 1.100
600 1.200
720 1.260
Those are nominal values, the min and max are +/-4%. For
the revision "A" parts (I think the BB Black) it has:
MHz Volts
300 0.950
600 1.100
720 1.200
800 1.260
1000 1.325
where the range is, again, +/-4%. The MPU voltage is
the VCDCD2 output from the tps65217c.
This seems not to be a bug any more since none of the
infrastructure associated with the tps65217 was designed
with this in mind. Maybe the bug should be closed?
Dennis
State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Fri, 30 Sep 2016 08:24:42 +0000
State-Changed-Why:
feedback arrived in 2013 and said to close the PR :-/
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.