char * strcpy(char * dest,const char *src) { char *tmp = dest; while ((*dest++ = *src++) != '\0') /* nothing */; return tmp; } |
#ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) ARCH := arm |
ifeq ($(CONFIG_ARCH_S3C2410),y) TEXTADDR = 0xC0008000 MACHINE = s3c2410 Endif |
if [ "$CONFIG_ARCH_S3C2410" = "y" ]; then comment 'S3C2410 Implementation' dep_bool ' SMDK (MERI TECH BOARD)' CONFIG_S3C2410_SMDK $CONFIG_ARCH_S3C2410 dep_bool ' change AIJI' CONFIG_SMDK_AIJI dep_tristate 'S3C2410 USB function support' CONFIG_S3C2410_USB $CONFIG_ARCH_S3C2100 dep_tristate ' Support for S3C2410 USB character device emulation' CONFIG_S3C2410_USB_CHAR $CONFIG_S3C2410_USB fi # /* CONFIG_ARCH_S3C2410 */ |
ifeq ($(CONFIG_ARCH_S3C2410),y) ZTEXTADDR = 0x30008000 ZRELADDR = 0x30008000 endif |
ifeq ($(CONFIG_ARCH_S3C2410),y) OBJS += head-s3c2410.o endif |
#include <linux/config.h> #include <linux/linkage.h> #include <asm/mach-types.h> .section ".start", #alloc, #execinstr __S3C2410_start: @ Preserve r8/r7 i.e. kernel entry values @ What is it? @ Nandy @ Data cache, Intstruction cache, MMU might be active. @ Be sure to flush kernel binary out of the cache, @ whatever state it is, before it is turned off. @ This is done by fetching through currently executed @ memory to be sure we hit the same cache bic r2, pc, #0x1f add r3, r2, #0x4000 @ 16 kb is quite enough... 1: ldr r0, [r2], #32 teq r2, r3 bne 1b mcr p15, 0, r0, c7, c10, 4 @ drain WB mcr p15, 0, r0, c7, c7, 0 @ flush I & D caches #if 0 @ disabling MMU and caches mrc p15, 0, r0, c1, c0, 0 @ read control register bic r0, r0, #0x05 @ disable D cache and MMU bic r0, r0, #1000 @ disable I cache mcr p15, 0, r0, c1, c0, 0 #endif /* * Pause for a short time so that we give enough time * for the host to start a terminal up. */ mov r0, #0x00200000 1: subs r0, r0, #1 bne 1b |
no-irq-arch := $(CONFIG_ARCH_INTEGRATOR) $(CONFIG_ARCH_CLPS711X) \ $(CONFIG_FOOTBRIDGE) $(CONFIG_ARCH_EBSA110) \ $(CONFIG_ARCH_SA1100) $(CONFIG_ARCH_CAMELOT) \ $(CONFIG_ARCH_S3C2400) $(CONFIG_ARCH_S3C2410) \ $(CONFIG_ARCH_MX1ADS) $(CONFIG_ARCH_PXA) obj-$(CONFIG_MIZI) += event.o obj-$(CONFIG_APM) += apm2.o |
#elif defined(CONFIG_ARCH_S3C2410) .macro addruart,rx mrc p15, 0, \rx, c1, c0 tst \rx, #1 @ MMU enabled ? moveq \rx, #0x50000000 @ physical base address movne \rx, #0xf0000000 @ virtual address .endm .macro senduart,rd,rx str \rd, [\rx, #0x20] @ UTXH .endm .macro waituart,rd,rx .endm .macro busyuart,rd,rx 1001: ldr \rd, [\rx, #0x10] @ read UTRSTAT tst \rd, #1 << 2 @ TX_EMPTY ? beq 1001b .endm |
void __init setup_arch(char **cmdline_p) { struct tag *tags = NULL; struct machine_desc *mdesc; char *from = default_command_line; ROOT_DEV = MKDEV(0, 255); setup_processor(); mdesc = setup_machine(machine_arch_type); machine_name = mdesc->name; if (mdesc->soft_reboot) reboot_setup("s"); if (mdesc->param_offset) tags = phys_to_virt(mdesc->param_offset); /* * Do the machine-specific fixups before we parse the * parameters or tags. */ if (mdesc->fixup) mdesc->fixup(mdesc, (struct param_struct *)tags, &from, &meminfo); /* * If we have the old style parameters, convert them to * a tag list before. */ if (tags && tags->hdr.tag != ATAG_CORE) convert_to_tag_list((struct param_struct *)tags, meminfo.nr_banks == 0); if (tags && tags->hdr.tag == ATAG_CORE) parse_tags(tags); if (meminfo.nr_banks == 0) { meminfo.nr_banks = 1; meminfo.bank[0].start = PHYS_OFFSET; meminfo.bank[0].size = MEM_SIZE; } init_mm.start_code = (unsigned long) &_text; init_mm.end_code = (unsigned long) &_etext; init_mm.end_data = (unsigned long) &_edata; init_mm.brk = (unsigned long) &_end; memcpy(saved_command_line, from, COMMAND_LINE_SIZE); saved_command_line[COMMAND_LINE_SIZE-1] = '\0'; parse_cmdline(&meminfo, cmdline_p, from); bootmem_init(&meminfo); paging_init(&meminfo, mdesc); request_standard_resources(&meminfo, mdesc); /* * Set up various architecture-specific pointers */ init_arch_irq = mdesc->init_irq; #ifdef CONFIG_VT #if defined(CONFIG_VGA_CONSOLE) conswitchp = &vga_con; #elif defined(CONFIG_DUMMY_CONSOLE) conswitchp = &dummy_con; #endif #endif } |
init_maps->bufferable = 0; |
init_maps->bufferable = 1; |
static int init(void * unused) { lock_kernel(); do_basic_setup(); prepare_namespace(); /* * Ok, we have completed the initial bootup, and * we're essentially up and running. Get rid of the * initmem segments and start the user-mode stuff.. */ free_initmem(); unlock_kernel(); if (open("/dev/console", O_RDWR, 0) < 0) printk("Warning: unable to open an initial console.\n"); (void) dup(0); (void) dup(0); /* * We try each of these until one succeeds. * * The Bourne shell can be used instead of init if we are * trying to recover a really broken machine. */ printk("========================================\n"); printk("= Friendly-ARM Tech. Ltd. =\n"); printk("= http://www.arm9.net =\n"); printk("= http://www.arm9.com.cn =\n"); printk("========================================\n"); if (execute_command) execve(execute_command,argv_init,envp_init); execve("/sbin/init",argv_init,envp_init); execve("/etc/init",argv_init,envp_init); execve("/bin/init",argv_init,envp_init); execve("/bin/sh",argv_init,envp_init); panic("No init found. Try passing init= option to kernel."); } |
======================================== = Friendly-ARM Tech. Ltd. = = http://www.arm9.net = = http://www.arm9.com.cn = ======================================== |