- 论坛徽章:
- 0
|
1.Initialization
file:///C:/DOCUME%7E1/ADMINI%7E1/LOCALS%7E1/Temp/moz-screenshot-2.jpg
![]()
a) Reserve
low memory region for sleep support.( acpi_reserve_bootmem)
file:///C:/DOCUME%7E1/ADMINI%7E1/LOCALS%7E1/Temp/moz-screenshot-1.jpg
- 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
*
*/
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.
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/52215/showart_655389.html |
|