Skip to contentSkip to conversation

ACPI DSDT language

DISCUSSION Jan Slezak 1 participant 2 messages Jan 28, 2003 – Jan 29, 2003 3 messages not in the archive ACPI

lore
Share & tools
lore

Jan Slezak

author
#0 lore raw

Hi,

I would like to know what way should be buffers handled when are passed as arguments to ACPI methods. I don't have a time to read the ACPI specs so I hope someone knows.

I find out by tracing my /_TZ/TMP method that they are passed by value so following construction (part of my original DSDT slightly modified) doesn't work (PNPG called) because PGET is not modified:

    Method (SX33, 2, NotSerialized)
    {
        If (LLess (Arg1, SizeOf (Arg0)))
        {
            CreateByteField (Arg0, Arg1, SX20)
            Store (Something, SX20)
        }
    }

    Method (PNPG, 1, NotSerialized)
    {
	.
	.
        Name (PGET, Buffer (8) {})
        SX33 (PGET, 2)
        Return (PGET)
    }

I need to know it to decide wheter it is my BIOS or the linux ACPI implementation what is buggy and to decide whether to send my DSDT patch to my notebook manufacturer (DELL).

Thanks,
Jan

P.S.: If it is right behaviour and the BIOS is buggy I don't understand why the ACPI (actually ACPI battery info) is working under WinXP, where there is no DSDT override and no buggy feature workaround in the biosinfo.inf for my DELL.

-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld =Something 2 See!
http://www.vasoftware.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#4 lore raw

Ducrot Bruno píše:

Quoted 73 lines · Ing. Jan Slezak
Quoted 47 lines

Ducrot Bruno pí?e:

Quoted 46 lines · Jan Slezak
Quoted 18 lines

Hi,

I would like to know what way should be buffers handled when are passed as arguments to ACPI methods. I don't have a time to read the ACPI specs so I hope someone knows.

I find out by tracing my /_TZ/TMP method that they are passed by value so following construction (part of my original DSDT slightly modified) doesn't work (PNPG called) because PGET is not modified:

    Method (SX33, 2, NotSerialized)
    {
        If (LLess (Arg1, SizeOf (Arg0)))
        {
            CreateByteField (Arg0, Arg1, SX20)
            Store (Something, SX20)
        }
    }
Quoted 9 lines
    Method (PNPG, 1, NotSerialized)
    {
      .
      .
        Name (PGET, Buffer (8) {})
        SX33 (PGET, 2)
        Return (PGET)
    }

Why don't make something like that instead:

    Method (PNPG, 1, NotSerialized)
    {
      .
      .
        Name (PGET, Buffer (8) {})
        Store (something, Index(PGET, 2))
        Return (PGET)
    }

(unless 'something' is not 8-bits long, though)

--
Ducrot Bruno

Quoted 8 lines
Quoted 2 lines

-- Which is worse: ignorance or apathy?
-- Don't know. Don't care.

Sure, it is possible and I modified my DSDT in a similar way, but I want to know if the original DSDT is correct (by specs, let's say theoreticaly). I don't want to beat my notebok manufacturer and get the answer "it is by spec" then.

Ah, yep, I have not read carrefully your first email.

By spec (2.0b, somewhere in 5.5.3 to 5.5.4):
any namespace creation in a control method can only be acceded in the control method.

Here, the buffer PNPG will be created only for _internal_ use of PNPG.

When the SX33(PGET, 2) occur, the control method SX33 can not have direct access of PGET, but of a _local copy_ of the buffer (which is referenced by Arg0) but still only for _internal_ use of SX33.

Please note also that 'Return (PGET)' at end of PNPG control method will actually create a _copy_ for the caller of PNPG (the initial PGET will be destroyed at end of the method).

Quoted 7 lines

Cheers,

--
Ducrot Bruno

-- Which is worse: ignorance or apathy?
-- Don't know. Don't care.

Great! So I'm going to send my DSDT fix to Dell and ask them to apply it to official BIOS.

Thanks,
Jan

-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld =Something 2 See!
http://www.vasoftware.com