* Intel ACPI
@ 2003-02-03 23:14 Margit Schubert-While
[not found] ` <4.3.2.7.2.20030204000748.00b62270-/+uTVYYQEIikFefZ9hXnBAC/G2K4zDHf@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: Margit Schubert-While @ 2003-02-03 23:14 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Hi,
So, What do you think about this (D845):
Method (OSFL, 0, NotSerialized)
{
Store (0x00, Local0)
If (MCTH (\_OS, "Microsoft Windows"))
{
Store (0x01, Local0)
}
If (MCTH (\_OS, "Microsoft WindowsME: Millennium Edition"))
{
Store (0x01, Local0)
}
Return (Local0)
}
Method (_PS3, 0, NotSerialized)
{
If (MCTH (\_OS, "Microsoft Windows"))
{
Store (_GTM (), TIM1)
}
}
Method (_PS0, 0, NotSerialized)
{
If (MCTH (\_OS, "Microsoft Windows"))
{
If (BOOT)
{
If (And (DRVI, 0x20))
{
PRGT (MPIO, MDMA, FLGS, 0xA0)
}
If (And (DRVI, 0x80))
{
PRGT (SPIO, SDMA, FLGS, 0xB0)
}
}
Store (0x01, BOOT)
}
}
Method (_PS3, 0, NotSerialized)
{
If (MCTH (\_OS, "Microsoft Windows"))
{
Store (_GTM (), TIM1)
}
}
Method (_PS0, 0, NotSerialized)
{
If (MCTH (\_OS, "Microsoft Windows"))
{
If (BOOT)
{
If (And (DRVI, 0x20))
{
PRGT (MPIO, MDMA, FLGS, 0xA0)
}
If (And (DRVI, 0x80))
{
PRGT (SPIO, SDMA, FLGS, 0xB0)
}
}
Store (0x01, BOOT)
}
}
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Intel ACPI
[not found] ` <4.3.2.7.2.20030204000748.00b62270-/+uTVYYQEIikFefZ9hXnBAC/G2K4zDHf@public.gmane.org>
@ 2003-02-04 9:45 ` Ducrot Bruno
[not found] ` <20030204094540.GE1205-j6u/t2rXLliUoIHC/UFpr9i2O/JbrIOy@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: Ducrot Bruno @ 2003-02-04 9:45 UTC (permalink / raw)
To: Margit Schubert-While; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
On Tue, Feb 04, 2003 at 12:14:13AM +0100, Margit Schubert-While wrote:
> Hi,
> So, What do you think about this (D845):
>
Nothing, apart that it will not work reliability with Linux or
any flavour of free *BSD.
--
Ducrot Bruno
-- Which is worse: ignorance or apathy?
-- Don't know. Don't care.
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Intel ACPI
[not found] ` <20030204094540.GE1205-j6u/t2rXLliUoIHC/UFpr9i2O/JbrIOy@public.gmane.org>
@ 2003-02-04 12:22 ` Dave Jones
[not found] ` <20030204132251.E16744-l3A5Bk7waGM@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: Dave Jones @ 2003-02-04 12:22 UTC (permalink / raw)
To: Ducrot Bruno
Cc: Margit Schubert-While,
acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
On Tue, Feb 04, 2003 at 10:45:40AM +0100, Ducrot Bruno wrote:
> > So, What do you think about this (D845):
> Nothing, apart that it will not work reliability with Linux or
> any flavour of free *BSD.
I wonder if it's worth allowing the user to override \_OS at boottime.
Dave
--
| Dave Jones. http://www.codemonkey.org.uk
| SuSE Labs
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Intel ACPI
[not found] ` <20030204132251.E16744-l3A5Bk7waGM@public.gmane.org>
@ 2003-02-04 15:43 ` Ducrot Bruno
[not found] ` <20030204154359.GH1205-j6u/t2rXLliUoIHC/UFpr9i2O/JbrIOy@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: Ducrot Bruno @ 2003-02-04 15:43 UTC (permalink / raw)
To: Dave Jones
Cc: Ducrot Bruno, Margit Schubert-While,
acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
On Tue, Feb 04, 2003 at 01:22:51PM +0100, Dave Jones wrote:
> On Tue, Feb 04, 2003 at 10:45:40AM +0100, Ducrot Bruno wrote:
> > > So, What do you think about this (D845):
> > Nothing, apart that it will not work reliability with Linux or
> > any flavour of free *BSD.
>
> I wonder if it's worth allowing the user to override \_OS at boottime.
In fact, I *always* change my \_OS string.
--
Ducrot Bruno
-- Which is worse: ignorance or apathy?
-- Don't know. Don't care.
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Intel ACPI
[not found] ` <20030204154359.GH1205-j6u/t2rXLliUoIHC/UFpr9i2O/JbrIOy@public.gmane.org>
@ 2003-02-04 15:46 ` Dave Jones
[not found] ` <20030204164641.A31886-l3A5Bk7waGM@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: Dave Jones @ 2003-02-04 15:46 UTC (permalink / raw)
To: Ducrot Bruno
Cc: Margit Schubert-While,
acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
On Tue, Feb 04, 2003 at 04:43:59PM +0100, Ducrot Bruno wrote:
> > > Nothing, apart that it will not work reliability with Linux or
> > > any flavour of free *BSD.
> > I wonder if it's worth allowing the user to override \_OS at boottime.
> In fact, I *always* change my \_OS string.
Interesting. For any noticable gain ?
Dave
--
| Dave Jones. http://www.codemonkey.org.uk
| SuSE Labs
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Intel ACPI
[not found] ` <20030204164641.A31886-l3A5Bk7waGM@public.gmane.org>
@ 2003-02-04 15:55 ` Ducrot Bruno
2003-02-05 6:29 ` Zdeněk OGAR Skalák
0 siblings, 1 reply; 10+ messages in thread
From: Ducrot Bruno @ 2003-02-04 15:55 UTC (permalink / raw)
To: Dave Jones
Cc: Ducrot Bruno, Margit Schubert-While,
acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
On Tue, Feb 04, 2003 at 04:46:42PM +0100, Dave Jones wrote:
> On Tue, Feb 04, 2003 at 04:43:59PM +0100, Ducrot Bruno wrote:
>
> > > > Nothing, apart that it will not work reliability with Linux or
> > > > any flavour of free *BSD.
> > > I wonder if it's worth allowing the user to override \_OS at boottime.
> > In fact, I *always* change my \_OS string.
>
> Interesting. For any noticable gain ?
S1 and S4bios work better, especially in 2.4 series, if \_OS is set as
'Microsoft Windows NT", because this OS have the same kind of support
for suspending/resuming devices as Linux 2.4 in general...
2.5 is another story. I am not sure for now what is 'best'.
--
Ducrot Bruno
-- Which is worse: ignorance or apathy?
-- Don't know. Don't care.
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Intel ACPI
2003-02-04 15:55 ` Ducrot Bruno
@ 2003-02-05 6:29 ` Zdeněk OGAR Skalák
[not found] ` <3E40AF32.AA177847-Bh/+Xfn7orxQjibfaplwYw@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: Zdeněk OGAR Skalák @ 2003-02-05 6:29 UTC (permalink / raw)
Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Hi,
Ducrot Bruno wrote:
>
> On Tue, Feb 04, 2003 at 04:46:42PM +0100, Dave Jones wrote:
> > On Tue, Feb 04, 2003 at 04:43:59PM +0100, Ducrot Bruno wrote:
> >
> > > > > Nothing, apart that it will not work reliability with Linux or
> > > > > any flavour of free *BSD.
> > > > I wonder if it's worth allowing the user to override \_OS at boottime.
> > > In fact, I *always* change my \_OS string.
> >
> > Interesting. For any noticable gain ?
>
> S1 and S4bios work better, especially in 2.4 series, if \_OS is set as
> 'Microsoft Windows NT", because this OS have the same kind of support
> for suspending/resuming devices as Linux 2.4 in general...
>
> 2.5 is another story. I am not sure for now what is 'best'.
So could we add kernel boot argument to allow changig/overriding the \_OS
string? Eg. acpi_os="Microsoft Windows NT" to allow us to play with it without
rekompiling the kernel ?
Zdenek OGAR Skalak
--
Ing. Zdeněk OGAR Skalák
Monet+ a.s.
Zámecká 365
763 14 Zlín - Štípa, CZ
Tel: +420 / 577 110 411, Fax: +420 / 577 914 557
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Intel ACPI
[not found] ` <3E40AF32.AA177847-Bh/+Xfn7orxQjibfaplwYw@public.gmane.org>
@ 2003-02-05 12:30 ` Dave Jones
[not found] ` <20030205133049.A18324-l3A5Bk7waGM@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: Dave Jones @ 2003-02-05 12:30 UTC (permalink / raw)
To: Zdenìk OGAR Skalák; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
On Wed, Feb 05, 2003 at 07:29:06AM +0100, Zdenìk OGAR Skalák wrote:
> So could we add kernel boot argument to allow changig/overriding the \_OS
> string? Eg. acpi_os="Microsoft Windows NT" to allow us to play with it without
> rekompiling the kernel ?
A bootarg does seem to be the most sensible way to do it. You need
to set it early enough so that you catch everything. Doing it later
through a sysctl or the like would be too late, and doing it statically
at compile time would make it useless for vendor kernels.
Dave
--
| Dave Jones. http://www.codemonkey.org.uk
| SuSE Labs
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] [1/2] Allow override acpi_gbl_pre_defined_names (aka change that _OS).
[not found] ` <20030205133049.A18324-l3A5Bk7waGM@public.gmane.org>
@ 2003-02-05 18:43 ` Ducrot Bruno
[not found] ` <20030205184310.GK1205-j6u/t2rXLliUoIHC/UFpr9i2O/JbrIOy@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: Ducrot Bruno @ 2003-02-05 18:43 UTC (permalink / raw)
To: Grover, Andrew
Cc: Dave Jones, Zdenìk OGAR Skalák,
acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Hi!
This patch allow an OS vendor to be able to change some values of the
acpi_gbl_pre_defined_names global variable.
The main purpose actually is to override the \_OS part, in order
to test/try etc. when a DSDT was more specifically written for
some Redmond OSes.
In order to get it to work, OS must provide an acpi_os_predefined_override()
(or AcpiOsPredefinedOverride) function.
One example is at the end of this patch.
A patch using a bootarg in order to change the \_OS string for Linux follow.
--- linux/drivers/acpi/namespace/nsaccess.c 2003/02/05 14:25:40 1.1
+++ linux/drivers/acpi/namespace/nsaccess.c 2003/02/05 15:23:59
@@ -100,6 +100,16 @@
* initial value, create the initial value.
*/
if (init_val->val) {
+ acpi_string val;
+
+ status = acpi_os_predefined_override(init_val, &val);
+ if (ACPI_FAILURE (status)) {
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+ "Could not override predefined %s\n", init_val->name));
+ }
+ if (val == NULL)
+ val = init_val->val;
+
/*
* Entry requests an initial value, allocate a
* descriptor for it.
@@ -118,7 +128,7 @@
switch (init_val->type) {
case ACPI_TYPE_METHOD:
obj_desc->method.param_count =
- (u8) ACPI_STRTOUL (init_val->val, NULL, 10);
+ (u8) ACPI_STRTOUL (val, NULL, 10);
obj_desc->common.flags |= AOPOBJ_DATA_VALID;
#if defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
@@ -132,7 +142,7 @@
case ACPI_TYPE_INTEGER:
obj_desc->integer.value =
- (acpi_integer) ACPI_STRTOUL (init_val->val, NULL, 10);
+ (acpi_integer) ACPI_STRTOUL (val, NULL, 10);
break;
@@ -141,8 +151,8 @@
/*
* Build an object around the static string
*/
- obj_desc->string.length = (u32) ACPI_STRLEN (init_val->val);
- obj_desc->string.pointer = init_val->val;
+ obj_desc->string.length = (u32) ACPI_STRLEN (val);
+ obj_desc->string.pointer = val;
obj_desc->common.flags |= AOPOBJ_STATIC_POINTER;
break;
@@ -151,7 +161,7 @@
obj_desc->mutex.node = new_node;
obj_desc->mutex.sync_level =
- (u16) ACPI_STRTOUL (init_val->val, NULL, 10);
+ (u16) ACPI_STRTOUL (val, NULL, 10);
if (ACPI_STRCMP (init_val->name, "_GL_") == 0) {
/*
--- linux/include/acpi/acpiosxf.h 2003/02/05 15:15:11 1.1
+++ linux/include/acpi/acpiosxf.h 2003/02/05 15:25:08
@@ -93,6 +93,11 @@
struct acpi_pointer *address);
acpi_status
+acpi_os_predefined_override (
+ const struct acpi_predefined_names *init_val,
+ acpi_string *new_val);
+
+acpi_status
acpi_os_table_override (
struct acpi_table_header *existing_table,
struct acpi_table_header **new_table);
--- linux/drivers/acpi/osl.c 2003/01/31 18:12:52 1.1
+++ linux/drivers/acpi/osl.c 2003/02/05 15:42:43
@@ -198,6 +198,17 @@
*phys = virt_to_phys(virt);
+ return AE_OK;
+}
+
+acpi_status
+acpi_os_predefined_override (const struct acpi_predefined_names *init_val,
+ acpi_string *new_val)
+{
+ if (!init_val || !new_val)
+ return AE_BAD_PARAMETER;
+
+ *new_val = NULL;
return AE_OK;
}
--
Ducrot Bruno
-- Which is worse: ignorance or apathy?
-- Don't know. Don't care.
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] [2/2] Allow override acpi_gbl_pre_defined_names (aka change that _OS).
[not found] ` <20030205184310.GK1205-j6u/t2rXLliUoIHC/UFpr9i2O/JbrIOy@public.gmane.org>
@ 2003-02-05 18:47 ` Ducrot Bruno
0 siblings, 0 replies; 10+ messages in thread
From: Ducrot Bruno @ 2003-02-05 18:47 UTC (permalink / raw)
To: Grover, Andrew
Cc: Dave Jones, Zdenìk OGAR Skalák,
acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
This is the linux part. It permit to pass a apci_os_name= boot args
in order to override the \_OS.
--- linux/drivers/acpi/osl.c 2003/02/05 15:51:26 1.5
+++ linux/drivers/acpi/osl.c 2003/02/05 18:09:21
@@ -201,6 +201,8 @@
return AE_OK;
}
+static char acpi_os_name[200] = ACPI_OS_NAME;
+
acpi_status
acpi_os_predefined_override (const struct acpi_predefined_names *init_val,
acpi_string *new_val)
@@ -209,6 +211,9 @@
return AE_BAD_PARAMETER;
*new_val = NULL;
+ if (!memcmp (init_val->name, "_OS_", 4))
+ *new_val = acpi_os_name;
+
return AE_OK;
}
@@ -848,3 +853,28 @@
return AE_OK;
}
+
+int __init
+acpi_os_name_setup(char *str)
+{
+ char *p = acpi_os_name;
+ int count = 199;
+
+ if (!str || !*str)
+ return 0;
+
+ for (; count-- && str && *str; str++) {
+ if (isalnum(*str) || *str == ' ')
+ *p++ = *str;
+ else if (*str == '\'' || *str == '"')
+ continue;
+ else
+ break;
+ }
+ *p = 0;
+
+ return 1;
+
+}
+
+__setup("acpi_os_name=", acpi_os_name_setup);
Cheers,
--
Ducrot Bruno
-- Which is worse: ignorance or apathy?
-- Don't know. Don't care.
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2003-02-05 18:47 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-03 23:14 Intel ACPI Margit Schubert-While
[not found] ` <4.3.2.7.2.20030204000748.00b62270-/+uTVYYQEIikFefZ9hXnBAC/G2K4zDHf@public.gmane.org>
2003-02-04 9:45 ` Ducrot Bruno
[not found] ` <20030204094540.GE1205-j6u/t2rXLliUoIHC/UFpr9i2O/JbrIOy@public.gmane.org>
2003-02-04 12:22 ` Dave Jones
[not found] ` <20030204132251.E16744-l3A5Bk7waGM@public.gmane.org>
2003-02-04 15:43 ` Ducrot Bruno
[not found] ` <20030204154359.GH1205-j6u/t2rXLliUoIHC/UFpr9i2O/JbrIOy@public.gmane.org>
2003-02-04 15:46 ` Dave Jones
[not found] ` <20030204164641.A31886-l3A5Bk7waGM@public.gmane.org>
2003-02-04 15:55 ` Ducrot Bruno
2003-02-05 6:29 ` Zdeněk OGAR Skalák
[not found] ` <3E40AF32.AA177847-Bh/+Xfn7orxQjibfaplwYw@public.gmane.org>
2003-02-05 12:30 ` Dave Jones
[not found] ` <20030205133049.A18324-l3A5Bk7waGM@public.gmane.org>
2003-02-05 18:43 ` [PATCH] [1/2] Allow override acpi_gbl_pre_defined_names (aka change that _OS) Ducrot Bruno
[not found] ` <20030205184310.GK1205-j6u/t2rXLliUoIHC/UFpr9i2O/JbrIOy@public.gmane.org>
2003-02-05 18:47 ` [PATCH] [2/2] " Ducrot Bruno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox