2001-10-01 12:54:33

by jdthood

[permalink] [raw]
Subject: Re: [PATCH] PnPBIOS 2.4.9-ac1[56] Vaio fix

Stelian: Okay, thanks for testing it.

Stelian and others: So the fix works using is_sony_vaio_laptop
to set the pnp_bios_dont_use_current_config flag. (Alan can
shorten this name if he wants ;) The is_sony_vaio_laptop
flag is only found in the i386 and x86_64 arches. Is the
pnpbios driver used on other arches? If so then we'll have
to provide the flag in those arches or pnpbios won't link.
Alan?

Thomas
--
(Don't reply to the From: address but to jdthood_AT_yahoo.co.uk)


2001-10-01 13:41:40

by Stelian Pop

[permalink] [raw]
Subject: Re: [PATCH] PnPBIOS 2.4.9-ac1[56] Vaio fix

On Mon, Oct 01, 2001 at 08:54:01AM -0400, Thomas Hood wrote:

> Stelian: Okay, thanks for testing it.
>
> Stelian and others: So the fix works using is_sony_vaio_laptop
> to set the pnp_bios_dont_use_current_config flag. i

As I said, the DMI scan routines are still *after* the PnP
driver initialization. I didn't really tested it, but I suspect
is_sony_vaio_laptop to be 0 when your routines are called.

Something else must have changed in your code to enable my Vaio to
boot...

Stelian.
--
Stelian Pop <[email protected]>
|---------------- Free Software Engineer -----------------|
| Alc?ve - http://www.alcove.com - Tel: +33 1 49 22 68 00 |
|------------- Alc?ve, liberating software ---------------|

2001-10-01 13:39:10

by Alan

[permalink] [raw]
Subject: Re: [PATCH] PnPBIOS 2.4.9-ac1[56] Vaio fix

> Stelian and others: So the fix works using is_sony_vaio_laptop
> to set the pnp_bios_dont_use_current_config flag. (Alan can
> shorten this name if he wants ;) The is_sony_vaio_laptop
> flag is only found in the i386 and x86_64 arches. Is the
> pnpbios driver used on other arches? If so then we'll have
> to provide the flag in those arches or pnpbios won't link.
> Alan?

PnPBIOS is a PC specific affliction. Other platforms have more elegantly
designed but even buggier solutions

2001-10-01 19:20:52

by Thomas Hood

[permalink] [raw]
Subject: Re: [PATCH] PnPBIOS 2.4.9-ac1[56] Vaio fix

--- Stelian Pop <[email protected]> wrote:
> As I said, the DMI scan routines are still *after* the PnP
> driver initialization. I didn't really tested it, but I suspect
> is_sony_vaio_laptop to be 0 when your routines are called.
> Something else must have changed in your code to enable my Vaio to
> boot...

I changed the initialization routine so that it would
use "boot" rather than "current" config values as much as
possible.

However, if is_sony_vaio_laptop is 0 at pnpbios init
time then if you look in /proc/bus/pnp you'll see numerical
entries there. Want to crash your machine? Just read from
them. (The numerically named entries in /proc/bus/pnp/boot
should be okay to read and write, though.)

We need to know when is_sony_vaio_laptop so that we can
stop this from happening. So either we put the dmi scan
earlier (which Alan says is in the works) or else we allow
the creation of the proc entries at init time but reject
read/write accesses after init time. I'll make up a patch
that does the latter, but it would be nicest if the proc
entries were omitted altogether.

--
Thomas

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

2001-10-02 08:35:46

by Stelian Pop

[permalink] [raw]
Subject: Re: [PATCH] PnPBIOS 2.4.9-ac1[56] Vaio fix

On Mon, Oct 01, 2001 at 08:21:04PM +0100, J.D. Hood wrote:

> However, if is_sony_vaio_laptop is 0 at pnpbios init
> time then if you look in /proc/bus/pnp you'll see numerical
> entries there.

Yes:
# cd /proc/bus/pnp/
# ls
00 01 02 03 04 05 06 07 08 09 0b 0c 0d 0e boot devices
# ls boot
00 01 02 03 04 05 06 07 08 09 0b 0c 0d 0e

> Want to crash your machine? Just read from
> them. (The numerically named entries in /proc/bus/pnp/boot
> should be okay to read and write, though.)

It doesn't crash. I did a "cat /proc/bus/pnp/0* > /dev/null"
and the laptop is still alive.

> We need to know when is_sony_vaio_laptop so that we can
> stop this from happening.

See above.

> So either we put the dmi scan
> earlier (which Alan says is in the works)

This is the solution, as Alan said DMI idents will be needed for
some other boards (GX ?).

Alan: are you already working on this or you're waiting for a
patch ?

> or else we allow
> the creation of the proc entries at init time but reject
> read/write accesses after init time. I'll make up a patch
> that does the latter, but it would be nicest if the proc
> entries were omitted altogether.

If we cannot read nor write them, there is no point in showing
them... (we already have the devices file to show the list).

Stelian.
--
Stelian Pop <[email protected]>
|---------------- Free Software Engineer -----------------|
| Alc?ve - http://www.alcove.com - Tel: +33 1 49 22 68 00 |
|------------- Alc?ve, liberating software ---------------|