Re: CONFIG_APM_POWER - still possible?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Yotam Medini
Date: Sunday, January 2, 2011 - 12:16 pm

Using the hints I got here, I realized that /proc/apm
is supposed to be created (for x86) by:
   apm_init() @ arch/x86/kernel/apm_32.c
I added some debug printk messages in some places I considered related.
From these I learned the following:

1. In setup_arch(...) @ arch/x86/kernel/setup.c:
	apm_info.bios = boot_params.apm_bios_info;
   it has the value:
        apm_info.bios.version == 0

2. In apm_init() @ arch/x86/kernel/apm_32.c:
  if (apm_info.bios.version == 0 || paravirt_enabled() || machine_is_olpc()) {
    printk(KERN_INFO "apm: BIOS not found.\n");
    return -ENODEV;
  }

  It gets here with
     apm_info.bios.version == 0
  This is why 'dmesg' shows:
     apm: BIOS not found
  and thus /proc/apm is not created.

3. In  query_apm_bios() @ arch/x86/boot/apm.c
   I added debug puts messages.
   But 'dmesg' showed none of them.

Could it be that some boot-command line parameters are not well passed
to the kernel?
Is the 'initrd' involved in this? I am not familiar with the 'black art' of
constructing 'initrd'. I am using mkinitramfs for this.
The initrd I get does manage to bring up the kernel, the file-systems
and a essentially - a running system.

I still have not tried compiling apm directly into the kernel.
I may try it later, but I believe the problem lies elsewhere.

Thanks for all the tips -- yotam


On Fri, 31 Dec 2010 14:23:35 -0800
Randy Dunlap <rdunlap@xenotime.net> wrote:

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
APM_CONFIG on x86 - Is it possible?, Yotam Medini, (Fri Dec 31, 10:38 am)
Re: APM_CONFIG on x86 - Is it possible?, Randy Dunlap, (Fri Dec 31, 11:33 am)
Re: APM_CONFIG on x86 - Is it possible?, Yotam Medini, (Fri Dec 31, 12:28 pm)
Re: APM_CONFIG on x86 - Is it possible?, Randy Dunlap, (Fri Dec 31, 12:39 pm)
Re: APM_CONFIG on x86 - Is it possible?, Yotam Medini, (Fri Dec 31, 2:40 pm)
Re: APM_CONFIG on x86 - Is it possible?, Avery Pennarun, (Fri Dec 31, 2:54 pm)
Re: APM_CONFIG on x86 - Is it possible?, Yotam Medini, (Fri Dec 31, 3:05 pm)
Re: APM_CONFIG on x86 - Is it possible?, Avery Pennarun, (Fri Dec 31, 3:10 pm)
Re: APM_CONFIG on x86 - Is it possible?, Randy Dunlap, (Fri Dec 31, 3:23 pm)
Re: APM_CONFIG on x86 - Is it possible?, Stephen Rothwell, (Sat Jan 1, 9:25 am)
Re: CONFIG_APM_POWER - still possible?, Yotam Medini, (Sun Jan 2, 12:16 pm)