Chinaunix首页 | 论坛 | 博客
  • 博客访问: 421115
  • 博文数量: 120
  • 博客积分: 3125
  • 博客等级: 中校
  • 技术积分: 1100
  • 用 户 组: 普通用户
  • 注册时间: 2007-10-29 10:59
文章分类

全部博文(120)

文章存档

2012年(28)

2011年(22)

2010年(34)

2009年(1)

2008年(35)

我的朋友

分类: LINUX

2008-05-02 23:05:34

1.Initialization

a) Reserve low memory region for sleep support.( acpi_reserve_bootmem)

  • I386: start_kernel(init/main.c) –> setup_arch -> setup_memory -> setup_bootmem_allocator(arch/x86/kernel/setup_32.c) -> acpi_reserve_bootmem
  • x86_64: start_kernel –> setup_arch -> acpi_reserve_bootmem
 
/**

 * acpi_reserve_bootmem - do _very_ early ACPI initialization

 *

 * We allocate a page from the first 1MB of memory for the wakeup

 * routine for when we come back from a sleep state. The

 * runtime allocator allows specification of <16MB pages, but not

 * <1MB pages.
 */
void __init acpi_reserve_bootmem(void)
{

       if ((&wakeup_end - &wakeup_start) > PAGE_SIZE*2) {

              printk(KERN_ERR

                     "ACPI: Wakeup code way too big, S3 disabled.\n");

              return;
       }
 

       acpi_wakeup_address = (unsigned long)alloc_bootmem_low(PAGE_SIZE*2);

       if (!acpi_wakeup_address)

              printk(KERN_ERR "ACPI: Cannot allocate lowmem, S3 disabled.\n");

}
 

b) The ACPI boot-time table parser. (acpi_boot_table_init)

c) Read APIC and some other early information from ACPI tables. (acpi_boot_init)

 

start_kernel(init/main.c)->setup_arch(arch/x86/kernel/setup.c)-> acpi_boot_table_init, acpi_boot_init(x86/kernel/acpi/boot.c)

 
d) Early init before LAPIC and SMP init

                        I.              reallocate ACPI tables. (acpi_reallocate_root_table)

                     II.              Initializes all global variables (initialize_subsystem)

                   III.              load the System Description Tables.( acpi_load_tables)

                   IV.              enable ACPI. (acpi_enable_subsystem)

 
start_kernel(init/main.c)->acpi_early_init(drivers/acpi/bus.c)
 
 
 
 
 
 
 
 
 
 
2.        
 
 
阅读(1826) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~