From: Matthew Garrett on
On Tue, Jun 01, 2010 at 01:31:08PM -0700, Justin P. Mattock wrote:

> now running as root gives nothing.

It returns you to the prompt? The machine hangs? What do you mean by
"nothing"? (Also, what chipset does this machine have?)

--
Matthew Garrett | mjg59(a)srcf.ucam.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Matthew Garrett on
On Tue, Jun 01, 2010 at 01:51:00PM -0700, Justin P. Mattock wrote:
> On 06/01/2010 01:33 PM, Matthew Garrett wrote:
>> On Tue, Jun 01, 2010 at 01:31:08PM -0700, Justin P. Mattock wrote:
>> It returns you to the prompt? The machine hangs? What do you mean by
>> "nothing"? (Also, what chipset does this machine have?)
>>
>
> this is what it does:
> It returns you to the prompt

Ok, so it does nothing. Sigh. Thapple.

> as for the chipset name..(not sure)

It's an MCP79. In that case I suspect that we're misdiagnosing this at
some level. How about the following (again, run as root):

#include <sys/io.h>

int main() {
iopl(3);
outb(0xfe, 0x64);
return 0;
}

--
Matthew Garrett | mjg59(a)srcf.ucam.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Matthew Garrett on
On Tue, Jun 01, 2010 at 02:26:01PM -0700, Justin P. Mattock wrote:
> On 06/01/2010 02:12 PM, Matthew Garrett wrote:
>> some level. How about the following (again, run as root):
>>
>> #include<sys/io.h>
>>
>> int main() {
>> iopl(3);
>> outb(0xfe, 0x64);
>> return 0;
>> }
>>

So, just to be clear, you run this as root and it immediately returns
you to the prompt? This seems unlikely.

> ahh!! I see now:
> grep 0x64 *.dsl

No, that's unrelated.

--
Matthew Garrett | mjg59(a)srcf.ucam.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Matthew Garrett on
On Tue, Jun 01, 2010 at 02:43:12PM -0700, Justin P. Mattock wrote:
> On 06/01/2010 02:29 PM, Matthew Garrett wrote:
>> So, just to be clear, you run this as root and it immediately returns
>> you to the prompt? This seems unlikely.
>
> yep.. with the above code
> I (save to a file) then
> non-root gcc reboot.c -o reboot
> then su
> ./reboot
> just bake to the command prompt

Are you running some sort of security policy that might block hardware
access? I'm going to have to find one of these machines to test with -
on everything I have here, the cf9 write and the keyboard controller
write both generate reboots. The worst case should be a hung machine,
not one that continues running...

--
Matthew Garrett | mjg59(a)srcf.ucam.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Matthew Garrett on
On Wed, Jun 02, 2010 at 05:27:22PM -0700, Justin P. Mattock wrote:
> On 06/02/2010 05:20 PM, Robert Hancock wrote:
>> #include<unistd.h>
>>
>> int main() {
>> iopl(3);
>> outb(2, 0xcf9);
>> sleep(1);
>> outb(6, 0xcf9);
>> return 0;
>> }
>>
>> That's basically what PCI reboot does.
>
> the above code reboot's the machine as it should..
> I can look at that(need to take a break first though)
> and see..

That's pretty infuriating. The ACPI-provided definition doesn't work,
and there's no ACPI mechanism for expressing the more complex cf9
behaviour. Windows doesn't appear to special case this, so we're
probably left trying to figure out why the keyboard controller method
doesn't work. Sigh.

--
Matthew Garrett | mjg59(a)srcf.ucam.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/