diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-07-29 17:27:56 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-07-29 17:27:56 -0400 |
commit | a20df564d15bd28e3df24e1c65b885bd74d23f17 (patch) | |
tree | df2fc17a1dbd53122de2785868cf9fbaeecf2122 /arch/arm | |
parent | d50f58bbd979e86378dfdec982452041f0e604ef (diff) | |
parent | e69edc7939abda1f696c482faa8168d80420f75c (diff) |
Merge branch 'arm/booting' of git://git.pengutronix.de/git/ukl/linux-2.6 into devel-stable
Conflicts:
arch/arm/Kconfig
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/Kconfig | 105 | ||||
-rw-r--r-- | arch/arm/boot/Makefile | 8 | ||||
-rw-r--r-- | arch/arm/boot/compressed/Makefile | 11 | ||||
-rw-r--r-- | arch/arm/boot/compressed/Makefile.debug | 23 | ||||
-rw-r--r-- | arch/arm/boot/compressed/head.S | 40 | ||||
-rw-r--r-- | arch/arm/boot/compressed/misc.c | 20 | ||||
-rw-r--r-- | arch/arm/kernel/Makefile | 4 | ||||
-rw-r--r-- | arch/arm/kernel/compat.c | 7 | ||||
-rw-r--r-- | arch/arm/kernel/compat.h | 2 | ||||
-rw-r--r-- | arch/arm/kernel/setup.c | 11 |
10 files changed, 152 insertions, 79 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 738f404d5e34..4e829c604f93 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -1404,6 +1404,12 @@ config CC_STACKPROTECTOR | |||
1404 | neutralized via a kernel panic. | 1404 | neutralized via a kernel panic. |
1405 | This feature requires gcc version 4.2 or above. | 1405 | This feature requires gcc version 4.2 or above. |
1406 | 1406 | ||
1407 | config DEPRECATED_PARAM_STRUCT | ||
1408 | bool "Provide old way to pass kernel parameters" | ||
1409 | help | ||
1410 | This was deprecated in 2001 and announced to live on for 5 years. | ||
1411 | Some old boot loaders still use this way. | ||
1412 | |||
1407 | endmenu | 1413 | endmenu |
1408 | 1414 | ||
1409 | menu "Boot options" | 1415 | menu "Boot options" |
@@ -1514,6 +1520,105 @@ config ATAGS_PROC | |||
1514 | Should the atags used to boot the kernel be exported in an "atags" | 1520 | Should the atags used to boot the kernel be exported in an "atags" |
1515 | file in procfs. Useful with kexec. | 1521 | file in procfs. Useful with kexec. |
1516 | 1522 | ||
1523 | config AUTO_ZRELADDR | ||
1524 | bool "Auto calculation of the decompressed kernel image address" | ||
1525 | depends on !ZBOOT_ROM && !ARCH_U300 | ||
1526 | help | ||
1527 | ZRELADDR is the physical address where the decompressed kernel | ||
1528 | image will be placed. If AUTO_ZRELADDR is selected, the address | ||
1529 | will be determined at run-time by masking the current IP with | ||
1530 | 0xf8000000. This assumes the zImage being placed in the first 128MB | ||
1531 | from start of memory. | ||
1532 | |||
1533 | config ZRELADDR | ||
1534 | hex "Physical address of the decompressed kernel image" | ||
1535 | depends on !AUTO_ZRELADDR | ||
1536 | default 0x00008000 if ARCH_BCMRING ||\ | ||
1537 | ARCH_CNS3XXX ||\ | ||
1538 | ARCH_DOVE ||\ | ||
1539 | ARCH_EBSA110 ||\ | ||
1540 | ARCH_FOOTBRIDGE ||\ | ||
1541 | ARCH_INTEGRATOR ||\ | ||
1542 | ARCH_IOP13XX ||\ | ||
1543 | ARCH_IOP33X ||\ | ||
1544 | ARCH_IXP2000 ||\ | ||
1545 | ARCH_IXP23XX ||\ | ||
1546 | ARCH_IXP4XX ||\ | ||
1547 | ARCH_KIRKWOOD ||\ | ||
1548 | ARCH_KS8695 ||\ | ||
1549 | ARCH_LOKI ||\ | ||
1550 | ARCH_MMP ||\ | ||
1551 | ARCH_MV78XX0 ||\ | ||
1552 | ARCH_NOMADIK ||\ | ||
1553 | ARCH_NUC93X ||\ | ||
1554 | ARCH_NS9XXX ||\ | ||
1555 | ARCH_ORION5X ||\ | ||
1556 | ARCH_SPEAR3XX ||\ | ||
1557 | ARCH_SPEAR6XX ||\ | ||
1558 | ARCH_U8500 ||\ | ||
1559 | ARCH_VERSATILE ||\ | ||
1560 | ARCH_W90X900 | ||
1561 | default 0x08008000 if ARCH_MX1 ||\ | ||
1562 | ARCH_SHARK | ||
1563 | default 0x10008000 if ARCH_MSM ||\ | ||
1564 | ARCH_OMAP1 ||\ | ||
1565 | ARCH_RPC | ||
1566 | default 0x20008000 if ARCH_S5P6440 ||\ | ||
1567 | ARCH_S5P6442 ||\ | ||
1568 | ARCH_S5PC100 ||\ | ||
1569 | ARCH_S5PV210 | ||
1570 | default 0x30008000 if ARCH_S3C2410 ||\ | ||
1571 | ARCH_S3C2400 ||\ | ||
1572 | ARCH_S3C2412 ||\ | ||
1573 | ARCH_S3C2416 ||\ | ||
1574 | ARCH_S3C2440 ||\ | ||
1575 | ARCH_S3C2443 | ||
1576 | default 0x40008000 if ARCH_STMP378X ||\ | ||
1577 | ARCH_STMP37XX ||\ | ||
1578 | ARCH_SH7372 ||\ | ||
1579 | ARCH_SH7377 | ||
1580 | default 0x50008000 if ARCH_S3C64XX ||\ | ||
1581 | ARCH_SH7367 | ||
1582 | default 0x60008000 if ARCH_VEXPRESS | ||
1583 | default 0x80008000 if ARCH_MX25 ||\ | ||
1584 | ARCH_MX3 ||\ | ||
1585 | ARCH_NETX ||\ | ||
1586 | ARCH_OMAP2PLUS ||\ | ||
1587 | ARCH_PNX4008 | ||
1588 | default 0x90008000 if ARCH_MX5 ||\ | ||
1589 | ARCH_MX91231 | ||
1590 | default 0xa0008000 if ARCH_IOP32X ||\ | ||
1591 | ARCH_PXA ||\ | ||
1592 | MACH_MX27 | ||
1593 | default 0xc0008000 if ARCH_LH7A40X ||\ | ||
1594 | MACH_MX21 | ||
1595 | default 0xf0008000 if ARCH_AAEC2000 ||\ | ||
1596 | ARCH_L7200 | ||
1597 | default 0xc0028000 if ARCH_CLPS711X | ||
1598 | default 0x70008000 if ARCH_AT91 && (ARCH_AT91CAP9 || ARCH_AT91SAM9G45) | ||
1599 | default 0x20008000 if ARCH_AT91 && !(ARCH_AT91CAP9 || ARCH_AT91SAM9G45) | ||
1600 | default 0xc0008000 if ARCH_DAVINCI && ARCH_DAVINCI_DA8XX | ||
1601 | default 0x80008000 if ARCH_DAVINCI && !ARCH_DAVINCI_DA8XX | ||
1602 | default 0x00008000 if ARCH_EP93XX && EP93XX_SDCE3_SYNC_PHYS_OFFSET | ||
1603 | default 0xc0008000 if ARCH_EP93XX && EP93XX_SDCE0_PHYS_OFFSET | ||
1604 | default 0xd0008000 if ARCH_EP93XX && EP93XX_SDCE1_PHYS_OFFSET | ||
1605 | default 0xe0008000 if ARCH_EP93XX && EP93XX_SDCE2_PHYS_OFFSET | ||
1606 | default 0xf0008000 if ARCH_EP93XX && EP93XX_SDCE3_ASYNC_PHYS_OFFSET | ||
1607 | default 0x00008000 if ARCH_GEMINI && GEMINI_MEM_SWAP | ||
1608 | default 0x10008000 if ARCH_GEMINI && !GEMINI_MEM_SWAP | ||
1609 | default 0x70008000 if ARCH_REALVIEW && REALVIEW_HIGH_PHYS_OFFSET | ||
1610 | default 0x00008000 if ARCH_REALVIEW && !REALVIEW_HIGH_PHYS_OFFSET | ||
1611 | default 0xc0208000 if ARCH_SA1100 && SA1111 | ||
1612 | default 0xc0008000 if ARCH_SA1100 && !SA1111 | ||
1613 | default 0x30108000 if ARCH_S3C2410 && PM_H1940 | ||
1614 | default 0x28E08000 if ARCH_U300 && MACH_U300_SINGLE_RAM | ||
1615 | default 0x48008000 if ARCH_U300 && !MACH_U300_SINGLE_RAM | ||
1616 | help | ||
1617 | ZRELADDR is the physical address where the decompressed kernel | ||
1618 | image will be placed. ZRELADDR has to be specified when the | ||
1619 | assumption of AUTO_ZRELADDR is not valid, or when ZBOOT_ROM is | ||
1620 | selected. | ||
1621 | |||
1517 | endmenu | 1622 | endmenu |
1518 | 1623 | ||
1519 | menu "CPU Power Management" | 1624 | menu "CPU Power Management" |
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index 4a590f4113e2..f705213caa88 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile | |||
@@ -14,18 +14,16 @@ | |||
14 | MKIMAGE := $(srctree)/scripts/mkuboot.sh | 14 | MKIMAGE := $(srctree)/scripts/mkuboot.sh |
15 | 15 | ||
16 | ifneq ($(MACHINE),) | 16 | ifneq ($(MACHINE),) |
17 | include $(srctree)/$(MACHINE)/Makefile.boot | 17 | -include $(srctree)/$(MACHINE)/Makefile.boot |
18 | endif | 18 | endif |
19 | 19 | ||
20 | # Note: the following conditions must always be true: | 20 | # Note: the following conditions must always be true: |
21 | # ZRELADDR == virt_to_phys(PAGE_OFFSET + TEXT_OFFSET) | ||
22 | # PARAMS_PHYS must be within 4MB of ZRELADDR | 21 | # PARAMS_PHYS must be within 4MB of ZRELADDR |
23 | # INITRD_PHYS must be in RAM | 22 | # INITRD_PHYS must be in RAM |
24 | ZRELADDR := $(zreladdr-y) | ||
25 | PARAMS_PHYS := $(params_phys-y) | 23 | PARAMS_PHYS := $(params_phys-y) |
26 | INITRD_PHYS := $(initrd_phys-y) | 24 | INITRD_PHYS := $(initrd_phys-y) |
27 | 25 | ||
28 | export ZRELADDR INITRD_PHYS PARAMS_PHYS | 26 | export INITRD_PHYS PARAMS_PHYS |
29 | 27 | ||
30 | targets := Image zImage xipImage bootpImage uImage | 28 | targets := Image zImage xipImage bootpImage uImage |
31 | 29 | ||
@@ -67,7 +65,7 @@ quiet_cmd_uimage = UIMAGE $@ | |||
67 | ifeq ($(CONFIG_ZBOOT_ROM),y) | 65 | ifeq ($(CONFIG_ZBOOT_ROM),y) |
68 | $(obj)/uImage: LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT) | 66 | $(obj)/uImage: LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT) |
69 | else | 67 | else |
70 | $(obj)/uImage: LOADADDR=$(ZRELADDR) | 68 | $(obj)/uImage: LOADADDR=$(CONFIG_ZRELADDR) |
71 | endif | 69 | endif |
72 | 70 | ||
73 | ifeq ($(CONFIG_THUMB2_KERNEL),y) | 71 | ifeq ($(CONFIG_THUMB2_KERNEL),y) |
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 53faa9063a03..cc8380b879fe 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile | |||
@@ -4,6 +4,7 @@ | |||
4 | # create a compressed vmlinuz image from the original vmlinux | 4 | # create a compressed vmlinuz image from the original vmlinux |
5 | # | 5 | # |
6 | 6 | ||
7 | AFLAGS_head.o += -DTEXT_OFFSET=$(TEXT_OFFSET) | ||
7 | HEAD = head.o | 8 | HEAD = head.o |
8 | OBJS = misc.o decompress.o | 9 | OBJS = misc.o decompress.o |
9 | FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c | 10 | FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c |
@@ -79,19 +80,9 @@ endif | |||
79 | EXTRA_CFLAGS := -fpic -fno-builtin | 80 | EXTRA_CFLAGS := -fpic -fno-builtin |
80 | EXTRA_AFLAGS := -Wa,-march=all | 81 | EXTRA_AFLAGS := -Wa,-march=all |
81 | 82 | ||
82 | # Supply ZRELADDR, INITRD_PHYS and PARAMS_PHYS to the decompressor via | ||
83 | # linker symbols. We only define initrd_phys and params_phys if the | ||
84 | # machine class defined the corresponding makefile variable. | ||
85 | LDFLAGS_vmlinux := --defsym zreladdr=$(ZRELADDR) | ||
86 | ifeq ($(CONFIG_CPU_ENDIAN_BE8),y) | 83 | ifeq ($(CONFIG_CPU_ENDIAN_BE8),y) |
87 | LDFLAGS_vmlinux += --be8 | 84 | LDFLAGS_vmlinux += --be8 |
88 | endif | 85 | endif |
89 | ifneq ($(INITRD_PHYS),) | ||
90 | LDFLAGS_vmlinux += --defsym initrd_phys=$(INITRD_PHYS) | ||
91 | endif | ||
92 | ifneq ($(PARAMS_PHYS),) | ||
93 | LDFLAGS_vmlinux += --defsym params_phys=$(PARAMS_PHYS) | ||
94 | endif | ||
95 | # ? | 86 | # ? |
96 | LDFLAGS_vmlinux += -p | 87 | LDFLAGS_vmlinux += -p |
97 | # Report unresolved symbol references | 88 | # Report unresolved symbol references |
diff --git a/arch/arm/boot/compressed/Makefile.debug b/arch/arm/boot/compressed/Makefile.debug deleted file mode 100644 index 491a037b2973..000000000000 --- a/arch/arm/boot/compressed/Makefile.debug +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | # | ||
2 | # linux/arch/arm/boot/compressed/Makefile | ||
3 | # | ||
4 | # create a compressed vmlinux image from the original vmlinux | ||
5 | # | ||
6 | |||
7 | COMPRESSED_EXTRA=../../lib/ll_char_wr.o | ||
8 | OBJECTS=misc-debug.o ll_char_wr.aout.o | ||
9 | |||
10 | CFLAGS=-D__KERNEL__ -O2 -DSTDC_HEADERS -DSTANDALONE_DEBUG -Wall -I../../../../include -c | ||
11 | |||
12 | test-gzip: piggy.aout.o $(OBJECTS) | ||
13 | $(CC) -o $@ $(OBJECTS) piggy.aout.o | ||
14 | |||
15 | misc-debug.o: misc.c | ||
16 | $(CC) $(CFLAGS) -o $@ misc.c | ||
17 | |||
18 | piggy.aout.o: piggy.o | ||
19 | arm-linuxelf-objcopy --change-leading-char -I elf32-arm -O arm-aout32-linux piggy.o piggy.aout.o | ||
20 | |||
21 | ll_char_wr.aout.o: $(COMPRESSED_EXTRA) | ||
22 | arm-linuxelf-objcopy --change-leading-char -I elf32-arm -O arm-aout32-linux $(COMPRESSED_EXTRA) ll_char_wr.aout.o | ||
23 | |||
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index c5191b1532e8..abf4d65acf62 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -170,9 +170,16 @@ not_angel: | |||
170 | 170 | ||
171 | .text | 171 | .text |
172 | adr r0, LC0 | 172 | adr r0, LC0 |
173 | ARM( ldmia r0, {r1, r2, r3, r4, r5, r6, r11, ip, sp}) | 173 | ARM( ldmia r0, {r1, r2, r3, r5, r6, r11, ip, sp}) |
174 | THUMB( ldmia r0, {r1, r2, r3, r4, r5, r6, r11, ip} ) | 174 | THUMB( ldmia r0, {r1, r2, r3, r5, r6, r11, ip} ) |
175 | THUMB( ldr sp, [r0, #32] ) | 175 | THUMB( ldr sp, [r0, #32] ) |
176 | #ifdef CONFIG_AUTO_ZRELADDR | ||
177 | @ determine final kernel image address | ||
178 | and r4, pc, #0xf8000000 | ||
179 | add r4, r4, #TEXT_OFFSET | ||
180 | #else | ||
181 | ldr r4, =CONFIG_ZRELADDR | ||
182 | #endif | ||
176 | subs r0, r0, r1 @ calculate the delta offset | 183 | subs r0, r0, r1 @ calculate the delta offset |
177 | 184 | ||
178 | @ if delta is zero, we are | 185 | @ if delta is zero, we are |
@@ -310,18 +317,17 @@ wont_overwrite: mov r0, r4 | |||
310 | LC0: .word LC0 @ r1 | 317 | LC0: .word LC0 @ r1 |
311 | .word __bss_start @ r2 | 318 | .word __bss_start @ r2 |
312 | .word _end @ r3 | 319 | .word _end @ r3 |
313 | .word zreladdr @ r4 | ||
314 | .word _start @ r5 | 320 | .word _start @ r5 |
315 | .word _image_size @ r6 | 321 | .word _image_size @ r6 |
316 | .word _got_start @ r11 | 322 | .word _got_start @ r11 |
317 | .word _got_end @ ip | 323 | .word _got_end @ ip |
318 | .word user_stack+4096 @ sp | 324 | .word user_stack_end @ sp |
319 | LC1: .word reloc_end - reloc_start | 325 | LC1: .word reloc_end - reloc_start |
320 | .size LC0, . - LC0 | 326 | .size LC0, . - LC0 |
321 | 327 | ||
322 | #ifdef CONFIG_ARCH_RPC | 328 | #ifdef CONFIG_ARCH_RPC |
323 | .globl params | 329 | .globl params |
324 | params: ldr r0, =params_phys | 330 | params: ldr r0, =0x10000100 @ params_phys for RPC |
325 | mov pc, lr | 331 | mov pc, lr |
326 | .ltorg | 332 | .ltorg |
327 | .align | 333 | .align |
@@ -339,9 +345,8 @@ params: ldr r0, =params_phys | |||
339 | * r4 = kernel execution address | 345 | * r4 = kernel execution address |
340 | * r7 = architecture number | 346 | * r7 = architecture number |
341 | * r8 = atags pointer | 347 | * r8 = atags pointer |
342 | * r9 = run-time address of "start" (???) | ||
343 | * On exit, | 348 | * On exit, |
344 | * r1, r2, r3, r9, r10, r12 corrupted | 349 | * r0, r1, r2, r3, r9, r10, r12 corrupted |
345 | * This routine must preserve: | 350 | * This routine must preserve: |
346 | * r4, r5, r6, r7, r8 | 351 | * r4, r5, r6, r7, r8 |
347 | */ | 352 | */ |
@@ -396,12 +401,18 @@ __armv3_mpu_cache_on: | |||
396 | 401 | ||
397 | mov r0, #0 | 402 | mov r0, #0 |
398 | mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 | 403 | mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 |
404 | /* | ||
405 | * ?? ARMv3 MMU does not allow reading the control register, | ||
406 | * does this really work on ARMv3 MPU? | ||
407 | */ | ||
399 | mrc p15, 0, r0, c1, c0, 0 @ read control reg | 408 | mrc p15, 0, r0, c1, c0, 0 @ read control reg |
400 | @ .... .... .... WC.M | 409 | @ .... .... .... WC.M |
401 | orr r0, r0, #0x000d @ .... .... .... 11.1 | 410 | orr r0, r0, #0x000d @ .... .... .... 11.1 |
411 | /* ?? this overwrites the value constructed above? */ | ||
402 | mov r0, #0 | 412 | mov r0, #0 |
403 | mcr p15, 0, r0, c1, c0, 0 @ write control reg | 413 | mcr p15, 0, r0, c1, c0, 0 @ write control reg |
404 | 414 | ||
415 | /* ?? invalidate for the second time? */ | ||
405 | mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 | 416 | mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 |
406 | mov pc, lr | 417 | mov pc, lr |
407 | 418 | ||
@@ -771,8 +782,10 @@ proc_types: | |||
771 | * Turn off the Cache and MMU. ARMv3 does not support | 782 | * Turn off the Cache and MMU. ARMv3 does not support |
772 | * reading the control register, but ARMv4 does. | 783 | * reading the control register, but ARMv4 does. |
773 | * | 784 | * |
774 | * On exit, r0, r1, r2, r3, r9, r12 corrupted | 785 | * On exit, |
775 | * This routine must preserve: r4, r6, r7 | 786 | * r0, r1, r2, r3, r9, r12 corrupted |
787 | * This routine must preserve: | ||
788 | * r4, r6, r7 | ||
776 | */ | 789 | */ |
777 | .align 5 | 790 | .align 5 |
778 | cache_off: mov r3, #12 @ cache_off function | 791 | cache_off: mov r3, #12 @ cache_off function |
@@ -845,7 +858,7 @@ __armv3_mmu_cache_off: | |||
845 | * Clean and flush the cache to maintain consistency. | 858 | * Clean and flush the cache to maintain consistency. |
846 | * | 859 | * |
847 | * On exit, | 860 | * On exit, |
848 | * r1, r2, r3, r9, r11, r12 corrupted | 861 | * r1, r2, r3, r9, r10, r11, r12 corrupted |
849 | * This routine must preserve: | 862 | * This routine must preserve: |
850 | * r0, r4, r5, r6, r7 | 863 | * r0, r4, r5, r6, r7 |
851 | */ | 864 | */ |
@@ -988,7 +1001,7 @@ no_cache_id: | |||
988 | __armv3_mmu_cache_flush: | 1001 | __armv3_mmu_cache_flush: |
989 | __armv3_mpu_cache_flush: | 1002 | __armv3_mpu_cache_flush: |
990 | mov r1, #0 | 1003 | mov r1, #0 |
991 | mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 | 1004 | mcr p15, 0, r1, c7, c0, 0 @ invalidate whole cache v3 |
992 | mov pc, lr | 1005 | mov pc, lr |
993 | 1006 | ||
994 | /* | 1007 | /* |
@@ -1001,6 +1014,7 @@ __armv3_mpu_cache_flush: | |||
1001 | phexbuf: .space 12 | 1014 | phexbuf: .space 12 |
1002 | .size phexbuf, . - phexbuf | 1015 | .size phexbuf, . - phexbuf |
1003 | 1016 | ||
1017 | @ phex corrupts {r0, r1, r2, r3} | ||
1004 | phex: adr r3, phexbuf | 1018 | phex: adr r3, phexbuf |
1005 | mov r2, #0 | 1019 | mov r2, #0 |
1006 | strb r2, [r3, r1] | 1020 | strb r2, [r3, r1] |
@@ -1015,6 +1029,7 @@ phex: adr r3, phexbuf | |||
1015 | strb r2, [r3, r1] | 1029 | strb r2, [r3, r1] |
1016 | b 1b | 1030 | b 1b |
1017 | 1031 | ||
1032 | @ puts corrupts {r0, r1, r2, r3} | ||
1018 | puts: loadsp r3, r1 | 1033 | puts: loadsp r3, r1 |
1019 | 1: ldrb r2, [r0], #1 | 1034 | 1: ldrb r2, [r0], #1 |
1020 | teq r2, #0 | 1035 | teq r2, #0 |
@@ -1029,12 +1044,14 @@ puts: loadsp r3, r1 | |||
1029 | teq r0, #0 | 1044 | teq r0, #0 |
1030 | bne 1b | 1045 | bne 1b |
1031 | mov pc, lr | 1046 | mov pc, lr |
1047 | @ putc corrupts {r0, r1, r2, r3} | ||
1032 | putc: | 1048 | putc: |
1033 | mov r2, r0 | 1049 | mov r2, r0 |
1034 | mov r0, #0 | 1050 | mov r0, #0 |
1035 | loadsp r3, r1 | 1051 | loadsp r3, r1 |
1036 | b 2b | 1052 | b 2b |
1037 | 1053 | ||
1054 | @ memdump corrupts {r0, r1, r2, r3, r10, r11, r12, lr} | ||
1038 | memdump: mov r12, r0 | 1055 | memdump: mov r12, r0 |
1039 | mov r10, lr | 1056 | mov r10, lr |
1040 | mov r11, #0 | 1057 | mov r11, #0 |
@@ -1070,3 +1087,4 @@ reloc_end: | |||
1070 | .align | 1087 | .align |
1071 | .section ".stack", "w" | 1088 | .section ".stack", "w" |
1072 | user_stack: .space 4096 | 1089 | user_stack: .space 4096 |
1090 | user_stack_end: | ||
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index d2b2ef41cd4f..e653a6d3c8d9 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c | |||
@@ -28,9 +28,6 @@ unsigned int __machine_arch_type; | |||
28 | 28 | ||
29 | #include <asm/unaligned.h> | 29 | #include <asm/unaligned.h> |
30 | 30 | ||
31 | #ifdef STANDALONE_DEBUG | ||
32 | #define putstr printf | ||
33 | #else | ||
34 | 31 | ||
35 | static void putstr(const char *ptr); | 32 | static void putstr(const char *ptr); |
36 | extern void error(char *x); | 33 | extern void error(char *x); |
@@ -116,7 +113,6 @@ static void putstr(const char *ptr) | |||
116 | flush(); | 113 | flush(); |
117 | } | 114 | } |
118 | 115 | ||
119 | #endif | ||
120 | 116 | ||
121 | void *memcpy(void *__dest, __const void *__src, size_t __n) | 117 | void *memcpy(void *__dest, __const void *__src, size_t __n) |
122 | { | 118 | { |
@@ -186,7 +182,6 @@ asmlinkage void __div0(void) | |||
186 | 182 | ||
187 | extern void do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x)); | 183 | extern void do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x)); |
188 | 184 | ||
189 | #ifndef STANDALONE_DEBUG | ||
190 | 185 | ||
191 | unsigned long | 186 | unsigned long |
192 | decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p, | 187 | decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p, |
@@ -211,18 +206,3 @@ decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p, | |||
211 | putstr(" done, booting the kernel.\n"); | 206 | putstr(" done, booting the kernel.\n"); |
212 | return output_ptr; | 207 | return output_ptr; |
213 | } | 208 | } |
214 | #else | ||
215 | |||
216 | char output_buffer[1500*1024]; | ||
217 | |||
218 | int main() | ||
219 | { | ||
220 | output_data = output_buffer; | ||
221 | |||
222 | putstr("Uncompressing Linux..."); | ||
223 | decompress(input_data, input_data_end - input_data, | ||
224 | NULL, NULL, output_data, NULL, error); | ||
225 | putstr("done.\n"); | ||
226 | return 0; | ||
227 | } | ||
228 | #endif | ||
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 26d302c28e13..021f72d89799 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile | |||
@@ -13,10 +13,12 @@ CFLAGS_REMOVE_return_address.o = -pg | |||
13 | 13 | ||
14 | # Object file lists. | 14 | # Object file lists. |
15 | 15 | ||
16 | obj-y := compat.o elf.o entry-armv.o entry-common.o irq.o \ | 16 | obj-y := elf.o entry-armv.o entry-common.o irq.o \ |
17 | process.o ptrace.o return_address.o setup.o signal.o \ | 17 | process.o ptrace.o return_address.o setup.o signal.o \ |
18 | sys_arm.o stacktrace.o time.o traps.o | 18 | sys_arm.o stacktrace.o time.o traps.o |
19 | 19 | ||
20 | obj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += compat.o | ||
21 | |||
20 | obj-$(CONFIG_LEDS) += leds.o | 22 | obj-$(CONFIG_LEDS) += leds.o |
21 | obj-$(CONFIG_OC_ETM) += etm.o | 23 | obj-$(CONFIG_OC_ETM) += etm.o |
22 | 24 | ||
diff --git a/arch/arm/kernel/compat.c b/arch/arm/kernel/compat.c index 0a1385442f43..925652318b8b 100644 --- a/arch/arm/kernel/compat.c +++ b/arch/arm/kernel/compat.c | |||
@@ -217,10 +217,3 @@ void __init convert_to_tag_list(struct tag *tags) | |||
217 | struct param_struct *params = (struct param_struct *)tags; | 217 | struct param_struct *params = (struct param_struct *)tags; |
218 | build_tag_list(params, ¶ms->u2); | 218 | build_tag_list(params, ¶ms->u2); |
219 | } | 219 | } |
220 | |||
221 | void __init squash_mem_tags(struct tag *tag) | ||
222 | { | ||
223 | for (; tag->hdr.size; tag = tag_next(tag)) | ||
224 | if (tag->hdr.tag == ATAG_MEM) | ||
225 | tag->hdr.tag = ATAG_NONE; | ||
226 | } | ||
diff --git a/arch/arm/kernel/compat.h b/arch/arm/kernel/compat.h index 27e61a68bd1c..39264ab1b9c6 100644 --- a/arch/arm/kernel/compat.h +++ b/arch/arm/kernel/compat.h | |||
@@ -9,5 +9,3 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | extern void convert_to_tag_list(struct tag *tags); | 11 | extern void convert_to_tag_list(struct tag *tags); |
12 | |||
13 | extern void squash_mem_tags(struct tag *tag); | ||
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 122d999bdc7c..cbc6ddb1c9bd 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -44,7 +44,9 @@ | |||
44 | #include <asm/traps.h> | 44 | #include <asm/traps.h> |
45 | #include <asm/unwind.h> | 45 | #include <asm/unwind.h> |
46 | 46 | ||
47 | #if defined(CONFIG_DEPRECATED_PARAM_STRUCT) | ||
47 | #include "compat.h" | 48 | #include "compat.h" |
49 | #endif | ||
48 | #include "atags.h" | 50 | #include "atags.h" |
49 | #include "tcm.h" | 51 | #include "tcm.h" |
50 | 52 | ||
@@ -663,6 +665,13 @@ static int __init customize_machine(void) | |||
663 | } | 665 | } |
664 | arch_initcall(customize_machine); | 666 | arch_initcall(customize_machine); |
665 | 667 | ||
668 | static void __init squash_mem_tags(struct tag *tag) | ||
669 | { | ||
670 | for (; tag->hdr.size; tag = tag_next(tag)) | ||
671 | if (tag->hdr.tag == ATAG_MEM) | ||
672 | tag->hdr.tag = ATAG_NONE; | ||
673 | } | ||
674 | |||
666 | void __init setup_arch(char **cmdline_p) | 675 | void __init setup_arch(char **cmdline_p) |
667 | { | 676 | { |
668 | struct tag *tags = (struct tag *)&init_tags; | 677 | struct tag *tags = (struct tag *)&init_tags; |
@@ -683,12 +692,14 @@ void __init setup_arch(char **cmdline_p) | |||
683 | else if (mdesc->boot_params) | 692 | else if (mdesc->boot_params) |
684 | tags = phys_to_virt(mdesc->boot_params); | 693 | tags = phys_to_virt(mdesc->boot_params); |
685 | 694 | ||
695 | #if defined(CONFIG_DEPRECATED_PARAM_STRUCT) | ||
686 | /* | 696 | /* |
687 | * If we have the old style parameters, convert them to | 697 | * If we have the old style parameters, convert them to |
688 | * a tag list. | 698 | * a tag list. |
689 | */ | 699 | */ |
690 | if (tags->hdr.tag != ATAG_CORE) | 700 | if (tags->hdr.tag != ATAG_CORE) |
691 | convert_to_tag_list(tags); | 701 | convert_to_tag_list(tags); |
702 | #endif | ||
692 | if (tags->hdr.tag != ATAG_CORE) | 703 | if (tags->hdr.tag != ATAG_CORE) |
693 | tags = (struct tag *)&init_tags; | 704 | tags = (struct tag *)&init_tags; |
694 | 705 | ||