/** * fixup_system3 - fixup function for system 3 board * @desc: machine description * @param: kernel params * @cmdline: kernel cmdline * @mi: memory info struct * */ static void __init fixup_system3(struct machine_desc *desc, struct param_struct *params, char **cmdline, struct meminfo *mi) { DPRINTK( "%s\n", "START" ); ROOT_DEV = MKDEV(RAMDISK_MAJOR,0); setup_ramdisk( 1, 0, 0, 8192 ); setup_initrd( 0xc0800000, 8*1024*1024 ); }
void setup_misc(void) { extern const uint32_t mboot_info; struct multiboot_info *pmboot_info = (void *)((uintptr_t)mboot_info); setup_memory_map(pmboot_info); setup_cmdline(pmboot_info); setup_initrd(pmboot_info); }
static int __init parse_tag_initrd2(const struct tag *tag) { unsigned long start = 0; if (tag->u.initrd.size) { start = (unsigned long)phys_to_virt(tag->u.initrd.start); setup_initrd(start, tag->u.initrd.size); } return 0; }
static void __init fixup_csb226(struct machine_desc *desc, struct param_struct *params, char **cmdline, struct meminfo *mi) { SET_BANK (0, 0xa0000000, 64*1024*1024); mi->nr_banks = 1; #if 0 setup_ramdisk (1, 0, 0, 8192); setup_initrd (__phys_to_virt(0xa1000000), 4*1024*1024); ROOT_DEV = MKDEV(RAMDISK_MAJOR,0); #endif }
/* kernel_main() * This is called by the low-level architecture startup routine. It sets up * the kernel proper and generally gets the operating system off the ground. */ void kernel_main(unsigned int initial_stack) { initial_esp = initial_stack; /* as given to us by multiboot */ /* Set up the default kernel flags. Change these by adding their * corresponding option when booting the kernel. */ kern.flags.preempt_kernel = TRUE; kern.flags.debug_sched = FALSE; kern.flags.debug_task = FALSE; kern.flags.debug_interrupt = FALSE; kern.flags.debug_ticks = FALSE; kern.flags.stats = FALSE; /* Before we do anything with the higher-level kernel, move the kernel * stack to a known location. This has to copy and remap all absolute * memory addresses. */ move_stack((void *)STACK_LOC, STACK_SIZE); /* Extract and set any options given to the kernel */ parse_cmdline(kern.cmdline); /* Now that all the lower-level startup has been done, we can set up * the higher-level kernel functions. */ init_vt(); print_startup(); setup_initrd(); load_kernel_symbols(); init_sched(); init_task(); create_init(); /* Start the kthread daemon going to set up other kernel threads */ kthread_create(kthreadd, "kthreadd"); /* And we're done */ kprintf("Kernel startup complete in %ldms\n\n", kern.current_time_offset.tv_msec); /* We need to wait a bit here for all the threads to settle themselves * before going away. */ sleep(100); /* The kernel task has finished the startup, so remove the task from the * system. This should never return, so panic if it does. */ task_exit(); panic("Kernel task did not die when it was supposed to :-("); }
static void __init fixup_graphicsmaster(struct machine_desc *desc, struct param_struct *params, char **cmdline, struct meminfo *mi) { SET_BANK( 0, 0xc0000000, 16*1024*1024 ); mi->nr_banks = 1; SET_BANK( 1, 0xc8000000, 16*1024*1024 ); mi->nr_banks = 2; ROOT_DEV = MKDEV(RAMDISK_MAJOR,0); setup_ramdisk( 1, 0, 0, 8192 ); setup_initrd( __phys_to_virt(0xc0800000), 4*1024*1024 ); }
void fixup_lpc(struct machine_desc *desc, struct param_struct *params, char ** cmdline, struct meminfo * mi) { mi->bank[0].start = 0x81000000; mi->bank[0].size = 8 * 1024 * 1024; mi->bank[0].node = 0; mi->nr_banks = 1; #ifdef CONFIG_BLK_DEV_INITRD setup_ramdisk(1, 0, 0, CONFIG_BLK_DEV_RAM_SIZE); setup_initrd(__phys_to_virt(0x81700000), 1024 * 1024); ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0); #endif }
static void __init fixup_simpad(struct machine_desc *desc, struct param_struct *params, char **cmdline, struct meminfo *mi) { #ifdef CONFIG_SA1100_SIMPAD_DRAM_64MB /* DRAM */ SET_BANK( 0, 0xc0000000, 64*1024*1024 ); #else SET_BANK( 0, 0xc0000000, 32*1024*1024 ); #endif mi->nr_banks = 1; ROOT_DEV = MKDEV(RAMDISK_MAJOR,0); setup_ramdisk( 1, 0, 0, 8192 ); setup_initrd( __phys_to_virt(0xc0800000), 4*1024*1024 ); }
static void __init ipod_fixup(struct machine_desc *desc, struct param_struct *params, char **cmdline, struct meminfo *mi) { #ifdef CONFIG_BLK_DEV_RAM extern void __ramdisk_data, __ramdisk_data_end, _text; setup_ramdisk(1, 0, 0, CONFIG_BLK_DEV_RAM_SIZE); setup_initrd((int)&__ramdisk_data, (int)&__ramdisk_data_end - (int)&__ramdisk_data); #else strcpy(*cmdline, "root=/dev/hda2 rw"); #endif }
MACHINE_END #endif #ifdef CONFIG_ARCH_IXP425_COYOTE static void __init fixup_coyote(struct machine_desc *desc, struct param_struct *params, char **cmdline, struct meminfo *mi) { mi->bank[0].start = PHYS_OFFSET; mi->bank[0].size = CONFIG_IXP425_SDRAM_SIZE * 1024 * 1024; mi->bank[0].node = 0; mi->nr_banks = 1; #ifdef CONFIG_BLK_DEV_INITRD setup_ramdisk(1, 0, 0, CONFIG_BLK_DEV_RAM_SIZE); setup_initrd(phys_to_virt(0x00A00000), 4 * 1024 * 1024); #endif }
static void __init fixup_l7200(struct machine_desc *desc, struct param_struct *unused, char **cmdline, struct meminfo *mi) { mi->nr_banks = 1; mi->bank[0].start = PHYS_OFFSET; mi->bank[0].size = (32*1024*1024); mi->bank[0].node = 0; ROOT_DEV = MKDEV(RAMDISK_MAJOR,0); setup_ramdisk( 1, 0, 0, CONFIG_BLK_DEV_RAM_SIZE); setup_initrd( __phys_to_virt(0xf1000000), 0x005dac7b); /* Serial Console COM2 and LCD */ strcpy( *cmdline, "console=tty0 console=ttyLU1,115200"); /* Serial Console COM1 and LCD */ //strcpy( *cmdline, "console=tty0 console=ttyLU0,115200"); /* Console on LCD */ //strcpy( *cmdline, "console=tty0"); }
static int __init parse_tag_initrd(const struct tag *tag) { setup_initrd(tag->u.initrd.start, tag->u.initrd.size); return 0; }