i-NRG

Internetworking Research Group — UCSC

  • Home
  • People
  • Projects
  • Publications
  • Resources
You are here: Home / HOWTO make Skynet boot after re-application of power

HOWTO make Skynet boot after re-application of power

Skynet used to fail to reboot after power failures. Since it runs Linux instead of its native Mac OS X, we couldn’t use an Apple GUI setting to make it boot on re-application of power. This HOWTO shows a procedure that makes it reboot under Linux and explains why we know that this procedure works.

What to Do

Ensure that this command is executed during startup:

% sudo setpci -s 00:1f.0 0xa4.b=0:1

This command clears a bit of the Mac Pro’s power-management register that affects the computer’s behavior upon re-application of power. The bit normally is set, which means the computer remains off after power is applied. Clearing the bit makes the computer boot.

Why it Works

This blog post explains why a similar command works for a Mac Mini. To summarize, the Mac Mini’s Intel LPC Controller device determines what happens after the re-application of power. The Mac Mini that the post describes has its Intel LPC Controller at PCI address 0x1F. This device’s byte register at address 0xA4 has a bit called “AFTERG3_EN” which affects what happens after a power failure (the “G3” state). Clearing the bit ensures that the computer will reboot once. (The bit is set by software during startup, and so it needs to be cleared every time the computer boots.)

Linux has a command that lets us determine whether the Mac Pro has an identical device at address 0x1F. Log into skynet and run the command

% sudo lspci -vvv

This command lists everything that the computer knows about its PCI buses. Look for the section that starts with 00:1f.0:

00:1f.0 ISA bridge: Intel Corporation 631xESB/632xESB/3100 Chipset LPC Interface Controller (rev 09)

That’s not the same device, but searching the web for 631xESB/632xESB/3100 yields a technical document for the Intel 631xESB/632xESB I/O Controller Hub. On page 705 (!) of that PDF is the description of a byte register at address 0xA4. Bit zero of this register is called AFTERG3_EN. The document says that clearing this bit causes the computer to boot upon re-application of power. So we’ve found what we want!

The command that is suggested in the blog clears all bits of the register, and so our command uses a mask to clear just bit 0 of the register. Here’s the command again:

% sudo setpci -s 00:1f.0 0xa4.b=0:1

The assignment 0x1f.b=0:1 ends with “:1“, which is a mask that protects all register bits except for bit 0. Before executing the command, the 0xa4 register contains 0x05. After, it contains 0x04. (Use the command below to read the 0xa4 register. Remember to run under sudo, or the result will be incorrect.)

% sudo setpci -s 00:1f.0 0xa4.b

HOWTOs

Here is a list of how-to solutions for problems that we have encountered while doing research in the i-NRG Lab. … Read More

Contact Us

Katia Obraczka
katia@soe.ucsc.edu

Lab
Engineering 2 Building, Room 311
UC Santa Cruz
1156 High St
Santa Cruz, CA 95064
map / driving directions

Copyright © 2023 · Enterprise Pro Theme on Genesis Framework · WordPress · Log in