From owner-freebsd-ppc@FreeBSD.ORG Thu Feb 21 18:02:23 2013 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7690A3C6; Thu, 21 Feb 2013 18:02:23 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-bk0-f46.google.com (mail-bk0-f46.google.com [209.85.214.46]) by mx1.freebsd.org (Postfix) with ESMTP id DC019C47; Thu, 21 Feb 2013 18:02:22 +0000 (UTC) Received: by mail-bk0-f46.google.com with SMTP id j5so4245005bkw.5 for ; Thu, 21 Feb 2013 10:02:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=9Z44fzpoHfiH5WFw6uVIOctrQzAEqV9yn17CEfySaTQ=; b=O1ySWpLwuRCWHBMns9d7jjoh9nXwDJLG1A2wDW3omfKBxA2+eMvB61HS95ZqPvjo/w SwnSdGFuoq141SS6iUuvUX/NMd/pNfadP2qdwWmx40+BAhaVTA1ufBbWjTSJvLdkgHJd d3LJwL3fgNfV2u9SQJp9wW+O+c88bo6VcQkgzM4XFWhEgzX2JKdUqiZwRvIeDJNgYxD1 HFYigZzEw1OO4i9LUFwo6lQ45TD9iki75xGnH479BywXpMNp5hqKkw8AhYwIunPCEjnb LJWofAto0kh0EJwiz8fs5TZ20wIeHZwXXItDaDp/IzAebZX4ixXZ0zYCj0sX7a1CQQfT uFvQ== MIME-Version: 1.0 X-Received: by 10.204.148.9 with SMTP id n9mr10961141bkv.1.1361469736070; Thu, 21 Feb 2013 10:02:16 -0800 (PST) Sender: chmeeedalf@gmail.com Received: by 10.204.10.13 with HTTP; Thu, 21 Feb 2013 10:02:15 -0800 (PST) In-Reply-To: References: Date: Thu, 21 Feb 2013 10:02:15 -0800 X-Google-Sender-Auth: bukqcpxwVZv0uU-tUEv20c2gm94 Message-ID: Subject: Re: CFT: PMU-based speed changes From: Justin Hibbits To: Adam Martin Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: FreeBSD PowerPC ML X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2013 18:02:23 -0000 Adam, On Thu, Feb 21, 2013 at 9:52 AM, Adam Martin wrote: > Justin, > > On Feb 21, 2013 8:56 AM, "Justin Hibbits" wrote: > > > > After over a year of off-and-on work, lots of frustration, and help from > > quite a few people, I present to you all for testing, PMU speed changes. > > You can find it in the projects/pmac_pmu branch, which is branched from > > -CURRENT back in December/January. Anybody with a Titanium Powerbook, > and > > some of the early Aluminum books, should now be able to run their > machines > > at full speed using powerd, or sysctl dev.cpu.0.freq. I tested this on > my > > 1GHz TiBook (last generation TiBook), using md5 on a core dump, and saw a > > nice performance boost. > > Will an 867MHz 12" G4 be useful for testing this? It's MPC 7455, iirc. > I think your 867MHz would work fine. I think last time we looked, it boots to FreeBSD at 500MHz, so this branch should now Just Work(TM) for you. The tell is if the 'min-clock-frequency' property exists in open firmware for the CPU. > > That branch also has PMU-based sleep code in place, but it does not work > > (don't try to set sysctl dev.pmu.0.sleep, your machine will go > catatonic). > > Ideas on what makes it go catatonic yet? Is it just the TiBook, or > AlBooks too? > I think it's the order in which the devices are suspended. I think the primary busses are being suspended too early, so the PMU isn't being suspended properly. Looking at pmu_sleep() in sys/powerpc/powermac/pmu.c should give you an idea of how it should work (just trace all the device_suspend entries in sys/powerpc). In fact, looking at the code, simply removing the uninorth_chip_resume DEVMETHOD entry might be sufficient. > -- > ADAM David Alan Martin > - Justin