public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [BUG] 2.6.23-rc1 broke APM
@ 2007-07-23 13:10 Mikael Pettersson
  2007-07-23 15:50 ` H. Peter Anvin
  0 siblings, 1 reply; 3+ messages in thread
From: Mikael Pettersson @ 2007-07-23 13:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: hpa

On this machine (Gigabyte mobo with i815EP chipset and a PIII),
APM worked fine up to 2.6.22. With 2.6.23-rc1 however the APM
driver fails to locate the APM bios:

--- dmesg-2.6.22	2007-07-23 14:07:46.000000000 +0200
+++ dmesg-2.6.23-rc1	2007-07-23 14:48:24.000000000 +0200
@@ -102,7 +105,7 @@
 Unpacking initramfs... done
 Freeing initrd memory: 976k freed
 Machine check exception polling timer started.
-apm: BIOS version 1.2 Flags 0x07 (Driver version 1.16ac)
+apm: BIOS not found.
 io scheduler noop registered
 io scheduler anticipatory registered (default)
 io scheduler deadline registered

The only change in 2.6.23-rc1 to arch/i386/kernel/apm.c is a
trivial nofreeze flag removal, so I suspect the boot code changes,
perhaps the new arch/i386/boot/apm.c:query_apm_bios().

/Mikael

^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: [BUG] 2.6.23-rc1 broke APM
@ 2007-07-23 22:26 Mikael Pettersson
  0 siblings, 0 replies; 3+ messages in thread
From: Mikael Pettersson @ 2007-07-23 22:26 UTC (permalink / raw)
  To: hpa, mikpe; +Cc: linux-kernel

On Mon, 23 Jul 2007 08:50:41 -0700, H. Peter Anvin wrote:
>Mikael Pettersson wrote:
>> On this machine (Gigabyte mobo with i815EP chipset and a PIII),
>> APM worked fine up to 2.6.22. With 2.6.23-rc1 however the APM
>> driver fails to locate the APM bios:
>> 
>> --- dmesg-2.6.22	2007-07-23 14:07:46.000000000 +0200
>> +++ dmesg-2.6.23-rc1	2007-07-23 14:48:24.000000000 +0200
>> @@ -102,7 +105,7 @@
>>  Unpacking initramfs... done
>>  Freeing initrd memory: 976k freed
>>  Machine check exception polling timer started.
>> -apm: BIOS version 1.2 Flags 0x07 (Driver version 1.16ac)
>> +apm: BIOS not found.
>>  io scheduler noop registered
>>  io scheduler anticipatory registered (default)
>>  io scheduler deadline registered
>> 
>> The only change in 2.6.23-rc1 to arch/i386/kernel/apm.c is a
>> trivial nofreeze flag removal, so I suspect the boot code changes,
>> perhaps the new arch/i386/boot/apm.c:query_apm_bios().
>> 
>
>Seems like a reasonable suspicion.
>
>Could you try the attached patch and:
>
>a) see if it helps the situation, and
>b) tell me what it prints?
>
>	-hpa

Only the first printf() triggers, and it prints:

apm: err = 0, ax = 0x102, bx = 0x504d, cx = 0x7

The err and bx checks will succeed, but the "if (cx & 0x02)"
check will cause query_apm_bios() to return failure.

I compared this check with the original assembly code,
and it turns out that the i386 boot rewrite accidentally
inverted the sense of this check. I've just posted a
patch to fix it.

/Mikael

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

end of thread, other threads:[~2007-07-23 22:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-23 13:10 [BUG] 2.6.23-rc1 broke APM Mikael Pettersson
2007-07-23 15:50 ` H. Peter Anvin
  -- strict thread matches above, loose matches on Subject: below --
2007-07-23 22:26 Mikael Pettersson

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