Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Jan 2014 08:25:42 -0800
From:      Justin Hibbits <chmeeedalf@gmail.com>
To:        Alexey Dokuchaev <danfe@FreeBSD.org>
Cc:        powerpc@FreeBSD.org
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 22 Jan 2014 15:33:23 +0000
Alexey Dokuchaev <danfe@FreeBSD.org> 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: <Apple MacIO ATA Controller> mem
> 0x20000-0x20fff,0x8800-0x88ff irq 24,12 on macio0
>   ata1: <Intrepid Kauai ATA Controller> mem 0xf5004000-0xf5007fff irq
> 39 at device 13.0 on pci2
>   ada0 at ata1 bus 0 scbus1 target 0 lun 0
>   ada0: <TOSHIBA MK4025GAS KA100P> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140122082542.745de133>