Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
- index c5d6025..7ceeff2 100644
- --- a/arch/arm/boot/compressed/head.S
- +++ b/arch/arm/boot/compressed/head.S
- @@ -458,6 +458,9 @@ not_relocated: mov r0, #0
- bl decompress_kernel
- bl cache_clean_flush
- bl cache_off
- + mov r0, #0x8e0000
- + mov r1, #0x41
- + str r1,[r0]
- mov r0, #0 @ must be zero
- mov r1, r7 @ restore architecture number
- mov r2, r8 @ restore atags pointer
- diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
- index 9275828..6c363c1 100644
- --- a/arch/arm/include/asm/io.h
- +++ b/arch/arm/include/asm/io.h
- @@ -83,6 +83,11 @@ extern void __iomem *__arm_ioremap_pfn(unsigned long, unsigned long, size_t, uns
- extern void __iomem *__arm_ioremap(unsigned long, size_t, unsigned int);
- extern void __iomem *__arm_ioremap_exec(unsigned long, size_t, bool cached);
- extern void __iounmap(volatile void __iomem *addr);
- +extern void __arm_iounmap(volatile void __iomem *addr);
- +
- +extern void __iomem * (*arch_ioremap_caller)(unsigned long, size_t,
- + unsigned int, void *);
- +extern void (*arch_iounmap)(volatile void __iomem *);
- /*
- * Bad read/write accesses...
- @@ -266,7 +271,7 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
- */
- #ifndef __arch_ioremap
- #define __arch_ioremap __arm_ioremap
- -#define __arch_iounmap __iounmap
- +#define __arch_iounmap __arm_iounmap
- #endif
- #define ioremap(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE)
- diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
- index 6d57911..3cde1b0 100644
- --- a/arch/arm/kernel/head.S
- +++ b/arch/arm/kernel/head.S
- @@ -129,6 +129,10 @@ ENTRY(stext)
- #endif
- bl __create_page_tables
- + ldr r12, =0x8e0004
- + mov r13, #0x42
- + str r13,[r12]
- +
- /*
- * The following calls CPU specific code in a position independent
- * manner. See arch/arm/mm/proc-*.S for details. r10 = base of
- @@ -311,6 +315,16 @@ __create_page_tables:
- orr r3, r7, #0x7c000000
- str r3, [r0]
- #endif
- +
- +//#if defined(CONFIG_ARCH_NETWINDER) || defined(CONFIG_ARCH_CATS)
- + /*
- + * Map in some SMI memory
- + */
- + add r0, r4, #0x00800000 >> (SECTION_SHIFT - PMD_ORDER)
- + orr r3, r7, #0x00800000
- + str r3, [r0]
- +//#endif
- +
- #ifdef CONFIG_ARCH_RPC
- /*
- * Map in screen at 0x02000000 & SCREEN2_BASE
- @@ -456,6 +470,11 @@ ENTRY(__turn_mmu_on)
- instr_sync
- mov r3, r3
- mov r3, r13
- +
- + ldr r12, =0x8e0008
- + mov r13, #0x43
- + str r13,[r12]
- +
- mov pc, r3
- __turn_mmu_on_end:
- ENDPROC(__turn_mmu_on)
- diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
- index caae7fe..e5f99e3 100644
- --- a/arch/arm/kernel/setup.c
- +++ b/arch/arm/kernel/setup.c
- @@ -923,9 +923,11 @@ void __init setup_arch(char **cmdline_p)
- struct machine_desc *mdesc;
- setup_processor();
- + *((unsigned char*)0x8e0001) = 'a';
- mdesc = setup_machine_fdt(__atags_pointer);
- if (!mdesc)
- mdesc = setup_machine_tags(machine_arch_type);
- + *((unsigned char*)0x8e0005) = 'b';
- machine_desc = mdesc;
- machine_name = mdesc->name;
- @@ -937,7 +939,7 @@ void __init setup_arch(char **cmdline_p)
- #endif
- if (mdesc->restart_mode)
- reboot_setup(&mdesc->restart_mode);
- -
- + *((unsigned char*)0x8e0009) = 'c';
- init_mm.start_code = (unsigned long) _text;
- init_mm.end_code = (unsigned long) _etext;
- init_mm.end_data = (unsigned long) _edata;
- @@ -948,27 +950,36 @@ void __init setup_arch(char **cmdline_p)
- *cmdline_p = cmd_line;
- parse_early_param();
- -
- + *((unsigned char*)0x8e000d) = 'd';
- sort(&meminfo.bank, meminfo.nr_banks, sizeof(meminfo.bank[0]), meminfo_cmp, NULL);
- sanity_check_meminfo();
- + *((unsigned char*)0x8e0011) = 'e';
- arm_memblock_init(&meminfo, mdesc);
- -
- + *((unsigned char*)0x8e0015) = 'f';
- paging_init(mdesc);
- + *((unsigned char*)0x8e0019) = 'g';
- request_standard_resources(mdesc);
- + *((unsigned char*)0x8e001d) = 'h';
- if (mdesc->restart)
- arm_pm_restart = mdesc->restart;
- unflatten_device_tree();
- + *((unsigned char*)0x8e0021) = 'i';
- #ifdef CONFIG_SMP
- if (is_smp())
- smp_init_cpus();
- #endif
- + *((unsigned char*)0x8e0025) = 'j';
- +
- reserve_crashkernel();
- + *((unsigned char*)0x8e0029) = 'k';
- tcm_init();
- + *((unsigned char*)0x8e002d) = 'l';
- +
- #ifdef CONFIG_MULTI_IRQ_HANDLER
- handle_arch_irq = mdesc->handle_irq;
- #endif
- @@ -981,6 +992,7 @@ void __init setup_arch(char **cmdline_p)
- #endif
- #endif
- early_trap_init();
- + *((unsigned char*)0x8e0031) = 'h';
- if (mdesc->init_early)
- mdesc->init_early();
- diff --git a/arch/arm/mach-msm/board-htcrhodium.c b/arch/arm/mach-msm/board-htcrhodium.c
- index 50e8386..7b416f9 100644
- --- a/arch/arm/mach-msm/board-htcrhodium.c
- +++ b/arch/arm/mach-msm/board-htcrhodium.c
- @@ -1382,7 +1382,9 @@ static void __init htcrhodium_init(void)
- static void __init htcrhodium_map_io(void)
- {
- + *((unsigned char*)0x8e000f) = 'd';
- msm_map_common_io();
- + *((unsigned char*)0x8e0013) = 'e';
- // iotable_init(trout_io_desc, ARRAY_SIZE(trout_io_desc));
- #ifdef CONFIG_MSM_DEBUG_UART3
- diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
- index 80632e8..0246290 100644
- --- a/arch/arm/mm/ioremap.c
- +++ b/arch/arm/mm/ioremap.c
- @@ -306,11 +306,15 @@ __arm_ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size,
- }
- EXPORT_SYMBOL(__arm_ioremap_pfn);
- +void __iomem * (*arch_ioremap_caller)(unsigned long, size_t,
- + unsigned int, void *) =
- + __arm_ioremap_caller;
- +
- void __iomem *
- __arm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
- {
- - return __arm_ioremap_caller(phys_addr, size, mtype,
- - __builtin_return_address(0));
- + return arch_ioremap_caller(phys_addr, size, mtype,
- + __builtin_return_address(0));
- }
- EXPORT_SYMBOL(__arm_ioremap);
- @@ -369,4 +373,11 @@ void __iounmap(volatile void __iomem *io_addr)
- vunmap(addr);
- }
- -EXPORT_SYMBOL(__iounmap);
- +
- +void (*arch_iounmap)(volatile void __iomem *) = __iounmap;
- +
- +void __arm_iounmap(volatile void __iomem *io_addr)
- +{
- + arch_iounmap(io_addr);
- +}
- +EXPORT_SYMBOL(__arm_iounmap);
- diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
- index 94c5a0c..3cab3c6 100644
- --- a/arch/arm/mm/mmu.c
- +++ b/arch/arm/mm/mmu.c
- @@ -933,7 +933,7 @@ static inline void prepare_page_table(void)
- * Clear out all the mappings below the kernel image.
- */
- for (addr = 0; addr < MODULES_VADDR; addr += PMD_SIZE)
- - pmd_clear(pmd_off_k(addr));
- + {}//TODO: hack will break the kernel once it starts running processes: pmd_clear(pmd_off_k(addr));
- #ifdef CONFIG_XIP_KERNEL
- /* The XIP kernel is mapped in the module area -- skip over it */
- @@ -1036,6 +1036,8 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
- create_mapping(&map);
- #endif
- + *((unsigned char*)0x8e0003) = 'a';
- +
- /*
- * Create a mapping for the machine vectors at the high-vectors
- * location (0xffff0000). If we aren't using high-vectors, also
- @@ -1047,12 +1049,14 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
- map.type = MT_HIGH_VECTORS;
- create_mapping(&map);
- + *((unsigned char*)0x8e0007) = 'b';
- if (!vectors_high()) {
- map.virtual = 0;
- map.type = MT_LOW_VECTORS;
- create_mapping(&map);
- }
- + *((unsigned char*)0x8e000b) = 'c';
- /*
- * Ask the machine support to map in the statically mapped devices.
- */
- @@ -1109,21 +1113,26 @@ void __init paging_init(struct machine_desc *mdesc)
- {
- void *zero_page;
- + *((unsigned char*)0x8e0002) = 'a';
- memblock_set_current_limit(lowmem_limit);
- -
- + *((unsigned char*)0x8e0006) = 'b';
- build_mem_type_table();
- + *((unsigned char*)0x8e000a) = 'c';
- prepare_page_table();
- + *((unsigned char*)0x8e000e) = 'd';
- map_lowmem();
- - devicemaps_init(mdesc);
- + *((unsigned char*)0x8e0012) = 'e';
- + devicemaps_init(mdesc);
- + *((unsigned char*)0x8e0016) = 'f';
- kmap_init();
- -
- + *((unsigned char*)0x8e001a) = 'g';
- top_pmd = pmd_off_k(0xffff0000);
- /* allocate the zero page. */
- zero_page = early_alloc(PAGE_SIZE);
- bootmem_init();
- -
- + *((unsigned char*)0x8e001e) = 'h';
- empty_zero_page = virt_to_page(zero_page);
- __flush_dcache_page(NULL, empty_zero_page);
- }
- diff --git a/init/main.c b/init/main.c
- index ff49a6d..9478f8b 100644
- --- a/init/main.c
- +++ b/init/main.c
- @@ -465,21 +465,34 @@ asmlinkage void __init start_kernel(void)
- char * command_line;
- extern const struct kernel_param __start___param[], __stop___param[];
- + *((unsigned long*)0x8e000c) = 'D';
- +
- /*
- * Need to run as early as possible, to initialize the
- * lockdep hash:
- */
- lockdep_init();
- + *((unsigned long*)0x8e0010) = 'E';
- +
- smp_setup_processor_id();
- +
- + *((unsigned long*)0x8e0014) = 'F';
- +
- debug_objects_early_init();
- + *((unsigned long*)0x8e0018) = 'G';
- +
- /*
- * Set up the the initial canary ASAP:
- */
- boot_init_stack_canary();
- + *((unsigned long*)0x8e001C) = 'H';
- +
- cgroup_init_early();
- + *((unsigned long*)0x8e0020) = 'I';
- +
- local_irq_disable();
- early_boot_irqs_disabled = true;
- @@ -487,20 +500,32 @@ asmlinkage void __init start_kernel(void)
- * Interrupts are still disabled. Do necessary setups, then
- * enable them
- */
- + *((unsigned long*)0x8e0024) = 'J';
- tick_init();
- + *((unsigned long*)0x8e0028) = 'K';
- boot_cpu_init();
- + *((unsigned long*)0x8e002C) = 'L';
- page_address_init();
- + *((unsigned long*)0x8e0030) = 'M';
- printk(KERN_NOTICE "%s", linux_banner);
- setup_arch(&command_line);
- + *((unsigned long*)0x8e0034) = 'N';
- mm_init_owner(&init_mm, &init_task);
- + *((unsigned long*)0x8e0038) = 'O';
- mm_init_cpumask(&init_mm);
- + *((unsigned long*)0x8e003c) = 'P';
- setup_command_line(command_line);
- + *((unsigned long*)0x8e0040) = 'Q';
- setup_nr_cpu_ids();
- + *((unsigned long*)0x8e0044) = 'R';
- setup_per_cpu_areas();
- + *((unsigned long*)0x8e0048) = 'S';
- smp_prepare_boot_cpu(); /* arch-specific boot-cpu hooks */
- -
- + *((unsigned long*)0x8e004c) = 'T';
- build_all_zonelists(NULL);
- + *((unsigned long*)0x8e0050) = 'U';
- page_alloc_init();
- + *((unsigned long*)0x8e0054) = 'V';
- printk(KERN_NOTICE "Kernel command line: %s\n", boot_command_line);
- parse_early_param();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement