lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAErSpo4uUsfKyON_5gxLikH2F0R7q-fBJ0+04vj2CrCH0r1q4g@mail.gmail.com>
Date:	Fri, 5 Aug 2011 09:20:07 -0600
From:	Bjorn Helgaas <bhelgaas@...gle.com>
To:	Jeff Chua <jeff.chua.linux@...il.com>
Cc:	lkml <linux-kernel@...r.kernel.org>
Subject: Re: How to access serial port that is set in BIOS as OS Controlled

On Fri, Aug 5, 2011 at 7:59 AM, Jeff Chua <jeff.chua.linux@...il.com> wrote:
>
>
> On Fri, Aug 5, 2011 at 1:39 AM, Bjorn Helgaas <bhelgaas@...gle.com> wrote:
>>
>> On Thu, Aug 4, 2011 at 4:56 AM, Andrey Panin <pazke@...trinvest.ru> wrote:
>> > On 209, 07 28, 2011 at 01:43:11PM +0800, Jeff Chua wrote:
>> >> I'm trying to access the serial port ttyS2 that is set in the BIOS as
>> >> "OS Controlled" without much success. If it's set it to "Always
>> >> Enabled",  I can access the serial port.
>>
>> >> If I set the BIOS to "OS Controlled", I can't access the serial port
>> >> no matter what parameter I pass to the setserial. The factory default
>> >> is "OS Controlled", and Window XP can detect and access the port.
>> >> There will be hundreds of CV60 to get into the BIOS to set it one by
>> >> one. If there's a way to access the port in linux, it'll be great!
>> >
>> > Does lspnp show this port in "OS Controlled" mode ?
>>
>> It would definitely be interesting to know what lspnp says, but I
>> suspect there might be even more to it.
>>
>> Linux can find UARTs via PNP (via PNPACPI on modern boxes).  But we
>> also poke blindly at the legacy I/O port addresses in
>> SERIAL_PORT_DFNS, which includes 0x3e8, so we should have found it
>> that way even if we didn't find it via PNP.
>>
>> My guess is that in "OS Controlled" mode, the port is initially
>> powered off or disconnected, so we can't find it, and there's some
>> ACPI method that would turn it on.  Windows might be enabling it
>> automatically.
>>
>> Can you also collect the DSDT so we can investigate this possibility?
>> There are instructions here:
>> http://kernel.org/pub/linux/kernel/people/helgaas/debug .  You might
>> want to open a bug report at http://bugzilla.kernel.org to have a
>> place to attach the DSDT and some dmesg logs.  I would start by filing
>> it under "ACPI / Config-Other".
>
> I tried it a bit more after reading  /usr/src/linux/Documentation/pnp.txt
> and got turned out that to enable to "OS Controlled" serial touch screen,
> I've to do this ...
>
> echo "auto" > /sys/bus/pnp/devices/00:0a/resources
>
> This seems to work.

OK.  That's a good clue, and maybe a good enough workaround for your
immediate need.

But I think the fact that it doesn't "just work" is a Linux bug, and
it'd be nice to fix it.  My guess is that running _SRS is what makes
the port work, and that Windows does this automatically but Linux does
not.  If we can figure out exactly what the difference is, there's a
good chance that we can fix several Linux issues by just doing things
the way Windows does.

Would you mind building with CONFIG_PNP_DEBUG_MESSAGES=y, booting with
"pnp.debug", issuing the "auto" command, and attaching the dmesg log
to this bug report?

  https://bugzilla.kernel.org/show_bug.cgi?id=40612

Thanks!

Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ