grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: reboot and halt commands for the PPC


From: Hollis Blanchard
Subject: Re: reboot and halt commands for the PPC
Date: Sat, 29 Jan 2005 12:40:07 -0600

On Jan 28, 2005, at 7:10 PM, Yoshinori K. Okuji wrote:

On Friday 28 January 2005 22:08, Marco Gerards wrote:
Isn't it "power-off" ?
afaik, my sparc only understand power-off to cut the power.

Is that a client interface command or a command for the command line
interface?  On my pegasos I have the shut-down command on the command
line interface.  The power-off command does not exist.

IIRC, power-off is used on Sparc, and shut-down on PowerPC. I don't know
why they are inconsistent, though.

Unfortunately, neither are listed in IEEE1275.

Further, "interpret" is an optional client interface command, and will not exist on systems without the Forth user interface (like PIBS, IBM's firmware for embedded PPC). I think the flow will need to go something like this:

grub_cmd_shutdown (...) {
        grub_ieee1275_interpret ("shut-down", 0); /* Apple Open Firmware */
grub_ieee1275_interpret ("power-off", 0); /* IBM Open Firmware and Sun OpenBoot */ return grub_error(GRUB_ERR_INVALID_COMMAND, "don't know how to shut down");
}

grub_cmd_reboot (...) {
        grub_ieee1275_interpret ("reset-all", 0);
        hard_reset ();
}

/* Manually jump to firmware's System Reset exception handler. */
hard_reset:
        lis             3, 0xfff0
        ori             3, 3, 0x0100
        mtctr   r3
        mfmsr   3
        ori             3, 3, MSR_IP
        mtmsr   3
        bctr

-Hollis





reply via email to

[Prev in Thread] Current Thread [Next in Thread]