Init_machine the process that is called in kernel

Source: Internet
Author: User

Take tiny4412 as an example:

Arch/arm/mach-exynos/mach-tiny4412.c

" TINY4412 " )    /**/    . Boot_params    0x100,    . INIT_IRQ    = Exynos4_init_irq,    . map_io        = smdk4x12_map_io,    . init_machine     = smdk4x12_machine_init,    . Timer        = &Exynos4_timer,    .    Reserve = &exynos4_reserve,machine_end

which

#define Machine_start (_type,_name)            staticconststruct  machine_desc __mach_desc_# #_type     __used                             __attribute__ ((__section__ (". Arch.info.init")) = {        . nr        = mach_type_# #_type,            . Name        = _name,#define machine_end                \};

At startup:

Start_kernel-----INIT/MAIN.C

----> Setup_arch----arch/arm/kernel/setup.c

----> Mdesc = setup_machine_tags (Machine_arch_type); Here, the structure is found on the basis of Machine_arch_type.

----> Machine_desc = MDESC;

Paging_init, ---(mdesc) (ARCH/ARM/MM/MMU.C)

----> Devicemaps_init (MDESC)

----> Mdesc->map_io () called the function Smdk4x12_map_io


Init_machine the process that is called in kernel

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.