* DSDT Fix, one question ...
@ 2003-02-27 10:41 Sander Smeenk
[not found] ` <20030227104122.GG21631-ntXksADE/7Pk1uMJSBkQmQ@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Sander Smeenk @ 2003-02-27 10:41 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Hi,
I'm trying to fix the DSDT on my desktop machine just to "learn" a bit
about this. I fixed all compile errors, but for one I am not sure if I
did the Right Thing (TM):
iasl tells me:
| dsdt.asl:1830: Method(STM_, 0, Serialized) {
| Warning 2019 - ^ Not all control paths return a value (STM_)
And indeed, there is no Return() at the end of this method. So I added
'Return(TMD0)', because I saw that in other methods too. It fixes the
compile warning, but I am not sure what TMD0 is, and wether it is the
right thing to return or not.
Especially because of this if-block at the top:
| If(REGF) {
| }
| Else {
| Return(TMD0)
| }
It seems to only return TMD0 if REGF is not set.
What is the correct way of finding out what it should return?
Or should I just return 0x00 ? :)
Thanks,
Sander.
Method-with-error:
| Method(STM_, 0, Serialized) {
| If(REGF) {
| }
| Else {
| Return(TMD0)
| }
| Store(0x0, GMUE)
| Store(0x7, GMUT)
| Store(0x0, GSUE)
| Store(0x7, GSUT)
| If(And(CHNF, 0x1, )) {
| Store(Match(DerefOf(Index(TIM0, 0x3, )), MLE, DMA0, MTR, 0x0, 0x0), Local0)
| If(LGreater(Local0, 0x6)) {
| Store(0x6, Local0)
| }
| If(LOr(LEqual(\_SB_.PCI0.SBRG.D147, 0x3147), LEqual(\_SB_.PCI0.SBRG.D147, 0x3177))) {
| Store(DerefOf(Index(DerefOf(Index(TIM0, 0x9, )), Local0, )), GMUT)
| }
| Else {
| Store(DerefOf(Index(DerefOf(Index(TIM0, 0x4, )), Local0, )), GMUT)
| }
| Or(GMUE, 0x7, GMUE)
| }
| Else {
| If(Or(LEqual(PIO0, Ones), LEqual(PIO0, 0x0), )) {
| If(And(LLess(DMA0, Ones), LGreater(DMA0, 0x0), )) {
| Store(DMA0, PIO0)
| }
| }
| }
| If(And(CHNF, 0x4, )) {
| Store(Match(DerefOf(Index(TIM0, 0x3, )), MLE, DMA1, MTR, 0x0, 0x0), Local0)
| If(LGreater(Local0, 0x6)) {
| Store(0x6, Local0)
| }
| If(LOr(LEqual(\_SB_.PCI0.SBRG.D147, 0x3147), LEqual(\_SB_.PCI0.SBRG.D147, 0x3177))) {
| Store(DerefOf(Index(DerefOf(Index(TIM0, 0x9, )), Local0, )), GSUT)
| }
| Else {
| Store(DerefOf(Index(DerefOf(Index(TIM0, 0x4, )), Local0, )), GSUT)
| }
| Or(GSUE, 0x7, GSUE)
| }
| Else {
| If(Or(LEqual(PIO1, Ones), LEqual(PIO1, 0x0), )) {
| If(And(LLess(DMA1, Ones), LGreater(DMA1, 0x0), )) {
| Store(DMA1, PIO1)
| }
| }
| }
| And(Match(DerefOf(Index(TIM0, 0x0, )), MGE, PIO0, MTR, 0x0, 0x0), 0x7, Local0)
| Store(DerefOf(Index(DerefOf(Index(TIM0, 0x1, )), Local0, )), Local1)
| Store(Local1, GMPT)
| And(Match(DerefOf(Index(TIM0, 0x0, )), MGE, PIO1, MTR, 0x0, 0x0), 0x7, Local0)
| Store(DerefOf(Index(DerefOf(Index(TIM0, 0x1, )), Local0, )), Local1)
| Store(Local1, GSPT)
| }
--
| Why is the time of day with the slowest traffic called rush hour?
| 1024D/08CEC94D - 34B3 3314 B146 E13C 70C8 9BDB D463 7E41 08CE C94D
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: DSDT Fix, one question ...
[not found] ` <20030227104122.GG21631-ntXksADE/7Pk1uMJSBkQmQ@public.gmane.org>
@ 2003-02-27 12:18 ` Adachi, Kenichi
[not found] ` <000001c2de5a$55d99160$7c4425db-F8JvWDuGsZU@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Adachi, Kenichi @ 2003-02-27 12:18 UTC (permalink / raw)
To: 'Sander Smeenk',
acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Hi,
I bet this sub-method "STM_" is being called from _STM - standard method
to set timing mode for IDE - and "TMD0" may stand for "Timing for D0",
but I'm lipping just a gibberish without whole DSDT and make/chipset
info. I need'em for better reasoning.
Thanks,
- Adachi, Kenichi
> -----Original Message-----
> From: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> [mailto:acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of
> Sander Smeenk
> Sent: Thursday, February 27, 2003 7:41 PM
> To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> Subject: [ACPI] DSDT Fix, one question ...
>
>
> Hi,
>
> I'm trying to fix the DSDT on my desktop machine just to "learn" a bit
> about this. I fixed all compile errors, but for one I am not sure if I
> did the Right Thing (TM):
>
> iasl tells me:
> | dsdt.asl:1830: Method(STM_, 0, Serialized) {
> | Warning 2019 - ^ Not all control paths return a
> value (STM_)
>
> And indeed, there is no Return() at the end of this method. So I added
> 'Return(TMD0)', because I saw that in other methods too. It fixes the
> compile warning, but I am not sure what TMD0 is, and wether it is the
> right thing to return or not.
>
> Especially because of this if-block at the top:
>
> | If(REGF) {
> | }
> | Else {
> | Return(TMD0)
> | }
>
> It seems to only return TMD0 if REGF is not set.
> What is the correct way of finding out what it should return?
>
> Or should I just return 0x00 ? :)
>
> Thanks,
> Sander.
>
> Method-with-error:
>
> | Method(STM_, 0, Serialized) {
> | If(REGF) {
> | }
> | Else {
> | Return(TMD0)
> | }
> | Store(0x0, GMUE)
> | Store(0x7, GMUT)
> | Store(0x0, GSUE)
> | Store(0x7, GSUT)
> | If(And(CHNF, 0x1, )) {
> | Store(Match(DerefOf(Index(TIM0, 0x3, )), MLE, DMA0,
> MTR, 0x0, 0x0), Local0)
> | If(LGreater(Local0, 0x6)) {
> | Store(0x6, Local0)
> | }
> | If(LOr(LEqual(\_SB_.PCI0.SBRG.D147, 0x3147),
> LEqual(\_SB_.PCI0.SBRG.D147, 0x3177))) {
> | Store(DerefOf(Index(DerefOf(Index(TIM0, 0x9,
> )), Local0, )), GMUT)
> | }
> | Else {
> | Store(DerefOf(Index(DerefOf(Index(TIM0, 0x4,
> )), Local0, )), GMUT)
> | }
> | Or(GMUE, 0x7, GMUE)
> | }
> | Else {
> | If(Or(LEqual(PIO0, Ones), LEqual(PIO0, 0x0), )) {
> | If(And(LLess(DMA0, Ones), LGreater(DMA0, 0x0), )) {
> | Store(DMA0, PIO0)
> | }
> | }
> | }
> | If(And(CHNF, 0x4, )) {
> | Store(Match(DerefOf(Index(TIM0, 0x3, )), MLE, DMA1,
> MTR, 0x0, 0x0), Local0)
> | If(LGreater(Local0, 0x6)) {
> | Store(0x6, Local0)
> | }
> | If(LOr(LEqual(\_SB_.PCI0.SBRG.D147, 0x3147),
> LEqual(\_SB_.PCI0.SBRG.D147, 0x3177))) {
> | Store(DerefOf(Index(DerefOf(Index(TIM0, 0x9,
> )), Local0, )), GSUT)
> | }
> | Else {
> | Store(DerefOf(Index(DerefOf(Index(TIM0, 0x4,
> )), Local0, )), GSUT)
> | }
> | Or(GSUE, 0x7, GSUE)
> | }
> | Else {
> | If(Or(LEqual(PIO1, Ones), LEqual(PIO1, 0x0), )) {
> | If(And(LLess(DMA1, Ones), LGreater(DMA1, 0x0), )) {
> | Store(DMA1, PIO1)
> | }
> | }
> | }
> | And(Match(DerefOf(Index(TIM0, 0x0, )), MGE, PIO0, MTR,
> 0x0, 0x0), 0x7, Local0)
> | Store(DerefOf(Index(DerefOf(Index(TIM0, 0x1, )),
> Local0, )), Local1)
> | Store(Local1, GMPT)
> | And(Match(DerefOf(Index(TIM0, 0x0, )), MGE, PIO1, MTR,
> 0x0, 0x0), 0x7, Local0)
> | Store(DerefOf(Index(DerefOf(Index(TIM0, 0x1, )),
> Local0, )), Local1)
> | Store(Local1, GSPT)
> | }
>
> --
> | Why is the time of day with the slowest traffic called rush hour?
> | 1024D/08CEC94D - 34B3 3314 B146 E13C 70C8 9BDB D463 7E41 08CE C94D
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> Acpi-devel mailing list
> Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/acpi-devel
>
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: DSDT Fix, one question ...
[not found] ` <000001c2de5a$55d99160$7c4425db-F8JvWDuGsZU@public.gmane.org>
@ 2003-02-27 12:53 ` Sander Smeenk
[not found] ` <20030227125318.GI21631-ntXksADE/7Pk1uMJSBkQmQ@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Sander Smeenk @ 2003-02-27 12:53 UTC (permalink / raw)
To: Adachi, Kenichi; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Quoting Adachi, Kenichi (aileenja-dTzOdQ2U+/YAvxtiuMwx3w@public.gmane.org):
> I bet this sub-method "STM_" is being called from _STM - standard method
> to set timing mode for IDE - and "TMD0" may stand for "Timing for D0",
> but I'm lipping just a gibberish without whole DSDT and make/chipset
> info. I need'em for better reasoning.
The complete DSDT is now located at:
http://valor.freshdot.net/~ssmeenk/
There's a lot of info about my hardware inside the DSDT.
This one came from an MSI KT333 Ultra ARU (MS-6580E) mainboard running
the latest, or maybe the second to last BIOS, not sure about that.
I'm currently running 2.5.53 vanilla, with no special ACPI-patches
applied.
HTH,
Sander.
--
| Waarom draagt een kamikazepiloot een helm ?
| 1024D/08CEC94D - 34B3 3314 B146 E13C 70C8 9BDB D463 7E41 08CE C94D
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: DSDT Fix, one question ...
[not found] ` <20030227125318.GI21631-ntXksADE/7Pk1uMJSBkQmQ@public.gmane.org>
@ 2003-02-27 15:40 ` Adachi, Kenichi
0 siblings, 0 replies; 4+ messages in thread
From: Adachi, Kenichi @ 2003-02-27 15:40 UTC (permalink / raw)
To: 'Sander Smeenk'; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Hi,
Theoretically or ideally speaking, OS (IDE guy) retrieves the current
setting for IDE by running _GTM, verifies/modifies the returned buffer
from ACPI BIOS, and applies it back to IDE Controller's registers by
running _STM. However, grep'ing drivers/ide for "GTM" or "STM" didn't
come back positively with linux-2.5.51. This could mean that whole chunk
annoying you is not used by Linux yet.
> The complete DSDT is now located at:
> http://valor.freshdot.net/~ssmeenk/
Your "TMD0" is locally created buffer to hold the setting info for IDE.
This apparently conforms to the format of _GTM Result Code (ACPI Spec
Table 10-4).
1663 Name(TMD0, Buffer(0x14) { })
1664 CreateDWordField(TMD0, 0x0, PIO0)
1665 CreateDWordField(TMD0, 0x4, DMA0)
1666 CreateDWordField(TMD0, 0x8, PIO1)
1667 CreateDWordField(TMD0, 0xc, DMA1)
1668 CreateDWordField(TMD0, 0x10, CHNF)
OS calls _GTM to get the current setting, _GTM then calls "GTM_", and
"GTM_" packs requested info in corresponding fields within "TMD0". Thus,
returning "TMD0" does really make sense in this *GET* context, but does
not in *SET* context very much. To me, at a glance, sub-method "STM_"
called from _STM doesn't have to return anything in the following
sequence (didn't check iASL code as to what made him give you warning):
1709 Method(_STM, 3) {
1710 Store(Arg0, Debug)
1711 Store(Arg0, TMD0) // saving the passed
buffer from OS for later use?
1712 Store(PMPT, GMPT)
1713 Store(PMUE, GMUE)
1714 Store(PMUT, GMUT)
1715 Store(PMCR, GMCR)
1716 Store(PSPT, GSPT)
1717 Store(PSUE, GSUE)
1718 Store(PSUT, GSUT)
1719 Store(PSCR, GSCR)
1720 STM_()
:
> This one came from an MSI KT333 Ultra ARU (MS-6580E)
> mainboard running the latest, or maybe the second to last
> BIOS, not sure about that.
Incidentally, your "REGF" flag simply tells you the availability of
"CFG2" PCI_Config OpRegion (OpRegion handler is ready or not). OpRegion
"CFG2" created at offset 0x40 - 0x60 of your IDE Controller(Bus:0,
Dev:17, Func:1)'s PCI Config Space would represent something essential
for IDE setting. For more details, you have to consult your South
Bridge's Datasheet. Don't know if VIA publishes it or not...
1564 Device(IDE0) {
1565 Name(_ADR, 0x00110001)
1566 Name(REGF, 0x1)
1567 Method(_REG, 2) {
1568 If(LEqual(Arg0, 0x2)) {
1569 Store(Arg1, REGF)
1570 }
1571 }
:
1669 OperationRegion(CFG2, PCI_Config, 0x40, 0x20)
Thanks,
- Adachi, Kenichi
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-02-27 15:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-27 10:41 DSDT Fix, one question Sander Smeenk
[not found] ` <20030227104122.GG21631-ntXksADE/7Pk1uMJSBkQmQ@public.gmane.org>
2003-02-27 12:18 ` Adachi, Kenichi
[not found] ` <000001c2de5a$55d99160$7c4425db-F8JvWDuGsZU@public.gmane.org>
2003-02-27 12:53 ` Sander Smeenk
[not found] ` <20030227125318.GI21631-ntXksADE/7Pk1uMJSBkQmQ@public.gmane.org>
2003-02-27 15:40 ` Adachi, Kenichi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox