From owner-freebsd-ppc@FreeBSD.ORG Wed Jan 22 16:25:59 2014 Return-Path: Delivered-To: powerpc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB919DE4; Wed, 22 Jan 2014 16:25:59 +0000 (UTC) Received: from mail-pa0-x231.google.com (mail-pa0-x231.google.com [IPv6:2607:f8b0:400e:c03::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7216D18D2; Wed, 22 Jan 2014 16:25:59 +0000 (UTC) Received: by mail-pa0-f49.google.com with SMTP id hz1so589554pad.22 for ; Wed, 22 Jan 2014 08:25:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=8Lpfl6Mu44MRFxDY8EEdjNgpOW9brKdYHV9vR/fDu+Q=; b=0hfDEdRdYGVwfIqfYcS5vBLuohprVqG6oZfI4vpq+q+BFfm2P9qkON4LjTfU+AFim0 ATaX7ANBOaAdOOgNbO97IuUDIowOz8DGzYVG4Vo2kx7WVlwbCJpylH6DQhvvcLhhQz1Q RXCPtwp6b5OPa/+CtMdrF+nggdjcnBLhdIyWt7J0+NCYs9AqMxuRUs4wZtL55ZbBQJ3l h4gjlcJDASggyH0ZhUDHsd1peDwc4ndA7YTnvIWQznneebqn4tgCt9OkhzY1RBVuHR+3 nTtPvOLeY0RKYywVpGgxjBafOhu6UNdc+TtIkN4FXSPB0nJhCDCWDJyt8iJ2xv8ptunw gznA== X-Received: by 10.69.0.39 with SMTP id av7mr2668562pbd.4.1390407947795; Wed, 22 Jan 2014 08:25:47 -0800 (PST) Received: from zhabar.gateway.2wire.net (76-253-2-5.lightspeed.sntcca.sbcglobal.net. [76.253.2.5]) by mx.google.com with ESMTPSA id tu3sm25013517pbc.40.2014.01.22.08.25.46 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Wed, 22 Jan 2014 08:25:47 -0800 (PST) Date: Wed, 22 Jan 2014 08:25:42 -0800 From: Justin Hibbits To: Alexey Dokuchaev Subject: Re: Tightening kernel for Mac Mini G4 Message-ID: <20140122082542.745de133@zhabar.gateway.2wire.net> In-Reply-To: <20140122153323.GA3637@FreeBSD.org> References: <20140122153323.GA3637@FreeBSD.org> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; powerpc64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: powerpc@FreeBSD.org X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jan 2014 16:25:59 -0000 On Wed, 22 Jan 2014 15:33:23 +0000 Alexey Dokuchaev wrote: > Hi there, > > Today I've brought to life an old rusted Mac Mini G4 which was almost > thrown into the garbage. I've just installed some fresh snapshot of > -CURRENT on it, and now building world. Before I get to the kernel > stage, I have couple of questions (to minimize the chances of hooking > up console again if I screw up along the way). > > I'm used to trimming the kernel config down as much as possible (yes, > that means "nodevice mem" and "nodevice io" at least on i386). This > brings me to the first question: do I read it correctly that "device > io" is x86 specific and I don't need it on ppc? Yes, "device io" is for using the I/O ports on the x86 CPU. PowerPC doesn't use I/O ports, it's purely mmio, and in PowerMacs that's done with the macio. > > Second question is about ATA subsystem. Per dmesg(8): > > ata0: mem > 0x20000-0x20fff,0x8800-0x88ff irq 24,12 on macio0 > ata1: mem 0xf5004000-0xf5007fff irq > 39 at device 13.0 on pci2 > ada0 at ata1 bus 0 scbus1 target 0 lun 0 > ada0: ATA-6 deviceuhub1: 3 ports with 3 > removable, self powered > > Normally on x86 I omit ATA stuff completely from kernel config, and > just add ataintel_load="YES" (on pre-AHCI system) > in /boot/loader.conf, which in turn loads all necessary dependencies > (atapci.ko, etc.). Since "ataintel" hardly applies to my G4: 1) can > I remove ATA from my MACMINI kernel config?, and 2) what shall I add > to /boot/loader.conf to enable the disk in Mac Mini G4? Is atapci.ko > (or simply ata.ko) enough? I do not see MacIO- or Kauai-related .ko > files under /boot/kernel, hence the question. ata_macio and ata_kauai aren't available as modules. It's probably trivial to make them such, but currently they're not. Just keep the devices in kernel config. > > Third, about this section of powerpc/GENERIC, seemingly > PowerPC-related: > > device iicbus # I2C bus code > device kiic # Keywest I2C > device ad7417 # PowerMac7,2 temperature sensor > device ds1631 # PowerMac11,2 temperature sensor > device ds1775 # PowerMac7,2 temperature sensor > device fcu # Apple Fan Control Unit > device max6690 # PowerMac7,2 temperature sensor > device powermac_nvram # Open Firmware configuration NVRAM powermac_nvram is different from nvram. nvram is CMOS (PC) according to the source code, powermac_nvram is OpenFirmware configuration. It can be pulled out and loaded as a module, and isn't required for 99% of what you would want to do anyway. fcu can be pulled out. The others can be modules as well. > ^^^^^^^^^^^^^^ > How is this one related to nvram.ko? Do I need to add > nvram_load="YES" to /boot/loader.conf to be able to interact with OF > nvram from userland? Do I have to keep "powermac_nvram" in kernel > config at the same time? > > device smu # Apple System Management Unit > device windtunnel # Apple G4 MDD fan controller Neither of these are necessary for you. I should probably eventually modularize windtunnel driver (and give it a better name). SMU is for G5 systems, PMU is for G4 and G3 systems. > None of these seems to be modularized, so: which of them are required > for Mac Mini G4? > > Fourth question is of less importance, but still. In > powerpc/GENERIC, I see this sound support section: > > device sound # Generic sound driver (required) > device snd_ai2s # Apple I2S audio > device snd_davbus # Apple DAVBUS audio > device snd_uaudio # USB Audio > > But nonetheless: > > $ mixer > mixer: /dev/mixer: No such file or directory > > Is internal sound card supported? If yes, which module should I load? > > Thanks, > > ./danfe Can you drop the output of 'ofwdump -ap' somewhere (freefall?) and I can take a look at it. Internal sound on most PowerPC Apple hardware is supported, I'm curious why yours isn't. - Justin