On 06/02/2010 05:20 PM, Robert Hancock wrote:On Wed, Jun 2, 2010 at 6:05 PM, Justin P. Mattock
<justinmattock@xxxxxxxxx> wrote:
Hmm, so the FADT says the reset register is listed as supported, and
says writing 0x06 to 0xCF9 is supposed to do it.. That's exactly what
this should do:
#include<sys/io.h>
int main() {
iopl(3);
outb(6, 0xcf9);
return 0;
}
but you said that didn't do anything.. It kind of seems like ACPI
reboot is busted on this machine then, but then I wonder how Windows
manages to work..
alright!! I have a better idea at what this is now..
as for the above code, yes this one segfaults,
the other code posted on the thread just returns
a command prompt(testing:
You get a segfault on that one? Running as root?
my bad(tired)I left out iopl(3);
in the code which was giving a segfault.
running the below code(s) just gives a command prompt
int main() {
iopl(3);
outb(0xfe, 0xcf9);
return 0;
}
int main() {
iopl(3);
outb(6, 0xcf9);
return 0;
}
What if you do:
#include<unistd.h>
int main() {
iopl(3);
outb(2, 0xcf9);
sleep(1);
outb(6, 0xcf9);
return 0;
}
That's basically what PCI reboot does.
It's possible it doesn't take the first time - you could try modifying
drivers/acpi/reboot.c to call acpi_reset in a loop instead of just
trying once (assuming you have the patch to default to ACPI reboot
enabled).
the above code reboot's the machine as it should..
I can look at that(need to take a break first though)
and see..
what about the whole kbd mechanism(0x64) give the info I provided
does it look possible, or is this machine strictly on cf9?