2013년 9월 1일 일요일

set number

1. /arch/arm/boot/compressed/misc.c
decompress_kernel(ulg output_start, ulg free_mem_ptr_p, ulg free_mem_ptr_end_p,
                  int arch_id)
{
        output_data             = (uch *)output_start;  /* Points to kernel start */
        free_mem_ptr            = free_mem_ptr_p;
        free_mem_end_ptr        = free_mem_ptr_end_p;
        __machine_arch_type     = arch_id;

        arch_decomp_setup();

        makecrc();
        putstr("(1)Uncompressing Linux...");
        gunzip();
        putstr(" (1-e)done, booting the kernel.\n");
        return output_ptr;
}
2.

3. /init/version.c
/* FIXED STRINGS! Don't touch! */
const char linux_banner[] =
        "(3)Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
        LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";

const char linux_proc_banner[] =
        "%s version %s"
        " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ")"
        " (" LINUX_COMPILER ") %s\n";
4. /arch/arm/kernel/setup.c
static void __init setup_processor(void)
{
        struct proc_info_list *list;

        /*
         * locate processor in the list of supported processor
         * types.  The linker builds this table for us from the
         * entries in arch/arm/mm/proc-*.S
         */
        list = lookup_processor_type(read_cpuid_id());
        if (!list) {
                printk("CPU configuration botched (ID %08x), unable "
                       "to continue.\n", read_cpuid_id());
                while (1);
        }

        cpu_name = list->cpu_name;

#ifdef MULTI_CPU
        processor = *list->proc;
#endif
#ifdef MULTI_TLB
        cpu_tlb = *list->tlb;
#endif
#ifdef MULTI_USER
        cpu_user = *list->user;
#endif
#ifdef MULTI_CACHE
        cpu_cache = *list->cache;
#endif

        printk("(4)CPU: %s [%08x] revision %d (ARMv%s), cr=%08lx\n",
               cpu_name, read_cpuid_id(), read_cpuid_id() & 15,
               proc_arch[cpu_architecture()], cr_alignment);

        sprintf(init_utsname()->machine, "%s%c", list->arch_name, ENDIANNESS);
        sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS);
        elf_hwcap = list->elf_hwcap;
#ifndef CONFIG_ARM_THUMB
        elf_hwcap &= ~HWCAP_THUMB;
#endif

        cacheid_init();
        cpu_proc_init();
}
5. /arch/arm/kernel/setup.c
static void __init cacheid_init(void)
{
        unsigned int cachetype = read_cpuid_cachetype();
        unsigned int arch = cpu_architecture();

        if (arch >= CPU_ARCH_ARMv6) {
                if ((cachetype & (7 << 29)) == 4 << 29) {
                        /* ARMv7 register format */
                        cacheid = CACHEID_VIPT_NONALIASING;
                        if ((cachetype & (3 << 14)) == 1 << 14)
                                cacheid |= CACHEID_ASID_TAGGED;
                } else if (cachetype & (1 << 23))
                        cacheid = CACHEID_VIPT_ALIASING;
                else
                        cacheid = CACHEID_VIPT_NONALIASING;
        } else {
                cacheid = CACHEID_VIVT;
        }

        printk("(5)CPU: %s data cache, %s instruction cache\n",
                cache_is_vivt() ? "VIVT" :
                cache_is_vipt_aliasing() ? "VIPT aliasing" :
                cache_is_vipt_nonaliasing() ? "VIPT nonaliasing" : "unknown",
                cache_is_vivt() ? "VIVT" :
                icache_is_vivt_asid_tagged() ? "VIVT ASID tagged" :
                cache_is_vipt_aliasing() ? "VIPT aliasing" :
                cache_is_vipt_nonaliasing() ? "VIPT nonaliasing" : "unknown");
}
6. /arch/arm/kernel/setup.c
static struct machine_desc * __init setup_machine(unsigned int nr)
{
        struct machine_desc *list;

        /*
         * locate machine in the list of supported machines.
         */
        list = lookup_machine_type(nr);
        if (!list) {
                printk("Machine configuration botched (nr %d), unable "
                       "to continue.\n", nr);
                while (1);
        }

        printk("(6)Machine: %s\n", list->name);

        return list;
}
7. /arch/arm/kernel/setup.c
static void __init parse_tags(const struct tag *t)
{
        for (; t->hdr.size; t = tag_next(t))
                if (!parse_tag(t))
                        printk(KERN_WARNING
                                "(7)Ignoring unrecognised tag 0x%08x\n",
                                t->hdr.tag);
}
8. /arch/arm/mm/mmu.c
switch (cp->pmd) {
        case PMD_SECT_WT:
                mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_WT;
                break;
        case PMD_SECT_WB:
        case PMD_SECT_WBWA:
                mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_WB;
                break;
        }
        printk("(8)Memory policy: ECC %sabled, Data cache %s\n",
                ecc_mask ? "en" : "dis", cp->policy);

        for (i = 0; i < ARRAY_SIZE(mem_types); i++) {
                struct mem_type *t = &mem_types[i];
                if (t->prot_l1)
                        t->prot_l1 |= PMD_DOMAIN(t->domain);
                if (t->prot_sect)
                        t->prot_sect |= PMD_DOMAIN(t->domain);
        }
9. /arch/arm/mm/mmu.c
/*
                 * Check whether this memory bank would partially overlap
                 * the vmalloc area.
                 */
                if (__va(bank->start + bank->size) > VMALLOC_MIN ||
                    __va(bank->start + bank->size) < __va(bank->start)) {
                        unsigned long newsize = VMALLOC_MIN - __va(bank->start);
                        printk(KERN_NOTICE "(9)Truncating RAM at %.8lx-%.8lx "
                               "to -%.8lx (vmalloc region overlap).\n",
                               bank->start, bank->start + bank->size - 1,
                               bank->start + newsize - 1);
                        bank->size = newsize;
                }

10. /arch/arm/plat-samsung/init.c
void __init s3c_init_cpu(unsigned long idcode,
                         struct cpu_table *cputab, unsigned int cputab_size)
{
        cpu = s3c_lookup_cpu(idcode, cputab, cputab_size);

        if (cpu == NULL) {
                printk(KERN_ERR "Unknown CPU type 0x%08lx\n", idcode);
                panic("Unknown S3C24XX CPU");
        }

        printk("(10)CPU %s (id 0x%08lx)\n", cpu->name, idcode);

        if (cpu->map_io == NULL || cpu->init == NULL) {
                printk(KERN_ERR "CPU %s support not enabled\n", cpu->name);
                panic("Unsupported Samsung CPU");
        }

        cpu->map_io();
}
11. /arch/arm/plat-samsung/clock.c
int __init s3c24xx_register_baseclocks(unsigned long xtal)
{
        printk(KERN_INFO "(11)S3C24XX Clocks, Copyright 2004 Simtec Electronics\n");

        clk_xtal.rate = xtal;

        /* register our clocks */

        if (s3c24xx_register_clock(&clk_xtal) < 0)
                printk(KERN_ERR "failed to register master xtal\n");

        if (s3c24xx_register_clock(&clk_mpll) < 0)
                printk(KERN_ERR "failed to register mpll clock\n");

        if (s3c24xx_register_clock(&clk_upll) < 0)
                printk(KERN_ERR "failed to register upll clock\n");

        if (s3c24xx_register_clock(&clk_f) < 0)
                printk(KERN_ERR "failed to register cpu fclk\n");

        if (s3c24xx_register_clock(&clk_h) < 0)
                printk(KERN_ERR "failed to register cpu hclk\n");

        if (s3c24xx_register_clock(&clk_p) < 0)
                printk(KERN_ERR "failed to register cpu pclk\n");

        return 0;
}
12.

13.

14. /arch/arm/mach-s5pv210/clock.c
apll = s5p_get_pll45xx(xtal, __raw_readl(S5P_APLL_CON), pll_4508);
        mpll = s5p_get_pll45xx(xtal, __raw_readl(S5P_MPLL_CON), pll_4502);
        epll = s5p_get_pll90xx(xtal, __raw_readl(S5P_EPLL_CON),
                        __raw_readl(S5P_EPLL_CON_K));

        printk(KERN_INFO "(14)S5PV210: PLL settings, A=%ld, M=%ld, E=%ld\n",
                        apll, mpll, epll);

        clk_fout_apll.ops = &s5pv210_fout_apll_ops;
        clk_fout_mpll.rate = mpll;
        clk_fout_epll.rate = epll;


15 - 26. /arch/arm/plat-s5p/bootmem.c
void s5pv210_reserve_bootmem(void)
{
        struct s3c_media_device *mdev;
        int i, nr_devs;

        nr_devs = sizeof(media_devs) / sizeof(media_devs[0]);
        for (i = 0; i < nr_devs; i++) {
                mdev = &media_devs[i];
                if (mdev->memsize <= 0)
                        continue;

                mdev->paddr = virt_to_phys(__alloc_bootmem(mdev->memsize,
                                PAGE_SIZE, meminfo.bank[mdev->bank].start));
                printk(KERN_INFO "(%d) s5pv210: %lu KB system memory reserved "
                        "for %s at bank[%d] 0x%08x\n", i+15,(unsigned long) mdev->memsize/1024,
                        mdev->name, mdev->bank, mdev->paddr);
        }
}
27. /mm/page_alloc.c
/*
         * Disable grouping by mobility if the number of pages in the
         * system is too low to allow the mechanism to work. It would be
         * more accurate, but expensive to check per-zone. This check is
         * made on memory-hotadd so a system can start with mobility
         * disabled and enable it later
         */
        if (vm_total_pages < (pageblock_nr_pages * MIGRATE_TYPES))
                page_group_by_mobility_disabled = 1;
        else
                page_group_by_mobility_disabled = 0;

        printk("(27)Built %i zonelists in %s order, mobility grouping %s.  "
                "Total pages: %ld\n",
                        nr_online_nodes,
                        zonelist_order_name[current_zonelist_order],
                        page_group_by_mobility_disabled ? "off" : "on",
                        vm_total_pages);
28. /init/main.c
/*
 * Interrupts are still disabled. Do necessary setups, then
 * enable them
 */
        lock_kernel();
        tick_init();
        boot_cpu_init();
        page_address_init();
        printk(KERN_NOTICE "%s", linux_banner);
        setup_arch(&command_line);
        mm_init_owner(&init_mm, &init_task);
        setup_command_line(command_line);
        setup_nr_cpu_ids();
        setup_per_cpu_areas();
        smp_prepare_boot_cpu(); /* arch-specific boot-cpu hooks */

        build_all_zonelists();
        page_alloc_init();

        printk(KERN_NOTICE "(28)Kernel command line: %s\n", boot_command_line);
        parse_early_param();
        parse_args("Booting kernel", static_command_line, __start___param,
                   __stop___param - __start___param,
                   &unknown_bootoption);
29 - 31. /mm/page_alloc.c
 if (!table)
                panic("Failed to allocate %s hash table\n", tablename);

        int nNumber = getNumberByTableName(tablename);

        printk(KERN_INFO "(%d)%s hash table entries: %d (order: %d, %lu bytes)\n",
               nNumber,
               tablename,
               (1U << log2qty),
               ilog2(size) - PAGE_SHIFT,
               size);

        if (_hash_shift)
                *_hash_shift = log2qty;
        if (_hash_mask)
                *_hash_mask = (1 << log2qty) - 1;









댓글 없음:

댓글 쓰기