public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* 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

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