public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* RE: [ACPI] [PATCH] restore _OS object to "Linux" for ia64
@ 2004-09-13 19:37 Moore, Robert
  2004-09-13 21:30 ` Gerald Pfeifer
  0 siblings, 1 reply; 7+ messages in thread
From: Moore, Robert @ 2004-09-13 19:37 UTC (permalink / raw)
  To: Brown, Len, Alex Williamson; +Cc: linux-ia64, ACPI Developers

I agree with what Len has written.

Not only is the !Windows code path apparently untested for the most
part, we have discovered many machines that simply do not work properly
unless we report "Microsoft Windows NT" for the _OS string.  This is
another reason why we changed this string from "Linux"

Bob


> -----Original Message-----
> From: acpi-devel-admin@lists.sourceforge.net [mailto:acpi-devel-
> admin@lists.sourceforge.net] On Behalf Of Len Brown
> Sent: Monday, September 13, 2004 12:23 PM
> To: Alex Williamson
> Cc: linux-ia64@vger.kernel.org; ACPI Developers
> Subject: Re: [ACPI] [PATCH] restore _OS object to "Linux" for ia64
> 
> On Mon, 2004-09-13 at 14:27, Alex Williamson wrote:
> >    A recent change to ACPI made the _OS object falsely report the OS
as
> > "Microsoft Windows NT".  This seems like a slippery slope, and I'd
> > rather not go down it for ia64.  I think all of the ia64 OEMs are
> > involved enough with Linux that this isn't necessary and the change
> > limits the options should ACPI firmware need to make an OS specific
work
> > around.  The patch below will make all ia64 boxes report a default
_OS
> > of "Linux".
> 
> While I share your pride in Linux, there are a couple of reasons
> why we do not make _OS return "Linux".
> 
> _OS is a deprecated interface -- it has been replaced
> by the more flexible _OSI.  So with _OS we're talking
> about past, not future systems.  And there is a total
> population of 0 systems in the installed base that check
> for _OS ="Linux" in their firmware.  On the other hand, there
> are zillions of systems that check for Windows with _OS,
> and the !Windows path through the firmware is effectivly
> unvalidated.
> 
> While this is really important on i386, it may not be
> important for ia64.  However, unless you can show
> me an existing system that checks for _OS=Linux, then
> it only adds risk w/o reward to make this change, even
> if just on ia64.  New systems should be using _OSI.
> 
> thanks,
> -Len
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> Project Admins to receive an Apple iPod Mini FREE for your judgement
on
> who ports your project to Linux PPC the best. Sponsored by IBM.
> Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
> _______________________________________________
> Acpi-devel mailing list
> Acpi-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/acpi-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread
* RE: [ACPI] [PATCH] restore _OS object to "Linux" for ia64
@ 2004-09-17 17:18 Moore, Robert
  0 siblings, 0 replies; 7+ messages in thread
From: Moore, Robert @ 2004-09-17 17:18 UTC (permalink / raw)
  To: Moore, Robert, Alex Williamson
  Cc: Gerald Pfeifer, Brown, Len, linux-ia64, ACPI Developers

A new example:

> -----Original Message-----
> From: Moore, Robert
> Sent: Friday, September 17, 2004 10:10 AM
> To: 'Andreas Leppert'; acpi-devel@lists.sourceforge.net
> Subject: RE: [ACPI] ACPI_OS_NAME: no battery or no ac_adapter
> 
> In newer versions of ACPI CA, we have changed ACPI_OS_NAME to "Microsoft
> Windows NT" for exactly this reason.
> 
> Bob
> 
> 
> > -----Original Message-----
> > From: acpi-devel-admin@lists.sourceforge.net [mailto:acpi-devel-
> > admin@lists.sourceforge.net] On Behalf Of Andreas Leppert
> > Sent: Friday, September 17, 2004 6:04 AM
> > To: acpi-devel@lists.sourceforge.net
> > Subject: [ACPI] ACPI_OS_NAME: no battery or no ac_adapter
> >
> > hi,
> >
> > i've a strange problem on my fujitsu laptop.  If i compile my kernel
> using
> > acpi, everything works fine, but acpi -V doesn't change the value of
> > ac_adapter info. it's always set to "on-line". it doesnt matter if the
> > ac_adapter is plugged in or not. always "on-line".
> >
> > then i found this:
> > http://sourceforge.net/mailarchive/message.php?msg_id=8560832
> >
> > so i changed the value of ACPI_OS_NAME in my
> > /usr/src/linux/include/acpi/platform/aclinux.h from "Linux" to
> "Microsoft
> > Windows NT". Now, ac_adapter changes its value from "on-line" to "off-
> > line" if i unplug the ac_adapter.
> >
> > But now, acpi -V doesnt show me any battery information. the line is
> just
> > omitted! so what to do?
> >
> > under http://andileppert.de/dsdtl.dsl you can find my dsdt. you will see
> > that there are a few _OS commands...  what can i do? this is a strange
> > thing...
> >
> > thanks in advance
> > Andi Leppert
> > _________________________________________________________
> > Mit WEB.DE FreePhone® mit höchster Qualität ab 0 Ct./Min.
> > weltweit telefonieren! http://freephone.web.de/?mc=021201
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> > Project Admins to receive an Apple iPod Mini FREE for your judgement on
> > who ports your project to Linux PPC the best. Sponsored by IBM.
> > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
> > _______________________________________________
> > Acpi-devel mailing list
> > Acpi-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/acpi-devel

> -----Original Message-----
> From: Moore, Robert
> Sent: Tuesday, September 14, 2004 8:00 AM
> To: 'Alex Williamson'
> Cc: Gerald Pfeifer; Brown, Len; linux-ia64@vger.kernel.org; ACPI
> Developers
> Subject: RE: [ACPI] [PATCH] restore _OS object to "Linux" for ia64
> 
> 
> >
> >    But how can we be sure we're bug for bug and feature for feature
> > compatible with an arbitrary version of Windows?  I got curious and
> > looked at the DSDT on my home PC, generic VIA KM266 chipset.  Sure
> > enough:
> 
> We aren't ever "sure".
> 
> All I can say is that MS is the "defacto" implementation and that we
> attempt to both adhere to the ACPI spec and make some accommodations to
> the MS implementation (such as supporting the control method "implicit
> return")
> 
> The NT/XP MS implementation is their best version with the fewest bugs, so
> this is the version that we are compatible with.
> 
> Given this, and the fact that most iA32 platform BIOSs are developed and
> tested with XP, using the "Microsoft Windows NT" identification string
> seems to be the best way to go.  By doing this, we have fixed at least
> several machines (maybe more) that were not working properly under Linux,
> and there haven't been any problems reported that I know of.
> 
> Bob
> 

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread
* RE: [ACPI] [PATCH] restore _OS object to "Linux" for ia64
@ 2004-09-14 15:00 Moore, Robert
  0 siblings, 0 replies; 7+ messages in thread
From: Moore, Robert @ 2004-09-14 15:00 UTC (permalink / raw)
  To: Alex Williamson; +Cc: Gerald Pfeifer, Brown, Len, linux-ia64, ACPI Developers


> 
>    But how can we be sure we're bug for bug and feature for feature
> compatible with an arbitrary version of Windows?  I got curious and
> looked at the DSDT on my home PC, generic VIA KM266 chipset.  Sure
> enough:

We aren't ever "sure".

All I can say is that MS is the "defacto" implementation and that we
attempt to both adhere to the ACPI spec and make some accommodations to
the MS implementation (such as supporting the control method "implicit
return")

The NT/XP MS implementation is their best version with the fewest bugs,
so this is the version that we are compatible with.

Given this, and the fact that most iA32 platform BIOSs are developed and
tested with XP, using the "Microsoft Windows NT" identification string
seems to be the best way to go.  By doing this, we have fixed at least
several machines (maybe more) that were not working properly under
Linux, and there haven't been any problems reported that I know of.

Bob



^ permalink raw reply	[flat|nested] 7+ messages in thread
* RE: [PATCH] restore _OS object to "Linux" for ia64
@ 2004-09-13 22:59 Moore, Robert
  2004-09-14  4:27 ` [ACPI] " Alex Williamson
  0 siblings, 1 reply; 7+ messages in thread
From: Moore, Robert @ 2004-09-13 22:59 UTC (permalink / raw)
  To: Moore, Robert, Gerald Pfeifer
  Cc: Brown, Len, Alex Williamson, linux-ia64-u79uwXL29TY76Z2rM5mHXA,
	ACPI Developers

Here's an example:

> -----Original Message-----
> From: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org [mailto:acpi-devel- 
> admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Martin Ginkel
> Sent: Wednesday, May 26, 2004 3:09 PM
> To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> Cc: oysteigi-zs2scLodJVNRyvKAgBWctw@public.gmane.org
> Subject: Re: [ACPI] Wrong AC state
> 
> Martin Ginkel wrote:
> > On my laptop (Fujitsu-Siemens Amilo D 8830) this seems to be 
> > partially broken. The /proc/ac_adapter/AC0/state has a value on-line

> > or off-line from boot-time and doesn't change later on.
> 
> OK found a solution while reading the disassembled DSDT:
> The Code ist checking the OS-Version:
> 
>      Method (_PSR, 0, NotSerialized)
>      {
>        If (LNot (LEqual (FAKE, 0x00)))
>        {
>          Return (0x00)
>        }
>        Else
>        {
>          If (LOr (LEqual (OSFL (), 0x00), LEqual (OSFL (), 0x04)))
>            {
>               Store (\_SB.PCI0.SBRG.EC0.XCIN, Local0)
>                                      }
>           Else
>            {
>               Store (ACIN, Local0)
>            }
> 
>               Return (Local0)
>            }
>       }
> 
> 
> OSFL is returning 0x00 for win2000 and 0x04 for windows nt.
> I defined as a dirty fix:
> ./include/acpi/platform/aclinux.h:50:
> #define ACPI_OS_NAME               "Microsoft Windows NT"
> 
> Now the Power Monitor reacts instantly.
> 
> Well: the Bios seems to be designed for Microsoft Windows ;-P
> 
> 
> 	CU
> 	Martin
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle 
> 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. 
> http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
> _______________________________________________
> Acpi-devel mailing list
> Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org 
> https://lists.sourceforge.net/lists/listinfo/acpi-devel

> -----Original Message-----
> From: Moore, Robert
> Sent: Monday, September 13, 2004 3:11 PM
> To: 'Gerald Pfeifer'
> Cc: Brown, Len; Alex Williamson; linux-ia64-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; ACPI
> Developers
> Subject: RE: [ACPI] [PATCH] restore _OS object to "Linux" for ia64
> 
> I don't know what the specific machines were.  There was lots of
> discussion on the Linux/ACPI list before we did this.  I think they
were
> all 32-bit machines, however.
> 
> 
> > -----Original Message-----
> > From: Gerald Pfeifer [mailto:gp-l3A5Bk7waGM@public.gmane.org]
> > Sent: Monday, September 13, 2004 2:30 PM
> > To: Moore, Robert
> > Cc: Brown, Len; Alex Williamson; linux-ia64-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; ACPI
> > Developers
> > Subject: RE: [ACPI] [PATCH] restore _OS object to "Linux" for ia64
> >
> > On Mon, 13 Sep 2004, Moore, Robert wrote:
> > > Not only is the !Windows code path apparently untested for the
most
> > > part, we have discovered many machines that simply do not work
> properly
> > > unless we report "Microsoft Windows NT" for the _OS string.
> >
> > Can you name some of these (broken) systems?
> >
> > Given that we apparently did not encounter this with our 2.6.5-based
> SLES9
> > kernel so far, I'm a bit sceptical that many (if any) ia64 machines
are
> > affected.
> >
> > Gerald


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH] restore _OS object to "Linux" for ia64
@ 2004-09-13 18:27 Alex Williamson
  2004-09-13 19:22 ` Len Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Alex Williamson @ 2004-09-13 18:27 UTC (permalink / raw)
  To: linux-ia64, acpi-devel


   A recent change to ACPI made the _OS object falsely report the OS as
"Microsoft Windows NT".  This seems like a slippery slope, and I'd
rather not go down it for ia64.  I think all of the ia64 OEMs are
involved enough with Linux that this isn't necessary and the change
limits the options should ACPI firmware need to make an OS specific work
around.  The patch below will make all ia64 boxes report a default _OS
of "Linux".  Thanks,

	Alex

-- 
Signed-off-by: Alex Williamson <alex.williamson@hp.com>

===== arch/ia64/kernel/acpi.c 1.74 vs edited =====
--- 1.74/arch/ia64/kernel/acpi.c	Thu Aug  5 22:40:29 2004
+++ edited/arch/ia64/kernel/acpi.c	Mon Sep 13 09:32:46 2004
@@ -629,6 +629,13 @@
 #endif
 	/* Make boot-up look pretty */
 	printk(KERN_INFO "%d CPUs available, %d CPUs total\n", available_cpus, total_cpus);
+
+	/*
+	 * Make the _OS object report the right name, ia64 Linux has
+	 * enough OEM support that we shouldn't need to fake another OS.
+	 */
+	acpi_os_name_setup("Linux");
+
 	return 0;
 }
 
===== include/acpi/acpiosxf.h 1.34 vs edited =====
--- 1.34/include/acpi/acpiosxf.h	Fri Jul 16 23:37:53 2004
+++ edited/include/acpi/acpiosxf.h	Mon Sep 13 09:38:55 2004
@@ -313,6 +313,10 @@
 	u32                             function,
 	void                            *info);
 
+int __init
+acpi_os_name_setup (
+	char				*str);
+
 /*
  * Debug print routines
  */



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-09-17 17:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-13 19:37 [ACPI] [PATCH] restore _OS object to "Linux" for ia64 Moore, Robert
2004-09-13 21:30 ` Gerald Pfeifer
2004-09-13 22:19   ` Nate Lawson
  -- strict thread matches above, loose matches on Subject: below --
2004-09-17 17:18 Moore, Robert
2004-09-14 15:00 Moore, Robert
2004-09-13 22:59 Moore, Robert
2004-09-14  4:27 ` [ACPI] " Alex Williamson
2004-09-13 18:27 Alex Williamson
2004-09-13 19:22 ` Len Brown
2004-09-13 19:42   ` [ACPI] " Alex Williamson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox