Makefile.boot cleanup
Subsystems (25)
cover Makefile.boot cleanup
Several facts:
1. ZRELADDR in most cases can be auto detected by maksing PC with 0xf000_0000 if the zImage is placed within the first 256MiB from the memory start, which is a sane assumption except for:
- when ARCH_MX1 or ARCH_SHARK is defined
- when ARCH_U300 is defined (U300 really is strange when defining PHYS_OFFSET and ZRELADDR)
- or when ZBOOT_ROM is defined
2. For the exceptions above or those situations where ZRELADDR still needs to be specified, an option CONFIG_ZRELADDR is provided. So if there is conflict when mutliple machines are selected (in the near future), things can be manually fixed by menuconfig, instead of playing tricks with Makefile.
3. INITRD_PHYS and PARAMS_PHYS are really used only for bootpImage, and references in arch/arm/boot/compressed can be safely removed
I've listed most of the zreladdr-y found in each Makefile.boot and made them default value in CONFIG_ZRELADDR, but still there could be mistakes. Please kindly try and report back, thanks.
PATCH 1/5 Remove unused PARAMS_PHYS from arch/arm/boot/compressed
From: Eric Miao <[email protected]>
The only reference in arch/arm/boot/compressed to PARAMS_PHYS is params() in head.S, which can be directly converted to the exact address as specified by arch/arm/mach-rpc/Makefile.boot.
--- arch/arm/boot/compressed/Makefile | 7 ++----- arch/arm/boot/compressed/head.S | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-)
arch/arm/boot/compressed/Makefile +2 -5
@@ -79,8 +79,8 @@ endif EXTRA_CFLAGS := -fpic -fno-builtin EXTRA_AFLAGS := -Wa,-march=all -# Supply ZRELADDR, INITRD_PHYS and PARAMS_PHYS to the decompressor via -# linker symbols. We only define initrd_phys and params_phys if the +# Supply ZRELADDR, INITRD_PHYS to the decompressor via +# linker symbols. We only define initrd_phys if the # machine class defined the corresponding makefile variable. LDFLAGS_vmlinux := --defsym zreladdr=$(ZRELADDR) ifeq ($(CONFIG_CPU_ENDIAN_BE8),y)
@@ -89,9 +89,6 @@ endif ifneq ($(INITRD_PHYS),) LDFLAGS_vmlinux += --defsym initrd_phys=$(INITRD_PHYS) endif -ifneq ($(PARAMS_PHYS),) -LDFLAGS_vmlinux += --defsym params_phys=$(PARAMS_PHYS) -endif # ? LDFLAGS_vmlinux += -p # Report unresolved symbol references
arch/arm/boot/compressed/head.S +1 -1
@@ -321,7 +321,7 @@ LC1: .word reloc_end - reloc_start #ifdef CONFIG_ARCH_RPC .globl params -params: ldr r0, =params_phys +params: ldr r0, =0x10000100 @ params_phys for RPC mov pc, lr .ltorg .align
Signature · 1 line
1.7.0.4
PATCH 1/5 Remove unused PARAMS_PHYS from arch/arm/boot/compressed
Hallo,
Quoted 7 lines · Eric Miao
From: Eric Miao <[email protected]>
The only reference in
arch/arm/boot/compressedtoPARAMS_PHYSisparams()inhead.S, which can be directly converted to the exact address as specified byarch/arm/mach-rpc/Makefile.boot.Signed-off-by Eric Miao <[email protected]>
So params_phys-y is only used in arch/arm/boot/bootp. Is this still used? It doesn't check r2 for finding the atag list but only uses params_phys-y. So according to Keith's fail-safe method for the removal
of cruft[1] bootp can be deleted. (Unless I didn't see that the kernel
still finds the atag list at params_phys-y if r2 isn't pointing to the correct address.) (OK, if r2 and params_phys-y agree, it could still work.)
Who cares to fix bootp? Should we delete it?
Best regards
Uwe
[1] 1. promise that there will be long-term support.
2. Realize failure.
3. "Accidentally" break things in the code.
4. Let a few years go by, and note that nobody has complained about the broken features.
5. Remove the code since it is obviously not being used.
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 2/5 Remove unused INITRD_PHYS from arch/arm/boot/compressed
In reply to Eric MiaoFrom: Uwe Kleine-K?nig <[email protected]>
Original patch from Uwe Kleine-K?nig <[email protected]>.
--- arch/arm/boot/compressed/Makefile | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-)
arch/arm/boot/compressed/Makefile +1 -6
@@ -79,16 +79,11 @@ endif EXTRA_CFLAGS := -fpic -fno-builtin EXTRA_AFLAGS := -Wa,-march=all -# Supply ZRELADDR, INITRD_PHYS to the decompressor via -# linker symbols. We only define initrd_phys if the -# machine class defined the corresponding makefile variable. +# Supply ZRELADDR to the decompressor via linker symbols. LDFLAGS_vmlinux := --defsym zreladdr=$(ZRELADDR) ifeq ($(CONFIG_CPU_ENDIAN_BE8),y) LDFLAGS_vmlinux += --be8 endif -ifneq ($(INITRD_PHYS),) -LDFLAGS_vmlinux += --defsym initrd_phys=$(INITRD_PHYS) -endif # ? LDFLAGS_vmlinux += -p # Report unresolved symbol references
Signature · 1 line
1.7.0.4
PATCH 2/5 Remove unused INITRD_PHYS from arch/arm/boot/compressed
Hello,
Quoted 6 lines · Eric Miao
From: Uwe Kleine-K?nig <[email protected]>
Original patch from Uwe Kleine-K?nig <[email protected]>.
Signed-off-by Uwe Kleine-K?nig <[email protected]>Signed-off-by Eric Miao <[email protected]>
The patch is OK, but the commit log of my patch was (IMHO) better. Something like:
Only arch/arm/boot/bootp/init.S uses initrd_phys, so there is no need to pass it in arch/arm/boot/compressed.
And I would prefer not to have this "Original patch from ..." in the commit log. Do you use it because the patch system doesn't offer to specify the author of a commit?
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 2/5 Remove unused INITRD_PHYS from arch/arm/boot/compressed
2010/6/10 Uwe Kleine-K?nig <[email protected]>:
Quoted 7 lines
Hello,
Quoted 4 lines · Eric Miao
From: Uwe Kleine-K?nig <[email protected]>
Original patch from Uwe Kleine-K?nig <[email protected]>.
Quoted 8 lines
Quoted 2 lines
Signed-off-by Uwe Kleine-K?nig <[email protected]>Signed-off-by Eric Miao <[email protected]>The patch is OK, but the commit log of my patch was (IMHO) better. Something like:
Only
arch/arm/boot/bootp/init.Susesinitrd_phys, so there is no need to pass it inarch/arm/boot/compressed.
OK.
Quoted 3 lines
And I would prefer not to have this "Original patch from ..." in the commit log. ?Do you use it because the patch system doesn't offer to specify the author of a commit?
It's actually a common practice by many other who I cannot remember. But yeah, it's there because I need to remind me it's not my patch and don't get the author wrong :-)
PATCH 3/5 Make TEXT_OFFSET a configurable option
In reply to Eric MiaoFrom: Eric Miao <[email protected]>
--- arch/arm/Kconfig | 13 +++++++++++++ arch/arm/Makefile | 13 +------------ arch/arm/kernel/Makefile | 4 ++-- 3 files changed, 16 insertions(+), 14 deletions(-)
arch/arm/Kconfig +13 -0
@@ -1484,6 +1484,19 @@ config ATAGS_PROC Should the atags used to boot the kernel be exported in an "atags" file in procfs. Useful with kexec. +config TEXT_OFFSET + hex "Offset of the kernel image from the start of RAM" + default 0x00008000 + default 0x00028000 if ARCH_CLPS711X + # We don't want the htc bootloader to corrupt kernel during resume + default 0x00108000 if PM_H1940 + # SA1111 DMA bug: we don't want the kernel to live in precious + # DMA-able memory + default 0x00208000 if (ARCH_SA1100 && SA1111) + help + TEXT_OFFSET is the offset of the decompressed kernel image from + memory start. Currently, it is expected the least significant 16 + bits to be 0x8000, so to leave space for the initial page table. endmenu menu "CPU Power Management"
arch/arm/Makefile +1 -12
@@ -108,14 +108,6 @@ CHECKFLAGS += -D__arm__ #Default value head-y := arch/arm/kernel/head$(MMUEXT).o arch/arm/kernel/init_task.o -textofs-y := 0x00008000 -textofs-$(CONFIG_ARCH_CLPS711X) := 0x00028000 -# We don't want the htc bootloader to corrupt kernel during resume -textofs-$(CONFIG_PM_H1940) := 0x00108000 -# SA1111 DMA bug: we don't want the kernel to live in precious DMA-able memory -ifeq ($(CONFIG_ARCH_SA1100),y) -textofs-$(CONFIG_SA1111) := 0x00208000 -endif # Machine directory name. This list is sorted alphanumerically # by CONFIG_* macro name.
@@ -209,9 +201,6 @@ CFLAGS_3c589_cs.o :=-DISA_SIXTEEN_BIT_PERIPHERAL export CFLAGS_3c589_cs.o endif -# The byte offset of the kernel image in RAM from the start of RAM. -TEXT_OFFSET := $(textofs-y) - # The first directory contains additional information for the boot setup code ifneq ($(machine-y),) MACHINE := arch/arm/mach-$(word 1,$(machine-y))/
@@ -228,7 +217,7 @@ else KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs) $(platdirs)) endif -export TEXT_OFFSET GZFLAGS MMUEXT +export GZFLAGS MMUEXT # Do we have FASTFPE? FASTFPE :=arch/arm/fastfpe
arch/arm/kernel/Makefile +2 -2
@@ -2,8 +2,8 @@ # Makefile for the linux kernel. # -CPPFLAGS_vmlinux.lds := -DTEXT_OFFSET=$(TEXT_OFFSET) -AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET) +CPPFLAGS_vmlinux.lds := -DTEXT_OFFSET=$(CONFIG_TEXT_OFFSET) +AFLAGS_head.o := -DTEXT_OFFSET=$(CONFIG_TEXT_OFFSET) ifdef CONFIG_DYNAMIC_FTRACE CFLAGS_REMOVE_ftrace.o = -pg
Signature · 1 line
1.7.0.4
PATCH 3/5 Make TEXT_OFFSET a configurable option
Quoted 14 lines · Eric Miao
From: Eric Miao <[email protected]>
Signed-off-by Eric Miao <[email protected]>--- arch/arm/Kconfig | 13 +++++++++++++ arch/arm/Makefile | 13 +------------ arch/arm/kernel/Makefile | 4 ++-- 3 files changed, 16 insertions(+), 14 deletions(-)arch/arm/Kconfig +0
-0
arch/arm/Kconfig config ATAGS_PROC · line 1488
Quoted 5 lines
arch/arm/Kconfig +2
-0@@ -1484,6 +1484,19 @@ config ATAGS_PROC Should the atags used to boot the kernel be exported in an "atags" file in procfs. Useful with kexec. +config TEXT_OFFSET + hex "Offset of the kernel image from the start of RAM"
IMHO this should not be user configurable.
Quoted 57 lines
arch/arm/Kconfig +11
-0+ default 0x00008000 + default 0x00028000 if ARCH_CLPS711X + # We don't want the htc bootloader to corrupt kernel during resume + default 0x00108000 if PM_H1940 + # SA1111 DMA bug: we don't want the kernel to live in precious + # DMA-able memory + default 0x00208000 if (ARCH_SA1100 && SA1111) + help + TEXT_OFFSET is the offset of the decompressed kernel image from + memory start. Currently, it is expected the least significant 16 + bits to be 0x8000, so to leave space for the initial page table. endmenu menu "CPU Power Management"arch/arm/Makefile +1
-12@@ -108,14 +108,6 @@ CHECKFLAGS += -D__arm__ #Default value head-y := arch/arm/kernel/head$(MMUEXT).o arch/arm/kernel/init_task.o -textofs-y := 0x00008000 -textofs-$(CONFIG_ARCH_CLPS711X) := 0x00028000 -# We don't want the htc bootloader to corrupt kernel during resume -textofs-$(CONFIG_PM_H1940) := 0x00108000 -# SA1111 DMA bug: we don't want the kernel to live in precious DMA-able memory -ifeq ($(CONFIG_ARCH_SA1100),y) -textofs-$(CONFIG_SA1111) := 0x00208000 -endif # Machine directory name. This list is sorted alphanumerically # by CONFIG_* macro name.@@ -209,9 +201,6 @@ CFLAGS_3c589_cs.o :=-DISA_SIXTEEN_BIT_PERIPHERAL export CFLAGS_3c589_cs.o endif -# The byte offset of the kernel image in RAM from the start of RAM. -TEXT_OFFSET := $(textofs-y) - # The first directory contains additional information for the boot setup code ifneq ($(machine-y),) MACHINE := arch/arm/mach-$(word 1,$(machine-y))/@@ -228,7 +217,7 @@ else KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs) $(platdirs)) endif -export TEXT_OFFSET GZFLAGS MMUEXT +export GZFLAGS MMUEXT # Do we have FASTFPE? FASTFPE :=arch/arm/fastfpearch/arm/kernel/Makefile +0
-0
arch/arm/kernel/Makefile line 6
Quoted 7 lines
arch/arm/kernel/Makefile +2
-2@@ -2,8 +2,8 @@ # Makefile for the linux kernel. # -CPPFLAGS_vmlinux.lds := -DTEXT_OFFSET=$(TEXT_OFFSET) -AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET) +CPPFLAGS_vmlinux.lds := -DTEXT_OFFSET=$(CONFIG_TEXT_OFFSET) +AFLAGS_head.o := -DTEXT_OFFSET=$(CONFIG_TEXT_OFFSET)
Why not use CONFIG_TEXT_OFFSET directly in head.S? Is CONFIG_TEXT_OFFSET available in vmlinux.lds?
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 3/5 Make TEXT_OFFSET a configurable option
2010/6/10 Uwe Kleine-K?nig <[email protected]>:
Quoted 18 lines · Eric Miao
Quoted 17 lines
From: Eric Miao <[email protected]>
Signed-off-by Eric Miao <[email protected]>---
?arch/arm/Kconfig ? ? ? ? | ? 13 +++++++++++++ ?arch/arm/Makefile ? ? ? ?| ? 13 +------------ ?arch/arm/kernel/Makefile | ? ?4 ++--?3 files changed, 16 insertions(+), 14 deletions(-)
arch/arm/Kconfig +0
-0@@ -1484,6 +1484,19 @@ config ATAGS_PROC? ? ? ? Should the atags used to boot the kernel be exported in an "atags" ? ? ? ? file in procfs. Useful with kexec.
Quoted 4 lines
Quoted 2 lines
+config
TEXT_OFFSET
+ ? ? hex "Offset of the kernel image from the start of RAM"IMHO this should not be user configurable.
That's true. The reason I don't want to keep this in Makefile is the concern about future change to Makefile (that machine-y could be composed of all the mach-*), and make it a kernel config option at least provide a way to fix that by the user interactively.
Quoted 1 line
Quoted 1 line
... snip
Quoted 6 lines
arch/arm/Kconfig
Quoted 4 lines
arch/arm/Kconfig +2
-2-CPPFLAGS_vmlinux.lds := -DTEXT_OFFSET=$(TEXT_OFFSET) -AFLAGS_head.o ? ? ? ?:= -DTEXT_OFFSET=$(TEXT_OFFSET) +CPPFLAGS_vmlinux.lds := -DTEXT_OFFSET=$(CONFIG_TEXT_OFFSET) +AFLAGS_head.o ? ? ? ?:= -DTEXT_OFFSET=$(CONFIG_TEXT_OFFSET)Why not use
CONFIG_TEXT_OFFSETdirectly inhead.S? IsCONFIG_TEXT_OFFSETavailable invmlinux.lds?
I think so, and I'm fine to either way.
PATCH 3/5 Make TEXT_OFFSET a configurable option
Quoted 24 lines · Eric Miao
2010/6/10 Uwe Kleine-K?nig <[email protected]>:
Quoted 18 lines · Eric Miao
Quoted 17 lines
From: Eric Miao <[email protected]>
Signed-off-by Eric Miao <[email protected]>---
?arch/arm/Kconfig ? ? ? ? | ? 13 +++++++++++++ ?arch/arm/Makefile ? ? ? ?| ? 13 +------------ ?arch/arm/kernel/Makefile | ? ?4 ++--?3 files changed, 16 insertions(+), 14 deletions(-)
arch/arm/Kconfig +0
-0@@ -1484,6 +1484,19 @@ config ATAGS_PROC? ? ? ? Should the atags used to boot the kernel be exported in an "atags" ? ? ? ? file in procfs. Useful with kexec.
Quoted 4 lines
Quoted 2 lines
+config
TEXT_OFFSET
+ ? ? hex "Offset of the kernel image from the start of RAM"IMHO this should not be user configurable.
Quoted 4 lines
That's true. The reason I don't want to keep this in
Makefileis the concern about future change toMakefile(that machine-y could be composed of all the mach-*), and make it a kernel config option at least provide a way to fix that by the user interactively.
You can have both, just remove the string after "hex" above.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
In reply to Eric MiaoFrom: Eric Miao <[email protected]>
Original idea and prototype came from Nicolas Pitre.
As long as the zImage is placed within the 256MB range from the start of the memory, ZRELADDR (Address where the decompressed kernel will be placed, usually == PHYS_OFFSET + TEXT_OFFSET) can be determined at run-time by masking PC with 0xf000_0000.
Running through all the Makefile.boot, all those zreladdr-y address == 0x[0-f]000_0000 + TEXT_OFFSET can be determined at run-time.
Option CONFIG_AUTO_ZRELADDR and CONFIG_ZRELADDR are introduced, CONFIG_ZRELADDR _must_ be explicitly specified if:
- ((zreladdr-y - TEXT_OFFSET) & ~0xf0000000) != 0, which means a maksing of PC with 0xf000_0000 will result an incorrect address.
- or the assumption of the zImage being loaded by the boot loader within 256MB from the start address is simply incorrect
- or when ZBOOT_ROM is used, where the above assumption is normally wrong
List of all Makefile.boot:
Hardcoded, and can be auto calculated by masking PC with 0xf000_0000:
arch/arm/mach-cns3xxx/Makefile.boot: zreladdr-y := 0x00008000arch/arm/mach-dove/Makefile.boot: zreladdr-y := 0x00008000arch/arm/mach-ebsa110/Makefile.boot: zreladdr-y := 0x00008000arch/arm/mach-footbridge/Makefile.boot: zreladdr-y := 0x00008000arch/arm/mach-integrator/Makefile.boot: zreladdr-y := 0x00008000arch/arm/mach-iop13xx/Makefile.boot: zreladdr-y := 0x00008000arch/arm/mach-iop33x/Makefile.boot: zreladdr-y := 0x00008000arch/arm/mach-ixp2000/Makefile.boot: zreladdr-y := 0x00008000arch/arm/mach-ixp23xx/Makefile.boot: zreladdr-y := 0x00008000arch/arm/mach-ixp4xx/Makefile.boot: zreladdr-y := 0x00008000arch/arm/mach-kirkwood/Makefile.boot: zreladdr-y := 0x00008000arch/arm/mach-ks8695/Makefile.boot: zreladdr-y := 0x00008000arch/arm/mach-loki/Makefile.boot: zreladdr-y := 0x00008000arch/arm/mach-mmp/Makefile.boot: zreladdr-y := 0x00008000arch/arm/mach-mv78xx0/Makefile.boot: zreladdr-y := 0x00008000arch/arm/mach-nomadik/Makefile.boot: zreladdr-y := 0x00008000arch/arm/mach-nuc93x/Makefile.boot: zreladdr-y := 0x00008000arch/arm/mach-ns9xxx/Makefile.boot: zreladdr-y := 0x8000arch/arm/mach-orion5x/Makefile.boot: zreladdr-y := 0x00008000arch/arm/mach-spear3xx/Makefile.boot: zreladdr-y := 0x00008000arch/arm/mach-spear6xx/Makefile.boot: zreladdr-y := 0x00008000arch/arm/mach-ux500/Makefile.boot: zreladdr-y := 0x00008000arch/arm/mach-versatile/Makefile.boot: zreladdr-y := 0x00008000arch/arm/mach-w90x900/Makefile.boot: zreladdr-y := 0x00008000arch/arm/mach-msm/Makefile.boot: zreladdr-y := 0x10008000arch/arm/mach-omap1/Makefile.boot: zreladdr-y := 0x10008000arch/arm/mach-rpc/Makefile.boot: zreladdr-y := 0x10008000
arch/arm/mach-s5p6440/Makefile.boot: zreladdr-y := 0x20008000 arch/arm/mach-s5p6442/Makefile.boot: zreladdr-y := 0x20008000 arch/arm/mach-s5pc100/Makefile.boot: zreladdr-y := 0x20008000 arch/arm/mach-s5pv210/Makefile.boot: zreladdr-y := 0x20008000 arch/arm/mach-s3c2410/Makefile.boot: zreladdr-y := 0x30008000 arch/arm/mach-s3c2410/Makefile.boot: zreladdr-y := 0x30108000
arch/arm/mach-stmp378x/Makefile.boot: zreladdr-y := 0x40008000arch/arm/mach-stmp37xx/Makefile.boot: zreladdr-y := 0x40008000arch/arm/mach-s3c64xx/Makefile.boot: zreladdr-y := 0x50008000arch/arm/mach-vexpress/Makefile.boot: zreladdr-y := 0x60008000arch/arm/mach-mx25/Makefile.boot: zreladdr-y := 0x80008000arch/arm/mach-mx3/Makefile.boot: zreladdr-y := 0x80008000arch/arm/mach-netx/Makefile.boot: zreladdr-y := 0x80008000arch/arm/mach-omap2/Makefile.boot: zreladdr-y := 0x80008000arch/arm/mach-pnx4008/Makefile.boot: zreladdr-y := 0x80008000arch/arm/mach-mx5/Makefile.boot: zreladdr-y := 0x90008000arch/arm/mach-mxc91231/Makefile.boot: zreladdr-y := 0x90008000arch/arm/mach-iop32x/Makefile.boot: zreladdr-y := 0xa0008000arch/arm/mach-pxa/Makefile.boot: zreladdr-y := 0xa0008000arch/arm/mach-lh7a40x/Makefile.boot: zreladdr-y := 0xc0008000arch/arm/mach-clps711x/Makefile.boot: zreladdr-y := 0xc0028000arch/arm/mach-aaec2000/Makefile.boot: zreladdr-y := 0xf0008000arch/arm/mach-l7200/Makefile.boot: zreladdr-y := 0xf0008000
Depends on other options/macros, but still can be auto calculated by masking PC with 0xf000_0000:
arch/arm/mach-bcmring/Makefile.boot: zreladdr-y := $(CONFIG_BCM_ZRELADDR)
* refer to arch/arm/configs/bcmring_defconfig:CONFIG_BCM_ZRELADDR=0x8000arch/arm/mach-h720x/Makefile.boot: zreladdr-$(CONFIG_ARCH_H720X) := 0x40008000arch/arm/mach-shmobile/Makefile.boot: zreladdr-y := $(__ZRELADDR)
* __ZRELADDR depends on CONFIG_MEMORY_STARTarch/arm/configs/ap4evb_defconfig: CONFIG_MEMORY_START=0x40000000 (SH7372)arch/arm/configs/g3evm_defconfig: CONFIG_MEMORY_START=0x50000000 (SH7367)arch/arm/configs/g4evm_defconfig: CONFIG_MEMORY_START=0x40000000 (SH7377)
arch/arm/mach-at91/Makefile.boot: zreladdr-y := 0x70008000 (CONFIG_ARCH_AT91CAP9) arch/arm/mach-at91/Makefile.boot: zreladdr-y := 0x70008000 (CONFIG_ARCH_AT91SAM9G45) arch/arm/mach-at91/Makefile.boot: zreladdr-y := 0x20008000 (CONFIG_ARCH_AT91) arch/arm/mach-davinci/Makefile.boot: zreladdr-y := 0xc0008000 (CONFIG_ARCH_DAVINCI_DA8XX) arch/arm/mach-davinci/Makefile.boot: zreladdr-y := 0x80008000 (!CONFIG_ARCH_DAVINCI_DA8XX) arch/arm/mach-ep93xx/Makefile.boot: zreladdr-$(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) := 0x00008000 arch/arm/mach-ep93xx/Makefile.boot: zreladdr-$(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) := 0xc0008000 arch/arm/mach-ep93xx/Makefile.boot: zreladdr-$(CONFIG_EP93XX_SDCE1_PHYS_OFFSET) := 0xd0008000 arch/arm/mach-ep93xx/Makefile.boot: zreladdr-$(CONFIG_EP93XX_SDCE2_PHYS_OFFSET) := 0xe0008000 arch/arm/mach-ep93xx/Makefile.boot: zreladdr-$(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET) := 0xf0008000 arch/arm/mach-gemini/Makefile.boot: zreladdr-y := 0x00008000 (CONFIG_GEMINI_MEM_SWAP) arch/arm/mach-gemini/Makefile.boot: zreladdr-y := 0x10008000 (!CONFIG_GEMINI_MEM_SWAP)
arch/arm/mach-mx2/Makefile.boot: zreladdr-$(CONFIG_MACH_MX21) := 0xC0008000arch/arm/mach-mx2/Makefile.boot: zreladdr-$(CONFIG_MACH_MX27) := 0xA0008000arch/arm/mach-realview/Makefile.boot: zreladdr-y := 0x70008000 (CONFIG_REALVIEW_HIGH_PHYS_OFFSET)arch/arm/mach-realview/Makefile.boot: zreladdr-y := 0x00008000 (CONFIG_REALVIEW_HIGH_PHYS_OFFSET)arch/arm/mach-sa1100/Makefile.boot: zreladdr-y := 0xc0008000arch/arm/mach-sa1100/Makefile.boot: zreladdr-$(CONFIG_SA1111) := 0xc0208000
Machines where ZRELADDR cannot be auto calcuated:
arch/arm/mach-mx1/Makefile.boot: zreladdr-y := 0x08008000arch/arm/mach-shark/Makefile.boot: zreladdr-y := 0x08008000arch/arm/mach-u300/Makefile.boot: zreladdr-y := 0x28E08000arch/arm/mach-u300/Makefile.boot: zreladdr-y := 0x48008000
--- arch/arm/Kconfig | 63 +++++++++++++++++++++++++++++++++++++ arch/arm/boot/Makefile | 10 +++--- arch/arm/boot/compressed/Makefile | 4 +- arch/arm/boot/compressed/head.S | 12 +++++-- 4 files changed, 79 insertions(+), 10 deletions(-)
arch/arm/Kconfig +63 -0
@@ -1497,6 +1497,69 @@ config TEXT_OFFSET TEXT_OFFSET is the offset of the decompressed kernel image from memory start. Currently, it is expected the least significant 16 bits to be 0x8000, so to leave space for the initial page table. + +config AUTO_ZRELADDR + bool "Auto calculation of the decompressed kernel image address" + depends on !ZBOOT_ROM && !(ARCH_MX1 || ARCH_SHARK || ARCH_U300) + help + ZRELADDR is the physical address where the decompressed kernel + image will be placed. If AUTO_ZRELADDR is selected, the address + will be determined at run-time by masking the current IP with + 0xf000_0000. This assumes the zImage being placed in the 256MB + range from the start of memory. + +config ZRELADDR + hex "Physical address of the decompressed kernel image" + depends on !AUTO_ZRELADDR + default 0x00008000 if ARCH_BCMRING || ARCH_CNS3XXX || ARCH_DOVE ||\ + ARCH_EBSA110 || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR ||\ + ARCH_IOP13XX || ARCH_IOP33X || ARCH_IXP2000 ||\ + ARCH_IXP23XX || ARCH_IXP4XX || ARCH_KIRKWOOD ||\ + ARCH_KS8695 || ARCH_LOKI || ARCH_MMP || ARCH_MV78XX0 ||\ + ARCH_NOMADIK || ARCH_NUC93X || ARCH_NS9XXX ||\ + ARCH_ORION5X || ARCH_SPEAR3XX || ARCH_SPEAR6XX ||\ + ARCH_UX5XX || ARCH_VERSATILE || ARCH_W90X900 + default 0x08008000 if ARCH_MX1 || ARCH_SHARK + default 0x10008000 if ARCH_MSM || ARCH_OMAP1 || ARCH_RPC + default 0x20008000 if ARCH_S5P6440 || ARCH_S5P6442 ||\ + ARCH_S5PC100 || ARCH_S5PV210 + default 0x30008000 if ARCH_S3C2410 || ARCH_S3C2400 || ARCH_S3C2412 ||\ + ARCH_S3C2416 || ARCH_S3C2440 || ARCH_S3C2443 + default 0x40008000 if ARCH_STMP378X || ARCH_STMP37XX || ARCH_SH7372 ||\ + ARCH_SH7377 + default 0x50008000 if ARCH_S3C64XX || ARCH_SH7367 + default 0x60008000 if ARCH_VEXPRESS + default 0x80008000 if ARCH_MX25 || ARCH_MX3 || ARCH_NETX ||\ + ARCH_OMAP2 || ARCH_PNX4008 + default 0x90008000 if ARCH_MX5 || ARCH_MX91231 + default 0xa0008000 if ARCH_IOP32X || ARCH_PXA || MACH_MX27 + default 0xc0008000 if ARCH_LH7A40X || MACH_MX21 + default 0xf0008000 if ARCH_AAEC2000 || ARCH_L7200 + default 0xc0028000 if ARCH_CLPS711X + default 0x70008000 if ARCH_AT91 && (ARCH_AT91CAP9 || ARCH_AT91SAM9G45) + default 0x20008000 if ARCH_AT91 && !(ARCH_AT91CAP9 || ARCH_AT91SAM9G45) + default 0xc0008000 if ARCH_DAVINCI && ARCH_DAVINCI_DA8XX + default 0x80008000 if ARCH_DAVINCI && !ARCH_DAVINCI_DA8XX + default 0x00008000 if ARCH_EP93XX && EP93XX_SDCE3_SYNC_PHYS_OFFSET + default 0xc0008000 if ARCH_EP93XX && EP93XX_SDCE0_PHYS_OFFSET + default 0xd0008000 if ARCH_EP93XX && EP93XX_SDCE1_PHYS_OFFSET + default 0xe0008000 if ARCH_EP93XX && EP93XX_SDCE2_PHYS_OFFSET + default 0xf0008000 if ARCH_EP93XX && EP93XX_SDCE3_ASYNC_PHYS_OFFSET + default 0x00008000 if ARCH_GEMINI && GEMINI_MEM_SWAP + default 0x10008000 if ARCH_GEMINI && !GEMINI_MEM_SWAP + default 0x70008000 if ARCH_REALVIEW && REALVIEW_HIGH_PHYS_OFFSET + default 0x00008000 if ARCH_REALVIEW && !REALVIEW_HIGH_PHYS_OFFSET + default 0xc0208000 if ARCH_SA1100 && SA1111 + default 0xc0008000 if ARCH_SA1100 && !SA1111 + default 0x30108000 if ARCH_S3C2410 && PM_H1940 + default 0x28E08000 if ARCH_U300 && MACH_U300_SINGLE_RAM + default 0x48008000 if ARCH_U300 && !MACH_U300_SINGLE_RAM + help + ZRELADDR is the physical address where the decompressed kernel + image will be placed. ZRELADDR has to be specified when the + assumption of AUTO_ZRELADDR is not valid, or when ZBOOT_ROM is + selected. + endmenu menu "CPU Power Management"
arch/arm/boot/Makefile +5 -5
@@ -14,18 +14,16 @@ MKIMAGE := $(srctree)/scripts/mkuboot.sh ifneq ($(MACHINE),) -include $(srctree)/$(MACHINE)/Makefile.boot +-include $(srctree)/$(MACHINE)/Makefile.boot endif # Note: the following conditions must always be true: -# ZRELADDR == virt_to_phys(PAGE_OFFSET + TEXT_OFFSET) # PARAMS_PHYS must be within 4MB of ZRELADDR # INITRD_PHYS must be in RAM -ZRELADDR := $(zreladdr-y) PARAMS_PHYS := $(params_phys-y) INITRD_PHYS := $(initrd_phys-y) -export ZRELADDR INITRD_PHYS PARAMS_PHYS +export INITRD_PHYS PARAMS_PHYS targets := Image zImage xipImage bootpImage uImage
@@ -67,7 +65,7 @@ quiet_cmd_uimage = UIMAGE $@ ifeq ($(CONFIG_ZBOOT_ROM),y) $(obj)/uImage: LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT) else -$(obj)/uImage: LOADADDR=$(ZRELADDR) +$(obj)/uImage: LOADADDR=$(CONFIG_ZRELADDR) endif ifeq ($(CONFIG_THUMB2_KERNEL),y)
@@ -78,6 +76,8 @@ $(obj)/uImage: STARTADDR=$(LOADADDR) endif $(obj)/uImage: $(obj)/zImage FORCE + @test "$(CONFIG_AUTO_ZRELADDR)" == "y" ||\ + (echo CONFIG_ZRELADDR must be specified for uImage; exit -1) $(call if_changed,uimage) @echo ' Image $@ is ready'
arch/arm/boot/compressed/Makefile +2 -2
@@ -4,6 +4,8 @@ # create a compressed vmlinuz image from the original vmlinux # +AFLAGS_head.o := -DTEXT_OFFSET=$(CONFIG_TEXT_OFFSET) + HEAD = head.o OBJS = misc.o decompress.o FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c
@@ -79,8 +81,6 @@ endif EXTRA_CFLAGS := -fpic -fno-builtin EXTRA_AFLAGS := -Wa,-march=all -# Supply ZRELADDR to the decompressor via linker symbols. -LDFLAGS_vmlinux := --defsym zreladdr=$(ZRELADDR) ifeq ($(CONFIG_CPU_ENDIAN_BE8),y) LDFLAGS_vmlinux += --be8 endif
arch/arm/boot/compressed/head.S +9 -3
@@ -170,9 +170,16 @@ not_angel: .text adr r0, LC0 - ARM( ldmia r0, {r1, r2, r3, r4, r5, r6, r11, ip, sp}) - THUMB( ldmia r0, {r1, r2, r3, r4, r5, r6, r11, ip} ) + ARM( ldmia r0, {r1, r2, r3, r5, r6, r11, ip, sp}) + THUMB( ldmia r0, {r1, r2, r3, r5, r6, r11, ip} ) THUMB( ldr sp, [r0, #32] ) +#ifdef CONFIG_AUTO_ZRELADDR + @ determine final kernel image address + and r4, pc, #0xf0000000 + add r4, r4, #TEXT_OFFSET +#else + ldr r4, =CONFIG_ZRELADDR +#endif subs r0, r0, r1 @ calculate the delta offset @ if delta is zero, we are
@@ -310,7 +317,6 @@ wont_overwrite: mov r0, r4 LC0: .word LC0 @ r1 .word __bss_start @ r2 .word _end @ r3 - .word zreladdr @ r4 .word _start @ r5 .word _image_size @ r6 .word _got_start @ r11
Signature · 1 line
1.7.0.4
Tony Lindgren
maintainerPATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
Quoted 20 lines · Eric Miao
From: Eric Miao <[email protected]>
Original idea and prototype came from Nicolas Pitre.
As long as the zImage is placed within the 256MB range from the start of the memory, ZRELADDR (Address where the decompressed kernel will be placed, usually ==
PHYS_OFFSET+TEXT_OFFSET) can be determined at run-time by masking PC with 0xf000_0000.Running through all the Makefile.boot, all those zreladdr-y address == 0x[0-f]000_0000 +
TEXT_OFFSETcan be determined at run-time.Option
CONFIG_AUTO_ZRELADDRandCONFIG_ZRELADDRare introduced,CONFIG_ZRELADDR_must_ be explicitly specified if:- ((zreladdr-y -
TEXT_OFFSET) & ~0xf0000000) != 0, which means a maksing of PC with 0xf000_0000 will result an incorrect address.
Quoted 6 lines
- or the assumption of the zImage being loaded by the boot loader within 256MB from the start address is simply incorrect
- or when
ZBOOT_ROMis used, where the above assumption is normally wrong
Nice series of patches!
Quoted 13 lines
arch/arm/Kconfig +13
-0+config ZRELADDR + hex "Physical address of the decompressed kernel image" + depends on !AUTO_ZRELADDR + default 0x00008000 if ARCH_BCMRING || ARCH_CNS3XXX || ARCH_DOVE ||\ + ARCH_EBSA110 || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR ||\ + ARCH_IOP13XX || ARCH_IOP33X || ARCH_IXP2000 ||\ + ARCH_IXP23XX || ARCH_IXP4XX || ARCH_KIRKWOOD ||\ + ARCH_KS8695 || ARCH_LOKI || ARCH_MMP || ARCH_MV78XX0 ||\ + ARCH_NOMADIK || ARCH_NUC93X || ARCH_NS9XXX ||\ + ARCH_ORION5X || ARCH_SPEAR3XX || ARCH_SPEAR6XX ||\ + ARCH_UX5XX || ARCH_VERSATILE || ARCH_W90X900 + default 0x08008000 if ARCH_MX1 || ARCH_SHARK + default 0x10008000 if ARCH_MSM || ARCH_OMAP1 || ARCH_RPC
arch/arm/Kconfig config TEXT_OFFSET · line 1533
Quoted 10 lines
arch/arm/Kconfig +10
-0+ default 0x20008000 if ARCH_S5P6440 || ARCH_S5P6442 ||\ + ARCH_S5PC100 || ARCH_S5PV210 + default 0x30008000 if ARCH_S3C2410 || ARCH_S3C2400 || ARCH_S3C2412 ||\ + ARCH_S3C2416 || ARCH_S3C2440 || ARCH_S3C2443 + default 0x40008000 if ARCH_STMP378X || ARCH_STMP37XX || ARCH_SH7372 ||\ + ARCH_SH7377 + default 0x50008000 if ARCH_S3C64XX || ARCH_SH7367 + default 0x60008000 if ARCH_VEXPRESS + default 0x80008000 if ARCH_MX25 || ARCH_MX3 || ARCH_NETX ||\ + ARCH_OMAP2 || ARCH_PNX4008
Please s/ARCH_OMAP2/ARCH_OMAP2PLUS/ above, then it covers ARCH_OMAP2, 3 and 4.
Regards,
Tony
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
In reply to Eric MiaoDne ?t 3. ?ervna 2010 09:36:52 Eric Miao napsal(a):
Quoted 95 lines
From: Eric Miao <[email protected]>
Original idea and prototype came from Nicolas Pitre.
As long as the zImage is placed within the 256MB range from the start of the memory, ZRELADDR (Address where the decompressed kernel will be placed, usually ==
PHYS_OFFSET+TEXT_OFFSET) can be determined at run-time by masking PC with 0xf000_0000.Running through all the Makefile.boot, all those zreladdr-y address == 0x[0-f]000_0000 +
TEXT_OFFSETcan be determined at run-time.Option
CONFIG_AUTO_ZRELADDRandCONFIG_ZRELADDRare introduced,CONFIG_ZRELADDR_must_ be explicitly specified if:- ((zreladdr-y -
TEXT_OFFSET) & ~0xf0000000) != 0, which means a maksing of PC with 0xf000_0000 will result an incorrect address.- or the assumption of the zImage being loaded by the boot loader within 256MB from the start address is simply incorrect
- or when
ZBOOT_ROMis used, where the above assumption is normally wrongList of all Makefile.boot:
Hardcoded, and can be auto calculated by masking PC with 0xf000_0000:
arch/arm/mach-cns3xxx/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-dove/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-ebsa110/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-footbridge/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-integrator/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-iop13xx/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-iop33x/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-ixp2000/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-ixp23xx/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-ixp4xx/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-kirkwood/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-ks8695/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-loki/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-mmp/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-mv78xx0/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-nomadik/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-nuc93x/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-ns9xxx/Makefile.boot: zreladdr-y :=0x8000arch/arm/mach-orion5x/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-spear3xx/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-spear6xx/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-ux500/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-versatile/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-w90x900/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-msm/Makefile.boot: zreladdr-y :=0x10008000arch/arm/mach-omap1/Makefile.boot: zreladdr-y :=0x10008000arch/arm/mach-rpc/Makefile.boot: zreladdr-y :=0x10008000arch/arm/mach-s5p6440/Makefile.boot: zreladdr-y := 0x20008000 arch/arm/mach-s5p6442/Makefile.boot: zreladdr-y := 0x20008000 arch/arm/mach-s5pc100/Makefile.boot: zreladdr-y := 0x20008000 arch/arm/mach-s5pv210/Makefile.boot: zreladdr-y := 0x20008000 arch/arm/mach-s3c2410/Makefile.boot: zreladdr-y := 0x30008000 arch/arm/mach-s3c2410/Makefile.boot: zreladdr-y := 0x30108000
arch/arm/mach-stmp378x/Makefile.boot: zreladdr-y :=0x40008000arch/arm/mach-stmp37xx/Makefile.boot: zreladdr-y :=0x40008000arch/arm/mach-s3c64xx/Makefile.boot: zreladdr-y :=0x50008000arch/arm/mach-vexpress/Makefile.boot: zreladdr-y :=0x60008000arch/arm/mach-mx25/Makefile.boot: zreladdr-y :=0x80008000arch/arm/mach-mx3/Makefile.boot: zreladdr-y :=0x80008000arch/arm/mach-netx/Makefile.boot: zreladdr-y :=0x80008000arch/arm/mach-omap2/Makefile.boot: zreladdr-y :=0x80008000arch/arm/mach-pnx4008/Makefile.boot: zreladdr-y :=0x80008000arch/arm/mach-mx5/Makefile.boot: zreladdr-y :=0x90008000arch/arm/mach-mxc91231/Makefile.boot: zreladdr-y :=0x90008000arch/arm/mach-iop32x/Makefile.boot: zreladdr-y :=0xa0008000arch/arm/mach-pxa/Makefile.boot: zreladdr-y :=0xa0008000arch/arm/mach-lh7a40x/Makefile.boot: zreladdr-y :=0xc0008000arch/arm/mach-clps711x/Makefile.boot: zreladdr-y :=0xc0028000arch/arm/mach-aaec2000/Makefile.boot: zreladdr-y :=0xf0008000arch/arm/mach-l7200/Makefile.boot: zreladdr-y :=0xf0008000Depends on other options/macros, but still can be auto calculated by masking PC with 0xf000_0000:
arch/arm/mach-bcmring/Makefile.boot: zreladdr-y :=
$(CONFIG_BCM_ZRELADDR) * refer to arch/arm/configs/bcmring_defconfig:CONFIG_BCM_ZRELADDR=0x8000arch/arm/mach-h720x/Makefile.boot: zreladdr-$(CONFIG_ARCH_H720X) :=0x40008000arch/arm/mach-shmobile/Makefile.boot: zreladdr-y :=
$(__ZRELADDR) *__ZRELADDRdepends onCONFIG_MEMORY_STARTarch/arm/configs/ap4evb_defconfig:CONFIG_MEMORY_START=0x40000000(SH7372)arch/arm/configs/g3evm_defconfig:CONFIG_MEMORY_START=0x50000000(SH7367)arch/arm/configs/g4evm_defconfig:CONFIG_MEMORY_START=0x40000000(SH7377)
Quoted 2 lines
arch/arm/mach-at91/Makefile.boot: zreladdr-y :=0x70008000
(CONFIG_ARCH_AT91CAP9)arch/arm/mach-at91/Makefile.boot: zreladdr-y
:=
Quoted 58 lines
0x70008000(CONFIG_ARCH_AT91SAM9G45)arch/arm/mach-at91/Makefile.boot:
zreladdr-y :=0x20008000(CONFIG_ARCH_AT91)arch/arm/mach-davinci/Makefile.boot: zreladdr-y :=0xc0008000
(CONFIG_ARCH_DAVINCI_DA8XX)arch/arm/mach-davinci/Makefile.boot:
zreladdr-y :=0x80008000(!CONFIG_ARCH_DAVINCI_DA8XX)arch/arm/mach-ep93xx/Makefile.boot:
zreladdr-$(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) :=0x00008000arch/arm/mach-ep93xx/Makefile.boot:
zreladdr-$(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) :=0xc0008000arch/arm/mach-ep93xx/Makefile.boot:
zreladdr-$(CONFIG_EP93XX_SDCE1_PHYS_OFFSET) :=0xd0008000arch/arm/mach-ep93xx/Makefile.boot:
zreladdr-$(CONFIG_EP93XX_SDCE2_PHYS_OFFSET) :=0xe0008000arch/arm/mach-ep93xx/Makefile.boot:
zreladdr-$(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET) :=0xf0008000arch/arm/mach-gemini/Makefile.boot: zreladdr-y :=0x00008000
(CONFIG_GEMINI_MEM_SWAP)arch/arm/mach-gemini/Makefile.boot:
zreladdr-y :=0x10008000(!CONFIG_GEMINI_MEM_SWAP)arch/arm/mach-mx2/Makefile.boot: zreladdr-$(CONFIG_MACH_MX21) :=0xC0008000arch/arm/mach-mx2/Makefile.boot:
zreladdr-$(CONFIG_MACH_MX27) :=0xA0008000arch/arm/mach-realview/Makefile.boot: zreladdr-y :=0x70008000
(CONFIG_REALVIEW_HIGH_PHYS_OFFSET)arch/arm/mach-realview/Makefile.boot:
zreladdr-y :=0x00008000(CONFIG_REALVIEW_HIGH_PHYS_OFFSET)arch/arm/mach-sa1100/Makefile.boot: zreladdr-y :=0xc0008000arch/arm/mach-sa1100/Makefile.boot: zreladdr-$(CONFIG_SA1111) :=0xc0208000Machines where ZRELADDR cannot be auto calcuated:
arch/arm/mach-mx1/Makefile.boot: zreladdr-y :=0x08008000arch/arm/mach-shark/Makefile.boot: zreladdr-y :=0x08008000arch/arm/mach-u300/Makefile.boot: zreladdr-y :=0x28E08000arch/arm/mach-u300/Makefile.boot: zreladdr-y :=0x48008000Signed-off-by Eric Miao <[email protected]>--- arch/arm/Kconfig | 63 +++++++++++++++++++++++++++++++++++++ arch/arm/boot/Makefile | 10 +++--- arch/arm/boot/compressed/Makefile | 4 +- arch/arm/boot/compressed/head.S | 12 +++++-- 4 files changed, 79 insertions(+), 10 deletions(-)arch/arm/Kconfig +6
-0@@ -1497,6 +1497,69 @@ config TEXT_OFFSET TEXT_OFFSET is the offset of the decompressed kernel image from memory start. Currently, it is expected the least significant 16 bits to be 0x8000, so to leave space for the initial page table. + +config AUTO_ZRELADDR + bool "Auto calculation of the decompressed kernel image address" + depends on !ZBOOT_ROM && !(ARCH_MX1 || ARCH_SHARK || ARCH_U300) + help + ZRELADDR is the physical address where the decompressed kernel
arch/arm/Kconfig config TEXT_OFFSET · line 1515
Quoted 10 lines
arch/arm/Kconfig +10
-0+ image will be placed. If AUTO_ZRELADDR is selected, the address + will be determined at run-time by masking the current IP with + 0xf000_0000. This assumes the zImage being placed in the 256MB + range from the start of memory. + +config ZRELADDR + hex "Physical address of the decompressed kernel image" + depends on !AUTO_ZRELADDR + default 0x00008000 if ARCH_BCMRING || ARCH_CNS3XXX || ARCH_DOVE ||\ + ARCH_EBSA110 || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR
||\ > + ARCH_IOP13XX || ARCH_IOP33X || ARCH_IXP2000 ||\ > + ARCH_IXP23XX || ARCH_IXP4XX || ARCH_KIRKWOOD ||\ > + ARCH_KS8695 || ARCH_LOKI || ARCH_MMP || ARCH_MV78XX0 ||\ > + ARCH_NOMADIK || ARCH_NUC93X || ARCH_NS9XXX ||\ > + ARCH_ORION5X || ARCH_SPEAR3XX || ARCH_SPEAR6XX ||\ > + ARCH_UX5XX || ARCH_VERSATILE || ARCH_W90X900 > + default 0x08008000 if ARCH_MX1 || ARCH_SHARK > + default 0x10008000 if ARCH_MSM || ARCH_OMAP1 || ARCH_RPC > + default 0x20008000 if ARCH_S5P6440 || ARCH_S5P6442 ||\ > + ARCH_S5PC100 || ARCH_S5PV210 > + default 0x30008000 if ARCH_S3C2410 || ARCH_S3C2400 || ARCH_S3C2412 ||\ > + ARCH_S3C2416 || ARCH_S3C2440 || ARCH_S3C2443 > + default 0x40008000 if ARCH_STMP378X || ARCH_STMP37XX || ARCH_SH7372 ||\ > + ARCH_SH7377 > + default 0x50008000 if ARCH_S3C64XX || ARCH_SH7367
Quoted 24 lines
arch/arm/Kconfig +24
-0+ default 0x60008000 if ARCH_VEXPRESS + default 0x80008000 if ARCH_MX25 || ARCH_MX3 || ARCH_NETX ||\ + ARCH_OMAP2 || ARCH_PNX4008 + default 0x90008000 if ARCH_MX5 || ARCH_MX91231 + default 0xa0008000 if ARCH_IOP32X || ARCH_PXA || MACH_MX27 + default 0xc0008000 if ARCH_LH7A40X || MACH_MX21 + default 0xf0008000 if ARCH_AAEC2000 || ARCH_L7200 + default 0xc0028000 if ARCH_CLPS711X + default 0x70008000 if ARCH_AT91 && (ARCH_AT91CAP9 || ARCH_AT91SAM9G45) + default 0x20008000 if ARCH_AT91 && !(ARCH_AT91CAP9 || ARCH_AT91SAM9G45) + default 0xc0008000 if ARCH_DAVINCI && ARCH_DAVINCI_DA8XX + default 0x80008000 if ARCH_DAVINCI && !ARCH_DAVINCI_DA8XX + default 0x00008000 if ARCH_EP93XX && EP93XX_SDCE3_SYNC_PHYS_OFFSET + default 0xc0008000 if ARCH_EP93XX && EP93XX_SDCE0_PHYS_OFFSET + default 0xd0008000 if ARCH_EP93XX && EP93XX_SDCE1_PHYS_OFFSET + default 0xe0008000 if ARCH_EP93XX && EP93XX_SDCE2_PHYS_OFFSET + default 0xf0008000 if ARCH_EP93XX && EP93XX_SDCE3_ASYNC_PHYS_OFFSET + default 0x00008000 if ARCH_GEMINI && GEMINI_MEM_SWAP + default 0x10008000 if ARCH_GEMINI && !GEMINI_MEM_SWAP + default 0x70008000 if ARCH_REALVIEW && REALVIEW_HIGH_PHYS_OFFSET + default 0x00008000 if ARCH_REALVIEW && !REALVIEW_HIGH_PHYS_OFFSET + default 0xc0208000 if ARCH_SA1100 && SA1111 + default 0xc0008000 if ARCH_SA1100 && !SA1111 + default 0x30108000 if ARCH_S3C2410 && PM_H1940
arch/arm/Kconfig config TEXT_OFFSET · line 1564
Quoted 10 lines
arch/arm/Kconfig +8
-0+ default 0x28E08000 if ARCH_U300 && MACH_U300_SINGLE_RAM + default 0x48008000 if ARCH_U300 && !MACH_U300_SINGLE_RAM + help + ZRELADDR is the physical address where the decompressed kernel + image will be placed. ZRELADDR has to be specified when the + assumption of AUTO_ZRELADDR is not valid, or when ZBOOT_ROM is + selected. + endmenu
Hi,
what about the PXA based devices, where RAM begins at 0x80000000 ?
Cheers
Quoted 97 lines
arch/arm/Kconfig +0
-0menu "CPU Power Management"arch/arm/boot/Makefile +5
-5@@ -14,18 +14,16 @@ MKIMAGE := $(srctree)/scripts/mkuboot.sh ifneq ($(MACHINE),) -include $(srctree)/$(MACHINE)/Makefile.boot +-include $(srctree)/$(MACHINE)/Makefile.boot endif # Note: the following conditions must always be true: -# ZRELADDR == virt_to_phys(PAGE_OFFSET + TEXT_OFFSET) # PARAMS_PHYS must be within 4MB of ZRELADDR # INITRD_PHYS must be in RAM -ZRELADDR := $(zreladdr-y) PARAMS_PHYS := $(params_phys-y) INITRD_PHYS := $(initrd_phys-y) -export ZRELADDR INITRD_PHYS PARAMS_PHYS +export INITRD_PHYS PARAMS_PHYS targets := Image zImage xipImage bootpImage uImage@@ -67,7 +65,7 @@ quiet_cmd_uimage = UIMAGE $@ ifeq ($(CONFIG_ZBOOT_ROM),y) $(obj)/uImage: LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT) else -$(obj)/uImage: LOADADDR=$(ZRELADDR) +$(obj)/uImage: LOADADDR=$(CONFIG_ZRELADDR) endif ifeq ($(CONFIG_THUMB2_KERNEL),y)@@ -78,6 +76,8 @@ $(obj)/uImage: STARTADDR=$(LOADADDR) endif $(obj)/uImage: $(obj)/zImage FORCE + @test "$(CONFIG_AUTO_ZRELADDR)" == "y" ||\ + (echo CONFIG_ZRELADDR must be specified for uImage; exit -1) $(call if_changed,uimage) @echo ' Image $@ is ready'(quoted diff) +0
-0b/arch/arm/boot/compressed/Makefile index dbd3fe8..45b0f48 100644
arch/arm/boot/compressed/Makefile +2
-2@@ -4,6 +4,8 @@ # create a compressed vmlinuz image from the original vmlinux # +AFLAGS_head.o := -DTEXT_OFFSET=$(CONFIG_TEXT_OFFSET) + HEAD = head.o OBJS = misc.o decompress.o FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c@@ -79,8 +81,6 @@ endif EXTRA_CFLAGS := -fpic -fno-builtin EXTRA_AFLAGS := -Wa,-march=all -# Supply ZRELADDR to the decompressor via linker symbols. -LDFLAGS_vmlinux := --defsym zreladdr=$(ZRELADDR) ifeq ($(CONFIG_CPU_ENDIAN_BE8),y) LDFLAGS_vmlinux += --be8 endif(quoted diff) +0
-0
b/arch/arm/boot/compressed/head.Sindex 0765990..17d19dc 100644arch/arm/boot/compressed/head.S +9
-3@@ -170,9 +170,16 @@ not_angel: .text adr r0, LC0 - ARM( ldmia r0, {r1, r2, r3, r4, r5, r6, r11, ip, sp}) - THUMB( ldmia r0, {r1, r2, r3, r4, r5, r6, r11, ip} ) + ARM( ldmia r0, {r1, r2, r3, r5, r6, r11, ip, sp}) + THUMB( ldmia r0, {r1, r2, r3, r5, r6, r11, ip} ) THUMB( ldr sp, [r0, #32] ) +#ifdef CONFIG_AUTO_ZRELADDR + @ determine final kernel image address + and r4, pc, #0xf0000000 + add r4, r4, #TEXT_OFFSET +#else + ldr r4, =CONFIG_ZRELADDR +#endif subs r0, r0, r1 @ calculate the delta offset @ if delta is zero, we are@@ -310,7 +317,6 @@ wont_overwrite: mov r0, r4 LC0: .word LC0 @ r1 .word __bss_start @ r2 .word _end @ r3 - .word zreladdr @ r4 .word _start @ r5 .word _image_size @ r6 .word _got_start @ r11
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
Quoted 3 lines
Hi,
what about the PXA based devices, where RAM begins at0x80000000?
I hope at this stage, it's a 1:1 direct mapping from the original zreladdr-y variables to CONFIG_ZRELADDR.
But yeah, we can make that change some time later based on this.
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
In reply to Eric MiaoQuoted 7 lines · Eric Miao
From: Eric Miao <[email protected]>
Original idea and prototype came from Nicolas Pitre.
As long as the zImage is placed within the 256MB range from the start of the memory, ZRELADDR (Address where the decompressed kernel will be placed, usually ==
PHYS_OFFSET+TEXT_OFFSET)
s/ / /
Quoted 11 lines
can be determined at run-time by masking PC with 0xf000_0000.
Running through all the Makefile.boot, all those zreladdr-y address == 0x[0-f]000_0000 +
TEXT_OFFSETcan be determined at run-time.Option
CONFIG_AUTO_ZRELADDRandCONFIG_ZRELADDRare introduced,CONFIG_ZRELADDR_must_ be explicitly specified if:- ((zreladdr-y -
TEXT_OFFSET) & ~0xf0000000) != 0, which means a maksing of PC with 0xf000_0000 will result an incorrect
s/maksing of/masking/ (note: there are 2 changes)
Quoted 5 lines
address.
- or the assumption of the zImage being loaded by the boot loader within 256MB from the start address is simply incorrect
Hmmm, this makes the image depending on the bootloader. Not that nice.
Quoted 2 lines
- or when
ZBOOT_ROMis used, where the above assumption is normally wrong
So guess based on sp :-)
Quoted 86 lines
List of all Makefile.boot:
Hardcoded, and can be auto calculated by masking PC with 0xf000_0000:
arch/arm/mach-cns3xxx/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-dove/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-ebsa110/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-footbridge/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-integrator/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-iop13xx/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-iop33x/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-ixp2000/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-ixp23xx/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-ixp4xx/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-kirkwood/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-ks8695/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-loki/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-mmp/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-mv78xx0/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-nomadik/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-nuc93x/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-ns9xxx/Makefile.boot: zreladdr-y :=0x8000arch/arm/mach-orion5x/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-spear3xx/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-spear6xx/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-ux500/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-versatile/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-w90x900/Makefile.boot: zreladdr-y :=0x00008000arch/arm/mach-msm/Makefile.boot: zreladdr-y :=0x10008000arch/arm/mach-omap1/Makefile.boot: zreladdr-y :=0x10008000arch/arm/mach-rpc/Makefile.boot: zreladdr-y :=0x10008000arch/arm/mach-s5p6440/Makefile.boot: zreladdr-y := 0x20008000 arch/arm/mach-s5p6442/Makefile.boot: zreladdr-y := 0x20008000 arch/arm/mach-s5pc100/Makefile.boot: zreladdr-y := 0x20008000 arch/arm/mach-s5pv210/Makefile.boot: zreladdr-y := 0x20008000 arch/arm/mach-s3c2410/Makefile.boot: zreladdr-y := 0x30008000 arch/arm/mach-s3c2410/Makefile.boot: zreladdr-y := 0x30108000
arch/arm/mach-stmp378x/Makefile.boot: zreladdr-y :=0x40008000arch/arm/mach-stmp37xx/Makefile.boot: zreladdr-y :=0x40008000arch/arm/mach-s3c64xx/Makefile.boot: zreladdr-y :=0x50008000arch/arm/mach-vexpress/Makefile.boot: zreladdr-y :=0x60008000arch/arm/mach-mx25/Makefile.boot: zreladdr-y :=0x80008000arch/arm/mach-mx3/Makefile.boot: zreladdr-y :=0x80008000arch/arm/mach-netx/Makefile.boot: zreladdr-y :=0x80008000arch/arm/mach-omap2/Makefile.boot: zreladdr-y :=0x80008000arch/arm/mach-pnx4008/Makefile.boot: zreladdr-y :=0x80008000arch/arm/mach-mx5/Makefile.boot: zreladdr-y :=0x90008000arch/arm/mach-mxc91231/Makefile.boot: zreladdr-y :=0x90008000arch/arm/mach-iop32x/Makefile.boot: zreladdr-y :=0xa0008000arch/arm/mach-pxa/Makefile.boot: zreladdr-y :=0xa0008000arch/arm/mach-lh7a40x/Makefile.boot: zreladdr-y :=0xc0008000arch/arm/mach-clps711x/Makefile.boot: zreladdr-y :=0xc0028000arch/arm/mach-aaec2000/Makefile.boot: zreladdr-y :=0xf0008000arch/arm/mach-l7200/Makefile.boot: zreladdr-y :=0xf0008000Depends on other options/macros, but still can be auto calculated by masking PC with 0xf000_0000:
arch/arm/mach-bcmring/Makefile.boot: zreladdr-y := $(CONFIG_BCM_ZRELADDR)
* refer to arch/arm/configs/bcmring_defconfig:CONFIG_BCM_ZRELADDR=0x8000arch/arm/mach-h720x/Makefile.boot: zreladdr-$(CONFIG_ARCH_H720X) :=0x40008000arch/arm/mach-shmobile/Makefile.boot: zreladdr-y := $(__ZRELADDR)
*__ZRELADDRdepends onCONFIG_MEMORY_STARTarch/arm/configs/ap4evb_defconfig:CONFIG_MEMORY_START=0x40000000(SH7372)arch/arm/configs/g3evm_defconfig:CONFIG_MEMORY_START=0x50000000(SH7367)arch/arm/configs/g4evm_defconfig:CONFIG_MEMORY_START=0x40000000(SH7377)arch/arm/mach-at91/Makefile.boot: zreladdr-y := 0x70008000 (CONFIG_ARCH_AT91CAP9) arch/arm/mach-at91/Makefile.boot: zreladdr-y := 0x70008000 (CONFIG_ARCH_AT91SAM9G45) arch/arm/mach-at91/Makefile.boot: zreladdr-y := 0x20008000 (CONFIG_ARCH_AT91) arch/arm/mach-davinci/Makefile.boot: zreladdr-y := 0xc0008000 (CONFIG_ARCH_DAVINCI_DA8XX) arch/arm/mach-davinci/Makefile.boot: zreladdr-y := 0x80008000 (!CONFIG_ARCH_DAVINCI_DA8XX) arch/arm/mach-ep93xx/Makefile.boot: zreladdr-$(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) := 0x00008000 arch/arm/mach-ep93xx/Makefile.boot: zreladdr-$(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) := 0xc0008000 arch/arm/mach-ep93xx/Makefile.boot: zreladdr-$(CONFIG_EP93XX_SDCE1_PHYS_OFFSET) := 0xd0008000 arch/arm/mach-ep93xx/Makefile.boot: zreladdr-$(CONFIG_EP93XX_SDCE2_PHYS_OFFSET) := 0xe0008000 arch/arm/mach-ep93xx/Makefile.boot: zreladdr-$(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET) := 0xf0008000 arch/arm/mach-gemini/Makefile.boot: zreladdr-y := 0x00008000 (CONFIG_GEMINI_MEM_SWAP) arch/arm/mach-gemini/Makefile.boot: zreladdr-y := 0x10008000 (!CONFIG_GEMINI_MEM_SWAP)
arch/arm/mach-mx2/Makefile.boot: zreladdr-$(CONFIG_MACH_MX21) :=0xC0008000arch/arm/mach-mx2/Makefile.boot: zreladdr-$(CONFIG_MACH_MX27) :=0xA0008000arch/arm/mach-realview/Makefile.boot: zreladdr-y :=0x70008000(CONFIG_REALVIEW_HIGH_PHYS_OFFSET)arch/arm/mach-realview/Makefile.boot: zreladdr-y :=0x00008000(CONFIG_REALVIEW_HIGH_PHYS_OFFSET)arch/arm/mach-sa1100/Makefile.boot: zreladdr-y :=0xc0008000arch/arm/mach-sa1100/Makefile.boot: zreladdr-$(CONFIG_SA1111) :=0xc0208000
Quoted 6 lines
Machines where ZRELADDR cannot be auto calcuated:
arch/arm/mach-mx1/Makefile.boot: zreladdr-y :=0x08008000arch/arm/mach-shark/Makefile.boot: zreladdr-y :=0x08008000arch/arm/mach-u300/Makefile.boot: zreladdr-y :=0x28E08000arch/arm/mach-u300/Makefile.boot: zreladdr-y :=0x48008000
I care about mx1, so I would prefer using 0xf8000000.
What do you think about requiring r4 to be set to physoffset as I did in my series? This way zImage would already know PHYSOFFSET and so didn't need to guess ZRELADDR. OK, until most bootloaders are fixed we need to guess, too. But at least this would provide a way to stop guessing wrong for the affected platforms.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
Quoted 5 lines · Uwe Kleine-K?nig
What do you think about requiring r4 to be set to physoffset as I did in my series? This way zImage would already know PHYSOFFSET and so didn't need to guess ZRELADDR. OK, until most bootloaders are fixed we need to guess, too. But at least this would provide a way to stop guessing wrong for the affected platforms.
That means it won't get implemented. Look at the facts. It's taken _years_ (5+ years) for boot loaders to start passing a value in r1. We then switched to the ATAG stuff, and it's again taking years for boot loaders to start passing right ATAG stuff - and most of them don't get it right. Eg, lots of uboot are happy to print out the memory information on the terminal as they start up, but don't pass memory information to the kernel.
So if we want phys offset in r4, we better realise that it'll take something like five years of nagging to get it in place, and even then people will continue to use boot loaders which don't have support. And if it's only necessary for a handful of platforms, I doubt anyone's really going to bother - or even validate that r4 is correct.
You have a whole set of other problems - how do you cope with existing boot loaders which happen to call the kernel with a value in r4 which _could_ potentially be valid, but should not be used? At the moment, r4 could contain _any_ value what so ever.
Let's face it - advertising that "the kernel will eventually start using r4" doesn't solve the problem either - we did that with the ATAG list and we know the results from that.
Maybe the right experiment to try this time - if we want r4 to contain a value - is to say that kernel 2.6.37 will require a value in r4, and won't boot without it, and will therefore be incompatible with old boot loaders.
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
Hello Russell,
Quoted 26 lines · Russell King - ARM Linux
Quoted 5 lines · Uwe Kleine-K?nig
What do you think about requiring r4 to be set to physoffset as I did in my series? This way zImage would already know PHYSOFFSET and so didn't need to guess ZRELADDR. OK, until most bootloaders are fixed we need to guess, too. But at least this would provide a way to stop guessing wrong for the affected platforms.
That means it won't get implemented. Look at the facts. It's taken _years_ (5+ years) for boot loaders to start passing a value in r1. We then switched to the ATAG stuff, and it's again taking years for boot loaders to start passing right ATAG stuff - and most of them don't get it right. Eg, lots of uboot are happy to print out the memory information on the terminal as they start up, but don't pass memory information to the kernel.
So if we want phys offset in r4, we better realise that it'll take something like five years of nagging to get it in place, and even then people will continue to use boot loaders which don't have support. And if it's only necessary for a handful of platforms, I doubt anyone's really going to bother - or even validate that r4 is correct.
You have a whole set of other problems - how do you cope with existing boot loaders which happen to call the kernel with a value in r4 which _could_ potentially be valid, but should not be used? At the moment, r4 could contain _any_ value what so ever.
Quoted 8 lines
Let's face it - advertising that "the kernel will eventually start using r4" doesn't solve the problem either - we did that with the ATAG list and we know the results from that.
Maybe the right experiment to try this time - if we want r4 to contain a value - is to say that kernel 2.6.37 will require a value in r4, and won't boot without it, and will therefore be incompatible with old boot loaders.
I agree with you. Either we need to completly break bootloaders that don't pass the right value or it should work without new requirements for most machines.
For the machines that fail to guess correctly IMHO the better approach is to let the bootloader pass the information instead of letting the user guess the right value. Maybe this is because I work for a company that usually sells support for both bootloader and kernel. The people that don't want/cannot to touch their bootloader might have a different mileage.
And note we could implement both ways (if provided via .config use this value otherwise use r4 if it looks valid else guess). If we choose that all values in r4 look valid we have the needed breakage :-)
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
In reply to Russell King - ARM Linux2010/6/10 Russell King - ARM Linux <[email protected]>:
Quoted 26 lines · Uwe Kleine-K?nig
Quoted 5 lines
What do you think about requiring r4 to be set to physoffset as I did in my series? ?This way zImage would already know PHYSOFFSET and so didn't need to guess ZRELADDR. ?OK, until most bootloaders are fixed we need to guess, too. ?But at least this would provide a way to stop guessing wrong for the affected platforms.
That means it won't get implemented. ?Look at the facts. ?It's taken _years_ (5+ years) for boot loaders to start passing a value in r1. We then switched to the ATAG stuff, and it's again taking years for boot loaders to start passing right ATAG stuff - and most of them don't get it right. ?Eg, lots of uboot are happy to print out the memory information on the terminal as they start up, but don't pass memory information to the kernel.
So if we want phys offset in r4, we better realise that it'll take something like five years of nagging to get it in place, and even then people will continue to use boot loaders which don't have support. And if it's only necessary for a handful of platforms, I doubt anyone's really going to bother - or even validate that r4 is correct.
You have a whole set of other problems - how do you cope with existing boot loaders which happen to call the kernel with a value in r4 which _could_ potentially be valid, but should not be used? ?At the moment, r4 could contain _any_ value what so ever.
Quoted 9 lines
Let's face it - advertising that "the kernel will eventually start using r4" doesn't solve the problem either - we did that with the ATAG list and we know the results from that.
Maybe the right experiment to try this time - if we want r4 to contain a value - is to say that kernel 2.6.37 will require a value in r4, and won't boot without it, and will therefore be incompatible with old boot loaders.
It might be difficult to guess if it's a correct value in r4 and we might not need it. We know which boards can be compiled together and the phys_offset can be guessed and we make a single kernel for them, otherwise we end up building a specific kernel. Although my observation is that most platforms can guess phys_offset automatically, but due to the fact there are so many ARM variants out there, and each is doing things differently, what we can do now is to provide both choices.
And you reminded me that it might be better if we can make RUNTIME_PHYS_OFFSET depends on the architecture this is test-proofed, so when the day that
RUNTIME_PHYS_OFFSET
depends on {ALL_ARCH}happens we can just simplify the mess a bit.
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
Quoted 45 lines · Eric Miao
2010/6/10 Russell King - ARM Linux <[email protected]>:
Quoted 26 lines · Uwe Kleine-K?nig
Quoted 5 lines
What do you think about requiring r4 to be set to physoffset as I did in my series? ?This way zImage would already know PHYSOFFSET and so didn't need to guess ZRELADDR. ?OK, until most bootloaders are fixed we need to guess, too. ?But at least this would provide a way to stop guessing wrong for the affected platforms.
That means it won't get implemented. ?Look at the facts. ?It's taken _years_ (5+ years) for boot loaders to start passing a value in r1. We then switched to the ATAG stuff, and it's again taking years for boot loaders to start passing right ATAG stuff - and most of them don't get it right. ?Eg, lots of uboot are happy to print out the memory information on the terminal as they start up, but don't pass memory information to the kernel.
So if we want phys offset in r4, we better realise that it'll take something like five years of nagging to get it in place, and even then people will continue to use boot loaders which don't have support. And if it's only necessary for a handful of platforms, I doubt anyone's really going to bother - or even validate that r4 is correct.
You have a whole set of other problems - how do you cope with existing boot loaders which happen to call the kernel with a value in r4 which _could_ potentially be valid, but should not be used? ?At the moment, r4 could contain _any_ value what so ever.
Quoted 9 lines
Let's face it - advertising that "the kernel will eventually start using r4" doesn't solve the problem either - we did that with the ATAG list and we know the results from that.
Maybe the right experiment to try this time - if we want r4 to contain a value - is to say that kernel 2.6.37 will require a value in r4, and won't boot without it, and will therefore be incompatible with old boot loaders.
It might be difficult to guess if it's a correct value in r4 and we might not need it. We know which boards can be compiled together and the
phys_offsetcan be guessed and we make a single kernel for them, otherwise we end up building a specific kernel. Although my observation is that most platforms can guessphys_offsetautomatically, but due to the fact there are so many ARM variants out there, and each is doing things differently, what we can do now is to provide both choices.
Quoted 5 lines
And you reminded me that it might be better if we can make
RUNTIME_PHYS_OFFSETdepends on the architecture this is test-proofed, so when the day that
RUNTIME_PHYS_OFFSETdepends on {ALL_ARCH}
I would prefer
config HAVE_RUNTIME_PHYS_OFFSET
bool
config RUNTIME_PHYS_OFFSET
depens on HAVE_RUNTIME_PHYS_OFFSET
config ARCH_FOO
select HAVE_RUNTIME_PHYS_OFFSET
for the usual reasons.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
2010/6/10 Uwe Kleine-K?nig <[email protected]>:
Quoted 56 lines · Eric Miao
Quoted 45 lines
2010/6/10 Russell King - ARM Linux <[email protected]>:
Quoted 26 lines · Uwe Kleine-K?nig
Quoted 5 lines
What do you think about requiring r4 to be set to physoffset as I did in my series? ?This way zImage would already know PHYSOFFSET and so didn't need to guess ZRELADDR. ?OK, until most bootloaders are fixed we need to guess, too. ?But at least this would provide a way to stop guessing wrong for the affected platforms.
That means it won't get implemented. ?Look at the facts. ?It's taken _years_ (5+ years) for boot loaders to start passing a value in r1. We then switched to the ATAG stuff, and it's again taking years for boot loaders to start passing right ATAG stuff - and most of them don't get it right. ?Eg, lots of uboot are happy to print out the memory information on the terminal as they start up, but don't pass memory information to the kernel.
So if we want phys offset in r4, we better realise that it'll take something like five years of nagging to get it in place, and even then people will continue to use boot loaders which don't have support. And if it's only necessary for a handful of platforms, I doubt anyone's really going to bother - or even validate that r4 is correct.
You have a whole set of other problems - how do you cope with existing boot loaders which happen to call the kernel with a value in r4 which _could_ potentially be valid, but should not be used? ?At the moment, r4 could contain _any_ value what so ever.
Quoted 9 lines
Let's face it - advertising that "the kernel will eventually start using r4" doesn't solve the problem either - we did that with the ATAG list and we know the results from that.
Maybe the right experiment to try this time - if we want r4 to contain a value - is to say that kernel 2.6.37 will require a value in r4, and won't boot without it, and will therefore be incompatible with old boot loaders.
It might be difficult to guess if it's a correct value in r4 and we might not need it. We know which boards can be compiled together and the
phys_offsetcan be guessed and we make a single kernel for them, otherwise we end up building a specific kernel. Although my observation is that most platforms can guessphys_offsetautomatically, but due to the fact there are so many ARM variants out there, and each is doing things differently, what we can do now is to provide both choices.Quoted 5 lines
And you reminded me that it might be better if we can make
RUNTIME_PHYS_OFFSETdepends on the architecture this is test-proofed, so when the day that
RUNTIME_PHYS_OFFSET
? ? ? ? depends on {ALL_ARCH}I would prefer
? ? ? ?config
HAVE_RUNTIME_PHYS_OFFSET
? ? ? ? ? ? ? ?bool
Quoted 8 lines
? ? ? ?config
RUNTIME_PHYS_OFFSET
? ? ? ? ? ? ? ?depens onHAVE_RUNTIME_PHYS_OFFSET? ? ? ?config
ARCH_FOO
? ? ? ? ? ? ? ?selectHAVE_RUNTIME_PHYS_OFFSETfor the usual reasons.
That's a good way to go.
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
In reply to Uwe Kleine-König2010/6/10 Uwe Kleine-K?nig <[email protected]>:
Quoted 21 lines · Eric Miao
Quoted 7 lines
From: Eric Miao <[email protected]>
Original idea and prototype came from Nicolas Pitre.
As long as the zImage is placed within the 256MB range from the start of the memory, ZRELADDR (Address where the decompressed kernel will be placed, usually ?==
PHYS_OFFSET+TEXT_OFFSET)s/ ?/ /
Quoted 11 lines
can be determined at run-time by masking PC with 0xf000_0000.
Running through all the Makefile.boot, all those zreladdr-y address == 0x[0-f]000_0000 +
TEXT_OFFSETcan be determined at run-time.Option
CONFIG_AUTO_ZRELADDRandCONFIG_ZRELADDRare introduced,CONFIG_ZRELADDR_must_ be explicitly specified if:?- ((zreladdr-y -
TEXT_OFFSET) & ~0xf0000000) != 0, which means ? ?a maksing of PC with 0xf000_0000 will result an incorrect
Quoted 8 lines
s/maksing of/masking/ (note: there are 2 changes)
Quoted 5 lines
? ?address.
?- or the assumption of the zImage being loaded by the boot ? ?loader within 256MB from the start address is simply ? ?incorrect
Hmmm, this makes the image depending on the bootloader. ?Not that nice.
Yes, that's a negative side. And that's why I'm still keeping CONFIG_ZRELADDR instead of guessing all the time, so platforms where this assumption isn't true have to build their kernel with this option set correctly.
I've actually discussed this with Nicolas and his opinion is this is some thing we can afford, e.g. in PC/x86 world, there are already a lot restrictions on kernel placement.
My original idea is to embed the machine_desc() section into zImage itself and invent a machine_desc.phys_offset field so that both the zImage header and the kernel itself will be both happy. There are some patches actually ready for this, and I can submit them just in case anyone is interested.
Quoted 91 lines
Quoted 3 lines
?- or when
ZBOOT_ROMis used, where the above assumption is ? ?normally wrongSo guess based on sp :-)
Quoted 86 lines
List of all Makefile.boot:
Hardcoded, and can be auto calculated by masking PC with 0xf000_0000:
arch/arm/mach-cns3xxx/Makefile.boot: ? ? zreladdr-y ? :=0x00008000arch/arm/mach-dove/Makefile.boot: ? ? ? ?zreladdr-y ? :=0x00008000arch/arm/mach-ebsa110/Makefile.boot: ? ? zreladdr-y ? :=0x00008000arch/arm/mach-footbridge/Makefile.boot: ? ? ? ? ?zreladdr-y ? :=0x00008000arch/arm/mach-integrator/Makefile.boot: ? ? ? ? ?zreladdr-y ? :=0x00008000arch/arm/mach-iop13xx/Makefile.boot: ? ? zreladdr-y ? :=0x00008000arch/arm/mach-iop33x/Makefile.boot: ? ? ?zreladdr-y ? :=0x00008000arch/arm/mach-ixp2000/Makefile.boot: ? ? zreladdr-y ? :=0x00008000arch/arm/mach-ixp23xx/Makefile.boot: ? ? zreladdr-y ? :=0x00008000arch/arm/mach-ixp4xx/Makefile.boot: ? ? ?zreladdr-y ? :=0x00008000arch/arm/mach-kirkwood/Makefile.boot: ? ?zreladdr-y ? :=0x00008000arch/arm/mach-ks8695/Makefile.boot: ? ? ?zreladdr-y ? :=0x00008000arch/arm/mach-loki/Makefile.boot: ? ? ? ?zreladdr-y ? :=0x00008000arch/arm/mach-mmp/Makefile.boot: ? ? ? ? zreladdr-y ? :=0x00008000arch/arm/mach-mv78xx0/Makefile.boot: ? ? zreladdr-y ? :=0x00008000arch/arm/mach-nomadik/Makefile.boot: ? ? zreladdr-y ? :=0x00008000arch/arm/mach-nuc93x/Makefile.boot: ? ? ?zreladdr-y ? :=0x00008000arch/arm/mach-ns9xxx/Makefile.boot: ? ? ?zreladdr-y ? :=0x8000arch/arm/mach-orion5x/Makefile.boot: ? ? zreladdr-y ? :=0x00008000arch/arm/mach-spear3xx/Makefile.boot: ? ? ?zreladdr-y :=0x00008000arch/arm/mach-spear6xx/Makefile.boot: ? ? ?zreladdr-y :=0x00008000arch/arm/mach-ux500/Makefile.boot: ? ? ? zreladdr-y ? :=0x00008000arch/arm/mach-versatile/Makefile.boot: ? ? ? ? ? zreladdr-y ? :=0x00008000arch/arm/mach-w90x900/Makefile.boot: ? ? zreladdr-y ? :=0x00008000arch/arm/mach-msm/Makefile.boot: ? ? ? ? zreladdr-y ? :=0x10008000arch/arm/mach-omap1/Makefile.boot: ? ? ? zreladdr-y ? :=0x10008000arch/arm/mach-rpc/Makefile.boot: ? ? ? ? zreladdr-y ? :=0x10008000arch/arm/mach-s5p6440/Makefile.boot: ? ? zreladdr-y ? :=0x20008000arch/arm/mach-s5p6442/Makefile.boot: ? ? zreladdr-y ? :=0x20008000arch/arm/mach-s5pc100/Makefile.boot: ? ? zreladdr-y ? :=0x20008000arch/arm/mach-s5pv210/Makefile.boot: ? ? zreladdr-y ? :=0x20008000arch/arm/mach-s3c2410/Makefile.boot: ? ? zreladdr-y ? :=0x30008000arch/arm/mach-s3c2410/Makefile.boot: ? ? zreladdr-y ? :=0x30108000arch/arm/mach-stmp378x/Makefile.boot: ? ?zreladdr-y ? :=0x40008000arch/arm/mach-stmp37xx/Makefile.boot: ? ?zreladdr-y ? :=0x40008000arch/arm/mach-s3c64xx/Makefile.boot: ? ? zreladdr-y ? :=0x50008000arch/arm/mach-vexpress/Makefile.boot: ? ?zreladdr-y ? :=0x60008000arch/arm/mach-mx25/Makefile.boot: ? ? ? ?zreladdr-y ? :=0x80008000arch/arm/mach-mx3/Makefile.boot: ? ? ? ? zreladdr-y ? :=0x80008000arch/arm/mach-netx/Makefile.boot: ? ? ? ?zreladdr-y ? :=0x80008000arch/arm/mach-omap2/Makefile.boot: ? ? ? zreladdr-y ? :=0x80008000arch/arm/mach-pnx4008/Makefile.boot: ? ? zreladdr-y ? :=0x80008000arch/arm/mach-mx5/Makefile.boot: ? ? ? ? zreladdr-y ? :=0x90008000arch/arm/mach-mxc91231/Makefile.boot: ? ?zreladdr-y ? :=0x90008000arch/arm/mach-iop32x/Makefile.boot: ? ? ?zreladdr-y ? :=0xa0008000arch/arm/mach-pxa/Makefile.boot: ? ? ? ? zreladdr-y ? :=0xa0008000arch/arm/mach-lh7a40x/Makefile.boot: ? ? zreladdr-y ? :=0xc0008000arch/arm/mach-clps711x/Makefile.boot: ? ?zreladdr-y ? :=0xc0028000arch/arm/mach-aaec2000/Makefile.boot: ? ?zreladdr-y ? :=0xf0008000arch/arm/mach-l7200/Makefile.boot: ? ? ? zreladdr-y ? :=0xf0008000Depends on other options/macros, but still can be auto calculated by masking PC with 0xf000_0000:
arch/arm/mach-bcmring/Makefile.boot: ? ? zreladdr-y ? := $(CONFIG_BCM_ZRELADDR)
* refer to arch/arm/configs/bcmring_defconfig:CONFIG_BCM_ZRELADDR=0x8000arch/arm/mach-h720x/Makefile.boot: ? ? ? zreladdr-$(CONFIG_ARCH_H720X) :=0x40008000arch/arm/mach-shmobile/Makefile.boot: ? ?zreladdr-y ? := $(__ZRELADDR)
*__ZRELADDRdepends onCONFIG_MEMORY_STARTarch/arm/configs/ap4evb_defconfig: ? ?CONFIG_MEMORY_START=0x40000000 (SH7372)arch/arm/configs/g3evm_defconfig: ? ?CONFIG_MEMORY_START=0x50000000(SH7367)arch/arm/configs/g4evm_defconfig: ? ?CONFIG_MEMORY_START=0x40000000(SH7377)
arch/arm/mach-at91/Makefile.boot: ? ? ? ?zreladdr-y ? :=0x70008000(CONFIG_ARCH_AT91CAP9)arch/arm/mach-at91/Makefile.boot: ? ? ? ?zreladdr-y ? :=0x70008000(CONFIG_ARCH_AT91SAM9G45)arch/arm/mach-at91/Makefile.boot: ? ? ? ?zreladdr-y ? :=0x20008000(CONFIG_ARCH_AT91)arch/arm/mach-davinci/Makefile.boot: ? ? zreladdr-y ? :=0xc0008000(CONFIG_ARCH_DAVINCI_DA8XX)arch/arm/mach-davinci/Makefile.boot: ? ? zreladdr-y ? :=0x80008000(!CONFIG_ARCH_DAVINCI_DA8XX)arch/arm/mach-ep93xx/Makefile.boot: ? ? ?zreladdr-$(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) ? ? :=0x00008000arch/arm/mach-ep93xx/Makefile.boot: ? ? ?zreladdr-$(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) ? ? ? ? ?:=0xc0008000arch/arm/mach-ep93xx/Makefile.boot: ? ? ?zreladdr-$(CONFIG_EP93XX_SDCE1_PHYS_OFFSET) ? ? ? ? ?:=0xd0008000arch/arm/mach-ep93xx/Makefile.boot: ? ? ?zreladdr-$(CONFIG_EP93XX_SDCE2_PHYS_OFFSET) ? ? ? ? ?:=0xe0008000arch/arm/mach-ep93xx/Makefile.boot: ? ? ?zreladdr-$(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET) ? ?:=0xf0008000arch/arm/mach-gemini/Makefile.boot: ? ? ?zreladdr-y ? :=0x00008000(CONFIG_GEMINI_MEM_SWAP)arch/arm/mach-gemini/Makefile.boot: ? ? ?zreladdr-y ? :=0x10008000(!CONFIG_GEMINI_MEM_SWAP)arch/arm/mach-mx2/Makefile.boot: ? ? ? ? zreladdr-$(CONFIG_MACH_MX21) :=0xC0008000arch/arm/mach-mx2/Makefile.boot: ? ? ? ? zreladdr-$(CONFIG_MACH_MX27) :=0xA0008000arch/arm/mach-realview/Makefile.boot: ? ?zreladdr-y ? :=0x70008000(CONFIG_REALVIEW_HIGH_PHYS_OFFSET)arch/arm/mach-realview/Makefile.boot: ? ?zreladdr-y ? :=0x00008000(CONFIG_REALVIEW_HIGH_PHYS_OFFSET)arch/arm/mach-sa1100/Makefile.boot: ? ? ?zreladdr-y ? :=0xc0008000arch/arm/mach-sa1100/Makefile.boot: ? ? ?zreladdr-$(CONFIG_SA1111) :=0xc0208000
Quoted 7 lines
Quoted 6 lines
Machines where ZRELADDR cannot be auto calcuated:
arch/arm/mach-mx1/Makefile.boot: ? ? ? ? zreladdr-y ? :=0x08008000arch/arm/mach-shark/Makefile.boot: ? ? ? zreladdr-y ? :=0x08008000arch/arm/mach-u300/Makefile.boot: ? ? ? ?zreladdr-y ? :=0x28E08000arch/arm/mach-u300/Makefile.boot: ? ? ? ?zreladdr-y ? :=0x48008000I care about mx1, so I would prefer using
0xf8000000.
Fair enough actually. And my guess of the u300 architecture is the phys offset actually starts from 0x2800_0000 or 0x4800_0000 which is also covered by 0xf800_0000. And I think u300 can actually get rid of those inconsistent addresses by other means though we all know it might be suffering from the communication processor side of the memory allocation.
Quoted 3 lines
What do you think about requiring r4 to be set to physoffset as I did in my series?
My only concern is to impose less restrictions on the boot loaders. And zImage is only one of the possible headers we may have:
* vmlinux can actually directly booted into as long as it's placed at the right place
* uImage, with zImage or vmlinux (raw or compressed) encapsulated
* zImage
* xipImage
* bootpImage
I'd really like to separate the guess work into two parts so they don't have dependencies.
Quoted 5 lines
This way zImage would already know PHYSOFFSET and so didn't need to guess ZRELADDR. ?OK, until most bootloaders are fixed we need to guess, too. ?But at least this would provide a way to stop guessing wrong for the affected platforms.
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
Hello Eric,
Quoted 4 lines
Quoted 2 lines
What do you think about requiring r4 to be set to physoffset as I did in my series?
My only concern is to impose less restrictions on the boot loaders.
While it remains optional without runtime physoffset it's OK if you ask me.
Quoted 8 lines
And zImage is only one of the possible headers we may have:
* vmlinux can actually directly booted into as long as it's placed at the right place
* uImage, with zImage or vmlinux (raw or compressed) encapsulated
* zImage
* xipImage
* bootpImage
bootpimage is still used? In a different thread I suggested to remove it.
The others are just a wrapped vmlinux that needs to be aware anyhow. And the wrappers only need to pass r4 additionally to r2 and r3 through.
Quoted 2 lines
I'd really like to separate the guess work into two parts so they don't have dependencies.
But zreladdr is always physoffset + textoffset, isn't it? So you should use the same guess for both physoffset and zreladdr, no?
And if you do it properly, it should even be possible to reuse the same code for all locations.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
2010/6/10 Uwe Kleine-K?nig <[email protected]>:
Quoted 17 lines
Hello Eric,
Quoted 4 lines
Quoted 2 lines
What do you think about requiring r4 to be set to physoffset as I did in my series?
My only concern is to impose less restrictions on the boot loaders.
While it remains optional without runtime physoffset it's OK if you ask me.
Quoted 8 lines
And zImage is only one of the possible headers we may have:
?* vmlinux can actually directly booted into as long as it's placed at the ? ?right place
?* uImage, with zImage or vmlinux (raw or compressed) encapsulated ?* zImage
?* xipImage
?* bootpImage
Quoted 8 lines
bootpimage is still used? ?In a different thread I suggested to remove it.
The others are just a wrapped vmlinux that needs to be aware anyhow. And the wrappers only need to pass r4 additionally to r2 and r3 through.Quoted 2 lines
I'd really like to separate the guess work into two parts so they don't have dependencies.
But zreladdr is always physoffset + textoffset, isn't it?
I'm not completely sure about the u300 case.
Quoted 2 lines
So you should
use the same guess for both physoffset and zreladdr, no?
My understanding is that separating guess of phys_offset and zreladdr might be a smoother migration path at this moment and yes it's a trade off.
Quoted 10 lines
And if you do it properly, it should even be possible to reuse the same code for all locations.
Best regards
Uwe--
Pengutronix e.K. ? ? ? ? ? ? ? ? ? ? ? ? ? | Uwe Kleine-K?nig ? ? ? ? ? ?| Industrial Linux Solutions ? ? ? ? ? ? ? ? | http://www.pengutronix.de/ ?|
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
2010/6/10 Eric Miao <[email protected]>:
Quoted 5 lines
2010/6/10 Uwe Kleine-K?nig <[email protected]>:
Quoted 1 line
But zreladdr is always physoffset + textoffset, isn't it?
I'm not completely sure about the u300 case.
OK as you see in mach-u300/Makefile.boot we have ZRELADDR at two different locations:
0x28E08000 or 0x48008000
(textoffset is 0x8000 IIRC)
The stuff in mach-u300/include/memory.h play with the Kconfig options in mach-u300/Kconfig and is supposed to provide dynamic resize of the memory for the 0x28e08000 variant, because that variant can actually be reconfigured by the boot loader (memory will be assigned to another CPU).
Then PHYS_OFFSET is set to the closest 2MiB boundary toward lower addresses since this is required by ARM Linux.
As you can see in the Kconfig we currently have 13 MiB meaning PHYS_OFFSET will be0x28000000 + (13 - 13&1) *1024*1024 = 0x28C00000
This way we comply with the 2MiB alignment requirement, even though in this case the actual physical memory begins at 0x28D00000. So the first MiB does not really exist. This is then compensated for in arch/arm/mm/mmu.c:
/*
* U300 - This platform family can share physical memory
* between two ARM cpus, one running Linux and the other
* running another OS.
*/
if (machine_is_u300()) {
#ifdef CONFIG_MACH_U300_SINGLE_RAM
#if ((CONFIG_MACH_U300_ACCESS_MEM_SIZE & 1) == 1) && \
CONFIG_MACH_U300_2MB_ALIGNMENT_FIX
res_size = 0x00100000;
#endif
#endif
}So we reserve the first MiB which is not actually memory, so that this will not be used, and Linux will actually make use of the memory from 0x28D00000.
If we had reserved 14MiB instead it would be:0x28000000 + (14 - 14&1) *1024*1024 = 0x28E00000
And then it would have matched.
The ZRELADDR in Makefile.boot is actually just some convention for the bootloader, it will work as long as we shrink the memory used by the other CPU, if we expand it past 14MiB everything breaks, like for 16 MiB for the other CPU physical memory begins at 0x29000000 and trying to have ZRELADDR at 28e08000 will just result in a bus error.
So the relation between ZRELADDR and PHYS_OFFSET
on the U300 is:
if CONFIG_MACH_U300_SINGLE_RAMPHYS_OFFSET = 0x28000000 +
reserved_for_other_cpu_rounded_to_closest_2MiB_lower_addresses
ZRELADDR = 0x28e00000 + textoffset
elsePHYS_OFFSET = 0x48000000
ZRELADDR = 0x48000000 + textoffset
endif
So the assumption holds if
!CONFIG_MACH_U300_SINGLE_RAM
Else it is complicated.
Yours,
Linus Walleij
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
In reply to Eric Miao2010/6/10 Eric Miao <[email protected]>:
Quoted 9 lines
Quoted 5 lines
Quoted 4 lines
arch/arm/mach-mx1/Makefile.boot: ? ? ? ? zreladdr-y ? :=0x08008000arch/arm/mach-shark/Makefile.boot: ? ? ? zreladdr-y ? :=0x08008000arch/arm/mach-u300/Makefile.boot: ? ? ? ?zreladdr-y ? :=0x28E08000arch/arm/mach-u300/Makefile.boot: ? ? ? ?zreladdr-y ? :=0x48008000I care about mx1, so I would prefer using
0xf8000000.Fair enough actually. And my guess of the u300 architecture is the phys offset actually starts from 0x2800_0000 or 0x4800_0000 which is also covered by 0xf800_0000.
This is correct and incorrect. :-)
In the latter case yes, it is always at 0x48000000
In the other case the physical memory is indeed at 0x28000000 but the range reserved for the other (ACC) CPU is locked by the boot loader, and read/write results in a bus error. So this is compile-time configurable.
It won't be more than a few MiB though, typically 13.
Quoted 3 lines
And I think u300 can actually get rid of those
inconsistent addresses by other means though we all know it might be suffering from the communication processor side of the memory allocation.
Any ideas, I'd be happy to implement them.
Any details you need, just ask.
Yours,
Linus Walleij
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
2010/6/11 Linus Walleij <[email protected]>:
Quoted 21 lines
2010/6/10 Eric Miao <[email protected]>:
Quoted 9 lines
Quoted 5 lines
Quoted 4 lines
arch/arm/mach-mx1/Makefile.boot: ? ? ? ? zreladdr-y ? :=0x08008000arch/arm/mach-shark/Makefile.boot: ? ? ? zreladdr-y ? :=0x08008000arch/arm/mach-u300/Makefile.boot: ? ? ? ?zreladdr-y ? :=0x28E08000arch/arm/mach-u300/Makefile.boot: ? ? ? ?zreladdr-y ? :=0x48008000I care about mx1, so I would prefer using
0xf8000000.Fair enough actually. And my guess of the u300 architecture is the phys offset actually starts from 0x2800_0000 or 0x4800_0000 which is also covered by 0xf800_0000.
This is correct and incorrect. :-)
In the latter case yes, it is always at
0x48000000In the other case the physical memory is indeed at
0x28000000but the range reserved for the other (ACC) CPU is locked by the boot loader, and read/write results in a bus error. So this is compile-time configurable.
Quoted 8 lines
It won't be more than a few MiB though, typically 13.
Quoted 3 lines
And I think u300 can actually get rid of those
inconsistent addresses by other means though we all know it might be suffering from the communication processor side of the memory allocation.Any ideas, I'd be happy to implement them.
Is it possible to reserve the memory in machine_desc.fixup? though not sure about if the memory will ever be accessed in the early stage.
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
In reply to Uwe Kleine-KönigQuoted 8 lines · Uwe Kleine-K?nig
Quoted 3 lines
- or the assumption of the zImage being loaded by the boot loader within 256MB from the start address is simply incorrect
Hmmm, this makes the image depending on the bootloader. Not that nice.
What do you think about requiring r4 to be set to physoffset as I did in my series? This way zImage would already know PHYSOFFSET and so didn't need to guess ZRELADDR.
No. That would make the dependency on the bootloader even _worse_.
And the fact is that most ARM targets have 256MB of RAM or less anyway, making this condition pretty hard to miss. For those very few targets out there with more than 256MB of RAM it is rather safe to presume that they do load zImage/uImage in the first 256MB of RAM already, and making this condition effective for the future is not that bad. And if you *really* can't satisfy that condition which would be really odd, then there is still the Kconfig option.
Compared to this, the conditions for the placement of zImage on x86 are far more restrictive. So I much prefer to use generally safe assumptions which are compatible with existing bootloaders rather than having a new boot requirement for this.
Nicolas
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
In reply to Eric Miao2010/6/3 Eric Miao <[email protected]>:
Quoted 38 lines
+config ZRELADDR
+ ? ? ? hex "Physical address of the decompressed kernel image"
+ ? ? ? depends on !AUTO_ZRELADDR+ ? ? ? default 0x00008000 if ARCH_BCMRING || ARCH_CNS3XXX || ARCH_DOVE ||\ + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ARCH_EBSA110 || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR ||\ + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ARCH_IOP13XX || ARCH_IOP33X || ARCH_IXP2000 ||\ + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ARCH_IXP23XX || ARCH_IXP4XX || ARCH_KIRKWOOD ||\ + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ARCH_KS8695 ?|| ARCH_LOKI || ARCH_MMP || ARCH_MV78XX0 ||\ + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ARCH_NOMADIK || ARCH_NUC93X || ARCH_NS9XXX ||\ + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ARCH_ORION5X || ARCH_SPEAR3XX || ARCH_SPEAR6XX ||\ + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ARCH_UX5XX || ARCH_VERSATILE || ARCH_W90X900 + ? ? ? default 0x08008000 if ARCH_MX1 || ARCH_SHARK + ? ? ? default 0x10008000 if ARCH_MSM || ARCH_OMAP1 || ARCH_RPC + ? ? ? default 0x20008000 if ARCH_S5P6440 || ARCH_S5P6442 ||\ + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ARCH_S5PC100 || ARCH_S5PV210 + ? ? ? default 0x30008000 if ARCH_S3C2410 || ARCH_S3C2400 || ARCH_S3C2412 ||\ + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ARCH_S3C2416 || ARCH_S3C2440 || ARCH_S3C2443 + ? ? ? default 0x40008000 if ARCH_STMP378X || ARCH_STMP37XX || ARCH_SH7372 ||\+ ? ? ? ? ? ? ? ? ? ? ? ? ? ?
ARCH_SH7377
+ ? ? ? default0x50008000ifARCH_S3C64XX||ARCH_SH7367
+ ? ? ? default0x60008000ifARCH_VEXPRESS
+ ? ? ? default0x80008000ifARCH_MX25||ARCH_MX3||ARCH_NETX||\
+ ? ? ? ? ? ? ? ? ? ? ? ? ? ?ARCH_OMAP2||ARCH_PNX4008
+ ? ? ? default0x90008000ifARCH_MX5||ARCH_MX91231
+ ? ? ? default0xa0008000ifARCH_IOP32X||ARCH_PXA||MACH_MX27
+ ? ? ? default0xc0008000ifARCH_LH7A40X||MACH_MX21
+ ? ? ? default0xf0008000ifARCH_AAEC2000||ARCH_L7200
+ ? ? ? default0xc0028000ifARCH_CLPS711X
+ ? ? ? default0x70008000ifARCH_AT91&& (ARCH_AT91CAP9||ARCH_AT91SAM9G45)
+ ? ? ? default0x20008000ifARCH_AT91&& !(ARCH_AT91CAP9 ||ARCH_AT91SAM9G45)
+ ? ? ? default0xc0008000ifARCH_DAVINCI&&ARCH_DAVINCI_DA8XX
+ ? ? ? default0x80008000ifARCH_DAVINCI&& !ARCH_DAVINCI_DA8XX
+ ? ? ? default0x00008000ifARCH_EP93XX&&EP93XX_SDCE3_SYNC_PHYS_OFFSET
+ ? ? ? default0xc0008000ifARCH_EP93XX&&EP93XX_SDCE0_PHYS_OFFSET
+ ? ? ? default0xd0008000ifARCH_EP93XX&&EP93XX_SDCE1_PHYS_OFFSET
+ ? ? ? default0xe0008000ifARCH_EP93XX&&EP93XX_SDCE2_PHYS_OFFSET
+ ? ? ? default0xf0008000ifARCH_EP93XX&&EP93XX_SDCE3_ASYNC_PHYS_OFFSET
+ ? ? ? default0x00008000ifARCH_GEMINI&&GEMINI_MEM_SWAP
Quoted 8 lines
+ ? ? ? default
0x10008000ifARCH_GEMINI&& !GEMINI_MEM_SWAP
+ ? ? ? default0x70008000ifARCH_REALVIEW&&REALVIEW_HIGH_PHYS_OFFSET
+ ? ? ? default0x00008000ifARCH_REALVIEW&& !REALVIEW_HIGH_PHYS_OFFSET
+ ? ? ? default0xc0208000ifARCH_SA1100&& SA1111
+ ? ? ? default0xc0008000ifARCH_SA1100&& !SA1111
+ ? ? ? default0x30108000ifARCH_S3C2410&&PM_H1940
+ ? ? ? default0x28E08000ifARCH_U300&&MACH_U300_SINGLE_RAM
+ ? ? ? default0x48008000ifARCH_U300&& !MACH_U300_SINGLE_RAM
This looks correct so
I assume it should be submitted simultaneously with a patch nuking off all Makefile.boot files and that infrastructure then?
Yours,
Linus Walleij
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
Hello Linus,
Quoted 2 lines · Linus Walleij
I assume it should be submitted simultaneously with a patch nuking off all Makefile.boot files and that infrastructure then?
Only when bootp is deleted or fixed not to use these variables.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
Quoted 6 lines · Uwe Kleine-K?nig
Hello Linus,
Quoted 2 lines · Linus Walleij
I assume it should be submitted simultaneously with a patch nuking off all Makefile.boot files and that infrastructure then?
Only when bootp is deleted or fixed not to use these variables.
You can't really "fix" it not to use these variables. The placement of things like the ramdisk image is something that can only be specified with a certain amount of information, such as where the kernel will be located, how large the decompressed kernel will be, where the RAM is located, whether there's any platform specific restrictions on what RAM can be used.
ARM is its own enemy here - not having started out with the memory architected to be in a certain location like it is on x86 makes all this very much more complicated, and I doubt that any wrapper around the kernel which performs in a way like the bootp wrapper could be made to work reliably without being told explicitly where to place stuff.
And I'm not in favour of it being deleted; there are boot loaders out there which can only fetch and boot one image. Such boot loaders make it difficult to wrap a ramdisk image with the kernel. The bootp wrapper solves that. It's also not something you want to use ZBOOT=y with.
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
In reply to Eric MiaoOn Thu, 2010-06-03 at 09:36 +0200, Eric Miao wrote:
(...)
arch/arm/Kconfig config TEXT_OFFSET · line 1521
Quoted 12 lines
arch/arm/Kconfig +12
-0+ +config ZRELADDR + hex "Physical address of the decompressed kernel image" + depends on !AUTO_ZRELADDR + default 0x00008000 if ARCH_BCMRING || ARCH_CNS3XXX || ARCH_DOVE ||\ + ARCH_EBSA110 || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR ||\ + ARCH_IOP13XX || ARCH_IOP33X || ARCH_IXP2000 ||\ + ARCH_IXP23XX || ARCH_IXP4XX || ARCH_KIRKWOOD ||\ + ARCH_KS8695 || ARCH_LOKI || ARCH_MMP || ARCH_MV78XX0 ||\ + ARCH_NOMADIK || ARCH_NUC93X || ARCH_NS9XXX ||\ + ARCH_ORION5X || ARCH_SPEAR3XX || ARCH_SPEAR6XX ||\ + ARCH_UX5XX || ARCH_VERSATILE || ARCH_W90X900
s/ARCH_UX5XX/ARCH_U8500
Srinidhi
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
In reply to Eric MiaoQuoted 20 lines · Eric Miao
From: Eric Miao <[email protected]>
Original idea and prototype came from Nicolas Pitre.
As long as the zImage is placed within the 256MB range from the start of the memory, ZRELADDR (Address where the decompressed kernel will be placed, usually ==
PHYS_OFFSET+TEXT_OFFSET) can be determined at run-time by masking PC with 0xf000_0000.Running through all the Makefile.boot, all those zreladdr-y address == 0x[0-f]000_0000 +
TEXT_OFFSETcan be determined at run-time.Option
CONFIG_AUTO_ZRELADDRandCONFIG_ZRELADDRare introduced,CONFIG_ZRELADDR_must_ be explicitly specified if:- ((zreladdr-y -
TEXT_OFFSET) & ~0xf0000000) != 0, which means a maksing of PC with 0xf000_0000 will result an incorrect address.
Quoted 8 lines
- or the assumption of the zImage being loaded by the boot loader within 256MB from the start address is simply incorrect
- or when
ZBOOT_ROMis used, where the above assumption is normally wrongList of all Makefile.boot:
Not so. What happened to H720x platforms, which are now broken? Any chance of fixing the regression that this introduced?
http://armlinux.simtec.co.uk/kautobuild/2.6.36-rc3/h7202_defconfig/zimage.log
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
Quoted 28 lines · Russell King - ARM Linux
Quoted 27 lines · Eric Miao
From: Eric Miao <[email protected]>
Original idea and prototype came from Nicolas Pitre.
As long as the zImage is placed within the 256MB range from the start of the memory, ZRELADDR (Address where the decompressed kernel will be placed, usually ==
PHYS_OFFSET+TEXT_OFFSET) can be determined at run-time by masking PC with 0xf000_0000.Running through all the Makefile.boot, all those zreladdr-y address == 0x[0-f]000_0000 +
TEXT_OFFSETcan be determined at run-time.Option
CONFIG_AUTO_ZRELADDRandCONFIG_ZRELADDRare introduced,CONFIG_ZRELADDR_must_ be explicitly specified if:- ((zreladdr-y -
TEXT_OFFSET) & ~0xf0000000) != 0, which means a maksing of PC with 0xf000_0000 will result an incorrect address.- or the assumption of the zImage being loaded by the boot loader within 256MB from the start address is simply incorrect
- or when
ZBOOT_ROMis used, where the above assumption is normally wrong
Quoted 6 lines
Quoted 1 line
List of all Makefile.boot:
Not so. What happened to H720x platforms, which are now broken? Any chance of fixing the regression that this introduced?
http://armlinux.simtec.co.uk/kautobuild/2.6.36-rc3/h7202_defconfig/zimage.log
And while we're here, why hasn't anyone removed the zreladdr definitions in Makefile.boot yet? Or do we still need them and we now have the same information defined in two different places?
This all looks like a half-done job at the moment. Please clean it up.
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
Hello,
Quoted 34 lines · Russell King - ARM Linux
Quoted 33 lines · Russell King - ARM Linux
Quoted 20 lines · Eric Miao
From: Eric Miao <[email protected]>
Original idea and prototype came from Nicolas Pitre.
As long as the zImage is placed within the 256MB range from the start of the memory, ZRELADDR (Address where the decompressed kernel will be placed, usually ==
PHYS_OFFSET+TEXT_OFFSET) can be determined at run-time by masking PC with 0xf000_0000.Running through all the Makefile.boot, all those zreladdr-y address == 0x[0-f]000_0000 +
TEXT_OFFSETcan be determined at run-time.Option
CONFIG_AUTO_ZRELADDRandCONFIG_ZRELADDRare introduced,CONFIG_ZRELADDR_must_ be explicitly specified if:- ((zreladdr-y -
TEXT_OFFSET) & ~0xf0000000) != 0, which means a maksing of PC with 0xf000_0000 will result an incorrect address.Quoted 8 lines
- or the assumption of the zImage being loaded by the boot loader within 256MB from the start address is simply incorrect
- or when
ZBOOT_ROMis used, where the above assumption is normally wrongList of all Makefile.boot:
Not so. What happened to H720x platforms, which are now broken? Any chance of fixing the regression that this introduced?
Quoted 7 lines
And while we're here, why hasn't anyone removed the zreladdr definitions in Makefile.boot yet? Or do we still need them and we now have the same information defined in two different places?
This all looks like a half-done job at the moment. Please clean it up.
The original series removed all the 'Makefile.boot's IIRC. Currently the params_phys-y value is needed though. So should I send a patch that just removes the zreladdr values?
Eric, what are your plans regarding the runtime-physoffset stuff? (I currently have none.)
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
Hello Russell,
Quoted 10 lines · Uwe Kleine-K?nig
Quoted 6 lines · Russell King - ARM Linux
And while we're here, why hasn't anyone removed the zreladdr definitions in Makefile.boot yet? Or do we still need them and we now have the same information defined in two different places?
This all looks like a half-done job at the moment. Please clean it up.
The original series removed all the 'Makefile.boot's IIRC. Currently the params_phys-y value is needed though. So should I send a patch that just removes the zreladdr values?
I looked into that and found some more issues. I hope I catched them all now. While doing that removing the zreladdr lines was nearly for free. So I did that, too.
I couldn't determine who to cc: for the ARCH_H720X patch. Russell, do you maintain this platform?
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 1/7 ARM: specify ZRELADDR for ARCH_TEGRA
This was missed in commit
e69edc79 (ARM: Auto calculate ZRELADDR and provide option for exceptions)
--- arch/arm/Kconfig | 1 + arch/arm/mach-tegra/Makefile.boot | 1 - 2 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/Kconfig +1 -0
@@ -1601,6 +1601,7 @@ config ZRELADDR ARCH_ORION5X ||\ ARCH_SPEAR3XX ||\ ARCH_SPEAR6XX ||\ + ARCH_TEGRA ||\ ARCH_U8500 ||\ ARCH_VERSATILE ||\ ARCH_W90X900
arch/arm/mach-tegra/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ -zreladdr-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00008000 params_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00000100 initrd_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00800000
Signature · 1 line
1.7.1
PATCH 1/7 ARM: specify ZRELADDR for ARCH_TEGRA
Yeah I saw that and posted a patch on the 27th and sent a pull request to Linus on Wednesday. Hopefully it will make rc4.
Cheers,
ERik
Quoted 38 lines · Uwe Kleine-K?nig
This was missed in commit
? ? ? ?e69edc79 (ARM: Auto calculate ZRELADDR and provide option for exceptions)
Cc linux-tegra at vger.kernel.orgCc Colin Cross <[email protected]>Cc Erik Gilling <[email protected]>Cc Olof Johansson <[email protected]>Signed-off-by Uwe Kleine-K?nig <[email protected]>---
?arch/arm/Kconfig ? ? ? ? ? ? ? ? ?| ? ?1 + ?arch/arm/mach-tegra/Makefile.boot | ? ?1 - ?2 files changed, 1 insertions(+), 1 deletions(-)arch/arm/Kconfig +1
-0@@ -1601,6 +1601,7 @@ config ZRELADDR ? ? ? ? ? ? ? ?ARCH_ORION5X ||\ ? ? ? ? ? ? ? ?ARCH_SPEAR3XX ||\ ? ? ? ? ? ? ? ?ARCH_SPEAR6XX ||\ + ? ? ? ? ? ? ? ARCH_TEGRA ||\ ? ? ? ? ? ? ? ?ARCH_U8500 ||\ ? ? ? ? ? ? ? ?ARCH_VERSATILE ||\? ? ? ? ? ? ? ?ARCH_W90X900
arch/arm/mach-tegra/Makefile.boot +0
-1@@ -1,3 +1,2 @@ -zreladdr-$(CONFIG_ARCH_TEGRA_2x_SOC) ? := 0x00008000?params_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) ? ? ? ?:=
0x00000100?initrd_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) ? ? ? ?:=0x00800000--
1.7.1
PATCH 1/7 ARM: specify ZRELADDR for ARCH_TEGRA
Hi Erik,
Quoted 2 lines · Erik Gilling
Yeah I saw that and posted a patch on the 27th and sent a pull request to Linus on Wednesday. Hopefully it will make rc4.
OK for me, I'll keep it in my queue and will drop it when Linus got the change. You didn't remove the line from arch/arm/mach-tegra/Makefile.boot, though.
(hmm, I thought that patches that touch common files like arch/arm/Kconfig should go via rmk?!) (BTW, I think lines like
Change-Id: Ic28177a645e2d5bc53099c15dcd5b1ae7f3d5208 in the commit log are OK in general if they help you in any way. Maybe just prefix it something unique, 'Android-Change-Id:'?)
Best regards
Uwe
Quoted 15 lines
Quoted 13 lines · Uwe Kleine-K?nig
This was missed in commit
? ? ? ?e69edc79 (ARM: Auto calculate ZRELADDR and provide option for exceptions)
Cc linux-tegra at vger.kernel.orgCc Colin Cross <[email protected]>Cc Erik Gilling <[email protected]>Cc Olof Johansson <[email protected]>Signed-off-by Uwe Kleine-K?nig <[email protected]>---
?arch/arm/Kconfig ? ? ? ? ? ? ? ? ?| ? ?1 + ?arch/arm/mach-tegra/Makefile.boot | ? ?1 - ?2 files changed, 1 insertions(+), 1 deletions(-)
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 1/7 ARM: specify ZRELADDR for ARCH_TEGRA
Quoted 6 lines · Uwe Kleine-K?nig
Quoted 2 lines · Erik Gilling
Yeah I saw that and posted a patch on the 27th and sent a pull request to Linus on Wednesday. ?Hopefully it will make rc4.
OK for me, I'll keep it in my queue and will drop it when Linus got the change. ?You didn't remove the line from
arch/arm/mach-tegra/Makefile.boot, though.
I'll do that too.
Quoted 2 lines
(hmm, I thought that patches that touch common files like
arch/arm/Kconfigshould go via rmk?!)
I looked and saw that others (specifically samsung) had submitted this fix directly to Linus. I'm still learning the ropes here and am happy to hear some clarification either way.
Quoted 4 lines
(BTW, I think lines like
Change-Id: Ic28177a645e2d5bc53099c15dcd5b1ae7f3d5208 in the commit log are OK in general if they help you in any way. ?Maybe just prefix it something unique, 'Android-Change-Id:'?)
These are used by our code review system
(https://review.source.android.com) so changing the name is just as easy as taking it out. Plus the patches that end up getting posted are rarely the same ones that are on top of our own tree.
-Erik
PATCH 1/7 ARM: specify ZRELADDR for ARCH_TEGRA
Hello,
Quoted 10 lines · Erik Gilling
Quoted 6 lines · Uwe Kleine-K?nig
Quoted 2 lines · Erik Gilling
Yeah I saw that and posted a patch on the 27th and sent a pull request to Linus on Wednesday. ?Hopefully it will make rc4.
OK for me, I'll keep it in my queue and will drop it when Linus got the change. ?You didn't remove the line from
arch/arm/mach-tegra/Makefile.boot, though.I'll do that too.
Note that Linus don't like to pull branches that don't match the pull request. (This makes him feel pulling uncooked changes.) If you do, you can add my Ack.
Quoted 6 lines
Quoted 2 lines
(hmm, I thought that patches that touch common files like
arch/arm/Kconfigshould go via rmk?!)I looked and saw that others (specifically samsung) had submitted this fix directly to Linus. I'm still learning the ropes here and am happy to hear some clarification either way.
Note that just me wondering if it's right doesn't necessarily means it's not. Russell, can you comment? Is it trivial enough and obviously only tegra related that it's OK?
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 1/7 ARM: specify ZRELADDR for ARCH_TEGRA
Quoted 7 lines · Uwe Kleine-K?nig
Hello,
Quoted 4 lines · Erik Gilling
On Fri, Sep 3, 2010 at 12:01 PM, Uwe Kleine-K?nig
Quoted 2 lines
(hmm, I thought that patches that touch common files like
arch/arm/Kconfigshould go via rmk?!)
Quoted 7 lines
Quoted 3 lines
I looked and saw that others (specifically samsung) had submitted this fix directly to Linus. I'm still learning the ropes here and am happy to hear some clarification either way.
Note that just me wondering if it's right doesn't necessarily means it's not. Russell, can you comment? Is it trivial enough and obviously only tegra related that it's OK?
The problem happens when there's related changes already in others git trees which clash or conflict with those changes.
This whole CONFIG_ZRELADDR thing seems like a step backwards towards a situation where we will get conflicts with multiple changes - but without gaining anything substantial in moving away from Makefile.boot.
Unless someone can come up with a real justification for CONFIG_ZRELADDR I'm mindful to revert it. (But - if people have sent these changes to Linus already, that's going to make reverting it a lot harder.)
PATCH 1/7 ARM: specify ZRELADDR for ARCH_TEGRA
Quoted 19 lines · Russell King - ARM Linux
Quoted 7 lines · Uwe Kleine-K?nig
Hello,
Quoted 4 lines · Erik Gilling
On Fri, Sep 3, 2010 at 12:01 PM, Uwe Kleine-K?nig
Quoted 2 lines
(hmm, I thought that patches that touch common files like
arch/arm/Kconfigshould go via rmk?!)Quoted 7 lines
Quoted 3 lines
I looked and saw that others (specifically samsung) had submitted this fix directly to Linus. I'm still learning the ropes here and am happy to hear some clarification either way.
Note that just me wondering if it's right doesn't necessarily means it's not. Russell, can you comment? Is it trivial enough and obviously only tegra related that it's OK?
The problem happens when there's related changes already in others git trees which clash or conflict with those changes.
Quoted 7 lines
This whole
CONFIG_ZRELADDRthing seems like a step backwards towards a situation where we will get conflicts with multiple changes - but without gaining anything substantial in moving away from Makefile.boot.Unless someone can come up with a real justification for
CONFIG_ZRELADDRI'm mindful to revert it. (But - if people have sent these changes to Linus already, that's going to make reverting it a lot harder.)
This is what I'm considering committing to sort out this ZRELADDR mess - it gives people who want AUTO_ZRELADDR their pie, while allowing us to keep the proven reliability of original method of handling ZRELADDR.
arch/arm/Kconfig | 90 ------------------------------------- arch/arm/boot/Makefile | 8 ++- arch/arm/boot/compressed/Makefile | 4 ++ arch/arm/boot/compressed/head.S | 2 +- 4 files changed, 10 insertions(+), 94 deletions(-)
arch/arm/Kconfig +0 -90
@@ -1576,96 +1576,6 @@ config AUTO_ZRELADDR 0xf8000000. This assumes the zImage being placed in the first 128MB from start of memory. -config ZRELADDR - hex "Physical address of the decompressed kernel image" - depends on !AUTO_ZRELADDR - default 0x00008000 if ARCH_BCMRING ||\ - ARCH_CNS3XXX ||\ - ARCH_DOVE ||\ - ARCH_EBSA110 ||\ - ARCH_FOOTBRIDGE ||\ - ARCH_INTEGRATOR ||\ - ARCH_IOP13XX ||\ - ARCH_IOP33X ||\ - ARCH_IXP2000 ||\ - ARCH_IXP23XX ||\ - ARCH_IXP4XX ||\ - ARCH_KIRKWOOD ||\ - ARCH_KS8695 ||\ - ARCH_LOKI ||\ - ARCH_MMP ||\ - ARCH_MV78XX0 ||\ - ARCH_NOMADIK ||\ - ARCH_NUC93X ||\ - ARCH_NS9XXX ||\ - ARCH_ORION5X ||\ - ARCH_SPEAR3XX ||\ - ARCH_SPEAR6XX ||\ - ARCH_U8500 ||\ - ARCH_VERSATILE ||\ - ARCH_W90X900 - default 0x08008000 if ARCH_MX1 ||\ - ARCH_SHARK - default 0x10008000 if ARCH_MSM ||\ - ARCH_OMAP1 ||\ - ARCH_RPC - default 0x20008000 if ARCH_S5P6440 ||\ - ARCH_S5P6442 ||\ - ARCH_S5PC100 ||\ - ARCH_S5PV210 - default 0x30008000 if ARCH_S3C2410 ||\ - ARCH_S3C2400 ||\ - ARCH_S3C2412 ||\ - ARCH_S3C2416 ||\ - ARCH_S3C2440 ||\ - ARCH_S3C2443 - default 0x40008000 if ARCH_STMP378X ||\ - ARCH_STMP37XX ||\ - ARCH_SH7372 ||\ - ARCH_SH7377 ||\ - ARCH_S5PV310 - default 0x50008000 if ARCH_S3C64XX ||\ - ARCH_SH7367 - default 0x60008000 if ARCH_VEXPRESS - default 0x80008000 if ARCH_MX25 ||\ - ARCH_MX3 ||\ - ARCH_NETX ||\ - ARCH_OMAP2PLUS ||\ - ARCH_PNX4008 - default 0x90008000 if ARCH_MX5 ||\ - ARCH_MX91231 - default 0xa0008000 if ARCH_IOP32X ||\ - ARCH_PXA ||\ - MACH_MX27 - default 0xc0008000 if ARCH_LH7A40X ||\ - MACH_MX21 - default 0xf0008000 if ARCH_AAEC2000 ||\ - ARCH_L7200 - default 0xc0028000 if ARCH_CLPS711X - default 0x70008000 if ARCH_AT91 && (ARCH_AT91CAP9 || ARCH_AT91SAM9G45) - default 0x20008000 if ARCH_AT91 && !(ARCH_AT91CAP9 || ARCH_AT91SAM9G45) - default 0xc0008000 if ARCH_DAVINCI && ARCH_DAVINCI_DA8XX - default 0x80008000 if ARCH_DAVINCI && !ARCH_DAVINCI_DA8XX - default 0x00008000 if ARCH_EP93XX && EP93XX_SDCE3_SYNC_PHYS_OFFSET - default 0xc0008000 if ARCH_EP93XX && EP93XX_SDCE0_PHYS_OFFSET - default 0xd0008000 if ARCH_EP93XX && EP93XX_SDCE1_PHYS_OFFSET - default 0xe0008000 if ARCH_EP93XX && EP93XX_SDCE2_PHYS_OFFSET - default 0xf0008000 if ARCH_EP93XX && EP93XX_SDCE3_ASYNC_PHYS_OFFSET - default 0x00008000 if ARCH_GEMINI && GEMINI_MEM_SWAP - default 0x10008000 if ARCH_GEMINI && !GEMINI_MEM_SWAP - default 0x70008000 if ARCH_REALVIEW && REALVIEW_HIGH_PHYS_OFFSET - default 0x00008000 if ARCH_REALVIEW && !REALVIEW_HIGH_PHYS_OFFSET - default 0xc0208000 if ARCH_SA1100 && SA1111 - default 0xc0008000 if ARCH_SA1100 && !SA1111 - default 0x30108000 if ARCH_S3C2410 && PM_H1940 - default 0x28E08000 if ARCH_U300 && MACH_U300_SINGLE_RAM - default 0x48008000 if ARCH_U300 && !MACH_U300_SINGLE_RAM - help - ZRELADDR is the physical address where the decompressed kernel - image will be placed. ZRELADDR has to be specified when the - assumption of AUTO_ZRELADDR is not valid, or when ZBOOT_ROM is - selected. - endmenu menu "CPU Power Management"
arch/arm/boot/Makefile +5 -3
@@ -14,16 +14,18 @@ MKIMAGE := $(srctree)/scripts/mkuboot.sh ifneq ($(MACHINE),) --include $(srctree)/$(MACHINE)/Makefile.boot +include $(srctree)/$(MACHINE)/Makefile.boot endif # Note: the following conditions must always be true: +# ZRELADDR == virt_to_phys(PAGE_OFFSET + TEXT_OFFSET) # PARAMS_PHYS must be within 4MB of ZRELADDR # INITRD_PHYS must be in RAM +ZRELADDR := $(zreladdr-y) PARAMS_PHYS := $(params_phys-y) INITRD_PHYS := $(initrd_phys-y) -export INITRD_PHYS PARAMS_PHYS +export ZRELADDR INITRD_PHYS PARAMS_PHYS targets := Image zImage xipImage bootpImage uImage
@@ -65,7 +67,7 @@ quiet_cmd_uimage = UIMAGE $@ ifeq ($(CONFIG_ZBOOT_ROM),y) $(obj)/uImage: LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT) else -$(obj)/uImage: LOADADDR=$(CONFIG_ZRELADDR) +$(obj)/uImage: LOADADDR=$(ZRELADDR) endif ifeq ($(CONFIG_THUMB2_KERNEL),y)
arch/arm/boot/compressed/Makefile +4 -0
@@ -79,6 +79,10 @@ endif EXTRA_CFLAGS := -fpic -fno-builtin EXTRA_AFLAGS := -Wa,-march=all +# Supply ZRELADDR to the decompressor via a linker symbol. +ifneq ($(CONFIG_AUTO_ZRELADDR),y) +LDFLAGS_vmlinux := --defsym zreladdr=$(ZRELADDR) +endif ifeq ($(CONFIG_CPU_ENDIAN_BE8),y) LDFLAGS_vmlinux += --be8 endif
arch/arm/boot/compressed/head.S +1 -1
@@ -177,7 +177,7 @@ not_angel: and r4, pc, #0xf8000000 add r4, r4, #TEXT_OFFSET #else - ldr r4, =CONFIG_ZRELADDR + ldr r4, =zreladdr #endif subs r0, r0, r1 @ calculate the delta offset
PATCH 1/7 ARM: specify ZRELADDR for ARCH_TEGRA
Hello Russell,
Quoted 24 lines · Russell King - ARM Linux
Quoted 23 lines · Russell King - ARM Linux
Quoted 7 lines · Uwe Kleine-K?nig
Hello,
Quoted 4 lines · Erik Gilling
On Fri, Sep 3, 2010 at 12:01 PM, Uwe Kleine-K?nig
Quoted 2 lines
(hmm, I thought that patches that touch common files like
arch/arm/Kconfigshould go via rmk?!)Quoted 7 lines
Quoted 3 lines
I looked and saw that others (specifically samsung) had submitted this fix directly to Linus. I'm still learning the ropes here and am happy to hear some clarification either way.
Note that just me wondering if it's right doesn't necessarily means it's not. Russell, can you comment? Is it trivial enough and obviously only tegra related that it's OK?
The problem happens when there's related changes already in others git trees which clash or conflict with those changes.
This whole
CONFIG_ZRELADDRthing seems like a step backwards towards a situation where we will get conflicts with multiple changes - but without gaining anything substantial in moving away from Makefile.boot.
Quoted 7 lines
Quoted 3 lines
Unless someone can come up with a real justification for
CONFIG_ZRELADDRI'm mindful to revert it. (But - if people have sent these changes to Linus already, that's going to make reverting it a lot harder.)This is what I'm considering committing to sort out this ZRELADDR mess - it gives people who want
AUTO_ZRELADDRtheir pie, while allowing us to keep the proven reliability of original method of handling ZRELADDR.
Would be OK for me. We might have to fix up some machines though.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 1/7 ARM: specify ZRELADDR for ARCH_TEGRA
Quoted 27 lines · Uwe Kleine-K?nig
Hello Russell,
Quoted 24 lines · Russell King - ARM Linux
Quoted 23 lines · Russell King - ARM Linux
Quoted 7 lines · Uwe Kleine-K?nig
Hello,
Quoted 4 lines · Erik Gilling
On Fri, Sep 3, 2010 at 12:01 PM, Uwe Kleine-K?nig
Quoted 2 lines
(hmm, I thought that patches that touch common files like
arch/arm/Kconfigshould go via rmk?!)Quoted 7 lines
Quoted 3 lines
I looked and saw that others (specifically samsung) had submitted this fix directly to Linus. I'm still learning the ropes here and am happy to hear some clarification either way.
Note that just me wondering if it's right doesn't necessarily means it's not. Russell, can you comment? Is it trivial enough and obviously only tegra related that it's OK?
The problem happens when there's related changes already in others git trees which clash or conflict with those changes.
This whole
CONFIG_ZRELADDRthing seems like a step backwards towards a situation where we will get conflicts with multiple changes - but without gaining anything substantial in moving away from Makefile.boot.
Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
Unless someone can come up with a real justification for
CONFIG_ZRELADDRI'm mindful to revert it. (But - if people have sent these changes to Linus already, that's going to make reverting it a lot harder.)This is what I'm considering committing to sort out this ZRELADDR mess - it gives people who want
AUTO_ZRELADDRtheir pie, while allowing us to keep the proven reliability of original method of handling ZRELADDR.Would be OK for me. We might have to fix up some machines though.
Any ideas what needs to be fixed? And is that an acked-by ?
PATCH 1/7 ARM: specify ZRELADDR for ARCH_TEGRA
Hello Russell,
Quoted 32 lines · Russell King - ARM Linux
Quoted 31 lines · Uwe Kleine-K?nig
Hello Russell,
Quoted 28 lines · Russell King - ARM Linux
Quoted 26 lines · Russell King - ARM Linux
Quoted 7 lines · Uwe Kleine-K?nig
Hello,
Quoted 4 lines · Erik Gilling
On Fri, Sep 3, 2010 at 12:01 PM, Uwe Kleine-K?nig
Quoted 2 lines
(hmm, I thought that patches that touch common files like
arch/arm/Kconfigshould go via rmk?!)Quoted 7 lines
Quoted 3 lines
I looked and saw that others (specifically samsung) had submitted this fix directly to Linus. I'm still learning the ropes here and am happy to hear some clarification either way.
Note that just me wondering if it's right doesn't necessarily means it's not. Russell, can you comment? Is it trivial enough and obviously only tegra related that it's OK?
The problem happens when there's related changes already in others git trees which clash or conflict with those changes.
This whole
CONFIG_ZRELADDRthing seems like a step backwards towards a situation where we will get conflicts with multiple changes - but without gaining anything substantial in moving away from Makefile.boot.Unless someone can come up with a real justification for
CONFIG_ZRELADDRI'm mindful to revert it. (But - if people have sent these changes to Linus already, that's going to make reverting it a lot harder.)
Quoted 6 lines
Quoted 4 lines
Quoted 3 lines
This is what I'm considering committing to sort out this ZRELADDR mess - it gives people who want
AUTO_ZRELADDRtheir pie, while allowing us to keep the proven reliability of original method of handling ZRELADDR.Would be OK for me. We might have to fix up some machines though.
Any ideas what needs to be fixed?
I thought that there may be platforms that don't have a specification of zreladdr-y anymore in Makefile.boot. Maybe the Tegra-stuff that Linus should pull removes it. Other than that I'd check s3c. The rest should be OK.
Quoted 1 line
And is that an acked-by ?
yeah, you can take it as such.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 1/7 ARM: specify ZRELADDR for ARCH_TEGRA
Quoted 5 lines · Uwe Kleine-K?nig
Quoted 1 line
Any ideas what needs to be fixed?
I thought that there may be platforms that don't have a specification of zreladdr-y anymore in Makefile.boot. ?Maybe the Tegra-stuff that Linus should pull removes it. ?Other than that I'd check s3c. ?The rest should be OK.
The tegra patch does not remove the zreladdr-y in Makefile.boot.
-Erik
RFC PATCH 2/7 ARM: shmobile: remove unneeded hack to calculate zreladdr
In reply to Uwe Kleine-KönigThe calculated value in Makefile.boot isn't used anymore since
e69edc79 (ARM: Auto calculate ZRELADDR and provide option for exceptions)
and physoffset can better be set in mach/memory.h depending on the actual machine type.
--- arch/arm/mach-shmobile/Kconfig | 11 ----------- arch/arm/mach-shmobile/Makefile.boot | 9 --------- arch/arm/mach-shmobile/include/mach/memory.h | 15 ++++++++++++++- 3 files changed, 14 insertions(+), 21 deletions(-) delete mode 100644 arch/arm/mach-shmobile/Makefile.boot
arch/arm/mach-shmobile/Kconfig +0 -11
@@ -61,17 +61,6 @@ comment "SH-Mobile System Configuration" menu "Memory configuration" -config MEMORY_START - hex "Physical memory start address" - default "0x50000000" if MACH_G3EVM - default "0x40000000" if MACH_G4EVM - default "0x40000000" if MACH_AP4EVB - default "0x00000000" - ---help--- - Tweak this only when porting to a new machine which does not - already have a defconfig. Changing it from the known correct - value on any of the known systems will only lead to disaster. - config MEMORY_SIZE hex "Physical memory size" default "0x08000000" if MACH_G3EVM
arch/arm/mach-shmobile/Makefile.boot deleted +0 -9
@@ -1,9 +0,0 @@ -__ZRELADDR := $(shell /bin/bash -c 'printf "0x%08x" \ - $$[$(CONFIG_MEMORY_START) + 0x8000]') - - zreladdr-y := $(__ZRELADDR) - -# Unsupported legacy stuff -# -#params_phys-y (Instead: Pass atags pointer in r2) -#initrd_phys-y (Instead: Use compiled-in initramfs)
arch/arm/mach-shmobile/include/mach/memory.h +14 -1
@@ -1,7 +1,20 @@#ifndef __ASM_MACH_MEMORY_H#define __ASM_MACH_MEMORY_H -#define PHYS_OFFSET UL(CONFIG_MEMORY_START) +#define SH7367_PHYS_OFFSET UL(0x50000000) +#define SH7372_PHYS_OFFSET UL(0x40000000) +#define SH7377_PHYS_OFFSET UL(0x40000000) + +#if !defined(CONFIG_RUNTIME_PHYS_OFFSET ) +# if defined(CONFIG_ARCH_SH7367 ) +# define PHYS_OFFSET SH7367_PHYS_OFFSET +# elif defined(CONFIG_ARCH_SH7372 ) +# define PHYS_OFFSET SH7372_PHYS_OFFSET +# elif defined(CONFIG_ARCH_SH7377 ) +# define PHYS_OFFSET SH7377_PHYS_OFFSET +# endif +#endif /* if !defined(CONFIG_RUNTIME_PHYS_OFFSET) */ +#define MEM_SIZE UL(CONFIG_MEMORY_SIZE)/* DMA memory at 0xf6000000 - 0xffdfffff */
Signature · 1 line
1.7.1
RFC PATCH 2/7 ARM: shmobile: remove unneeded hack to calculate zreladdr
2010/9/3 Uwe Kleine-K?nig <[email protected]>:
Quoted 68 lines
The calculated value in Makefile.boot isn't used anymore since
? ? ? ?e69edc79 (ARM: Auto calculate ZRELADDR and provide option for exceptions)
and physoffset can better be set in
mach/memory.hdepending on the actual machine type.Cc Paul Mundt <[email protected]>Cc Magnus Damm <[email protected]>Cc linux-sh at vger.kernel.orgSigned-off-by Uwe Kleine-K?nig <[email protected]>---
?arch/arm/mach-shmobile/Kconfig ? ? ? ? ? ? ? | ? 11 ----------- ?arch/arm/mach-shmobile/Makefile.boot ? ? ? ? | ? ?9 --------- ?arch/arm/mach-shmobile/include/mach/memory.h | ? 15 ++++++++++++++-?3 files changed, 14 insertions(+), 21 deletions(-) ?delete mode 100644
arch/arm/mach-shmobile/Makefile.bootarch/arm/mach-shmobile/Kconfig +0
-0@@ -61,17 +61,6 @@ comment "SH-Mobile System Configuration"?menu "Memory configuration"
arch/arm/mach-shmobile/Kconfig +0
-11-config MEMORY_START - ? ? ? hex "Physical memory start address" - ? ? ? default "0x50000000" if MACH_G3EVM - ? ? ? default "0x40000000" if MACH_G4EVM - ? ? ? default "0x40000000" if MACH_AP4EVB - ? ? ? default "0x00000000" - ? ? ? ---help--- - ? ? ? ? Tweak this only when porting to a new machine which does not - ? ? ? ? already have a defconfig. Changing it from the known correct - ? ? ? ? value on any of the known systems will only lead to disaster. -?config
MEMORY_SIZE
? ? ? ?hex "Physical memory size"
? ? ? ?default "0x08000000" ifMACH_G3EVMarch/arm/mach-shmobile/Makefile.boot deleted +0
-9@@ -1,9 +0,0 @@ -__ZRELADDR ? ? := $(shell /bin/bash -c 'printf "0x%08x" \ - ? ? ? ? ? ? ? ? ? ?$$[$(CONFIG_MEMORY_START) + 0x8000]') - - ? zreladdr-y ? := $(__ZRELADDR) - -# Unsupported legacy stuff -# -#params_phys-y (Instead: Pass atags pointer in r2) -#initrd_phys-y (Instead: Use compiled-in initramfs)arch/arm/mach-shmobile/include/mach/memory.h +0
-0@@ -1,7 +1,20 @@?#ifndef
__ASM_MACH_MEMORY_H
?#define__ASM_MACH_MEMORY_Harch/arm/mach-shmobile/include/mach/memory.h +4
-1-#define PHYS_OFFSET ? ?UL(CONFIG_MEMORY_START) +#define SH7367_PHYS_OFFSET UL(0x50000000) +#define SH7372_PHYS_OFFSET UL(0x40000000) +#define SH7377_PHYS_OFFSET UL(0x40000000) +
arch/arm/mach-shmobile/include/mach/memory.h line 17
Quoted 10 lines
arch/arm/mach-shmobile/include/mach/memory.h +10
-0+#if !defined(CONFIG_RUNTIME_PHYS_OFFSET ) +# if defined(CONFIG_ARCH_SH7367 ) +# ?define PHYS_OFFSET ?SH7367_PHYS_OFFSET +# elif defined(CONFIG_ARCH_SH7372 ) +# ?define PHYS_OFFSET ?SH7372_PHYS_OFFSET +# elif defined(CONFIG_ARCH_SH7377 ) +# ?define PHYS_OFFSET ?SH7377_PHYS_OFFSET +# endif +#endif /* if !defined(CONFIG_RUNTIME_PHYS_OFFSET) */ +
Looks like the CONFIG_MEMORY_START was a configurable option, tho not sure if it can be configured to other values, but making it fixed here doesn't seem to be a consistent change. (meaning there is assumption here).
Quoted 12 lines
?#define
MEM_SIZE? ? ?UL(CONFIG_MEMORY_SIZE)?/* DMA memory at
0xf6000000-0xffdfffff*/
--
1.7.1_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
RFC PATCH 2/7 ARM: shmobile: remove unneeded hack to calculate zreladdr
Hello Eric,
Quoted 76 lines · Eric Miao
2010/9/3 Uwe Kleine-K?nig <[email protected]>:
Quoted 75 lines
The calculated value in Makefile.boot isn't used anymore since
? ? ? ?e69edc79 (ARM: Auto calculate ZRELADDR and provide option for exceptions)
and physoffset can better be set in
mach/memory.hdepending on the actual machine type.Cc Paul Mundt <[email protected]>Cc Magnus Damm <[email protected]>Cc linux-sh at vger.kernel.orgSigned-off-by Uwe Kleine-K?nig <[email protected]>---
?arch/arm/mach-shmobile/Kconfig ? ? ? ? ? ? ? | ? 11 ----------- ?arch/arm/mach-shmobile/Makefile.boot ? ? ? ? | ? ?9 --------- ?arch/arm/mach-shmobile/include/mach/memory.h | ? 15 ++++++++++++++-?3 files changed, 14 insertions(+), 21 deletions(-) ?delete mode 100644
arch/arm/mach-shmobile/Makefile.bootarch/arm/mach-shmobile/Kconfig +0
-0@@ -61,17 +61,6 @@ comment "SH-Mobile System Configuration"?menu "Memory configuration"
arch/arm/mach-shmobile/Kconfig +0
-11-config MEMORY_START - ? ? ? hex "Physical memory start address" - ? ? ? default "0x50000000" if MACH_G3EVM - ? ? ? default "0x40000000" if MACH_G4EVM - ? ? ? default "0x40000000" if MACH_AP4EVB - ? ? ? default "0x00000000" - ? ? ? ---help--- - ? ? ? ? Tweak this only when porting to a new machine which does not - ? ? ? ? already have a defconfig. Changing it from the known correct - ? ? ? ? value on any of the known systems will only lead to disaster. -?config
MEMORY_SIZE
? ? ? ?hex "Physical memory size"
? ? ? ?default "0x08000000" ifMACH_G3EVMarch/arm/mach-shmobile/Makefile.boot deleted +0
-9@@ -1,9 +0,0 @@ -__ZRELADDR ? ? := $(shell /bin/bash -c 'printf "0x%08x" \ - ? ? ? ? ? ? ? ? ? ?$$[$(CONFIG_MEMORY_START) + 0x8000]') - - ? zreladdr-y ? := $(__ZRELADDR) - -# Unsupported legacy stuff -# -#params_phys-y (Instead: Pass atags pointer in r2) -#initrd_phys-y (Instead: Use compiled-in initramfs)arch/arm/mach-shmobile/include/mach/memory.h +0
-0@@ -1,7 +1,20 @@?#ifndef
__ASM_MACH_MEMORY_H
?#define__ASM_MACH_MEMORY_Harch/arm/mach-shmobile/include/mach/memory.h +11
-1-#define PHYS_OFFSET ? ?UL(CONFIG_MEMORY_START) +#define SH7367_PHYS_OFFSET UL(0x50000000) +#define SH7372_PHYS_OFFSET UL(0x40000000) +#define SH7377_PHYS_OFFSET UL(0x40000000) + +#if !defined(CONFIG_RUNTIME_PHYS_OFFSET ) +# if defined(CONFIG_ARCH_SH7367 ) +# ?define PHYS_OFFSET ?SH7367_PHYS_OFFSET +# elif defined(CONFIG_ARCH_SH7372 ) +# ?define PHYS_OFFSET ?SH7372_PHYS_OFFSET +# elif defined(CONFIG_ARCH_SH7377 ) +# ?define PHYS_OFFSET ?SH7377_PHYS_OFFSET
Quoted 8 lines
arch/arm/mach-shmobile/include/mach/memory.h line 17
Quoted 3 lines
arch/arm/mach-shmobile/include/mach/memory.h +3
-0+# endif +#endif /* if !defined(CONFIG_RUNTIME_PHYS_OFFSET) */ +Looks like the
CONFIG_MEMORY_STARTwas a configurable option, tho not sure if it can be configured to other values, but making it fixed here doesn't seem to be a consistent change. (meaning there is assumption here).
That is why I put RFC in the subject :-) Anyhow, ZRELADDR is hard coded since e69edc79 (without ZRELADDR_AUTO). And the help text suggested to only tweak it "when porting to a new machine which does not already have a defconfig". As a person making a new port should be able to add a new default for ZRELADDR to arch/arm/Kconfig I think it's OK to remove the possibility to create a broken kernel for the people that don't work on a new port.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
RFC PATCH 2/7 ARM: shmobile: remove unneeded hack to calculate zreladdr
In reply to Uwe Kleine-KönigQuoted 11 lines · Uwe Kleine-K??nig
arch/arm/mach-shmobile/Kconfig +0
-11-config MEMORY_START - hex "Physical memory start address" - default "0x50000000" if MACH_G3EVM - default "0x40000000" if MACH_G4EVM - default "0x40000000" if MACH_AP4EVB - default "0x00000000" - ---help--- - Tweak this only when porting to a new machine which does not - already have a defconfig. Changing it from the known correct - value on any of the known systems will only lead to disaster. -
[snip]
Quoted 5 lines
arch/arm/mach-shmobile/include/mach/memory.h +4
-1-#define PHYS_OFFSET UL(CONFIG_MEMORY_START) +#define SH7367_PHYS_OFFSET UL(0x50000000) +#define SH7372_PHYS_OFFSET UL(0x40000000) +#define SH7377_PHYS_OFFSET UL(0x40000000) +
arch/arm/mach-shmobile/include/mach/memory.h line 17
Quoted 10 lines
arch/arm/mach-shmobile/include/mach/memory.h +10
-0+#if !defined(CONFIG_RUNTIME_PHYS_OFFSET ) +# if defined(CONFIG_ARCH_SH7367 ) +# define PHYS_OFFSET SH7367_PHYS_OFFSET +# elif defined(CONFIG_ARCH_SH7372 ) +# define PHYS_OFFSET SH7372_PHYS_OFFSET +# elif defined(CONFIG_ARCH_SH7377 ) +# define PHYS_OFFSET SH7377_PHYS_OFFSET +# endif +#endif /* if !defined(CONFIG_RUNTIME_PHYS_OFFSET) */ +
You've taken a board-specific property and made it CPU-specific. There is nothing about these CPUs that mandates memory starting here, it just happens that for the moment we have 1 board per CPU, but that's not an assumption we can really bank on.
RFC PATCH 2/7 ARM: shmobile: remove unneeded hack to calculate zreladdr
Hello Paul,
Quoted 27 lines · Paul Mundt
Quoted 11 lines · Uwe Kleine-K??nig
arch/arm/mach-shmobile/Kconfig +0
-11-config MEMORY_START - hex "Physical memory start address" - default "0x50000000" if MACH_G3EVM - default "0x40000000" if MACH_G4EVM - default "0x40000000" if MACH_AP4EVB - default "0x00000000" - ---help--- - Tweak this only when porting to a new machine which does not - already have a defconfig. Changing it from the known correct - value on any of the known systems will only lead to disaster. -[snip]
Quoted 12 lines
arch/arm/mach-shmobile/include/mach/memory.h +11
-1-#define PHYS_OFFSET UL(CONFIG_MEMORY_START) +#define SH7367_PHYS_OFFSET UL(0x50000000) +#define SH7372_PHYS_OFFSET UL(0x40000000) +#define SH7377_PHYS_OFFSET UL(0x40000000) + +#if !defined(CONFIG_RUNTIME_PHYS_OFFSET ) +# if defined(CONFIG_ARCH_SH7367 ) +# define PHYS_OFFSET SH7367_PHYS_OFFSET +# elif defined(CONFIG_ARCH_SH7372 ) +# define PHYS_OFFSET SH7372_PHYS_OFFSET +# elif defined(CONFIG_ARCH_SH7377 ) +# define PHYS_OFFSET SH7377_PHYS_OFFSET
Quoted 8 lines
arch/arm/mach-shmobile/include/mach/memory.h line 17
Quoted 3 lines
arch/arm/mach-shmobile/include/mach/memory.h +3
-0+# endif +#endif /* if !defined(CONFIG_RUNTIME_PHYS_OFFSET) */ +You've taken a board-specific property and made it CPU-specific. There is nothing about these CPUs that mandates memory starting here, it just happens that for the moment we have 1 board per CPU, but that's not an assumption we can really bank on.
I choosed to do so as CONFIG_ZRELADDR (which is now reverted) used the ARCH_... symbols, too, to select the needed values. And that's my I marked the patch as RFC. So would you consider this patch acceptible if I respin it using the MACH_... symbols?
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 3/7 ARM: specify ZRELADDR for ARCH_H720X
In reply to Uwe Kleine-KönigThis was missed in commit
e69edc79 (ARM: Auto calculate ZRELADDR and provide option for exceptions)
--- arch/arm/Kconfig | 4 +++- arch/arm/mach-h720x/Makefile.boot | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 arch/arm/mach-h720x/Makefile.boot
arch/arm/Kconfig +3 -1
@@ -1620,7 +1620,9 @@ config ZRELADDR ARCH_S3C2416 ||\ ARCH_S3C2440 ||\ ARCH_S3C2443 - default 0x40008000 if ARCH_STMP378X ||\ + default 0x40008000 if \ + ARCH_H720X ||\ + ARCH_STMP378X ||\ ARCH_STMP37XX ||\ ARCH_SH7372 ||\ ARCH_SH7377 ||\
arch/arm/mach-h720x/Makefile.boot deleted +0 -2
@@ -1,2 +0,0 @@ - zreladdr-$(CONFIG_ARCH_H720X) := 0x40008000 -
Signature · 1 line
1.7.1
PATCH 3/7 ARM: specify ZRELADDR for ARCH_H720X
2010/9/3 Uwe Kleine-K?nig <[email protected]>:
Quoted 5 lines
This was missed in commit
? ? ? ?e69edc79 (ARM: Auto calculate ZRELADDR and provide option for exceptions)
Signed-off-by Uwe Kleine-K?nig <[email protected]>
This is straight-forward. Ack.
Quoted 38 lines
---
?arch/arm/Kconfig ? ? ? ? ? ? ? ? ?| ? ?4 +++- ?arch/arm/mach-h720x/Makefile.boot | ? ?2 -- ?2 files changed, 3 insertions(+), 3 deletions(-) ?delete mode 100644arch/arm/mach-h720x/Makefile.bootarch/arm/Kconfig +0
-0@@ -1620,7 +1620,9 @@ config ZRELADDR ? ? ? ? ? ? ? ?ARCH_S3C2416 ||\ ? ? ? ? ? ? ? ?ARCH_S3C2440 ||\? ? ? ? ? ? ? ?ARCH_S3C2443
- ? ? ? default0x40008000ifARCH_STMP378X||\
+ ? ? ? default0x40008000if \
+ ? ? ? ? ? ? ?ARCH_H720X||\
+ ? ? ? ? ? ? ?ARCH_STMP378X||\
? ? ? ? ? ? ? ?ARCH_STMP37XX ||\? ? ? ? ? ? ? ?ARCH_SH7372 ||\ ? ? ? ? ? ? ? ?ARCH_SH7377 ||\arch/arm/mach-h720x/Makefile.boot deleted +0
-3@@ -1,2 +0,0 @@ - ? zreladdr-$(CONFIG_ARCH_H720X) ? ? ? := 0x40008000 - --1.7.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 4/7 ARM: specify ZRELADDR for ARCH_LPC32XX
In reply to Uwe Kleine-KönigThis was missed in commit
e69edc79 (ARM: Auto calculate ZRELADDR and provide option for exceptions)
--- arch/arm/Kconfig | 4 +++- arch/arm/mach-lpc32xx/Makefile.boot | 1 - 2 files changed, 3 insertions(+), 2 deletions(-)
arch/arm/Kconfig +3 -1
@@ -1630,7 +1630,9 @@ config ZRELADDR default 0x50008000 if ARCH_S3C64XX ||\ ARCH_SH7367 default 0x60008000 if ARCH_VEXPRESS - default 0x80008000 if ARCH_MX25 ||\ + default 0x80008000 if \ + ARCH_LPC32XX ||\ + ARCH_MX25 ||\ ARCH_MX3 ||\ ARCH_NETX ||\ ARCH_OMAP2PLUS ||\
arch/arm/mach-lpc32xx/Makefile.boot +0 -1
@@ -1,4 +1,3 @@ - zreladdr-y := 0x80008000 params_phys-y := 0x80000100 initrd_phys-y := 0x82000000
Signature · 1 line
1.7.1
PATCH 4/7 ARM: specify ZRELADDR for ARCH_LPC32XX
2010/9/3 Uwe Kleine-K?nig <[email protected]>:
Quoted 6 lines
This was missed in commit
? ? ? ?e69edc79 (ARM: Auto calculate ZRELADDR and provide option for exceptions)
Cc Kevin Wells <[email protected]>Signed-off-by Uwe Kleine-K?nig <[email protected]>
Looks straight-forward. Ack.
Quoted 38 lines
---
?arch/arm/Kconfig ? ? ? ? ? ? ? ? ? ?| ? ?4 +++-
?arch/arm/mach-lpc32xx/Makefile.boot | ? ?1 -
?2 files changed, 3 insertions(+), 2 deletions(-)arch/arm/Kconfig +0
-0@@ -1630,7 +1630,9 @@ config ZRELADDR ? ? ? ?default 0x50008000 if ARCH_S3C64XX ||\? ? ? ? ? ? ? ?ARCH_SH7367
? ? ? ?default0x60008000ifARCH_VEXPRESS
- ? ? ? default0x80008000ifARCH_MX25||\
+ ? ? ? default0x80008000if \
+ ? ? ? ? ? ? ?ARCH_LPC32XX||\
+ ? ? ? ? ? ? ?ARCH_MX25||\
? ? ? ? ? ? ? ?ARCH_MX3 ||\
? ? ? ? ? ? ? ?ARCH_NETX ||\
? ? ? ? ? ? ? ?ARCH_OMAP2PLUS ||\arch/arm/mach-lpc32xx/Makefile.boot +0
-1@@ -1,4 +1,3 @@ - ? zreladdr-y ?:= 0x80008000?params_phys-y ?:=
0x80000100
?initrd_phys-y ?:=0x82000000--
1.7.1_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 5/7 ARM: don't expose CONFIG_ZRELADDR to the users
In reply to Uwe Kleine-KönigThis value is essential for booting a zImage and only depends on the memory layout of the machine to boot. This value was specified in Makefile.boot before
e69edc79 (ARM: Auto calculate ZRELADDR and provide option for exceptions)
and so wasn't available to change via .config.
The only exception is bcmring that had a extra config for specifing the address used, which is removed in this commit, too, as it isn't used anymore since e69edc79. This is the only machine that still gets a possibility to change CONFIG_ZRELADDR.
--- arch/arm/Kconfig | 2 +- arch/arm/configs/bcmring_defconfig | 1 - arch/arm/mach-bcmring/Kconfig | 3 --- arch/arm/mach-bcmring/Makefile.boot | 1 - 4 files changed, 1 insertions(+), 6 deletions(-)
arch/arm/Kconfig +1 -1
@@ -1577,7 +1577,7 @@ config AUTO_ZRELADDR from start of memory. config ZRELADDR - hex "Physical address of the decompressed kernel image" + hex "Physical address of the decompressed kernel image" if ARCH_BCMRING depends on !AUTO_ZRELADDR default 0x00008000 if ARCH_BCMRING ||\ ARCH_CNS3XXX ||\
arch/arm/configs/bcmring_defconfig +0 -1
@@ -21,7 +21,6 @@ CONFIG_MODULE_UNLOAD=y # CONFIG_IOSCHED_DEADLINE is not set # CONFIG_IOSCHED_CFQ is not set CONFIG_ARCH_BCMRING=y -CONFIG_BCM_ZRELADDR=0x8000 CONFIG_CPU_32v6K=y CONFIG_NO_HZ=y CONFIG_PREEMPT=y
arch/arm/mach-bcmring/Kconfig +0 -3
@@ -13,9 +13,6 @@ endchoice menu "BCMRING Options" depends on ARCH_BCMRING -config BCM_ZRELADDR - hex "Compressed ZREL ADDR" - endmenu # source "drivers/char/bcmring/Kconfig"
arch/arm/mach-bcmring/Makefile.boot +0 -1
@@ -1,6 +1,5 @@ # Address where decompressor will be written and eventually executed. # # default to SDRAM -zreladdr-y := $(CONFIG_BCM_ZRELADDR) params_phys-y := 0x00000800
Signature · 1 line
1.7.1
PATCH 5/7 ARM: don't expose CONFIG_ZRELADDR to the users
2010/9/3 Uwe Kleine-K?nig <[email protected]>
Quoted 5 lines
This value is essential for booting a zImage and only depends on the memory layout of the machine to boot. ?This value was specified in Makefile.boot before
Quoted 8 lines
? ? ? ?e69edc79 (ARM: Auto calculate ZRELADDR and provide option for exceptions)
and so wasn't available to change via .config.
The only exception is bcmring that had a extra config for specifing the address used, which is removed in this commit, too, as it isn't used anymore since
e69edc79. ?This is the only machine that still gets a possibility to changeCONFIG_ZRELADDR.
This looks correct to me.
Quoted 72 lines
Cc Russell King <[email protected]>Cc Nicolas Pitre <[email protected]>Cc Eric Miao <[email protected]>Cc Leo Chen <[email protected]>Cc Scott Branden <[email protected]>Signed-off-by Uwe Kleine-K?nig <[email protected]>---
?arch/arm/Kconfig ? ? ? ? ? ? ? ? ? ?| ? ?2 +- ?arch/arm/configs/bcmring_defconfig ?| ? ?1 - ?arch/arm/mach-bcmring/Kconfig ? ? ? | ? ?3 --- ?arch/arm/mach-bcmring/Makefile.boot | ? ?1 -?4 files changed, 1 insertions(+), 6 deletions(-)
arch/arm/Kconfig +0
-0@@ -1577,7 +1577,7 @@ config AUTO_ZRELADDR? ? ? ? ?from start of memory.
?config ZRELADDR
- ? ? ? hex "Physical address of the decompressed kernel image"
+ ? ? ? hex "Physical address of the decompressed kernel image" ifARCH_BCMRING? ? ? ?depends on !AUTO_ZRELADDR
? ? ? ?default0x00008000ifARCH_BCMRING||\
? ? ? ? ? ? ? ?ARCH_CNS3XXX ||\arch/arm/configs/bcmring_defconfig +0
-0@@ -21,7 +21,6 @@ CONFIG_MODULE_UNLOAD=y?#
CONFIG_IOSCHED_DEADLINEis not set
?#CONFIG_IOSCHED_CFQis not set
?CONFIG_ARCH_BCMRING=y
-CONFIG_BCM_ZRELADDR=0x8000
?CONFIG_CPU_32v6K=y
?CONFIG_NO_HZ=y
?CONFIG_PREEMPT=yarch/arm/mach-bcmring/Kconfig +0
-0@@ -13,9 +13,6 @@ endchoice?menu "BCMRING Options"
? ? ? ?depends onARCH_BCMRINGarch/arm/mach-bcmring/Kconfig +0
-3-config BCM_ZRELADDR - ? ? ? hex "Compressed ZREL ADDR" -?endmenu
?# source "
drivers/char/bcmring/Kconfig"arch/arm/mach-bcmring/Makefile.boot +0
-0@@ -1,6 +1,5 @@?# Address where decompressor will be written and eventually executed. ?#
?# default to SDRAM
-zreladdr-y ? ? ?:= $(CONFIG_BCM_ZRELADDR)
?params_phys-y ? :=0x00000800--
1.7.1_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 5/7 ARM: don't expose CONFIG_ZRELADDR to the users
Quoted 8 lines · Eric Miao
2010/9/3 Uwe Kleine-K?nig <[email protected]>
Quoted 7 lines
This value is essential for booting a zImage and only depends on the memory layout of the machine to boot. ?This value was specified in Makefile.boot before
? ? ? ?e69edc79 (ARM: Auto calculate ZRELADDR and provide option for exceptions)
Quoted 8 lines
Quoted 6 lines
and so wasn't available to change via .config.
The only exception is bcmring that had a extra config for specifing the address used, which is removed in this commit, too, as it isn't used anymore since
e69edc79. ?This is the only machine that still gets a possibility to changeCONFIG_ZRELADDR.This looks correct to me.
That's an Ack?
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 5/7 ARM: don't expose CONFIG_ZRELADDR to the users
2010/9/4 Uwe Kleine-K?nig <[email protected]>:
Quoted 11 lines · Eric Miao
Quoted 10 lines
2010/9/3 Uwe Kleine-K?nig <[email protected]>
Quoted 9 lines
This value is essential for booting a zImage and only depends on the memory layout of the machine to boot. ?This value was specified in Makefile.boot before
? ? ? ?e69edc79 (ARM: Auto calculate ZRELADDR and provide option for exceptions)
and so wasn't available to change via .config.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
The only exception is bcmring that had a extra config for specifing the address used, which is removed in this commit, too, as it isn't used anymore since
e69edc79. ?This is the only machine that still gets a possibility to changeCONFIG_ZRELADDR.This looks correct to me.
That's an Ack?
Ack.
PATCH 5/7 ARM: don't expose CONFIG_ZRELADDR to the users
Quoted 17 lines
2010/9/4 Uwe Kleine-K?nig <[email protected]>:
Quoted 16 lines · Eric Miao
Quoted 15 lines
2010/9/3 Uwe Kleine-K?nig <[email protected]>
Quoted 13 lines
This value is essential for booting a zImage and only depends on the memory layout of the machine to boot. ?This value was specified in Makefile.boot before
? ? ? ?e69edc79 (ARM: Auto calculate ZRELADDR and provide option for exceptions)
and so wasn't available to change via .config.
The only exception is bcmring that had a extra config for specifing the address used, which is removed in this commit, too, as it isn't used anymore since
e69edc79. ?This is the only machine that still gets a possibility to changeCONFIG_ZRELADDR.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
This looks correct to me.
That's an Ack?
Ack.
I think it should be:
arch/arm/mach-bcmring/Makefile.boot +1 -1
@@ -1,6 +1,5 @@ # Address where decompressor will be written and eventually executed. # # default to SDRAM -zreladdr-y := $(CONFIG_BCM_ZRELADDR) +zreladdr-y := $(CONFIG_ZRELADDR) params_phys-y := 0x00000800
instead of
arch/arm/mach-bcmring/Makefile.boot +0 -1
@@ -1,6 +1,5 @@ # Address where decompressor will be written and eventually executed. # # default to SDRAM -zreladdr-y := $(CONFIG_BCM_ZRELADDR) params_phys-y := 0x00000800
-Mathieu
PATCH 5/7 ARM: don't expose CONFIG_ZRELADDR to the users
Hello Mathieu,
Quoted 30 lines · Mathieu Rondonneau
Quoted 17 lines
2010/9/4 Uwe Kleine-K?nig <[email protected]>:
Quoted 16 lines · Eric Miao
Quoted 15 lines
2010/9/3 Uwe Kleine-K?nig <[email protected]>
Quoted 13 lines
This value is essential for booting a zImage and only depends on the memory layout of the machine to boot. ?This value was specified in Makefile.boot before
? ? ? ?e69edc79 (ARM: Auto calculate ZRELADDR and provide option for exceptions)
and so wasn't available to change via .config.
The only exception is bcmring that had a extra config for specifing the address used, which is removed in this commit, too, as it isn't used anymore since
e69edc79. ?This is the only machine that still gets a possibility to changeCONFIG_ZRELADDR.Quoted 6 lines
Quoted 3 lines
Quoted 1 line
This looks correct to me.
That's an Ack?
Ack.
I think it should be:
arch/arm/mach-bcmring/Makefile.boot line 5
Quoted 6 lines
arch/arm/mach-bcmring/Makefile.boot +1
-1@@ -1,6 +1,5 @@ # Address where decompressor will be written and eventually executed. # # default to SDRAM -zreladdr-y := $(CONFIG_BCM_ZRELADDR) +zreladdr-y := $(CONFIG_ZRELADDR) params_phys-y := 0x00000800
No, the variable zreladdr-y isn't used anymore, see path 7/7.
Quoted 7 lines
instead of
arch/arm/mach-bcmring/Makefile.boot
Quoted 8 lines
arch/arm/mach-bcmring/Makefile.boot +0
-2@@ -1,6 +1,5 @@ # Address where decompressor will be written and eventually executed. # # default to SDRAM -zreladdr-y := $(CONFIG_BCM_ZRELADDR) params_phys-y := 0x00000800 -Mathieu
There is no "Mathieu" in arch/arm/mach-bcmring/Makefile.boot to remove :-)
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 6/7 ARM: fix ordering of defaults for config ZRELADDR
In reply to Uwe Kleine-König--- arch/arm/Kconfig | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/Kconfig +2 -2
@@ -1596,8 +1596,8 @@ config ZRELADDR ARCH_MMP ||\ ARCH_MV78XX0 ||\ ARCH_NOMADIK ||\ - ARCH_NUC93X ||\ ARCH_NS9XXX ||\ + ARCH_NUC93X ||\ ARCH_ORION5X ||\ ARCH_SPEAR3XX ||\ ARCH_SPEAR6XX ||\
@@ -1660,9 +1660,9 @@ config ZRELADDR default 0x10008000 if ARCH_GEMINI && !GEMINI_MEM_SWAP default 0x70008000 if ARCH_REALVIEW && REALVIEW_HIGH_PHYS_OFFSET default 0x00008000 if ARCH_REALVIEW && !REALVIEW_HIGH_PHYS_OFFSET + default 0x30108000 if ARCH_S3C2410 && PM_H1940 default 0xc0208000 if ARCH_SA1100 && SA1111 default 0xc0008000 if ARCH_SA1100 && !SA1111 - default 0x30108000 if ARCH_S3C2410 && PM_H1940 default 0x28E08000 if ARCH_U300 && MACH_U300_SINGLE_RAM default 0x48008000 if ARCH_U300 && !MACH_U300_SINGLE_RAM help
Signature · 1 line
1.7.1
PATCH 7/7 ARM: removed unused zreladdr specifications in all Makefile.boot files
In reply to Uwe Kleine-König--- arch/arm/mach-aaec2000/Makefile.boot | 1 - arch/arm/mach-at91/Makefile.boot | 3 --- arch/arm/mach-clps711x/Makefile.boot | 1 - arch/arm/mach-cns3xxx/Makefile.boot | 1 - arch/arm/mach-davinci/Makefile.boot | 2 -- arch/arm/mach-dove/Makefile.boot | 1 - arch/arm/mach-ebsa110/Makefile.boot | 1 - arch/arm/mach-ep93xx/Makefile.boot | 5 ----- arch/arm/mach-footbridge/Makefile.boot | 1 - arch/arm/mach-gemini/Makefile.boot | 2 -- arch/arm/mach-imx/Makefile.boot | 3 --- arch/arm/mach-integrator/Makefile.boot | 1 - arch/arm/mach-iop13xx/Makefile.boot | 1 - arch/arm/mach-iop32x/Makefile.boot | 1 - arch/arm/mach-iop33x/Makefile.boot | 1 - arch/arm/mach-ixp2000/Makefile.boot | 1 - arch/arm/mach-ixp23xx/Makefile.boot | 1 - arch/arm/mach-ixp4xx/Makefile.boot | 1 - arch/arm/mach-kirkwood/Makefile.boot | 1 - arch/arm/mach-ks8695/Makefile.boot | 1 - arch/arm/mach-lh7a40x/Makefile.boot | 1 - arch/arm/mach-loki/Makefile.boot | 1 - arch/arm/mach-mmp/Makefile.boot | 1 - arch/arm/mach-msm/Makefile.boot | 1 - arch/arm/mach-mv78xx0/Makefile.boot | 1 - arch/arm/mach-mx25/Makefile.boot | 1 - arch/arm/mach-mx3/Makefile.boot | 1 - arch/arm/mach-mx5/Makefile.boot | 1 - arch/arm/mach-mxc91231/Makefile.boot | 1 - arch/arm/mach-netx/Makefile.boot | 1 - arch/arm/mach-nomadik/Makefile.boot | 1 - arch/arm/mach-ns9xxx/Makefile.boot | 1 - arch/arm/mach-nuc93x/Makefile.boot | 1 - arch/arm/mach-omap1/Makefile.boot | 1 - arch/arm/mach-omap2/Makefile.boot | 1 - arch/arm/mach-orion5x/Makefile.boot | 1 - arch/arm/mach-pnx4008/Makefile.boot | 1 - arch/arm/mach-pxa/Makefile.boot | 1 - arch/arm/mach-realview/Makefile.boot | 2 -- arch/arm/mach-rpc/Makefile.boot | 1 - arch/arm/mach-s3c2410/Makefile.boot | 2 -- arch/arm/mach-s3c64xx/Makefile.boot | 1 - arch/arm/mach-s5p6440/Makefile.boot | 1 - arch/arm/mach-s5p6442/Makefile.boot | 1 - arch/arm/mach-s5pc100/Makefile.boot | 1 - arch/arm/mach-s5pv210/Makefile.boot | 1 - arch/arm/mach-s5pv310/Makefile.boot | 1 - arch/arm/mach-sa1100/Makefile.boot | 2 -- arch/arm/mach-shark/Makefile.boot | 2 -- arch/arm/mach-spear3xx/Makefile.boot | 1 - arch/arm/mach-spear6xx/Makefile.boot | 1 - arch/arm/mach-stmp378x/Makefile.boot | 1 - arch/arm/mach-stmp37xx/Makefile.boot | 1 - arch/arm/mach-u300/Makefile.boot | 2 -- arch/arm/mach-ux500/Makefile.boot | 1 - arch/arm/mach-versatile/Makefile.boot | 1 - arch/arm/mach-vexpress/Makefile.boot | 1 - arch/arm/mach-w90x900/Makefile.boot | 1 - 58 files changed, 0 insertions(+), 73 deletions(-) delete mode 100644 arch/arm/mach-shark/Makefile.boot
arch/arm/mach-aaec2000/Makefile.boot +0 -1
@@ -1 +0,0 @@ - zreladdr-y := 0xf0008000
arch/arm/mach-at91/Makefile.boot +0 -3
@@ -4,15 +4,12 @@ # INITRD_PHYS must be in RAM ifeq ($(CONFIG_ARCH_AT91CAP9),y) - zreladdr-y := 0x70008000 params_phys-y := 0x70000100 initrd_phys-y := 0x70410000 else ifeq ($(CONFIG_ARCH_AT91SAM9G45),y) - zreladdr-y := 0x70008000 params_phys-y := 0x70000100 initrd_phys-y := 0x70410000 else - zreladdr-y := 0x20008000 params_phys-y := 0x20000100 initrd_phys-y := 0x20410000 endif
arch/arm/mach-clps711x/Makefile.boot +0 -1
@@ -1,5 +1,4 @@ # The standard locations for stuff on CLPS711x type processors - zreladdr-y := 0xc0028000 params_phys-y := 0xc0000100 # Should probably have some agreement on these... initrd_phys-$(CONFIG_ARCH_P720T) := 0xc0400000
arch/arm/mach-cns3xxx/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00C00000
arch/arm/mach-davinci/Makefile.boot +0 -2
@@ -2,12 +2,10 @@ ifeq ($(CONFIG_ARCH_DAVINCI_DA8XX),y) ifeq ($(CONFIG_ARCH_DAVINCI_DMx),y) $(error Cannot enable DaVinci and DA8XX platforms concurrently) else - zreladdr-y := 0xc0008000 params_phys-y := 0xc0000100 initrd_phys-y := 0xc0800000 endif else - zreladdr-y := 0x80008000 params_phys-y := 0x80000100 initrd_phys-y := 0x80800000 endif
arch/arm/mach-dove/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-ebsa110/Makefile.boot +0 -1
@@ -1,4 +1,3 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000400 initrd_phys-y := 0x00800000
arch/arm/mach-ep93xx/Makefile.boot +0 -5
@@ -1,14 +1,9 @@ - zreladdr-$(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) := 0x00008000 params_phys-$(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) := 0x00000100 - zreladdr-$(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) := 0xc0008000 params_phys-$(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) := 0xc0000100 - zreladdr-$(CONFIG_EP93XX_SDCE1_PHYS_OFFSET) := 0xd0008000 params_phys-$(CONFIG_EP93XX_SDCE1_PHYS_OFFSET) := 0xd0000100 - zreladdr-$(CONFIG_EP93XX_SDCE2_PHYS_OFFSET) := 0xe0008000 params_phys-$(CONFIG_EP93XX_SDCE2_PHYS_OFFSET) := 0xe0000100 - zreladdr-$(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET) := 0xf0008000 params_phys-$(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET) := 0xf0000100
arch/arm/mach-footbridge/Makefile.boot +0 -1
@@ -1,4 +1,3 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-gemini/Makefile.boot +0 -2
@@ -1,9 +1,7 @@ ifeq ($(CONFIG_GEMINI_MEM_SWAP),y) - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000 else - zreladdr-y := 0x10008000 params_phys-y := 0x10000100 initrd_phys-y := 0x10800000 endif
arch/arm/mach-imx/Makefile.boot +0 -3
@@ -1,11 +1,8 @@ -zreladdr-$(CONFIG_ARCH_MX1) := 0x08008000 params_phys-$(CONFIG_ARCH_MX1) := 0x08000100 initrd_phys-$(CONFIG_ARCH_MX1) := 0x08800000 -zreladdr-$(CONFIG_MACH_MX21) := 0xC0008000 params_phys-$(CONFIG_MACH_MX21) := 0xC0000100 initrd_phys-$(CONFIG_MACH_MX21) := 0xC0800000 -zreladdr-$(CONFIG_MACH_MX27) := 0xA0008000 params_phys-$(CONFIG_MACH_MX27) := 0xA0000100 initrd_phys-$(CONFIG_MACH_MX27) := 0xA0800000
arch/arm/mach-integrator/Makefile.boot +0 -1
@@ -1,4 +1,3 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-iop13xx/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-iop32x/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0xa0008000 params_phys-y := 0xa0000100 initrd_phys-y := 0xa0800000
arch/arm/mach-iop33x/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-ixp2000/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100
arch/arm/mach-ixp23xx/Makefile.boot +0 -1
@@ -1,2 +1 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100
arch/arm/mach-ixp4xx/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100
arch/arm/mach-kirkwood/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-ks8695/Makefile.boot +0 -1
@@ -3,6 +3,5 @@ # PARAMS_PHYS must be within 4MB of ZRELADDR # INITRD_PHYS must be in RAM - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-lh7a40x/Makefile.boot +0 -1
@@ -1,4 +1,3 @@ - zreladdr-y := 0xc0008000 params_phys-y := 0xc0000100 initrd_phys-y := 0xc4000000
arch/arm/mach-loki/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-mmp/Makefile.boot +0 -1
@@ -1 +0,0 @@ - zreladdr-y := 0x00008000
arch/arm/mach-msm/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x10008000 params_phys-y := 0x10000100 initrd_phys-y := 0x10800000
arch/arm/mach-mv78xx0/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-mx25/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x80008000 params_phys-y := 0x80000100 initrd_phys-y := 0x80800000
arch/arm/mach-mx3/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x80008000 params_phys-y := 0x80000100 initrd_phys-y := 0x80800000
arch/arm/mach-mx5/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x90008000 params_phys-y := 0x90000100 initrd_phys-y := 0x90800000
arch/arm/mach-mxc91231/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x90008000 params_phys-y := 0x90000100 initrd_phys-y := 0x90800000
arch/arm/mach-netx/Makefile.boot +0 -1
@@ -1,2 +1 @@ - zreladdr-y := 0x80008000
arch/arm/mach-nomadik/Makefile.boot +0 -1
@@ -1,4 +1,3 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-ns9xxx/Makefile.boot +0 -1
@@ -1,2 +1 @@ -zreladdr-y := 0x8000 params_phys-y := 0x100
arch/arm/mach-nuc93x/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ -zreladdr-y := 0x00008000 params_phys-y := 0x00000100
arch/arm/mach-omap1/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x10008000 params_phys-y := 0x10000100 initrd_phys-y := 0x10800000
arch/arm/mach-omap2/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x80008000 params_phys-y := 0x80000100 initrd_phys-y := 0x80800000
arch/arm/mach-orion5x/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-pnx4008/Makefile.boot +0 -1
@@ -1,4 +1,3 @@ - zreladdr-y := 0x80008000 params_phys-y := 0x80000100 initrd_phys-y := 0x80800000
arch/arm/mach-pxa/Makefile.boot +0 -1
@@ -1,2 +1 @@ - zreladdr-y := 0xa0008000
arch/arm/mach-realview/Makefile.boot +0 -2
@@ -1,9 +1,7 @@ ifeq ($(CONFIG_REALVIEW_HIGH_PHYS_OFFSET),y) - zreladdr-y := 0x70008000 params_phys-y := 0x70000100 initrd_phys-y := 0x70800000 else - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000 endif
arch/arm/mach-rpc/Makefile.boot +0 -1
@@ -1,4 +1,3 @@ - zreladdr-y := 0x10008000 params_phys-y := 0x10000100 initrd_phys-y := 0x18000000
arch/arm/mach-s3c2410/Makefile.boot +0 -2
@@ -1,7 +1,5 @@ ifeq ($(CONFIG_PM_H1940),y) - zreladdr-y := 0x30108000 params_phys-y := 0x30100100 else - zreladdr-y := 0x30008000 params_phys-y := 0x30000100 endif
arch/arm/mach-s3c64xx/Makefile.boot +0 -1
@@ -1,2 +1 @@ - zreladdr-y := 0x50008000 params_phys-y := 0x50000100
arch/arm/mach-s5p6440/Makefile.boot +0 -1
@@ -1,2 +1 @@ - zreladdr-y := 0x20008000 params_phys-y := 0x20000100
arch/arm/mach-s5p6442/Makefile.boot +0 -1
@@ -1,2 +1 @@ - zreladdr-y := 0x20008000 params_phys-y := 0x20000100
arch/arm/mach-s5pc100/Makefile.boot +0 -1
@@ -1,2 +1 @@ - zreladdr-y := 0x20008000 params_phys-y := 0x20000100
arch/arm/mach-s5pv210/Makefile.boot +0 -1
@@ -1,2 +1 @@ - zreladdr-y := 0x20008000 params_phys-y := 0x20000100
arch/arm/mach-s5pv310/Makefile.boot +0 -1
@@ -1,2 +1 @@ - zreladdr-y := 0x40008000 params_phys-y := 0x40000100
arch/arm/mach-sa1100/Makefile.boot +0 -2
@@ -1,6 +1,4 @@ - zreladdr-y := 0xc0008000 ifeq ($(CONFIG_ARCH_SA1100),y) - zreladdr-$(CONFIG_SA1111) := 0xc0208000 endif params_phys-y := 0xc0000100 initrd_phys-y := 0xc0800000
arch/arm/mach-shark/Makefile.boot deleted +0 -2
@@ -1,2 +0,0 @@ - zreladdr-y := 0x08008000 -
arch/arm/mach-spear3xx/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ -zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-spear6xx/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ -zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-stmp378x/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x40008000 params_phys-y := 0x40000100 initrd_phys-y := 0x40800000
arch/arm/mach-stmp37xx/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x40008000 params_phys-y := 0x40000100 initrd_phys-y := 0x40800000
arch/arm/mach-u300/Makefile.boot +0 -2
@@ -4,10 +4,8 @@ # INITRD_PHYS must be in RAM ifdef CONFIG_MACH_U300_SINGLE_RAM - zreladdr-y := 0x28E08000 params_phys-y := 0x28E00100 else - zreladdr-y := 0x48008000 params_phys-y := 0x48000100 endif
arch/arm/mach-ux500/Makefile.boot +0 -1
@@ -1,4 +1,3 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-versatile/Makefile.boot +0 -1
@@ -1,4 +1,3 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-vexpress/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x60008000 params_phys-y := 0x60000100 initrd_phys-y := 0x60800000
arch/arm/mach-w90x900/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ -zreladdr-y := 0x00008000 params_phys-y := 0x00000100
Signature · 1 line
1.7.1
PATCH 7/7 ARM: removed unused zreladdr specifications in all Makefile.boot files
2010/9/3 Uwe Kleine-K?nig <[email protected]>:
Quoted 32 lines
Signed-off-by Uwe Kleine-K?nig <[email protected]>---
?arch/arm/mach-aaec2000/Makefile.boot ? | ? ?1 - ?arch/arm/mach-at91/Makefile.boot ? ? ? | ? ?3 --- ?arch/arm/mach-clps711x/Makefile.boot ? | ? ?1 - ?arch/arm/mach-cns3xxx/Makefile.boot ? ?| ? ?1 - ?arch/arm/mach-davinci/Makefile.boot ? ?| ? ?2 -- ?arch/arm/mach-dove/Makefile.boot ? ? ? | ? ?1 - ?arch/arm/mach-ebsa110/Makefile.boot ? ?| ? ?1 - ?arch/arm/mach-ep93xx/Makefile.boot ? ? | ? ?5 ----- ?arch/arm/mach-footbridge/Makefile.boot | ? ?1 - ?arch/arm/mach-gemini/Makefile.boot ? ? | ? ?2 -- ?arch/arm/mach-imx/Makefile.boot ? ? ? ?| ? ?3 --- ?arch/arm/mach-integrator/Makefile.boot | ? ?1 - ?arch/arm/mach-iop13xx/Makefile.boot ? ?| ? ?1 - ?arch/arm/mach-iop32x/Makefile.boot ? ? | ? ?1 - ?arch/arm/mach-iop33x/Makefile.boot ? ? | ? ?1 - ?arch/arm/mach-ixp2000/Makefile.boot ? ?| ? ?1 - ?arch/arm/mach-ixp23xx/Makefile.boot ? ?| ? ?1 - ?arch/arm/mach-ixp4xx/Makefile.boot ? ? | ? ?1 - ?arch/arm/mach-kirkwood/Makefile.boot ? | ? ?1 - ?arch/arm/mach-ks8695/Makefile.boot ? ? | ? ?1 - ?arch/arm/mach-lh7a40x/Makefile.boot ? ?| ? ?1 - ?arch/arm/mach-loki/Makefile.boot ? ? ? | ? ?1 - ?arch/arm/mach-mmp/Makefile.boot ? ? ? ?| ? ?1 - ?arch/arm/mach-msm/Makefile.boot ? ? ? ?| ? ?1 - ?arch/arm/mach-mv78xx0/Makefile.boot ? ?| ? ?1 - ?arch/arm/mach-mx25/Makefile.boot ? ? ? | ? ?1 - ?arch/arm/mach-mx3/Makefile.boot ? ? ? ?| ? ?1 - ?arch/arm/mach-mx5/Makefile.boot ? ? ? ?| ? ?1 - ?arch/arm/mach-mxc91231/Makefile.boot ? | ? ?1 - ?arch/arm/mach-netx/Makefile.boot ? ? ? | ? ?1 -
Quoted 8 lines
?arch/arm/mach-nomadik/Makefile.boot ? ?| ? ?1 - ?arch/arm/mach-ns9xxx/Makefile.boot ? ? | ? ?1 - ?arch/arm/mach-nuc93x/Makefile.boot ? ? | ? ?1 - ?arch/arm/mach-omap1/Makefile.boot ? ? ?| ? ?1 - ?arch/arm/mach-omap2/Makefile.boot ? ? ?| ? ?1 - ?arch/arm/mach-orion5x/Makefile.boot ? ?| ? ?1 - ?arch/arm/mach-pnx4008/Makefile.boot ? ?| ? ?1 - ?arch/arm/mach-pxa/Makefile.boot ? ? ? ?| ? ?1 -
I'd prefer some of the Makefile.boot be completely removed if they contain only the definition of zreladdr-y, e.g. mach-pxa/
Quoted 562 lines
?arch/arm/mach-realview/Makefile.boot ? | ? ?2 -- ?arch/arm/mach-rpc/Makefile.boot ? ? ? ?| ? ?1 - ?arch/arm/mach-s3c2410/Makefile.boot ? ?| ? ?2 -- ?arch/arm/mach-s3c64xx/Makefile.boot ? ?| ? ?1 - ?arch/arm/mach-s5p6440/Makefile.boot ? ?| ? ?1 - ?arch/arm/mach-s5p6442/Makefile.boot ? ?| ? ?1 - ?arch/arm/mach-s5pc100/Makefile.boot ? ?| ? ?1 - ?arch/arm/mach-s5pv210/Makefile.boot ? ?| ? ?1 - ?arch/arm/mach-s5pv310/Makefile.boot ? ?| ? ?1 - ?arch/arm/mach-sa1100/Makefile.boot ? ? | ? ?2 -- ?arch/arm/mach-shark/Makefile.boot ? ? ?| ? ?2 -- ?arch/arm/mach-spear3xx/Makefile.boot ? | ? ?1 - ?arch/arm/mach-spear6xx/Makefile.boot ? | ? ?1 - ?arch/arm/mach-stmp378x/Makefile.boot ? | ? ?1 - ?arch/arm/mach-stmp37xx/Makefile.boot ? | ? ?1 - ?arch/arm/mach-u300/Makefile.boot ? ? ? | ? ?2 -- ?arch/arm/mach-ux500/Makefile.boot ? ? ?| ? ?1 - ?arch/arm/mach-versatile/Makefile.boot ?| ? ?1 - ?arch/arm/mach-vexpress/Makefile.boot ? | ? ?1 - ?arch/arm/mach-w90x900/Makefile.boot ? ?| ? ?1 -?58 files changed, 0 insertions(+), 73 deletions(-) ?delete mode 100644
arch/arm/mach-shark/Makefile.bootarch/arm/mach-aaec2000/Makefile.boot +0
-1@@ -1 +0,0 @@ - ? ? ? zreladdr-y := 0xf0008000arch/arm/mach-at91/Makefile.boot +0
-0@@ -4,15 +4,12 @@?# ?
INITRD_PHYSmust be in RAM?ifeq ($(CONFIG_ARCH_AT91CAP9),y)
- ? zreladdr-y ?:=0x70008000
?params_phys-y ?:=0x70000100
?initrd_phys-y ?:=0x70410000
?else ifeq ($(CONFIG_ARCH_AT91SAM9G45),y)
- ? zreladdr-y ?:=0x70008000
?params_phys-y ?:=0x70000100
?initrd_phys-y ?:=0x70410000
?else
- ? zreladdr-y ?:=0x20008000
?params_phys-y ?:=0x20000100
?initrd_phys-y ?:=0x20410000
?endifarch/arm/mach-clps711x/Makefile.boot +0
-0@@ -1,5 +1,4 @@?# The standard locations for stuff on CLPS711x type processors
- ? zreladdr-y ? ? ? ? ? ? ? ? ? ? ? ? ?:=0xc0028000?params_phys-y ? ? ? ? ? ? ? ? ? ? ? ? ?:=0xc0000100?# Should probably have some agreement on these... ?initrd_phys-$(CONFIG_ARCH_P720T) ? ? ? :=0xc0400000arch/arm/mach-cns3xxx/Makefile.boot +0
-1@@ -1,3 +1,2 @@ - ? zreladdr-y ?:= 0x00008000?params_phys-y ?:=
0x00000100
?initrd_phys-y ?:=0x00C00000arch/arm/mach-davinci/Makefile.boot +0
-0@@ -2,12 +2,10 @@ ifeq ($(CONFIG_ARCH_DAVINCI_DA8XX),y) ?ifeq ($(CONFIG_ARCH_DAVINCI_DMx),y) ?$(error Cannot enable DaVinci and DA8XX platforms concurrently)?else
- ? zreladdr-y ?:=0xc0008000
?params_phys-y ?:=0xc0000100
?initrd_phys-y ?:=0xc0800000
?endif
?else
- ? zreladdr-y ?:=0x80008000
?params_phys-y ?:=0x80000100
?initrd_phys-y ?:=0x80800000
?endifarch/arm/mach-dove/Makefile.boot +0
-1@@ -1,3 +1,2 @@ - ? zreladdr-y ?:= 0x00008000?params_phys-y ?:=
0x00000100
?initrd_phys-y ?:=0x00800000arch/arm/mach-ebsa110/Makefile.boot +0
-1@@ -1,4 +1,3 @@ - ? zreladdr-y ?:= 0x00008000?params_phys-y ?:=
0x00000400
?initrd_phys-y ?:=0x00800000arch/arm/mach-ep93xx/Makefile.boot +0
-1@@ -1,14 +1,9 @@ - ? zreladdr-$(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) ? ?:= 0x00008000?params_phys-$(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) ? ?:=
0x00000100- ? zreladdr-$(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) ? ? ? ? :=
0xc0008000?params_phys-$(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) ? ? ? ? :=0xc0000100- ? zreladdr-$(CONFIG_EP93XX_SDCE1_PHYS_OFFSET) ? ? ? ? :=
0xd0008000?params_phys-$(CONFIG_EP93XX_SDCE1_PHYS_OFFSET) ? ? ? ? :=0xd0000100- ? zreladdr-$(CONFIG_EP93XX_SDCE2_PHYS_OFFSET) ? ? ? ? :=
0xe0008000?params_phys-$(CONFIG_EP93XX_SDCE2_PHYS_OFFSET) ? ? ? ? :=0xe0000100- ? zreladdr-$(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET) ? :=
0xf0008000?params_phys-$(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET) ? :=0xf0000100arch/arm/mach-footbridge/Makefile.boot +0
-1@@ -1,4 +1,3 @@ - ? zreladdr-y ?:= 0x00008000?params_phys-y ?:=
0x00000100
?initrd_phys-y ?:=0x00800000arch/arm/mach-gemini/Makefile.boot +0
-1@@ -1,9 +1,7 @@ ?ifeq ($(CONFIG_GEMINI_MEM_SWAP),y) - ? zreladdr-y ?:= 0x00008000?params_phys-y ?:=
0x00000100
?initrd_phys-y ?:=0x00800000
?else
- ? zreladdr-y ?:=0x10008000
?params_phys-y ?:=0x10000100
?initrd_phys-y ?:=0x10800000
?endifarch/arm/mach-imx/Makefile.boot +0
-1@@ -1,11 +1,8 @@ -zreladdr-$(CONFIG_ARCH_MX1) ? ?:= 0x08008000?params_phys-$(CONFIG_ARCH_MX1) :=
0x08000100
?initrd_phys-$(CONFIG_ARCH_MX1) :=0x08800000-zreladdr-$(CONFIG_MACH_MX21) ? :=
0xC0008000?params_phys-$(CONFIG_MACH_MX21) ? ? ? ?:=0xC0000100?initrd_phys-$(CONFIG_MACH_MX21) ? ? ? ?:=0xC0800000-zreladdr-$(CONFIG_MACH_MX27) ? :=
0xA0008000?params_phys-$(CONFIG_MACH_MX27) ? ? ? ?:=0xA0000100?initrd_phys-$(CONFIG_MACH_MX27) ? ? ? ?:=0xA0800000arch/arm/mach-integrator/Makefile.boot +0
-1@@ -1,4 +1,3 @@ - ? zreladdr-y ?:= 0x00008000?params_phys-y ?:=
0x00000100
?initrd_phys-y ?:=0x00800000arch/arm/mach-iop13xx/Makefile.boot +0
-1@@ -1,3 +1,2 @@ - ? zreladdr-y ? := 0x00008000?params_phys-y ?:=
0x00000100
?initrd_phys-y ?:=0x00800000arch/arm/mach-iop32x/Makefile.boot +0
-1@@ -1,3 +1,2 @@ - ? zreladdr-y ?:= 0xa0008000?params_phys-y ?:=
0xa0000100
?initrd_phys-y ?:=0xa0800000arch/arm/mach-iop33x/Makefile.boot +0
-1@@ -1,3 +1,2 @@ - ? zreladdr-y ?:= 0x00008000?params_phys-y ?:=
0x00000100
?initrd_phys-y ?:=0x00800000arch/arm/mach-ixp2000/Makefile.boot +0
-1@@ -1,3 +1,2 @@ - ? zreladdr-y ?:= 0x00008000?params_phys-y ?:=
0x00000100arch/arm/mach-ixp23xx/Makefile.boot +0
-1@@ -1,2 +1 @@ - ? zreladdr-y ?:= 0x00008000?params_phys-y ?:=
0x00000100arch/arm/mach-ixp4xx/Makefile.boot +0
-1@@ -1,3 +1,2 @@ - ? zreladdr-y ?:= 0x00008000?params_phys-y ?:=
0x00000100arch/arm/mach-kirkwood/Makefile.boot +0
-1@@ -1,3 +1,2 @@ - ? zreladdr-y ?:= 0x00008000?params_phys-y ?:=
0x00000100
?initrd_phys-y ?:=0x00800000arch/arm/mach-ks8695/Makefile.boot +0
-0@@ -3,6 +3,5 @@?# ?
PARAMS_PHYSmust be within 4MB of ZRELADDR
?# ?INITRD_PHYSmust be in RAM- ? zreladdr-y ?:=
0x00008000
?params_phys-y ?:=0x00000100
?initrd_phys-y ?:=0x00800000arch/arm/mach-lh7a40x/Makefile.boot +0
-1@@ -1,4 +1,3 @@ - ? zreladdr-y ?:= 0xc0008000?params_phys-y ?:=
0xc0000100
?initrd_phys-y ?:=0xc4000000arch/arm/mach-loki/Makefile.boot +0
-1@@ -1,3 +1,2 @@ - ? zreladdr-y ?:= 0x00008000?params_phys-y ?:=
0x00000100
?initrd_phys-y ?:=0x00800000arch/arm/mach-mmp/Makefile.boot +0
-1@@ -1 +0,0 @@ - ? zreladdr-y ?:= 0x00008000arch/arm/mach-msm/Makefile.boot +0
-1@@ -1,3 +1,2 @@ - ?zreladdr-y ? ? ? ? ? := 0x10008000?params_phys-y ? ? ? ? ?:=
0x10000100
?initrd_phys-y ? ? ? ? ?:=0x10800000arch/arm/mach-mv78xx0/Makefile.boot +0
-1@@ -1,3 +1,2 @@ - ? zreladdr-y ?:= 0x00008000?params_phys-y ?:=
0x00000100
?initrd_phys-y ?:=0x00800000arch/arm/mach-mx25/Makefile.boot +0
-1@@ -1,3 +1,2 @@ - ? zreladdr-y ?:= 0x80008000?params_phys-y ?:=
0x80000100
?initrd_phys-y ?:=0x80800000arch/arm/mach-mx3/Makefile.boot +0
-1@@ -1,3 +1,2 @@ - ? zreladdr-y ?:= 0x80008000?params_phys-y ?:=
0x80000100
?initrd_phys-y ?:=0x80800000arch/arm/mach-mx5/Makefile.boot +0
-1@@ -1,3 +1,2 @@ - ? zreladdr-y ?:= 0x90008000?params_phys-y ?:=
0x90000100
?initrd_phys-y ?:=0x90800000arch/arm/mach-mxc91231/Makefile.boot +0
-1@@ -1,3 +1,2 @@ - ? zreladdr-y ?:= 0x90008000?params_phys-y ?:=
0x90000100
?initrd_phys-y ?:=0x90800000arch/arm/mach-netx/Makefile.boot +0
-1@@ -1,2 +1 @@ - ? ?zreladdr-y ? ? ? ? ? ? ? ? := 0x80008000arch/arm/mach-nomadik/Makefile.boot +0
-1@@ -1,4 +1,3 @@ - ? zreladdr-y ?:= 0x00008000?params_phys-y ?:=
0x00000100
?initrd_phys-y ?:=0x00800000arch/arm/mach-ns9xxx/Makefile.boot +0
-1@@ -1,2 +1 @@ -zreladdr-y := 0x8000?params_phys-y :=
0x100arch/arm/mach-nuc93x/Makefile.boot +0
-1@@ -1,3 +1,2 @@ -zreladdr-y ? ? := 0x00008000?params_phys-y ?:=
0x00000100arch/arm/mach-omap1/Makefile.boot +0
-1@@ -1,3 +1,2 @@ - ? zreladdr-y ? ? ? ? ?:= 0x10008000?params_phys-y ? ? ? ? ?:=
0x10000100
?initrd_phys-y ? ? ? ? ?:=0x10800000arch/arm/mach-omap2/Makefile.boot +0
-1@@ -1,3 +1,2 @@ - ?zreladdr-y ? ? ? ? ? := 0x80008000?params_phys-y ? ? ? ? ?:=
0x80000100
?initrd_phys-y ? ? ? ? ?:=0x80800000arch/arm/mach-orion5x/Makefile.boot +0
-1@@ -1,3 +1,2 @@ - ? zreladdr-y ?:= 0x00008000?params_phys-y ?:=
0x00000100
?initrd_phys-y ?:=0x00800000arch/arm/mach-pnx4008/Makefile.boot +0
-1@@ -1,4 +1,3 @@ - ? zreladdr-y ? ? ? ? ?:= 0x80008000?params_phys-y ? ? ? ? ?:=
0x80000100
?initrd_phys-y ? ? ? ? ?:=0x80800000arch/arm/mach-pxa/Makefile.boot +0
-1@@ -1,2 +1 @@ - ? zreladdr-y ?:= 0xa0008000arch/arm/mach-realview/Makefile.boot +0
-1@@ -1,9 +1,7 @@ ?ifeq ($(CONFIG_REALVIEW_HIGH_PHYS_OFFSET),y) - ? zreladdr-y ?:= 0x70008000?params_phys-y ?:=
0x70000100
?initrd_phys-y ?:=0x70800000
?else
- ? zreladdr-y ?:=0x00008000
?params_phys-y ?:=0x00000100
?initrd_phys-y ?:=0x00800000
?endifarch/arm/mach-rpc/Makefile.boot +0
-1@@ -1,4 +1,3 @@ - ? zreladdr-y ?:= 0x10008000?params_phys-y ?:=
0x10000100
?initrd_phys-y ?:=0x18000000arch/arm/mach-s3c2410/Makefile.boot +0
-1@@ -1,7 +1,5 @@ ?ifeq ($(CONFIG_PM_H1940),y) - ? ? ? zreladdr-y ? ? ? ? ? ? ?:= 0x30108000? ? ? ?params_phys-y ? :=
0x30100100
?else
- ? ? ? zreladdr-y ? ? ? ? ? ? ?:=0x30008000
? ? ? ?params_phys-y ? :=0x30000100
?endifarch/arm/mach-s3c64xx/Makefile.boot +0
-1@@ -1,2 +1 @@ - ? zreladdr-y ?:= 0x50008000?params_phys-y ?:=
0x50000100arch/arm/mach-s5p6440/Makefile.boot +0
-1@@ -1,2 +1 @@ - ? zreladdr-y ?:= 0x20008000?params_phys-y ?:=
0x20000100arch/arm/mach-s5p6442/Makefile.boot +0
-1@@ -1,2 +1 @@ - ? zreladdr-y ?:= 0x20008000?params_phys-y ?:=
0x20000100arch/arm/mach-s5pc100/Makefile.boot +0
-1@@ -1,2 +1 @@ - ? zreladdr-y ?:= 0x20008000?params_phys-y ?:=
0x20000100arch/arm/mach-s5pv210/Makefile.boot +0
-1@@ -1,2 +1 @@ - ? zreladdr-y ?:= 0x20008000?params_phys-y ?:=
0x20000100arch/arm/mach-s5pv310/Makefile.boot +0
-1@@ -1,2 +1 @@ - ? zreladdr-y ?:= 0x40008000?params_phys-y ?:=
0x40000100arch/arm/mach-sa1100/Makefile.boot +0
-2@@ -1,6 +1,4 @@ - ? zreladdr-y ?:= 0xc0008000 ?ifeq ($(CONFIG_ARCH_SA1100),y) - ? zreladdr-$(CONFIG_SA1111) ? ? ? ? ? := 0xc0208000?endif
?params_phys-y ?:=0xc0000100
?initrd_phys-y ?:=0xc0800000arch/arm/mach-shark/Makefile.boot deleted +0
-2@@ -1,2 +0,0 @@ - ? zreladdr-y ?:= 0x08008000 -arch/arm/mach-spear3xx/Makefile.boot +0
-1@@ -1,3 +1,2 @@ -zreladdr-y ? ? := 0x00008000?params_phys-y ?:=
0x00000100
?initrd_phys-y ?:=0x00800000arch/arm/mach-spear6xx/Makefile.boot +0
-1@@ -1,3 +1,2 @@ -zreladdr-y ? ? := 0x00008000?params_phys-y ?:=
0x00000100
?initrd_phys-y ?:=0x00800000arch/arm/mach-stmp378x/Makefile.boot +0
-1@@ -1,3 +1,2 @@ - ? zreladdr-y ?:= 0x40008000?params_phys-y ?:=
0x40000100
?initrd_phys-y ?:=0x40800000arch/arm/mach-stmp37xx/Makefile.boot +0
-1@@ -1,3 +1,2 @@ - ? zreladdr-y ?:= 0x40008000?params_phys-y ?:=
0x40000100
?initrd_phys-y ?:=0x40800000arch/arm/mach-u300/Makefile.boot +0
-0@@ -4,10 +4,8 @@?# ?
INITRD_PHYSmust be in RAM?ifdef
CONFIG_MACH_U300_SINGLE_RAM
- ? ? zreladdr-y ? ? ? ?:=0x28E08000
? params_phys-y ? ? ? ?:=0x28E00100
?else
- ? ? zreladdr-y ? ? ? ?:=0x48008000
? params_phys-y ? ? ? ?:=0x48000100
?endifarch/arm/mach-ux500/Makefile.boot +0
-1@@ -1,4 +1,3 @@ - ? zreladdr-y ?:= 0x00008000?params_phys-y ?:=
0x00000100
?initrd_phys-y ?:=0x00800000arch/arm/mach-versatile/Makefile.boot +0
-1@@ -1,4 +1,3 @@ - ? zreladdr-y ?:= 0x00008000?params_phys-y ?:=
0x00000100
?initrd_phys-y ?:=0x00800000arch/arm/mach-vexpress/Makefile.boot +0
-1@@ -1,3 +1,2 @@ - ? zreladdr-y ?:= 0x60008000?params_phys-y ?:=
0x60000100
?initrd_phys-y ?:=0x60800000arch/arm/mach-w90x900/Makefile.boot +0
-1@@ -1,3 +1,2 @@ -zreladdr-y ? ? := 0x00008000?params_phys-y ?:=
0x00000100--
1.7.1_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH v2 7/7 ARM: removed unused zreladdr specifications in all Makefile.boot files
---
Hello,
compared to v1 I now deleted
arch/arm/mach-aaec2000/Makefile.boot
arch/arm/mach-mmp/Makefile.boot
arch/arm/mach-netx/Makefile.boot
arch/arm/mach-pxa/Makefile.boot
(found by grep -L '[^=]' arch/arm/mach-*/Makefile.boot) and removed an (now) empty if from
arch/arm/mach-sa1100/Makefile.boot
(and a trailing empty line)
Thanks
Uwe
arch/arm/mach-aaec2000/Makefile.boot | 1 - arch/arm/mach-at91/Makefile.boot | 3 --- arch/arm/mach-clps711x/Makefile.boot | 1 - arch/arm/mach-cns3xxx/Makefile.boot | 1 - arch/arm/mach-davinci/Makefile.boot | 2 -- arch/arm/mach-dove/Makefile.boot | 1 - arch/arm/mach-ebsa110/Makefile.boot | 1 - arch/arm/mach-ep93xx/Makefile.boot | 5 ----- arch/arm/mach-footbridge/Makefile.boot | 1 - arch/arm/mach-gemini/Makefile.boot | 2 -- arch/arm/mach-imx/Makefile.boot | 3 --- arch/arm/mach-integrator/Makefile.boot | 1 - arch/arm/mach-iop13xx/Makefile.boot | 1 - arch/arm/mach-iop32x/Makefile.boot | 1 - arch/arm/mach-iop33x/Makefile.boot | 1 - arch/arm/mach-ixp2000/Makefile.boot | 1 - arch/arm/mach-ixp23xx/Makefile.boot | 1 - arch/arm/mach-ixp4xx/Makefile.boot | 1 - arch/arm/mach-kirkwood/Makefile.boot | 1 - arch/arm/mach-ks8695/Makefile.boot | 1 - arch/arm/mach-lh7a40x/Makefile.boot | 1 - arch/arm/mach-loki/Makefile.boot | 1 - arch/arm/mach-mmp/Makefile.boot | 1 - arch/arm/mach-msm/Makefile.boot | 1 - arch/arm/mach-mv78xx0/Makefile.boot | 1 - arch/arm/mach-mx25/Makefile.boot | 1 - arch/arm/mach-mx3/Makefile.boot | 1 - arch/arm/mach-mx5/Makefile.boot | 1 - arch/arm/mach-mxc91231/Makefile.boot | 1 - arch/arm/mach-netx/Makefile.boot | 2 -- arch/arm/mach-nomadik/Makefile.boot | 1 - arch/arm/mach-ns9xxx/Makefile.boot | 1 - arch/arm/mach-nuc93x/Makefile.boot | 1 - arch/arm/mach-omap1/Makefile.boot | 1 - arch/arm/mach-omap2/Makefile.boot | 1 - arch/arm/mach-orion5x/Makefile.boot | 1 - arch/arm/mach-pnx4008/Makefile.boot | 1 - arch/arm/mach-pxa/Makefile.boot | 2 -- arch/arm/mach-realview/Makefile.boot | 2 -- arch/arm/mach-rpc/Makefile.boot | 1 - arch/arm/mach-s3c2410/Makefile.boot | 2 -- arch/arm/mach-s3c64xx/Makefile.boot | 1 - arch/arm/mach-s5p6440/Makefile.boot | 1 - arch/arm/mach-s5p6442/Makefile.boot | 1 - arch/arm/mach-s5pc100/Makefile.boot | 1 - arch/arm/mach-s5pv210/Makefile.boot | 1 - arch/arm/mach-s5pv310/Makefile.boot | 1 - arch/arm/mach-sa1100/Makefile.boot | 5 ----- arch/arm/mach-shark/Makefile.boot | 2 -- arch/arm/mach-spear3xx/Makefile.boot | 1 - arch/arm/mach-spear6xx/Makefile.boot | 1 - arch/arm/mach-stmp378x/Makefile.boot | 1 - arch/arm/mach-stmp37xx/Makefile.boot | 1 - arch/arm/mach-u300/Makefile.boot | 2 -- arch/arm/mach-ux500/Makefile.boot | 1 - arch/arm/mach-versatile/Makefile.boot | 1 - arch/arm/mach-vexpress/Makefile.boot | 1 - arch/arm/mach-w90x900/Makefile.boot | 1 - 58 files changed, 0 insertions(+), 78 deletions(-) delete mode 100644 arch/arm/mach-aaec2000/Makefile.boot delete mode 100644 arch/arm/mach-mmp/Makefile.boot delete mode 100644 arch/arm/mach-netx/Makefile.boot delete mode 100644 arch/arm/mach-pxa/Makefile.boot delete mode 100644 arch/arm/mach-shark/Makefile.boot
arch/arm/mach-aaec2000/Makefile.boot deleted +0 -1
@@ -1 +0,0 @@ - zreladdr-y := 0xf0008000
arch/arm/mach-at91/Makefile.boot +0 -3
@@ -4,15 +4,12 @@ # INITRD_PHYS must be in RAM ifeq ($(CONFIG_ARCH_AT91CAP9),y) - zreladdr-y := 0x70008000 params_phys-y := 0x70000100 initrd_phys-y := 0x70410000 else ifeq ($(CONFIG_ARCH_AT91SAM9G45),y) - zreladdr-y := 0x70008000 params_phys-y := 0x70000100 initrd_phys-y := 0x70410000 else - zreladdr-y := 0x20008000 params_phys-y := 0x20000100 initrd_phys-y := 0x20410000 endif
arch/arm/mach-clps711x/Makefile.boot +0 -1
@@ -1,5 +1,4 @@ # The standard locations for stuff on CLPS711x type processors - zreladdr-y := 0xc0028000 params_phys-y := 0xc0000100 # Should probably have some agreement on these... initrd_phys-$(CONFIG_ARCH_P720T) := 0xc0400000
arch/arm/mach-cns3xxx/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00C00000
arch/arm/mach-davinci/Makefile.boot +0 -2
@@ -2,12 +2,10 @@ ifeq ($(CONFIG_ARCH_DAVINCI_DA8XX),y) ifeq ($(CONFIG_ARCH_DAVINCI_DMx),y) $(error Cannot enable DaVinci and DA8XX platforms concurrently) else - zreladdr-y := 0xc0008000 params_phys-y := 0xc0000100 initrd_phys-y := 0xc0800000 endif else - zreladdr-y := 0x80008000 params_phys-y := 0x80000100 initrd_phys-y := 0x80800000 endif
arch/arm/mach-dove/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-ebsa110/Makefile.boot +0 -1
@@ -1,4 +1,3 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000400 initrd_phys-y := 0x00800000
arch/arm/mach-ep93xx/Makefile.boot +0 -5
@@ -1,14 +1,9 @@ - zreladdr-$(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) := 0x00008000 params_phys-$(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) := 0x00000100 - zreladdr-$(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) := 0xc0008000 params_phys-$(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) := 0xc0000100 - zreladdr-$(CONFIG_EP93XX_SDCE1_PHYS_OFFSET) := 0xd0008000 params_phys-$(CONFIG_EP93XX_SDCE1_PHYS_OFFSET) := 0xd0000100 - zreladdr-$(CONFIG_EP93XX_SDCE2_PHYS_OFFSET) := 0xe0008000 params_phys-$(CONFIG_EP93XX_SDCE2_PHYS_OFFSET) := 0xe0000100 - zreladdr-$(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET) := 0xf0008000 params_phys-$(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET) := 0xf0000100
arch/arm/mach-footbridge/Makefile.boot +0 -1
@@ -1,4 +1,3 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-gemini/Makefile.boot +0 -2
@@ -1,9 +1,7 @@ ifeq ($(CONFIG_GEMINI_MEM_SWAP),y) - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000 else - zreladdr-y := 0x10008000 params_phys-y := 0x10000100 initrd_phys-y := 0x10800000 endif
arch/arm/mach-imx/Makefile.boot +0 -3
@@ -1,11 +1,8 @@ -zreladdr-$(CONFIG_ARCH_MX1) := 0x08008000 params_phys-$(CONFIG_ARCH_MX1) := 0x08000100 initrd_phys-$(CONFIG_ARCH_MX1) := 0x08800000 -zreladdr-$(CONFIG_MACH_MX21) := 0xC0008000 params_phys-$(CONFIG_MACH_MX21) := 0xC0000100 initrd_phys-$(CONFIG_MACH_MX21) := 0xC0800000 -zreladdr-$(CONFIG_MACH_MX27) := 0xA0008000 params_phys-$(CONFIG_MACH_MX27) := 0xA0000100 initrd_phys-$(CONFIG_MACH_MX27) := 0xA0800000
arch/arm/mach-integrator/Makefile.boot +0 -1
@@ -1,4 +1,3 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-iop13xx/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-iop32x/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0xa0008000 params_phys-y := 0xa0000100 initrd_phys-y := 0xa0800000
arch/arm/mach-iop33x/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-ixp2000/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100
arch/arm/mach-ixp23xx/Makefile.boot +0 -1
@@ -1,2 +1 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100
arch/arm/mach-ixp4xx/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100
arch/arm/mach-kirkwood/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-ks8695/Makefile.boot +0 -1
@@ -3,6 +3,5 @@ # PARAMS_PHYS must be within 4MB of ZRELADDR # INITRD_PHYS must be in RAM - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-lh7a40x/Makefile.boot +0 -1
@@ -1,4 +1,3 @@ - zreladdr-y := 0xc0008000 params_phys-y := 0xc0000100 initrd_phys-y := 0xc4000000
arch/arm/mach-loki/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-mmp/Makefile.boot deleted +0 -1
@@ -1 +0,0 @@ - zreladdr-y := 0x00008000
arch/arm/mach-msm/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x10008000 params_phys-y := 0x10000100 initrd_phys-y := 0x10800000
arch/arm/mach-mv78xx0/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-mx25/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x80008000 params_phys-y := 0x80000100 initrd_phys-y := 0x80800000
arch/arm/mach-mx3/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x80008000 params_phys-y := 0x80000100 initrd_phys-y := 0x80800000
arch/arm/mach-mx5/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x90008000 params_phys-y := 0x90000100 initrd_phys-y := 0x90800000
arch/arm/mach-mxc91231/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x90008000 params_phys-y := 0x90000100 initrd_phys-y := 0x90800000
arch/arm/mach-netx/Makefile.boot deleted +0 -2
@@ -1,2 +0,0 @@ - zreladdr-y := 0x80008000 -
arch/arm/mach-nomadik/Makefile.boot +0 -1
@@ -1,4 +1,3 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-ns9xxx/Makefile.boot +0 -1
@@ -1,2 +1 @@ -zreladdr-y := 0x8000 params_phys-y := 0x100
arch/arm/mach-nuc93x/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ -zreladdr-y := 0x00008000 params_phys-y := 0x00000100
arch/arm/mach-omap1/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x10008000 params_phys-y := 0x10000100 initrd_phys-y := 0x10800000
arch/arm/mach-omap2/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x80008000 params_phys-y := 0x80000100 initrd_phys-y := 0x80800000
arch/arm/mach-orion5x/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-pnx4008/Makefile.boot +0 -1
@@ -1,4 +1,3 @@ - zreladdr-y := 0x80008000 params_phys-y := 0x80000100 initrd_phys-y := 0x80800000
arch/arm/mach-pxa/Makefile.boot deleted +0 -2
@@ -1,2 +0,0 @@ - zreladdr-y := 0xa0008000 -
arch/arm/mach-realview/Makefile.boot +0 -2
@@ -1,9 +1,7 @@ ifeq ($(CONFIG_REALVIEW_HIGH_PHYS_OFFSET),y) - zreladdr-y := 0x70008000 params_phys-y := 0x70000100 initrd_phys-y := 0x70800000 else - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000 endif
arch/arm/mach-rpc/Makefile.boot +0 -1
@@ -1,4 +1,3 @@ - zreladdr-y := 0x10008000 params_phys-y := 0x10000100 initrd_phys-y := 0x18000000
arch/arm/mach-s3c2410/Makefile.boot +0 -2
@@ -1,7 +1,5 @@ ifeq ($(CONFIG_PM_H1940),y) - zreladdr-y := 0x30108000 params_phys-y := 0x30100100 else - zreladdr-y := 0x30008000 params_phys-y := 0x30000100 endif
arch/arm/mach-s3c64xx/Makefile.boot +0 -1
@@ -1,2 +1 @@ - zreladdr-y := 0x50008000 params_phys-y := 0x50000100
arch/arm/mach-s5p6440/Makefile.boot +0 -1
@@ -1,2 +1 @@ - zreladdr-y := 0x20008000 params_phys-y := 0x20000100
arch/arm/mach-s5p6442/Makefile.boot +0 -1
@@ -1,2 +1 @@ - zreladdr-y := 0x20008000 params_phys-y := 0x20000100
arch/arm/mach-s5pc100/Makefile.boot +0 -1
@@ -1,2 +1 @@ - zreladdr-y := 0x20008000 params_phys-y := 0x20000100
arch/arm/mach-s5pv210/Makefile.boot +0 -1
@@ -1,2 +1 @@ - zreladdr-y := 0x20008000 params_phys-y := 0x20000100
arch/arm/mach-s5pv310/Makefile.boot +0 -1
@@ -1,2 +1 @@ - zreladdr-y := 0x40008000 params_phys-y := 0x40000100
arch/arm/mach-sa1100/Makefile.boot +0 -5
@@ -1,7 +1,2 @@ - zreladdr-y := 0xc0008000 -ifeq ($(CONFIG_ARCH_SA1100),y) - zreladdr-$(CONFIG_SA1111) := 0xc0208000 -endif params_phys-y := 0xc0000100 initrd_phys-y := 0xc0800000 -
arch/arm/mach-shark/Makefile.boot deleted +0 -2
@@ -1,2 +0,0 @@ - zreladdr-y := 0x08008000 -
arch/arm/mach-spear3xx/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ -zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-spear6xx/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ -zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-stmp378x/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x40008000 params_phys-y := 0x40000100 initrd_phys-y := 0x40800000
arch/arm/mach-stmp37xx/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x40008000 params_phys-y := 0x40000100 initrd_phys-y := 0x40800000
arch/arm/mach-u300/Makefile.boot +0 -2
@@ -4,10 +4,8 @@ # INITRD_PHYS must be in RAM ifdef CONFIG_MACH_U300_SINGLE_RAM - zreladdr-y := 0x28E08000 params_phys-y := 0x28E00100 else - zreladdr-y := 0x48008000 params_phys-y := 0x48000100 endif
arch/arm/mach-ux500/Makefile.boot +0 -1
@@ -1,4 +1,3 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-versatile/Makefile.boot +0 -1
@@ -1,4 +1,3 @@ - zreladdr-y := 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000
arch/arm/mach-vexpress/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ - zreladdr-y := 0x60008000 params_phys-y := 0x60000100 initrd_phys-y := 0x60800000
arch/arm/mach-w90x900/Makefile.boot +0 -1
@@ -1,3 +1,2 @@ -zreladdr-y := 0x00008000 params_phys-y := 0x00000100
Signature · 1 line
1.7.1
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
In reply to Uwe Kleine-KönigHello,
[Added Ben to Cc:]
Quoted 7 lines · Uwe Kleine-K?nig
Quoted 6 lines · Russell King - ARM Linux
Quoted 5 lines
And while we're here, why hasn't anyone removed the zreladdr definitions in Makefile.boot yet? Or do we still need them and we now have the same information defined in two different places?
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
This all looks like a half-done job at the moment. Please clean it up.
The original series removed all the 'Makefile.boot's IIRC. Currently the params_phys-y value is needed though. So should I send a patch that just removes the zreladdr values?
I looked into that and found some more issues. I hope I catched them all now. While doing that removing the zreladdr lines was nearly for free. So I did that, too.
I just found another (probably harmless) issue: arch/arm/Kconfig has:
...
default 0x30008000 if ARCH_S3C2410 ||\
ARCH_S3C2400 ||\
ARCH_S3C2412 ||\
ARCH_S3C2416 ||\
ARCH_S3C2440 ||\
ARCH_S3C2443
...PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
In reply to Uwe Kleine-KönigHello Russell,
Quoted 7 lines · Uwe Kleine-K?nig
Quoted 6 lines · Uwe Kleine-K?nig
Quoted 5 lines · Russell King - ARM Linux
And while we're here, why hasn't anyone removed the zreladdr definitions in Makefile.boot yet? Or do we still need them and we now have the same information defined in two different places?
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
This all looks like a half-done job at the moment. Please clean it up.
The original series removed all the 'Makefile.boot's IIRC. Currently the params_phys-y value is needed though. So should I send a patch that just removes the zreladdr values?
I looked into that and found some more issues. I hope I catched them all now. While doing that removing the zreladdr lines was nearly for free. So I did that, too.
I just noticed that you already started working here on your master branch. (Commit cbb288bf874f86 hides ZRELADDR.)
In a different thread you said you might revert the commit introducing ZRELADDR. In case you are not satisfied by Eric's and my work on this series let my point out that I sent the a patch identically to cbb288bf874f86 in reply to the mail you link to in cbb288bf874f86's commit message already a month ago.
Are you OK with my series? If yes, can you please say so, then I will rebase on top of your current master branch.
Thanks
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
Quoted 20 lines · Uwe Kleine-K?nig
Hello Russell,
Quoted 7 lines · Uwe Kleine-K?nig
Quoted 6 lines · Uwe Kleine-K?nig
Quoted 5 lines · Russell King - ARM Linux
And while we're here, why hasn't anyone removed the zreladdr definitions in Makefile.boot yet? Or do we still need them and we now have the same information defined in two different places?
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
This all looks like a half-done job at the moment. Please clean it up.
The original series removed all the 'Makefile.boot's IIRC. Currently the params_phys-y value is needed though. So should I send a patch that just removes the zreladdr values?
I looked into that and found some more issues. I hope I catched them all now. While doing that removing the zreladdr lines was nearly for free. So I did that, too.
I just noticed that you already started working here on your master branch. (Commit
cbb288bf874f86hides ZRELADDR.)
Quoted 8 lines
In a different thread you said you might revert the commit introducing ZRELADDR. In case you are not satisfied by Eric's and my work on this series let my point out that I sent the a patch identically to
cbb288bf874f86in reply to the mail you link to in cbb288bf874f86's commit message already a month ago.Are you OK with my series? If yes, can you please say so, then I will rebase on top of your current master branch.
See one of my other replies today; I think it'll just be better in the long run to get rid of this CONFIG_ZRELADDR idea. Our original way of doing this was simpler, less error prone, and less conflict prone.
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
In reply to Uwe Kleine-KönigQuoted 13 lines · Uwe Kleine-K?nig
Hello Russell,
Quoted 10 lines · Uwe Kleine-K?nig
Quoted 6 lines · Russell King - ARM Linux
And while we're here, why hasn't anyone removed the zreladdr definitions in Makefile.boot yet? Or do we still need them and we now have the same information defined in two different places?
This all looks like a half-done job at the moment. Please clean it up.
The original series removed all the 'Makefile.boot's IIRC. Currently the params_phys-y value is needed though. So should I send a patch that just removes the zreladdr values?
Quoted 6 lines
I looked into that and found some more issues. I hope I catched them all now. While doing that removing the zreladdr lines was nearly for free. So I did that, too.
I couldn't determine who to cc: for the
ARCH_H720Xpatch. Russell, do you maintain this platform?
Nope.
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
Uwe,
Quoted 8 lines · Russell King - ARM Linux
Quoted 6 lines
I looked into that and found some more issues. I hope I catched them all now. While doing that removing the zreladdr lines was nearly for free. So I did that, too.
I couldn't determine who to cc: for the
ARCH_H720Xpatch. Russell, do you maintain this platform?Nope.
Sascha does probably maintain H720x. However, I'm not sure if there is somebody out there who does still use it actively.
rsc
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
PATCH 4/5 Auto calculate ZRELADDR and provide option for exceptions
In reply to Uwe Kleine-König2010/9/3 Uwe Kleine-K?nig <[email protected]>:
Quoted 39 lines
Hello,
Quoted 36 lines · Russell King - ARM Linux
Quoted 34 lines · Russell King - ARM Linux
Quoted 20 lines · Eric Miao
From: Eric Miao <[email protected]>
Original idea and prototype came from Nicolas Pitre.
As long as the zImage is placed within the 256MB range from the start of the memory, ZRELADDR (Address where the decompressed kernel will be placed, usually ?==
PHYS_OFFSET+TEXT_OFFSET) can be determined at run-time by masking PC with 0xf000_0000.Running through all the Makefile.boot, all those zreladdr-y address == 0x[0-f]000_0000 +
TEXT_OFFSETcan be determined at run-time.Option
CONFIG_AUTO_ZRELADDRandCONFIG_ZRELADDRare introduced,CONFIG_ZRELADDR_must_ be explicitly specified if:?- ((zreladdr-y -
TEXT_OFFSET) & ~0xf0000000) != 0, which means ? ?a maksing of PC with 0xf000_0000 will result an incorrect ? ?address.Quoted 8 lines
?- or the assumption of the zImage being loaded by the boot ? ?loader within 256MB from the start address is simply ? ?incorrect
?- or when
ZBOOT_ROMis used, where the above assumption is ? ?normally wrongList of all Makefile.boot:
Not so. ?What happened to H720x platforms, which are now broken? Any chance of fixing the regression that this introduced?
http://armlinux.simtec.co.uk/kautobuild/2.6.36-rc3/h7202_defconfig/zimage.log
Quoted 9 lines
Quoted 5 lines
And while we're here, why hasn't anyone removed the zreladdr definitions in Makefile.boot yet? ?Or do we still need them and we now have the same information defined in two different places?
This all looks like a half-done job at the moment. ?Please clean it up.
The original series removed all the 'Makefile.boot's IIRC. ?Currently the params_phys-y value is needed though. ?So should I send a patch that just removes the zreladdr values?
That sounds like a plan. And for those platforms which requires only zreladdr-y, the whole Makefile.boot can just be removed. e.g. mach-pxa and mach-mmp.
Quoted 10 lines
Eric, what are your plans regarding the runtime-physoffset stuff? ?(I currently have none.)
Best regards
Uwe--
Pengutronix e.K. ? ? ? ? ? ? ? ? ? ? ? ? ? | Uwe Kleine-K?nig ? ? ? ? ? ?| Industrial Linux Solutions ? ? ? ? ? ? ? ? | http://www.pengutronix.de/ ?|
PATCH 5/5 Move inclusion of Makefile.boot into arch/arm/boot/bootp
In reply to Eric MiaoFrom: Eric Miao <[email protected]>
Since zreladdr-y, params_phys-y and initrd_phys-y are no longer used in arch/arm/boot/compressed, move the inclusion into bootp/.
Now unless you are building for an bootpImage, no per machine class Makefile.boot needs to be included.
--- arch/arm/boot/Makefile | 21 +-------------------- arch/arm/boot/bootp/Makefile | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 21 deletions(-)
arch/arm/boot/Makefile +1 -20
@@ -13,18 +13,6 @@ MKIMAGE := $(srctree)/scripts/mkuboot.sh -ifneq ($(MACHINE),) --include $(srctree)/$(MACHINE)/Makefile.boot -endif - -# Note: the following conditions must always be true: -# PARAMS_PHYS must be within 4MB of ZRELADDR -# INITRD_PHYS must be in RAM -PARAMS_PHYS := $(params_phys-y) -INITRD_PHYS := $(initrd_phys-y) - -export INITRD_PHYS PARAMS_PHYS - targets := Image zImage xipImage bootpImage uImage ifeq ($(CONFIG_XIP_KERNEL),y)
@@ -81,7 +69,7 @@ $(obj)/uImage: $(obj)/zImage FORCE $(call if_changed,uimage) @echo ' Image $@ is ready' -$(obj)/bootp/bootp: $(obj)/zImage initrd FORCE +$(obj)/bootp/bootp: $(obj)/zImage FORCE $(Q)$(MAKE) $(build)=$(obj)/bootp $@ @:
@@ -89,13 +77,6 @@ $(obj)/bootpImage: $(obj)/bootp/bootp FORCE $(call if_changed,objcopy) @echo ' Kernel: $@ is ready' -PHONY += initrd FORCE -initrd: - @test "$(INITRD_PHYS)" != "" || \ - (echo This machine does not support INITRD; exit -1) - @test "$(INITRD)" != "" || \ - (echo You must specify INITRD; exit -1) - install: $(obj)/Image $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ $(obj)/Image System.map "$(INSTALL_PATH)"
arch/arm/boot/bootp/Makefile +18 -1
@@ -5,6 +5,16 @@ # architecture-specific flags and dependencies. # +ifneq ($(MACHINE),) +-include $(srctree)/$(MACHINE)/Makefile.boot +endif + +# Note: the following conditions must always be true: +# PARAMS_PHYS must be within 4MB of ZRELADDR +# INITRD_PHYS must be in RAM +PARAMS_PHYS := $(params_phys-y) +INITRD_PHYS := $(initrd_phys-y) + LDFLAGS_bootp :=-p --no-undefined -X \ --defsym initrd_phys=$(INITRD_PHYS) \ --defsym params_phys=$(PARAMS_PHYS) -T
@@ -17,11 +27,18 @@ $(obj)/bootp: $(src)/bootp.lds $(addprefix $(obj)/,init.o kernel.o initrd.o) FOR $(call if_changed,ld) @: +PHONY += initrd FORCE +initrd: + @test "$(INITRD_PHYS)" != "" || \ + (echo This machine does not support INITRD; exit -1) + @test "$(INITRD)" != "" || \ + (echo You must specify INITRD; exit -1) + # kernel.o and initrd.o includes a binary image using # .incbin, a dependency which is not tracked automatically $(obj)/kernel.o: arch/arm/boot/zImage FORCE -$(obj)/initrd.o: $(INITRD) FORCE +$(obj)/initrd.o: $(INITRD) initrd FORCE PHONY += $(INITRD) FORCE
Signature · 1 line
1.7.0.4
PATCH 5/5 Move inclusion of Makefile.boot into arch/arm/boot/bootp
Quoted 9 lines · Eric Miao
From: Eric Miao <[email protected]>
Since zreladdr-y, params_phys-y and initrd_phys-y are no longer used in
arch/arm/boot/compressed, move the inclusion into bootp/.Now unless you are building for an bootpImage, no per machine class Makefile.boot needs to be included.
Signed-off-by Eric Miao <[email protected]>
Quoted 101 lines
--- arch/arm/boot/Makefile | 21 +-------------------- arch/arm/boot/bootp/Makefile | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 21 deletions(-)arch/arm/boot/Makefile +1
-20@@ -13,18 +13,6 @@ MKIMAGE := $(srctree)/scripts/mkuboot.sh -ifneq ($(MACHINE),) --include $(srctree)/$(MACHINE)/Makefile.boot -endif - -# Note: the following conditions must always be true: -# PARAMS_PHYS must be within 4MB of ZRELADDR -# INITRD_PHYS must be in RAM -PARAMS_PHYS := $(params_phys-y) -INITRD_PHYS := $(initrd_phys-y) - -export INITRD_PHYS PARAMS_PHYS - targets := Image zImage xipImage bootpImage uImage ifeq ($(CONFIG_XIP_KERNEL),y)@@ -81,7 +69,7 @@ $(obj)/uImage: $(obj)/zImage FORCE $(call if_changed,uimage) @echo ' Image $@ is ready' -$(obj)/bootp/bootp: $(obj)/zImage initrd FORCE +$(obj)/bootp/bootp: $(obj)/zImage FORCE $(Q)$(MAKE) $(build)=$(obj)/bootp $@ @:@@ -89,13 +77,6 @@ $(obj)/bootpImage: $(obj)/bootp/bootp FORCE $(call if_changed,objcopy) @echo ' Kernel: $@ is ready' -PHONY += initrd FORCE -initrd: - @test "$(INITRD_PHYS)" != "" || \ - (echo This machine does not support INITRD; exit -1) - @test "$(INITRD)" != "" || \ - (echo You must specify INITRD; exit -1) - install: $(obj)/Image $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ $(obj)/Image System.map "$(INSTALL_PATH)"arch/arm/boot/bootp/Makefile +18
-1@@ -5,6 +5,16 @@ # architecture-specific flags and dependencies. # +ifneq ($(MACHINE),) +-include $(srctree)/$(MACHINE)/Makefile.boot +endif + +# Note: the following conditions must always be true: +# PARAMS_PHYS must be within 4MB of ZRELADDR +# INITRD_PHYS must be in RAM +PARAMS_PHYS := $(params_phys-y) +INITRD_PHYS := $(initrd_phys-y) + LDFLAGS_bootp :=-p --no-undefined -X \ --defsym initrd_phys=$(INITRD_PHYS) \ --defsym params_phys=$(PARAMS_PHYS) -T@@ -17,11 +27,18 @@ $(obj)/bootp: $(src)/bootp.lds $(addprefix $(obj)/,init.o kernel.o initrd.o) FOR $(call if_changed,ld) @: +PHONY += initrd FORCE +initrd: + @test "$(INITRD_PHYS)" != "" || \ + (echo This machine does not support INITRD; exit -1) + @test "$(INITRD)" != "" || \ + (echo You must specify INITRD; exit -1) + # kernel.o and initrd.o includes a binary image using # .incbin, a dependency which is not tracked automatically $(obj)/kernel.o: arch/arm/boot/zImage FORCE -$(obj)/initrd.o: $(INITRD) FORCE +$(obj)/initrd.o: $(INITRD) initrd FORCE PHONY += $(INITRD) FORCESignature · 7 lines
1.7.0.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
cover Makefile.boot cleanup
In reply to Eric MiaoQuoted 11 lines · Eric Miao
Several facts:
1. ZRELADDR in most cases can be auto detected by maksing PC with ? 0xf000_0000 if the zImage is placed within the first 256MiB from ? the memory start, which is a sane assumption except for:
? - when
ARCH_MX1orARCH_SHARKis defined
? - whenARCH_U300is defined (U300 really is strange when defining ? ?PHYS_OFFSETand ZRELADDR)
? - or whenZBOOT_ROMis defined
And maybe we could restrict the assumption to 128MB, so that MX1 and SHARK can be included as well.
Quoted 14 lines
2. For the exceptions above or those situations where ZRELADDR still ? needs to be specified, an option
CONFIG_ZRELADDRis provided. So ? if there is conflict when mutliple machines are selected (in the ? near future), things can be manually fixed by menuconfig, instead ? of playing tricks withMakefile.3.
INITRD_PHYSandPARAMS_PHYSare really used only for bootpImage, ? and references inarch/arm/boot/compressedcan be safely removedI've listed most of the zreladdr-y found in each Makefile.boot and made them default value in
CONFIG_ZRELADDR, but still there could be mistakes. Please kindly try and report back, thanks.
cover Makefile.boot cleanup
Hi Eric,
Quoted 7 lines · Eric Miao
Quoted 6 lines · Eric Miao
Several facts:
1. ZRELADDR in most cases can be auto detected by maksing PC with ? 0xf000_0000 if the zImage is placed within the first 256MiB from ? the memory start, which is a sane assumption except for:
Quoted 8 lines
Quoted 5 lines
? - when
ARCH_MX1orARCH_SHARKis defined
? - whenARCH_U300is defined (U300 really is strange when defining ? ?PHYS_OFFSETand ZRELADDR)
? - or whenZBOOT_ROMis definedAnd maybe we could restrict the assumption to 128MB, so that MX1 and SHARK can be included as well.
I used 128 MiB, too. When I did it I found "problems" for s3c2400 and at91. For the latter physoffset depended on .config.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
cover Makefile.boot cleanup
2010/6/3 Uwe Kleine-K?nig <[email protected]>:
Quoted 16 lines
Hi Eric,
Quoted 13 lines · Eric Miao
Quoted 11 lines · Eric Miao
Several facts:
1. ZRELADDR in most cases can be auto detected by maksing PC with ? 0xf000_0000 if the zImage is placed within the first 256MiB from ? the memory start, which is a sane assumption except for:
? - when
ARCH_MX1orARCH_SHARKis defined
? - whenARCH_U300is defined (U300 really is strange when defining ? ?PHYS_OFFSETand ZRELADDR)
? - or whenZBOOT_ROMis defined
Quoted 5 lines
Quoted 2 lines
And maybe we could restrict the assumption to 128MB, so that MX1 and SHARK can be included as well.
I used 128 MiB, too. ?When I did it I found "problems" for s3c2400 and at91. ?For the latter physoffset depended on .config.
Yeah, there are some platforms really makes me scratching my head. For the problem of PHYS_OFFSET actually, not necessarily ZRELADDR. (I've again reviewed your previous patches, and think maybe we can possibly work together to bring them to the list again)
1. S3C2400 PHYS_OFFSET == 0x0c00_0000 which is on a 64MB boundary. I guess we can simply drop support for such platforms. Restricting the assumption to even smaller is not fair for most other platforms.
2. AT91 is actually much better.
3. The most weird platform must be U300, that PHYS_OFFSET is really something variable. Depending on a somewhat access processor (I guess it's a communication processor/MODEM). While for U300, I guess a proper way for it to do is to declare a high enough TEXT_OFFSET and use .fixup to reserve a range of memory for the access processor if possible.
Yet we don't have to support those platforms. The complex of the problem is really: how to support as many platforms as possible yet still leave a smooth migration path, and a fall-back way for those silicon simply just cannot do auto detection at run-time, and the different boot method:
ZROM/XIP (and possibly bootp)
cover Makefile.boot cleanup
In reply to Eric MiaoHello Eric,
Quoted 10 lines · Eric Miao
Several facts:
1. ZRELADDR in most cases can be auto detected by maksing PC with 0xf000_0000 if the zImage is placed within the first 256MiB from the memory start, which is a sane assumption except for:
- when
ARCH_MX1orARCH_SHARKis defined
- whenARCH_U300is defined (U300 really is strange when definingPHYS_OFFSETand ZRELADDR)
- or whenZBOOT_ROMis defined
If you guess ZRELADDR based on sp instead of pc it even should work if ZBOOT_ROM is defined?!
That's how I did it in
http://git.pengutronix.de/?p=ukl/linux-2.6.git;a=commit;h=booting/pu
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
cover Makefile.boot cleanup
Quoted 9 lines · Uwe Kleine-K?nig
Hello Eric,
Quoted 6 lines · Eric Miao
Several facts:
1. ZRELADDR in most cases can be auto detected by maksing PC with 0xf000_0000 if the zImage is placed within the first 256MiB from the memory start, which is a sane assumption except for:
Quoted 6 lines
Quoted 4 lines
- when
ARCH_MX1orARCH_SHARKis defined
- whenARCH_U300is defined (U300 really is strange when definingPHYS_OFFSETand ZRELADDR)
- or whenZBOOT_ROMis definedIf you guess ZRELADDR based on sp instead of pc it even should work if
ZBOOT_ROMis defined?!
If you're using ZBOOT_ROM that means you want to execute zImage directly from ROM. This is therefore a highly customized configuration. In that context, having a variable phys-offset doesn't make much sense to start with.
Nicolas
cover Makefile.boot cleanup
Quoted 15 lines · Nicolas Pitre
Quoted 13 lines · Uwe Kleine-K?nig
Hello Eric,
Quoted 10 lines · Eric Miao
Several facts:
1. ZRELADDR in most cases can be auto detected by maksing PC with 0xf000_0000 if the zImage is placed within the first 256MiB from the memory start, which is a sane assumption except for:
- when
ARCH_MX1orARCH_SHARKis defined
- whenARCH_U300is defined (U300 really is strange when definingPHYS_OFFSETand ZRELADDR)
- or whenZBOOT_ROMis defined
Quoted 7 lines
Quoted 2 lines
If you guess ZRELADDR based on sp instead of pc it even should work if
ZBOOT_ROMis defined?!If you're using
ZBOOT_ROMthat means you want to execute zImage directly from ROM. This is therefore a highly customized configuration. In that context, having a variable phys-offset doesn't make much sense to start with.
Right, but then the kernel needs to know this fixed value for phys-offset. In the patches presented by Eric the person configuring the kernel needs to know that value. When guessing based on sp she doesn't need to read addional docs when enabling ZBOOT_ROM.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
cover Makefile.boot cleanup
In reply to Uwe Kleine-KönigQuoted 9 lines · Uwe Kleine-K?nig
Hello Eric,
Quoted 6 lines · Eric Miao
Several facts:
1. ZRELADDR in most cases can be auto detected by maksing PC with 0xf000_0000 if the zImage is placed within the first 256MiB from the memory start, which is a sane assumption except for:
Quoted 6 lines
Quoted 4 lines
- when
ARCH_MX1orARCH_SHARKis defined
- whenARCH_U300is defined (U300 really is strange when definingPHYS_OFFSETand ZRELADDR)
- or whenZBOOT_ROMis definedIf you guess ZRELADDR based on sp instead of pc it even should work if
ZBOOT_ROMis defined?!
What is the relation between sp and ZRELADDR?
While we're pushing forward the notion of a relation between phys offset and the location where zImage is loaded in memory, I think that making the association with sp is a bit too obscur. Knowing where you upload your kernel is clear, knowing where the stack is allocated in relation to that is not that clear. It is in the .bss section of course, but when ZBOOT_ROM is not defined then the .bss happens to be right after the zImage binary, while it must be explicitly specified otherwise.
Quoted 9 lines · Uwe Kleine-K?nig
Quoted 4 lines · Nicolas Pitre
If you're using
ZBOOT_ROMthat means you want to execute zImage directly from ROM. This is therefore a highly customized configuration. In that context, having a variable phys-offset doesn't make much sense to start with.Right, but then the kernel needs to know this fixed value for phys-offset. In the patches presented by Eric the person configuring the kernel needs to know that value. When guessing based on sp she doesn't need to read addional docs when enabling
ZBOOT_ROM.
That's presuming phys offset would still be runtime determined. Again, if you care about ZBOOT_ROM, you probably want a fixed phys offset at compile time too. So that value has to be determined at kernel config time, not at run time from pc or sp. And when dealing with such customized expert config options, she better know what she's doing and be familiar with the memory layout so not to have to read the datasheet only for the physical RAM offset while she already must know what flash offset to use.
If anything, you _could_ try doing something similar to:
config PHYS_OFFSET
[prompt] default (CONFIG_ZBOOT_ROM_BSS & 0xf0000000) if ZBOOT_ROM
but I doubt Kconfig might accept such a syntax.
Nicolas
cover Makefile.boot cleanup
2010/6/18 Nicolas Pitre <[email protected]>:
Quoted 49 lines · Uwe Kleine-K?nig
Quoted 10 lines
Hello Eric,
Quoted 6 lines · Eric Miao
Several facts:
1. ZRELADDR in most cases can be auto detected by maksing PC with ? ?0xf000_0000 if the zImage is placed within the first 256MiB from ? ?the memory start, which is a sane assumption except for:
Quoted 6 lines
Quoted 4 lines
? ?- when
ARCH_MX1orARCH_SHARKis defined
? ?- whenARCH_U300is defined (U300 really is strange when defining ? ? ?PHYS_OFFSET and ZRELADDR)
? ?- or whenZBOOT_ROMis definedIf you guess ZRELADDR based on sp instead of pc it even should work if
ZBOOT_ROMis defined?!What is the relation between sp and ZRELADDR?
While we're pushing forward the notion of a relation between phys offset and the location where zImage is loaded in memory, I think that making the association with sp is a bit too obscur. ?Knowing where you upload your kernel is clear, knowing where the stack is allocated in relation to that is not that clear. ?It is in the .bss section of course, but when
ZBOOT_ROMis not defined then the .bss happens to be right after the zImage binary, while it must be explicitly specified otherwise.Quoted 9 lines · Uwe Kleine-K?nig
Quoted 4 lines · Nicolas Pitre
If you're using
ZBOOT_ROMthat means you want to execute zImage directly from ROM. ?This is therefore a highly customized configuration. ?In that context, having a variable phys-offset doesn't make much sense to start with.Right, but then the kernel needs to know this fixed value for phys-offset. ?In the patches presented by Eric the person configuring the kernel needs to know that value. ?When guessing based on sp she doesn't need to read addional docs when enabling
ZBOOT_ROM.That's presuming phys offset would still be runtime determined. ?Again, if you care about
ZBOOT_ROM, you probably want a fixed phys offset at compile time too. ?So that value has to be determined at kernel config time, not at run time from pc or sp. ?And when dealing with such customized expert config options, she better know what she's doing and be familiar with the memory layout so not to have to read the datasheet only for the physical RAM offset while she already must know what flash offset to use.
Quoted 8 lines
If anything, you _could_ try doing something similar to:
config
PHYS_OFFSET
? ? ? ?[prompt]
? ? ? ?default (CONFIG_ZBOOT_ROM_BSS&0xf0000000) ifZBOOT_ROMbut I doubt
Kconfigmight accept such a syntax.
No, Kconfig doesn't. I tried to play this a bit with Kconfig, but failed.
cover Makefile.boot cleanup
In reply to Nicolas Pitre2010/6/18 Nicolas Pitre <[email protected]>:
Quoted 20 lines · Uwe Kleine-K?nig
Quoted 10 lines
Hello Eric,
Quoted 6 lines · Eric Miao
Several facts:
1. ZRELADDR in most cases can be auto detected by maksing PC with ? ?0xf000_0000 if the zImage is placed within the first 256MiB from ? ?the memory start, which is a sane assumption except for:
Quoted 6 lines
Quoted 4 lines
? ?- when
ARCH_MX1orARCH_SHARKis defined
? ?- whenARCH_U300is defined (U300 really is strange when defining ? ? ?PHYS_OFFSET and ZRELADDR)
? ?- or whenZBOOT_ROMis definedIf you guess ZRELADDR based on sp instead of pc it even should work if
ZBOOT_ROMis defined?!What is the relation between sp and ZRELADDR?
Quoted 8 lines
While we're pushing forward the notion of a relation between phys offset and the location where zImage is loaded in memory, I think that making the association with sp is a bit too obscur. ?Knowing where you upload your kernel is clear, knowing where the stack is allocated in relation to that is not that clear. ?It is in the .bss section of course, but when
ZBOOT_ROMis not defined then the .bss happens to be right after the zImage binary, while it must be explicitly specified otherwise.
I agree with Nico. Associating PHYS_OFFSET with pc is more straight-forward, and I think it will save us some effort just not to support a runtime phys_offset
with ZBOOT enabled.
cover cleanup in early boot code
In reply to Eric MiaoHello,
a while ago I sent a few patches that clean up in this area, too, some of them are orthogonal to Eric's. I resend them in reply to this mail.
Eric, maybe we can start merging your and my work, at least the bits that doesn't need further discussion between us? (i.e. the patches I acked and hopefully the first few of mine)
Do you irc? I'm (e.g.) in #armlinux on freenode.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 1/10 arm/zImage: don't hard code the stack size twice
--- arch/arm/boot/compressed/head.S | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/boot/compressed/head.S +2 -1
@@ -315,7 +315,7 @@ LC0: .word LC0 @ r1 .word _image_size @ r6 .word _got_start @ r11 .word _got_end @ ip - .word user_stack+4096 @ sp + .word user_stack_end @ sp LC1: .word reloc_end - reloc_start .size LC0, . - LC0
@@ -1070,3 +1070,4 @@ reloc_end: .align .section ".stack", "w" user_stack: .space 4096 +user_stack_end:
Signature · 1 line
1.7.1
PATCH 1/10 arm/zImage: don't hard code the stack size twice
2010/6/10 Uwe Kleine-K?nig <[email protected]>:
Quoted 19 lines
Signed-off-by Uwe Kleine-K?nig <[email protected]>---
?arch/arm/boot/compressed/head.S | ? ?3 ++-
?1 files changed, 2 insertions(+), 1 deletions(-)arch/arm/boot/compressed/head.S +0
-0@@ -315,7 +315,7 @@ LC0: ? ? ? ? ? ? ? ?.word ? LC0 ? ? ? ? ? ? ? ? ? ? @ r1? ? ? ? ? ? ? ?.word ?
_image_size? ? ? ? ? ? @ r6 ? ? ? ? ? ? ? ?.word ?_got_start? ? ? ? ? ? ?@ r11 ? ? ? ? ? ? ? ?.word ?_got_end? ? ? ? ? ? ? ?@ ip
- ? ? ? ? ? ? ? .word ? user_stack+4096 ? ? ? ? @ sp
+ ? ? ? ? ? ? ? .word ?user_stack_end? ? ? ? ?@ sp ?LC1: ? ? ? ? ? .word ?reloc_end-reloc_start? ? ? ? ? ? ? ?.size ? LC0, . - LC0arch/arm/boot/compressed/head.S +0
-0@@ -1070,3 +1070,4 @@ reloc_end:
Quoted 4 lines
? ? ? ? ? ? ? ?.align
? ? ? ? ? ? ? ?.section ".stack", "w"
?user_stack: ? ?.space ?4096
+user_stack_end:
This one looks OK to me.
PATCH 1/10 arm/zImage: don't hard code the stack size twice
Quoted 27 lines · Eric Miao
2010/6/10 Uwe Kleine-K?nig <[email protected]>:
Quoted 19 lines
Signed-off-by Uwe Kleine-K?nig <[email protected]>---
?arch/arm/boot/compressed/head.S | ? ?3 ++-
?1 files changed, 2 insertions(+), 1 deletions(-)arch/arm/boot/compressed/head.S +0
-0@@ -315,7 +315,7 @@ LC0: ? ? ? ? ? ? ? ?.word ? LC0 ? ? ? ? ? ? ? ? ? ? @ r1? ? ? ? ? ? ? ?.word ?
_image_size? ? ? ? ? ? @ r6 ? ? ? ? ? ? ? ?.word ?_got_start? ? ? ? ? ? ?@ r11 ? ? ? ? ? ? ? ?.word ?_got_end? ? ? ? ? ? ? ?@ ip
- ? ? ? ? ? ? ? .word ? user_stack+4096 ? ? ? ? @ sp
+ ? ? ? ? ? ? ? .word ?user_stack_end? ? ? ? ?@ sp ?LC1: ? ? ? ? ? .word ?reloc_end-reloc_start? ? ? ? ? ? ? ?.size ? LC0, . - LC0arch/arm/boot/compressed/head.S +0
-0@@ -1070,3 +1070,4 @@ reloc_end:Quoted 4 lines
? ? ? ? ? ? ? ?.align
? ? ? ? ? ? ? ?.section ".stack", "w"
?user_stack: ? ?.space ?4096
+user_stack_end:This one looks OK to me.
Quoted 1 line
Acked-by Eric Miao <[email protected]>
Nicolas
PATCH 2/10 arm/zImage: some comments for __armv3_mpu_cache_on
In reply to Uwe Kleine-König__armv3_mpu_cache_on seems broken. As there is noone around who knows about these machines just keep the code as is but point out the strange things.
--- arch/arm/boot/compressed/head.S | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
arch/arm/boot/compressed/head.S +3 -0
@@ -396,12 +396,15 @@ __armv3_mpu_cache_on: mov r0, #0 mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 + /* ?? ARMv3 MMU doesn not allow reading the control register, does this really work on ARMv3 MPU? */ mrc p15, 0, r0, c1, c0, 0 @ read control reg @ .... .... .... WC.M orr r0, r0, #0x000d @ .... .... .... 11.1 + /* ?? this overwrites the value constructed above? */ mov r0, #0 mcr p15, 0, r0, c1, c0, 0 @ write control reg + /* ?? invalidate for the second time? */ mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 mov pc, lr
Signature · 1 line
1.7.1
PATCH 2/10 arm/zImage: some comments for __armv3_mpu_cache_on
Hello.
Quoted 14 lines · Uwe Kleine-K?nig
__armv3_mpu_cache_onseems broken. As there is noone around who knows about these machines just keep the code as is but point out the strange things.Signed-off-by Uwe Kleine-K?nig <[email protected]>--- arch/arm/boot/compressed/head.S | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)arch/arm/boot/compressed/head.S +0
-0
arch/arm/boot/compressed/head.S __armv3_mpu_cache_on: · line 399
Quoted 4 lines
arch/arm/boot/compressed/head.S +1
-0@@ -396,12 +396,15 @@ __armv3_mpu_cache_on: mov r0, #0 mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 + /* ?? ARMv3 MMU doesn not allow reading the control register, does this really work on ARMv3 MPU? */
Only "does not".
WBR, Sergei
PATCH 2/10 arm/zImage: some comments for __armv3_mpu_cache_on
In reply to Uwe Kleine-König2010/6/10 Uwe Kleine-K?nig <[email protected]>:
Quoted 20 lines
__armv3_mpu_cache_onseems broken. ?As there is noone around who knows about these machines just keep the code as is but point out the strange things.Signed-off-by Uwe Kleine-K?nig <[email protected]>---
?arch/arm/boot/compressed/head.S | ? ?3 +++
?1 files changed, 3 insertions(+), 0 deletions(-)arch/arm/boot/compressed/head.S +0
-0@@ -396,12 +396,15 @@ __armv3_mpu_cache_on:? ? ? ? ? ? ? ?mov ? ? r0, #0
? ? ? ? ? ? ? ?mcr ? ? p15, 0, r0, c7, c0, 0 ? @ invalidate whole cache v3
+ ? ? ? ? ? ? ? /* ?? ARMv3 MMU doesn not allow reading the control register, does this really work on ARMv3 MPU? */
Quoted 1 line
From [email protected] Sun Jun 6 12:36:48 2010
From: [email protected] ()
Date: Sun, 06 Jun 2010 16:36:48 -0000
Subject: No subject
Message-ID: <[email protected]>
http://en.wikipedia.org/wiki/ARM_architecture
ARM740T is actually V4T, and reading of control register should be OK. Although I guess due to historic reason, it's using armv3_* prefix for the functions?
Quoted 1 line
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0mrc =C2=A0 =C2=A0 =
p15, 0, r0, c1, c0, 0 =C2=A0 @ read control reg
Quoted 1 line
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0@ .... .... .... WC.M
Quoted 1 line
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0orr =C2=A0 =C2=A0 =
r0, r0, #0x000d =C2=A0 =C2=A0 =C2=A0 =C2=A0 @ .... .... .... 11.1
Quoted 1 line
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* ?? this overwrites =
the value constructed above? */
Quoted 1 line
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0mov =C2=A0 =C2=A0 =
r0, #0
This does seem to be an error.
Quoted 1 line
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0mcr =C2=A0 =C2=A0 =
p15, 0, r0, c1, c0, 0 =C2=A0 @ write control reg
Quoted 2 lines
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* ?? invalidate for t=
he second time? */
Quoted 1 line
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0mcr =C2=A0 =C2=A0 =
p15, 0, r0, c7, c0, 0 =C2=A0 @ invalidate whole cache v3
Quoted 1 line
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0mov =C2=A0 =C2=A0 =
pc, lr
Quoted 10 lines
--
1.7.1_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 2/10 arm/zImage: some comments for __armv3_mpu_cache_on
Quoted 7 lines · Eric Miao
Quoted 5 lines
? ? ? ? ? ? ? ?mrc ? ? p15, 0, r0, c1, c0, 0 ? @ read control reg ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?@ .... .... .... WC.M ? ? ? ? ? ? ? ?orr ? ? r0, r0, #0x000d ? ? ? ? @ .... .... .... 11.1
+ ? ? ? ? ? ? ? /* ?? this overwrites the value constructed above? */ ? ? ? ? ? ? ? ?mov ? ? r0, #0This does seem to be an error.
If we can't test the removal of that line, we have to assume that the existing code was tested, and did work. (It certainly will work, but slower because the caches would not be on.) We don't know if removing this line would cause problems.
I think it's better just to add a comment about it, and leave the code as-is.
However, if someone has an ARM740T system and can test the removal of this, then we can remove it. I suspect that ARM740T systems are rarely worked on now though - esp. as the whole nommu stuff doesn't seem to get much attention.
PATCH 3/10 arm/zImage: __armv3_mpu_cache_flush: respect should-be-zero specification
In reply to Uwe Kleine-KönigProbably the register content for cache operations is "don't care" in practice, but as r1 is explicitly zeroed, use that one.
--- arch/arm/boot/compressed/head.S | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/boot/compressed/head.S +1 -1
@@ -991,7 +991,7 @@ no_cache_id: __armv3_mmu_cache_flush: __armv3_mpu_cache_flush: mov r1, #0 - mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 + mcr p15, 0, r1, c7, c0, 0 @ invalidate whole cache v3 mov pc, lr /*
Signature · 1 line
1.7.1
PATCH 3/10 arm/zImage: __armv3_mpu_cache_flush: respect should-be-zero specification
2010/6/10 Uwe Kleine-K?nig <[email protected]>:
Quoted 13 lines
Probably the register content for cache operations is "don't care" in practice, but as r1 is explicitly zeroed, use that one.
Signed-off-by Uwe Kleine-K?nig <[email protected]>---
?arch/arm/boot/compressed/head.S | ? ?2 +-
?1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/boot/compressed/head.S +0
-0@@ -991,7 +991,7 @@ no_cache_id:
Quoted 6 lines
?__armv3_mmu_cache_flush:
?__armv3_mpu_cache_flush:
? ? ? ? ? ? ? ?mov ? ? r1, #0
- ? ? ? ? ? ? ? mcr ? ? p15, 0, r0, c7, c0, 0 ? @ invalidate whole cache v3
+ ? ? ? ? ? ? ? mcr ? ? p15, 0, r1, c7, c0, 0 ? @ invalidate whole cache v3 ? ? ? ? ? ? ? ?mov ? ? pc, lr
And this is at least more consistent with arch/arm/mm/cache-v3.S, so
PATCH 4/10 arm/zImage: fix comments for cache_on, cache_off and cache_clean_flush
In reply to Uwe Kleine-KönigThis adds missing registers to the list of corrupted registers and removes a wrong comment about r9 on entry
While at it the formatting of the comment to cache_off is changed to resemble the other two.
--- arch/arm/boot/compressed/head.S | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
arch/arm/boot/compressed/head.S +6 -5
@@ -339,9 +339,8 @@ params: ldr r0, =params_phys * r4 = kernel execution address * r7 = architecture number * r8 = atags pointer - * r9 = run-time address of "start" (???) * On exit, - * r1, r2, r3, r9, r10, r12 corrupted + * r0, r1, r2, r3, r9, r10, r12 corrupted * This routine must preserve: * r4, r5, r6, r7, r8 */
@@ -774,8 +773,10 @@ proc_types: * Turn off the Cache and MMU. ARMv3 does not support * reading the control register, but ARMv4 does. * - * On exit, r0, r1, r2, r3, r9, r12 corrupted - * This routine must preserve: r4, r6, r7 + * On exit, + * r0, r1, r2, r3, r9, r12 corrupted + * This routine must preserve: + * r4, r6, r7 */ .align 5 cache_off: mov r3, #12 @ cache_off function
@@ -848,7 +849,7 @@ __armv3_mmu_cache_off: * Clean and flush the cache to maintain consistency. * * On exit, - * r1, r2, r3, r9, r11, r12 corrupted + * r1, r2, r3, r9, r10, r11, r12 corrupted * This routine must preserve: * r0, r4, r5, r6, r7 */
Signature · 1 line
1.7.1
PATCH 4/10 arm/zImage: fix comments for cache_on, cache_off and cache_clean_flush
2010/6/10 Uwe Kleine-K?nig <[email protected]>:
Quoted 16 lines
This adds missing registers to the list of corrupted registers and removes a wrong comment about r9 on entry
While at it the formatting of the comment to
cache_offis changed to resemble the other two.Signed-off-by Uwe Kleine-K?nig <[email protected]>---
?arch/arm/boot/compressed/head.S | ? 11 ++++++----- ?1 files changed, 6 insertions(+), 5 deletions(-)arch/arm/boot/compressed/head.S +0
-0@@ -339,9 +339,8 @@ params: ? ? ? ? ? ? ldr ? ? r0, =params_phys
Quoted 4 lines
?* ?r4 = kernel execution address
?* ?r7 = architecture number
?* ?r8 = atags pointer
- * ?r9 = run-time address of "start" ?(???)
OK. r9 is actually loaded with CPUID at the very first of call_cache_fn, so I seriously doubt its usage on entrance.
Quoted 3 lines
?* On exit,
- * ?r1, r2, r3, r9, r10, r12 corrupted
+ * ?r0, r1, r2, r3, r9, r10, r12 corrupted
OK.
Quoted 5 lines
?* This routine must preserve:
?* ?r4, r5, r6, r7, r8
?*/arch/arm/boot/compressed/head.S +0
-0@@ -774,8 +773,10 @@ proc_types:?* Turn off the Cache and MMU. ?ARMv3 does not support
Quoted 8 lines
?* reading the control register, but ARMv4 does.
?*
- * On exit, r0, r1, r2, r3, r9, r12 corrupted
- * This routine must preserve: r4, r6, r7
+ * On exit,
+ * ?r0, r1, r2, r3, r9, r12 corrupted
+ * This routine must preserve:
+ * ?r4, r6, r7
OK, as talked, this looks to align with other comments in this file.
Quoted 9 lines
?*/
? ? ? ? ? ? ? ?.align ?5
?cache_off: ? ? mov ? ? r3, #12 ? ? ? ? ? ? ? ? @cache_offfunctionarch/arm/boot/compressed/head.S +0
-0@@ -848,7 +849,7 @@ __armv3_mmu_cache_off:?* Clean and flush the cache to maintain consistency. ?*
?* On exit,
- * ?r1, r2, r3, r9, r11, r12 corrupted
+ * ?r1, r2, r3, r9, r10, r11, r12 corrupted
OK, took another look and r10 is corrupted in __armv7_mmu_cache_flush, where it's used to hold the ID_MMFR1.
Quoted 3 lines
?* This routine must preserve:
?* ?r0, r4, r5, r6, r7
?*/
So,
PATCH 5/10 arm/zImage: annotate debug functions about corrupted registers
In reply to Uwe Kleine-König--- arch/arm/boot/compressed/head.S | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/boot/compressed/head.S +4 -0
@@ -1005,6 +1005,7 @@ __armv3_mpu_cache_flush: phexbuf: .space 12 .size phexbuf, . - phexbuf +@ phex corrupts {r0, r1, r2, r3} phex: adr r3, phexbuf mov r2, #0 strb r2, [r3, r1]
@@ -1019,6 +1020,7 @@ phex: adr r3, phexbuf strb r2, [r3, r1] b 1b +@ puts corrupts {r0, r1, r2, r3} puts: loadsp r3, r1 1: ldrb r2, [r0], #1 teq r2, #0
@@ -1033,12 +1035,14 @@ puts: loadsp r3, r1 teq r0, #0 bne 1b mov pc, lr +@ putc corrupts {r0, r1, r2, r3} putc: mov r2, r0 mov r0, #0 loadsp r3, r1 b 2b +@ memdump corrupts {r0, r1, r2, r3, r10, r11, r12, lr} memdump: mov r12, r0 mov r10, lr mov r11, #0
Signature · 1 line
1.7.1
PATCH 5/10 arm/zImage: annotate debug functions about corrupted registers
2010/6/10 Uwe Kleine-K?nig <[email protected]>:
Quoted 1 line
Signed-off-by Uwe Kleine-K?nig <[email protected]>
Not sure if this is absolutely necessary, though.
Quoted 48 lines
---
?arch/arm/boot/compressed/head.S | ? ?4 ++++
?1 files changed, 4 insertions(+), 0 deletions(-)arch/arm/boot/compressed/head.S +0
-0@@ -1005,6 +1005,7 @@ __armv3_mpu_cache_flush:?phexbuf: ? ? ? .space ?12
? ? ? ? ? ? ? ?.size ? phexbuf, . - phexbuf+@ phex corrupts {r0, r1, r2, r3}
?phex: ? ? ? ? ?adr ? ? r3, phexbuf
? ? ? ? ? ? ? ?mov ? ? r2, #0
? ? ? ? ? ? ? ?strb ? ?r2, [r3, r1]arch/arm/boot/compressed/head.S +0
-0@@ -1019,6 +1020,7 @@ phex: ? ? ? ? ? ? adr ? ? r3, phexbuf? ? ? ? ? ? ? ?strb ? ?r2, [r3, r1]
? ? ? ? ? ? ? ?b ? ? ? 1b+@ puts corrupts {r0, r1, r2, r3}
?puts: ? ? ? ? ?loadsp ?r3, r1
?1: ? ? ? ? ? ? ldrb ? ?r2, [r0], #1
? ? ? ? ? ? ? ?teq ? ? r2, #0arch/arm/boot/compressed/head.S +0
-0@@ -1033,12 +1035,14 @@ puts: ? ? ? ? ? loadsp ?r3, r1? ? ? ? ? ? ? ?teq ? ? r0, #0
? ? ? ? ? ? ? ?bne ? ? 1b
? ? ? ? ? ? ? ?mov ? ? pc, lr
+@ putc corrupts {r0, r1, r2, r3}
?putc:
? ? ? ? ? ? ? ?mov ? ? r2, r0
? ? ? ? ? ? ? ?mov ? ? r0, #0
? ? ? ? ? ? ? ?loadsp ?r3, r1
? ? ? ? ? ? ? ?b ? ? ? 2b+@ memdump corrupts {r0, r1, r2, r3, r10, r11, r12, lr} ?memdump: ? ? ? mov ? ? r12, r0
? ? ? ? ? ? ? ?mov ? ? r10, lr
? ? ? ? ? ? ? ?mov ? ? r11, #0
--
1.7.1_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 5/10 arm/zImage: annotate debug functions about corrupted registers
Quoted 4 lines · Eric Miao
2010/6/10 Uwe Kleine-K?nig <[email protected]>:
Quoted 1 line
Signed-off-by Uwe Kleine-K?nig <[email protected]>Not sure if this is absolutely necessary, though.
I had to analyze which registers are corrupted to create the last patch in the series. I don't have strong feelings but thought to document my findings.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 6/10 arm: remove bit-rotten STANDALONE_DEBUG for decompressor
In reply to Uwe Kleine-KönigI tried to get this running to debug the regression introduced by e7db7b4 without success. But this has several problems that make it hard to fix:
- lib/decompress_inflate.c includes in-kernel headers that make it difficult to compile for user space.
- the binary formats changed both in kernel and user space and at least for the kernel side there isn't only a single variant.
--- arch/arm/boot/compressed/Makefile.debug | 23 ----------------------- arch/arm/boot/compressed/misc.c | 20 -------------------- 2 files changed, 0 insertions(+), 43 deletions(-) delete mode 100644 arch/arm/boot/compressed/Makefile.debug
arch/arm/boot/compressed/Makefile.debug deleted +0 -23
@@ -1,23 +0,0 @@ -# -# linux/arch/arm/boot/compressed/Makefile -# -# create a compressed vmlinux image from the original vmlinux -# - -COMPRESSED_EXTRA=../../lib/ll_char_wr.o -OBJECTS=misc-debug.o ll_char_wr.aout.o - -CFLAGS=-D__KERNEL__ -O2 -DSTDC_HEADERS -DSTANDALONE_DEBUG -Wall -I../../../../include -c - -test-gzip: piggy.aout.o $(OBJECTS) - $(CC) -o $@ $(OBJECTS) piggy.aout.o - -misc-debug.o: misc.c - $(CC) $(CFLAGS) -o $@ misc.c - -piggy.aout.o: piggy.o - arm-linuxelf-objcopy --change-leading-char -I elf32-arm -O arm-aout32-linux piggy.o piggy.aout.o - -ll_char_wr.aout.o: $(COMPRESSED_EXTRA) - arm-linuxelf-objcopy --change-leading-char -I elf32-arm -O arm-aout32-linux $(COMPRESSED_EXTRA) ll_char_wr.aout.o -
arch/arm/boot/compressed/misc.c +0 -20
@@ -28,9 +28,6 @@ unsigned int __machine_arch_type;#include <asm/unaligned.h> -#ifdef STANDALONE_DEBUG -#define putstr printf -#else static void putstr (const char *ptr);extern void error (char *x);
@@ -116,7 +113,6 @@ static void putstr(const char *ptr)flush (); } -#endif void *memcpy(void *__dest, __const void *__src, size_t __n) {
@@ -186,7 +182,6 @@ asmlinkage void __div0(void)extern void do_decompress (u8 *input,int len,u8 *output,void (*error)(char *x)); -#ifndef STANDALONE_DEBUG unsigned long 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,putstr (" done, booting the kernel.\n" );return output_ptr; } -#else - -char output_buffer[1500 *1024 ]; - -int main () -{ - output_data = output_buffer; - -putstr ("Uncompressing Linux..." ); -decompress (input_data, input_data_end - input_data, -NULL ,NULL , output_data,NULL , error); -putstr ("done.\n" ); -return 0 ; -} -#endif
Signature · 1 line
1.7.1
PATCH 6/10 arm: remove bit-rotten STANDALONE_DEBUG for decompressor
2010/6/10 Uwe Kleine-K?nig <[email protected]>:
Quoted 11 lines
I tried to get this running to debug the regression introduced by e7db7b4 without success. ?But this has several problems that make it hard to fix:
?-
lib/decompress_inflate.cincludes in-kernel headers that make ? ?it difficult to compile for user space.
?- the binary formats changed both in kernel and user space and ? ?at least for the kernel side there isn't only a single ? ?variant.Signed-off-by Uwe Kleine-K?nig <[email protected]>
If it's not fixable, my personal feeling is agree with you to remove it.
Quoted 93 lines
---
?arch/arm/boot/compressed/Makefile.debug | ? 23 ----------------------- ?arch/arm/boot/compressed/misc.c ? ? ? ? | ? 20 -------------------- ?2 files changed, 0 insertions(+), 43 deletions(-)
?delete mode 100644arch/arm/boot/compressed/Makefile.debugarch/arm/boot/compressed/Makefile.debug deleted +0
-23@@ -1,23 +0,0 @@ -# -# linux/arch/arm/boot/compressed/Makefile -# -# create a compressed vmlinux image from the original vmlinux -# - -COMPRESSED_EXTRA=../../lib/ll_char_wr.o -OBJECTS=misc-debug.o ll_char_wr.aout.o - -CFLAGS=-D__KERNEL__ -O2 -DSTDC_HEADERS -DSTANDALONE_DEBUG -Wall -I../../../../include -c - -test-gzip: piggy.aout.o $(OBJECTS) - ? ? ? $(CC) -o $@ $(OBJECTS) piggy.aout.o - -misc-debug.o: misc.c - ? ? ? $(CC) $(CFLAGS) -o $@ misc.c - -piggy.aout.o: piggy.o - ? ? ? arm-linuxelf-objcopy --change-leading-char -I elf32-arm -O arm-aout32-linux piggy.o piggy.aout.o - -ll_char_wr.aout.o: $(COMPRESSED_EXTRA) - ? ? ? arm-linuxelf-objcopy --change-leading-char -I elf32-arm -O arm-aout32-linux $(COMPRESSED_EXTRA) ll_char_wr.aout.o -arch/arm/boot/compressed/misc.c +0
-0@@ -28,9 +28,6 @@ unsigned int __machine_arch_type;?#include <
asm/unaligned.h>arch/arm/boot/compressed/misc.c +0
-3-#ifdef STANDALONE_DEBUG -#define putstr printf -#else ?static void
putstr(const char *ptr);
?extern voiderror(char *x);arch/arm/boot/compressed/misc.c +0
-2@@ -116,7 +113,6 @@ static void putstr(const char *ptr) ? ? ? ?flush(); ?} -#endif ?void *memcpy(void *__dest, __const void *__src, size_t __n) ?{@@ -186,7 +182,6 @@ asmlinkage void __div0(void) ?extern void do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x)); -#ifndef STANDALONE_DEBUG ?unsigned long
?decompress_kernel(unsigned longoutput_start, unsigned longfree_mem_ptr_p,arch/arm/boot/compressed/misc.c +0
-16@@ -211,18 +206,3 @@ decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p, ? ? ? ?putstr(" done, booting the kernel.\n"); ? ? ? ?return output_ptr; ?} -#else - -char output_buffer[1500 *1024 ]; - -int main () -{ - ? ? ? output_data = output_buffer; - - ? ? ? putstr("Uncompressing Linux..."); - ? ? ? decompress(input_data, input_data_end - input_data, - ? ? ? ? ? ? ? ? ? ? ? NULL, NULL, output_data, NULL, error); - ? ? ? putstr("done.\n"); - ? ? ? return 0; -} -#endif --1.7.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 7/10 arm/zImage: don't define unused symbol initrd_phys
In reply to Uwe Kleine-KönigThe only user of initrd_phys is arch/arm/boot/bootp/init.S which still gets the value passed to.
--- arch/arm/boot/compressed/Makefile | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-)
arch/arm/boot/compressed/Makefile +3 -6
@@ -79,16 +79,13 @@ endif EXTRA_CFLAGS := -fpic -fno-builtin EXTRA_AFLAGS := -Wa,-march=all -# Supply ZRELADDR, INITRD_PHYS and PARAMS_PHYS to the decompressor via -# linker symbols. We only define initrd_phys and params_phys if the -# machine class defined the corresponding makefile variable. +# Supply ZRELADDR and PARAMS_PHYS to the decompressor via linker symbols. We +# only define params_phys if the machine class defined the corresponding +# makefile variable. LDFLAGS_vmlinux := --defsym zreladdr=$(ZRELADDR) ifeq ($(CONFIG_CPU_ENDIAN_BE8),y) LDFLAGS_vmlinux += --be8 endif -ifneq ($(INITRD_PHYS),) -LDFLAGS_vmlinux += --defsym initrd_phys=$(INITRD_PHYS) -endif ifneq ($(PARAMS_PHYS),) LDFLAGS_vmlinux += --defsym params_phys=$(PARAMS_PHYS) endif
Signature · 1 line
1.7.1
PATCH 7/10 arm/zImage: don't define unused symbol initrd_phys
2010/6/10 Uwe Kleine-K?nig <[email protected]>:
Quoted 4 lines
The only user of
initrd_physisarch/arm/boot/bootp/init.Swhich still gets the value passed to.Signed-off-by Uwe Kleine-K?nig <[email protected]>
Quoted 37 lines
---
?arch/arm/boot/compressed/Makefile | ? ?9 +++------ ?1 files changed, 3 insertions(+), 6 deletions(-)arch/arm/boot/compressed/Makefile +0
-0@@ -79,16 +79,13 @@ endif?EXTRA_CFLAGS ?:= -fpic -fno-builtin
?EXTRA_AFLAGS ?:= -Wa,-march=allarch/arm/boot/compressed/Makefile +3
-3-# Supply ZRELADDR, INITRD_PHYS and PARAMS_PHYS to the decompressor via -# linker symbols. ?We only define initrd_phys and params_phys if the -# machine class defined the corresponding makefile variable. +# Supply ZRELADDR and PARAMS_PHYS to the decompressor via linker symbols. ?We +# only define params_phys if the machine class defined the corresponding +# makefile variable.?LDFLAGS_vmlinux := --defsym zreladdr=$(ZRELADDR)
?ifeq ($(CONFIG_CPU_ENDIAN_BE8),y)
?LDFLAGS_vmlinux += --be8
?endifarch/arm/boot/compressed/Makefile +0
-3-ifneq ($(INITRD_PHYS),) -LDFLAGS_vmlinux += --defsym initrd_phys=$(INITRD_PHYS) -endif?ifneq ($(PARAMS_PHYS),)
?LDFLAGS_vmlinux += --defsym params_phys=$(PARAMS_PHYS) ?endif
--
1.7.1_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 8/10 arm: deprecate support for old way to pass kernel parameters
In reply to Uwe Kleine-KönigThis was deprecated in 2001 and announced to live on for 5 years.
For now provide a kernel parameter for those who still need it.
--- arch/arm/Kconfig | 6 ++++++ arch/arm/kernel/Makefile | 4 +++- arch/arm/kernel/compat.c | 7 ------- arch/arm/kernel/compat.h | 2 -- arch/arm/kernel/setup.c | 11 +++++++++++ 5 files changed, 20 insertions(+), 10 deletions(-)
arch/arm/Kconfig +6 -0
@@ -1374,6 +1374,12 @@ config UACCESS_WITH_MEMCPY However, if the CPU data cache is using a write-allocate mode, this option is unlikely to provide any performance gain. +config DEPRECATED_PARAM_STRUCT + bool "Provide old way to pass kernel parameters" + help + This was deprecated in 2001 and announced to live on for 5 years. + Some old boot loaders still use this way. + endmenu menu "Boot options"
arch/arm/kernel/Makefile +3 -1
@@ -13,10 +13,12 @@ CFLAGS_REMOVE_return_address.o = -pg # Object file lists. -obj-y := compat.o elf.o entry-armv.o entry-common.o irq.o \ +obj-y := elf.o entry-armv.o entry-common.o irq.o \ process.o ptrace.o return_address.o setup.o signal.o \ sys_arm.o stacktrace.o time.o traps.o +obj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += compat.o + obj-$(CONFIG_LEDS) += leds.o obj-$(CONFIG_OC_ETM) += etm.o
arch/arm/kernel/compat.c +0 -7
@@ -217,10 +217,3 @@ void __init convert_to_tag_list(struct tag *tags)struct param_struct *params = (struct param_struct *)tags;build_tag_list (params, ¶ms->u2); } - -void __init squash_mem_tags (struct tag *tag) -{ -for (; tag->hdr.size; tag =tag_next (tag)) -if (tag->hdr.tag ==ATAG_MEM ) - tag->hdr.tag =ATAG_NONE ; -}
arch/arm/kernel/compat.h +0 -2
@@ -9,5 +9,3 @@*/ extern void convert_to_tag_list (struct tag *tags); - -extern void squash_mem_tags (struct tag *tag);
arch/arm/kernel/setup.c +11 -0
@@ -44,7 +44,9 @@#include <asm/traps.h> #include <asm/unwind.h> +#if defined(CONFIG_DEPRECATED_PARAM_STRUCT )#include "compat.h" +#endif #include "atags.h" #include "tcm.h"
@@ -663,6 +665,13 @@ static int __init customize_machine(void) }arch_initcall (customize_machine); +static void __init squash_mem_tags (struct tag *tag) +{ +for (; tag->hdr.size; tag =tag_next (tag)) +if (tag->hdr.tag ==ATAG_MEM ) + tag->hdr.tag =ATAG_NONE ; +} +void __init setup_arch (char **cmdline_p) {struct tag *tags = (struct tag *)&init_tags;
@@ -683,12 +692,14 @@ void __init setup_arch(char **cmdline_p)else if (mdesc->boot_params) tags =phys_to_virt (mdesc->boot_params); +#if defined(CONFIG_DEPRECATED_PARAM_STRUCT )/* * If we have the old style parameters, convert them to * a tag list. */ if (tags->hdr.tag !=ATAG_CORE )convert_to_tag_list (tags); +#endif if (tags->hdr.tag !=ATAG_CORE ) tags = (struct tag *)&init_tags;
Signature · 1 line
1.7.1
PATCH 8/10 arm: deprecate support for old way to pass kernel parameters
2010/6/10 Uwe Kleine-K?nig <[email protected]>:
Quoted 5 lines
This was deprecated in 2001 and announced to live on for 5 years.
For now provide a kernel parameter for those who still need it.
Signed-off-by Uwe Kleine-K?nig <[email protected]>
Looks OK to me, Acked.
BTW, is there any existing usage of this and can we remove this completely from now on?
Quoted 120 lines
---
?arch/arm/Kconfig ? ? ? ? | ? ?6 ++++++ ?arch/arm/kernel/Makefile | ? ?4 +++- ?arch/arm/kernel/compat.c | ? ?7 ------- ?arch/arm/kernel/compat.h | ? ?2 -- ?arch/arm/kernel/setup.c ?| ? 11 +++++++++++?5 files changed, 20 insertions(+), 10 deletions(-)
arch/arm/Kconfig +0
-0@@ -1374,6 +1374,12 @@ config UACCESS_WITH_MEMCPY ? ? ? ? ?However, if the CPU data cache is using a write-allocate mode,? ? ? ? ?this option is unlikely to provide any performance gain.
arch/arm/Kconfig +6
-0+config DEPRECATED_PARAM_STRUCT + ? ? ? bool "Provide old way to pass kernel parameters" + ? ? ? help + ? ? ? ? This was deprecated in 2001 and announced to live on for 5 years. + ? ? ? ? Some old boot loaders still use this way. +?endmenu
?menu "Boot options"
arch/arm/kernel/Makefile +0
-0@@ -13,10 +13,12 @@ CFLAGS_REMOVE_return_address.o = -pg?# Object file lists.
arch/arm/kernel/Makefile +1
-1-obj-y ? ? ? ? ?:= compat.o elf.o entry-armv.o entry-common.o irq.o \ +obj-y ? ? ? ? ?:= elf.o entry-armv.o entry-common.o irq.o \? ? ? ? ? ? ? ? ? process.o ptrace.o return_address.o setup.o signal.o \
? ? ? ? ? ? ? ? ? sys_arm.o stacktrace.o time.o traps.oarch/arm/kernel/Makefile +2
-0+obj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += compat.o +?obj-$(CONFIG_LEDS) ? ? ? ? ? ? += leds.o
?obj-$(CONFIG_OC_ETM) ? ? ? ? ? += etm.oarch/arm/kernel/compat.c +0
-7@@ -217,10 +217,3 @@ void __init convert_to_tag_list(struct tag *tags) ? ? ? ?struct param_struct *params = (struct param_struct *)tags; ? ? ? ?build_tag_list(params, ¶ms->u2); ?} - -void __init squash_mem_tags (struct tag *tag) -{ - ? ? ? for (; tag->hdr.size; tag = tag_next(tag)) - ? ? ? ? ? ? ? if (tag->hdr.tag == ATAG_MEM) - ? ? ? ? ? ? ? ? ? ? ? tag->hdr.tag = ATAG_NONE; -}arch/arm/kernel/compat.h +0
-0@@ -9,5 +9,3 @@?*/
?extern void
convert_to_tag_list(struct tag *tags);arch/arm/kernel/compat.h +0
-2- -extern void squash_mem_tags (struct tag *tag);arch/arm/kernel/setup.c +0
-0@@ -44,7 +44,9 @@?#include <
asm/traps.h>
?#include <asm/unwind.h>+#if
defined(CONFIG_DEPRECATED_PARAM_STRUCT)
?#include "compat.h"
+#endif
?#include "atags.h"
?#include "tcm.h"arch/arm/kernel/setup.c +8
-0@@ -663,6 +665,13 @@ static int __init customize_machine(void) ?} ?arch_initcall(customize_machine); +static void __init squash_mem_tags (struct tag *tag) +{ + ? ? ? for (; tag->hdr.size; tag = tag_next(tag)) + ? ? ? ? ? ? ? if (tag->hdr.tag == ATAG_MEM) + ? ? ? ? ? ? ? ? ? ? ? tag->hdr.tag = ATAG_NONE; +} + ?void __init setup_arch(char **cmdline_p) ?{ ? ? ? ?struct tag *tags = (struct tag *)&init_tags;@@ -683,12 +692,14 @@ void __init setup_arch(char **cmdline_p) ? ? ? ?else if (mdesc->boot_params) ? ? ? ? ? ? ? ?tags = phys_to_virt(mdesc->boot_params); +#if defined(CONFIG_DEPRECATED_PARAM_STRUCT )? ? ? ?/*
? ? ? ? * If we have the old style parameters, convert them to ? ? ? ? * a tag list.
? ? ? ? */
? ? ? ?if (tags->hdr.tag!=ATAG_CORE)
? ? ? ? ? ? ? ?convert_to_tag_list(tags);
+#endif
? ? ? ?if (tags->hdr.tag!=ATAG_CORE)
? ? ? ? ? ? ? ?tags = (struct tag *)&init_tags;--
1.7.1_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 8/10 arm: deprecate support for old way to pass kernel parameters
Quoted 11 lines · Eric Miao
2010/6/10 Uwe Kleine-K?nig <[email protected]>:
Quoted 5 lines
This was deprecated in 2001 and announced to live on for 5 years.
For now provide a kernel parameter for those who still need it.
Signed-off-by Uwe Kleine-K?nig <[email protected]>Looks OK to me, Acked.
BTW, is there any existing usage of this and can we remove this completely from now on?
Boot messages from my firewall:
Linux version 2.6.32.8 (rmk at rmk-PC) (gcc version 3.4.3) #11 Sat Mar 27 20:51:49 GMT 2010
CPU: StrongARM-110 [4401a102] revision 2 (ARMv4), cr=0000517d
CPU: VIVT data cache, VIVT instruction cache
Machine: EBSA110
Converting old-style param struct to taglistATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
Obviously, being a critical machine here, and that I have no way to jtag it if I brick it, I'm not going to replace the boot loader (which incidentally can only bootp/tftp one file - the one in the bootp packet.)
PATCH 9/10 arm/uImage: require passing a LOADADDR when building with RUNTIME_PHYSOFFSET
In reply to Uwe Kleine-Königthe default load address (in the CONFIG_ZBOOT_ROM=n case) is ZRELADDR which (apart from being a stupid load address for the RUNTIME_PHYSOFFSET=n case) might not be a valid read/write memory on the target machine at all. So require passing a LOADADDR on the command line. This obiously makes the uImage more machine dependant than the zImage.
--- arch/arm/boot/Makefile | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
arch/arm/boot/Makefile +5 -1
@@ -64,11 +64,13 @@ quiet_cmd_uimage = UIMAGE $@ -C none -a $(LOADADDR) -e $(STARTADDR) \ -n 'Linux-$(KERNELRELEASE)' -d $< $@ +ifeq ($(CONFIG_RUNTIME_PHYS_OFFSET),) ifeq ($(CONFIG_ZBOOT_ROM),y) $(obj)/uImage: LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT) else $(obj)/uImage: LOADADDR=$(ZRELADDR) endif +endif ifeq ($(CONFIG_THUMB2_KERNEL),y) # Set bit 0 to 1 so that "mov pc, rx" switches to Thumb-2 mode
@@ -77,7 +79,9 @@ else $(obj)/uImage: STARTADDR=$(LOADADDR) endif -$(obj)/uImage: $(obj)/zImage FORCE +$(obj)/uImage: $(obj)/zImage FORCE + @test -n "$(LOADADDR)" || \ + (echo "You must specify a load address (i.e. make uImage LOADADDR=0x...)"; exit 1) $(call if_changed,uimage) @echo ' Image $@ is ready'
Signature · 1 line
1.7.1
PATCH 10/10 arm: Allow PHYS_OFFSET to be runtime determined
In reply to Uwe Kleine-KönigThis bases on work done earlier by Lennert Buytenhek and Mark A. Greer. Compared to their approach zreladdr isn't guessed based on the pc register but the bootloader is expected to pass PHYS_OFFSET in r3. If that value doesn't look right (e.g. isn't aligned) it is guessed based on the value of sp. This should work for CONFIG_ZBOOT_ROM, too.
To use it for your machine removing the definition of PHYS_OFFSET from <mach/memory.h> and selecting CONFIG_RUNTIME_PHYS_OFFSET should be enough.
---
This patch is only included as I forgot to take it out before sending the initial mail. But maybe it's not bad to have it in this thread, too.
Best regards
Uwe
Documentation/arm/Booting | 1 + arch/arm/Kconfig | 3 ++ arch/arm/boot/compressed/Makefile | 1 + arch/arm/boot/compressed/head.S | 50 +++++++++++++++++++++++++++++++++++++ arch/arm/include/asm/memory.h | 5 +++ arch/arm/kernel/head.S | 31 +++++++++++++++++------ arch/arm/kernel/setup.c | 10 ++++++- 7 files changed, 92 insertions(+), 9 deletions(-)
Documentation/arm/Booting +1 -0
@@ -126,6 +126,7 @@ In either case, the following conditions must be met: r0 = 0, r1 = machine type number discovered in (3) above. r2 = physical address of tagged list in system RAM. + r3 = PHYS_OFFSET - CPU mode All forms of interrupts must be disabled (IRQs and FIQs)
arch/arm/Kconfig +3 -0
@@ -1374,6 +1374,9 @@ config UACCESS_WITH_MEMCPY However, if the CPU data cache is using a write-allocate mode, this option is unlikely to provide any performance gain. +config RUNTIME_PHYS_OFFSET + bool + config DEPRECATED_PARAM_STRUCT bool "Provide old way to pass kernel parameters" help
arch/arm/boot/compressed/Makefile +1 -0
@@ -4,6 +4,7 @@ # create a compressed vmlinuz image from the original vmlinux # +AFLAGS_head.o += -DTEXT_OFFSET=$(TEXT_OFFSET) HEAD = head.o OBJS = misc.o decompress.o FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c
arch/arm/boot/compressed/head.S +50 -0
74 lines not on this page · raw message
arch/arm/include/asm/memory.h +5 -0
@@ -24,6 +24,11 @@*/ #define UL (x) _AC(x, UL) +#if defined(CONFIG_RUNTIME_PHYS_OFFSET ) && !defined(__ASSEMBLY__) +extern unsigned long phys_offset; +#define PHYS_OFFSET phys_offset +#endif +#ifdef CONFIG_MMU /*
arch/arm/kernel/head.S +23 -8
@@ -22,12 +22,14 @@ #include <asm/thread_info.h> #include <asm/system.h> +#if !defined(CONFIG_RUNTIME_PHYS_OFFSET) #if (PHYS_OFFSET & 0x001fffff) #error "PHYS_OFFSET must be at an even 2MiB boundary!" #endif +#define KERNEL_RAM_PADDR (PHYS_OFFSET + TEXT_OFFSET) +#endif #define KERNEL_RAM_VADDR (PAGE_OFFSET + TEXT_OFFSET) -#define KERNEL_RAM_PADDR (PHYS_OFFSET + TEXT_OFFSET) /*
@@ -44,8 +46,8 @@ .globl swapper_pg_dir .equ swapper_pg_dir, KERNEL_RAM_VADDR - 0x4000 - .macro pgtbl, rd - ldr \rd, =(KERNEL_RAM_PADDR - 0x4000) + .macro pgtbl, rd, phys_offset + add \rd, \phys_offset, #(TEXT_OFFSET - 0x4000) .endm #ifdef CONFIG_XIP_KERNEL
@@ -215,9 +217,25 @@ ENDPROC(__turn_mmu_on) * Returns: * r0, r3, r6, r7 corrupted * r4 = physical page table address + * r5 = physical start address of (the first bank of) RAM (PHYS_OFFSET) */ __create_page_tables: - pgtbl r4 @ page table address +#if defined(CONFIG_RUNTIME_PHYS_OFFSET) + @ stext is at PHYS_OFFSET + TEXT_OFFSET. As PHYS_OFFSET has to be + @ 2MiB-aligned and assuming that TEXT_OFFSET < 2MiB + @ stext & 0xffe00000 yields PHYS_OFFSET + adr r5, stext + ldr r4, =0xffe00000 + and r5, r5, r4 + + @ save phys_offset + ldr r4, =(phys_offset - PAGE_OFFSET) + str r5, [r4, r5] +#else + ldr r5, =PHYS_OFFSET +#endif + + pgtbl r4, r5 @ r4 = page table address /* * Clear the 16K level 1 swapper page table
@@ -282,10 +300,7 @@ __create_page_tables: * Then map first 1MB of ram in case it contains our boot params. */ add r0, r4, #PAGE_OFFSET >> 18 - orr r6, r7, #(PHYS_OFFSET & 0xff000000) - .if (PHYS_OFFSET & 0x00f00000) - orr r6, r6, #(PHYS_OFFSET & 0x00f00000) - .endif + orr r6, r7, r5 str r6, [r0] #ifdef CONFIG_DEBUG_LL
arch/arm/kernel/setup.c +9 -1
@@ -69,6 +69,12 @@ __setup("fpe=", fpe_setup);extern void paging_init (struct machine_desc *desc);extern void reboot_setup (char *str); +#if defined(CONFIG_RUNTIME_PHYS_OFFSET ) +/* assign a value to prevent phys_offset from ending in up bss */ +unsigned long phys_offset =0xdeadbeef ; +EXPORT_SYMBOL (phys_offset); +#endif +unsigned int processor_id;EXPORT_SYMBOL (processor_id);unsigned int __machine_arch_type;
@@ -650,7 +656,7 @@ static struct init_tags { { tag_size(tag_core), ATAG_CORE }, { 1, PAGE_SIZE, 0xff }, { tag_size(tag_mem32), ATAG_MEM }, - { MEM_SIZE, PHYS_OFFSET }, + { MEM_SIZE, }, { 0, ATAG_NONE } };
@@ -691,6 +697,8 @@ void __init setup_arch(char **cmdline_p) tags =phys_to_virt (__atags_pointer); else if (mdesc->boot_params) tags =phys_to_virt (mdesc->boot_params); + else + init_tags.mem.start = PHYS_OFFSET;#if defined(CONFIG_DEPRECATED_PARAM_STRUCT )/*
Signature · 1 line
1.7.1
cover cleanup in early boot code
In reply to Uwe Kleine-König2010/6/10 Uwe Kleine-K?nig <[email protected]>:
Quoted 10 lines
Hello,
a while ago I sent a few patches that clean up in this area, too, some of them are orthogonal to Eric's. ?I resend them in reply to this mail.
Eric, maybe we can start merging your and my work, at least the bits that doesn't need further discussion between us? ?(i.e. the patches I acked and hopefully the first few of mine)
Do you irc? ?I'm (e.g.) in #armlinux on freenode.
I'm normally ericm or ericm|ubuntu in #ubuntu-arm, sometime, I'll add #armlinux into my channels to join automatically
Quoted 13 lines
Best regards
Uwe--
Pengutronix e.K. ? ? ? ? ? ? ? ? ? ? ? ? ? | Uwe Kleine-K?nig ? ? ? ? ? ?| Industrial Linux Solutions ? ? ? ? ? ? ? ? | http://www.pengutronix.de/ ?|_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
cover Makefile.boot cleanup
In reply to Eric MiaoHello,
this series is a merge between Eric's and my patches that we did to clean up the early boot code. It doesn't contain runtime physoffset support for now, but I plan to pick that up later.
Best regards
Uwe
The following changes since commit 7e27d6e778cd87b6f2415515d7127eba53fe5d02:
Linux 2.6.35-rc3 (2010-06-11 19:14:04 -0700)
are available in the git repository at:
git://git.pengutronix.de/git/ukl/linux-2.6.git arm/booting
Eric Miao (2):
ARM: Remove unused PARAMS_PHYS from arch/arm/boot/compressed Auto calculate ZRELADDR and provide option for exceptions
Uwe Kleine-K?nig (9):
ARM: zImage: don't hard code the stack size twice
ARM: zImage: some comments for __armv3_mpu_cache_on
ARM: zImage: __armv3_mpu_cache_flush: respect should-be-zero specification
ARM: zImage: fix comments for cache_on, cache_off and cache_clean_flush
ARM: zImage: annotate debug functions about corrupted registers
ARM: remove bit-rotten STANDALONE_DEBUG for decompressor
ARM: zImage: don't define unused symbol initrd_phys
ARM: deprecate support for old way to pass kernel parameters
ARM: uImage: require passing a LOADADDR when building with RUNTIME_PHYSOFFSET
arch/arm/Kconfig | 105 +++++++++++++++++++++++++++++++ arch/arm/boot/Makefile | 14 +++-- arch/arm/boot/compressed/Makefile | 11 +--- arch/arm/boot/compressed/Makefile.debug | 23 ------- arch/arm/boot/compressed/head.S | 40 +++++++++--- arch/arm/boot/compressed/misc.c | 20 ------ arch/arm/kernel/Makefile | 4 +- arch/arm/kernel/compat.c | 7 -- arch/arm/kernel/compat.h | 2 - arch/arm/kernel/setup.c | 11 +++ 10 files changed, 157 insertions(+), 80 deletions(-) delete mode 100644 arch/arm/boot/compressed/Makefile.debug
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 1/11 ARM: zImage: don't hard code the stack size twice
--- arch/arm/boot/compressed/head.S | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/boot/compressed/head.S +2 -1
@@ -315,7 +315,7 @@ LC0: .word LC0 @ r1 .word _image_size @ r6 .word _got_start @ r11 .word _got_end @ ip - .word user_stack+4096 @ sp + .word user_stack_end @ sp LC1: .word reloc_end - reloc_start .size LC0, . - LC0
@@ -1070,3 +1070,4 @@ reloc_end: .align .section ".stack", "w" user_stack: .space 4096 +user_stack_end:
Signature · 1 line
1.7.1
PATCH 2/11 ARM: zImage: some comments for __armv3_mpu_cache_on
In reply to Uwe Kleine-König__armv3_mpu_cache_on seems broken. As there is noone around who knows about these machines just keep the code as is but point out the strange things.
--- arch/arm/boot/compressed/head.S | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/boot/compressed/head.S +6 -0
@@ -396,12 +396,18 @@ __armv3_mpu_cache_on: mov r0, #0 mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 + /* + * ?? ARMv3 MMU does not allow reading the control register, + * does this really work on ARMv3 MPU? + */ mrc p15, 0, r0, c1, c0, 0 @ read control reg @ .... .... .... WC.M orr r0, r0, #0x000d @ .... .... .... 11.1 + /* ?? this overwrites the value constructed above? */ mov r0, #0 mcr p15, 0, r0, c1, c0, 0 @ write control reg + /* ?? invalidate for the second time? */ mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 mov pc, lr
Signature · 1 line
1.7.1
PATCH 3/11 ARM: zImage: __armv3_mpu_cache_flush: respect should-be-zero specification
In reply to Uwe Kleine-KönigProbably the register content for cache operations is "don't care" in practice, but as r1 is explicitly zeroed, use that one.
--- arch/arm/boot/compressed/head.S | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/boot/compressed/head.S +1 -1
@@ -994,7 +994,7 @@ no_cache_id: __armv3_mmu_cache_flush: __armv3_mpu_cache_flush: mov r1, #0 - mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 + mcr p15, 0, r1, c7, c0, 0 @ invalidate whole cache v3 mov pc, lr /*
Signature · 1 line
1.7.1
PATCH 4/11 ARM: zImage: fix comments for cache_on, cache_off and cache_clean_flush
In reply to Uwe Kleine-KönigThis adds missing registers to the list of corrupted registers and removes a wrong comment about r9 on entry
While at it the formatting of the comment to cache_off is changed to resemble the other two.
--- arch/arm/boot/compressed/head.S | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
arch/arm/boot/compressed/head.S +6 -5
@@ -339,9 +339,8 @@ params: ldr r0, =params_phys * r4 = kernel execution address * r7 = architecture number * r8 = atags pointer - * r9 = run-time address of "start" (???) * On exit, - * r1, r2, r3, r9, r10, r12 corrupted + * r0, r1, r2, r3, r9, r10, r12 corrupted * This routine must preserve: * r4, r5, r6, r7, r8 */
@@ -777,8 +776,10 @@ proc_types: * Turn off the Cache and MMU. ARMv3 does not support * reading the control register, but ARMv4 does. * - * On exit, r0, r1, r2, r3, r9, r12 corrupted - * This routine must preserve: r4, r6, r7 + * On exit, + * r0, r1, r2, r3, r9, r12 corrupted + * This routine must preserve: + * r4, r6, r7 */ .align 5 cache_off: mov r3, #12 @ cache_off function
@@ -851,7 +852,7 @@ __armv3_mmu_cache_off: * Clean and flush the cache to maintain consistency. * * On exit, - * r1, r2, r3, r9, r11, r12 corrupted + * r1, r2, r3, r9, r10, r11, r12 corrupted * This routine must preserve: * r0, r4, r5, r6, r7 */
Signature · 1 line
1.7.1
PATCH 5/11 ARM: zImage: annotate debug functions about corrupted registers
In reply to Uwe Kleine-König--- arch/arm/boot/compressed/head.S | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/boot/compressed/head.S +4 -0
@@ -1008,6 +1008,7 @@ __armv3_mpu_cache_flush: phexbuf: .space 12 .size phexbuf, . - phexbuf +@ phex corrupts {r0, r1, r2, r3} phex: adr r3, phexbuf mov r2, #0 strb r2, [r3, r1]
@@ -1022,6 +1023,7 @@ phex: adr r3, phexbuf strb r2, [r3, r1] b 1b +@ puts corrupts {r0, r1, r2, r3} puts: loadsp r3, r1 1: ldrb r2, [r0], #1 teq r2, #0
@@ -1036,12 +1038,14 @@ puts: loadsp r3, r1 teq r0, #0 bne 1b mov pc, lr +@ putc corrupts {r0, r1, r2, r3} putc: mov r2, r0 mov r0, #0 loadsp r3, r1 b 2b +@ memdump corrupts {r0, r1, r2, r3, r10, r11, r12, lr} memdump: mov r12, r0 mov r10, lr mov r11, #0
Signature · 1 line
1.7.1
PATCH 6/11 ARM: remove bit-rotten STANDALONE_DEBUG for decompressor
In reply to Uwe Kleine-KönigI tried to get this running to debug the regression introduced by e7db7b4 without success. But this has several problems that make it hard to fix:
- lib/decompress_inflate.c includes in-kernel headers that make it difficult to compile for user space.
- the binary formats changed both in kernel and user space and at least for the kernel side there isn't only a single variant.
--- arch/arm/boot/compressed/Makefile.debug | 23 ----------------------- arch/arm/boot/compressed/misc.c | 20 -------------------- 2 files changed, 0 insertions(+), 43 deletions(-) delete mode 100644 arch/arm/boot/compressed/Makefile.debug
arch/arm/boot/compressed/Makefile.debug deleted +0 -23
@@ -1,23 +0,0 @@ -# -# linux/arch/arm/boot/compressed/Makefile -# -# create a compressed vmlinux image from the original vmlinux -# - -COMPRESSED_EXTRA=../../lib/ll_char_wr.o -OBJECTS=misc-debug.o ll_char_wr.aout.o - -CFLAGS=-D__KERNEL__ -O2 -DSTDC_HEADERS -DSTANDALONE_DEBUG -Wall -I../../../../include -c - -test-gzip: piggy.aout.o $(OBJECTS) - $(CC) -o $@ $(OBJECTS) piggy.aout.o - -misc-debug.o: misc.c - $(CC) $(CFLAGS) -o $@ misc.c - -piggy.aout.o: piggy.o - arm-linuxelf-objcopy --change-leading-char -I elf32-arm -O arm-aout32-linux piggy.o piggy.aout.o - -ll_char_wr.aout.o: $(COMPRESSED_EXTRA) - arm-linuxelf-objcopy --change-leading-char -I elf32-arm -O arm-aout32-linux $(COMPRESSED_EXTRA) ll_char_wr.aout.o -
arch/arm/boot/compressed/misc.c +0 -20
@@ -28,9 +28,6 @@ unsigned int __machine_arch_type;#include <asm/unaligned.h> -#ifdef STANDALONE_DEBUG -#define putstr printf -#else static void putstr (const char *ptr);extern void error (char *x);
@@ -116,7 +113,6 @@ static void putstr(const char *ptr)flush (); } -#endif void *memcpy(void *__dest, __const void *__src, size_t __n) {
@@ -186,7 +182,6 @@ asmlinkage void __div0(void)extern void do_decompress (u8 *input,int len,u8 *output,void (*error)(char *x)); -#ifndef STANDALONE_DEBUG unsigned long 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,putstr (" done, booting the kernel.\n" );return output_ptr; } -#else - -char output_buffer[1500 *1024 ]; - -int main () -{ - output_data = output_buffer; - -putstr ("Uncompressing Linux..." ); -decompress (input_data, input_data_end - input_data, -NULL ,NULL , output_data,NULL , error); -putstr ("done.\n" ); -return 0 ; -} -#endif
Signature · 1 line
1.7.1
PATCH 6/11 ARM: remove bit-rotten STANDALONE_DEBUG for decompressor
Quoted 11 lines · Uwe Kleine-K?nig
I tried to get this running to debug the regression introduced by e7db7b4 without success. But this has several problems that make it hard to fix:
-
lib/decompress_inflate.cincludes in-kernel headers that make it difficult to compile for user space.
- the binary formats changed both in kernel and user space and at least for the kernel side there isn't only a single variant.Signed-off-by Uwe Kleine-K?nig <[email protected]>
Quoted 87 lines
--- arch/arm/boot/compressed/Makefile.debug | 23 ----------------------- arch/arm/boot/compressed/misc.c | 20 -------------------- 2 files changed, 0 insertions(+), 43 deletions(-) delete mode 100644 arch/arm/boot/compressed/Makefile.debugarch/arm/boot/compressed/Makefile.debug deleted +0
-23@@ -1,23 +0,0 @@ -# -# linux/arch/arm/boot/compressed/Makefile -# -# create a compressed vmlinux image from the original vmlinux -# - -COMPRESSED_EXTRA=../../lib/ll_char_wr.o -OBJECTS=misc-debug.o ll_char_wr.aout.o - -CFLAGS=-D__KERNEL__ -O2 -DSTDC_HEADERS -DSTANDALONE_DEBUG -Wall -I../../../../include -c - -test-gzip: piggy.aout.o $(OBJECTS) - $(CC) -o $@ $(OBJECTS) piggy.aout.o - -misc-debug.o: misc.c - $(CC) $(CFLAGS) -o $@ misc.c - -piggy.aout.o: piggy.o - arm-linuxelf-objcopy --change-leading-char -I elf32-arm -O arm-aout32-linux piggy.o piggy.aout.o - -ll_char_wr.aout.o: $(COMPRESSED_EXTRA) - arm-linuxelf-objcopy --change-leading-char -I elf32-arm -O arm-aout32-linux $(COMPRESSED_EXTRA) ll_char_wr.aout.o -arch/arm/boot/compressed/misc.c +0
-20@@ -28,9 +28,6 @@ unsigned int __machine_arch_type;#include <asm/unaligned.h> -#ifdef STANDALONE_DEBUG -#define putstr printf -#else static void putstr (const char *ptr);extern void error (char *x);@@ -116,7 +113,6 @@ static void putstr(const char *ptr)flush (); } -#endif void *memcpy(void *__dest, __const void *__src, size_t __n) {@@ -186,7 +182,6 @@ asmlinkage void __div0(void)extern void do_decompress (u8 *input,int len,u8 *output,void (*error)(char *x)); -#ifndef STANDALONE_DEBUG unsigned long 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,putstr (" done, booting the kernel.\n" );return output_ptr; } -#else - -char output_buffer[1500 *1024 ]; - -int main () -{ - output_data = output_buffer; - -putstr ("Uncompressing Linux..." ); -decompress (input_data, input_data_end - input_data, -NULL ,NULL , output_data,NULL , error); -putstr ("done.\n" ); -return 0 ; -} -#endif Signature · 1 line
1.7.1
PATCH 7/11 ARM: zImage: don't define unused symbol initrd_phys
In reply to Uwe Kleine-KönigThe only user of initrd_phys is arch/arm/boot/bootp/init.S which still gets the value passed to.
--- arch/arm/boot/compressed/Makefile | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-)
arch/arm/boot/compressed/Makefile +3 -6
@@ -79,16 +79,13 @@ endif EXTRA_CFLAGS := -fpic -fno-builtin EXTRA_AFLAGS := -Wa,-march=all -# Supply ZRELADDR, INITRD_PHYS and PARAMS_PHYS to the decompressor via -# linker symbols. We only define initrd_phys and params_phys if the -# machine class defined the corresponding makefile variable. +# Supply ZRELADDR and PARAMS_PHYS to the decompressor via linker symbols. We +# only define params_phys if the machine class defined the corresponding +# makefile variable. LDFLAGS_vmlinux := --defsym zreladdr=$(ZRELADDR) ifeq ($(CONFIG_CPU_ENDIAN_BE8),y) LDFLAGS_vmlinux += --be8 endif -ifneq ($(INITRD_PHYS),) -LDFLAGS_vmlinux += --defsym initrd_phys=$(INITRD_PHYS) -endif ifneq ($(PARAMS_PHYS),) LDFLAGS_vmlinux += --defsym params_phys=$(PARAMS_PHYS) endif
Signature · 1 line
1.7.1
PATCH 8/11 ARM: deprecate support for old way to pass kernel parameters
In reply to Uwe Kleine-KönigThis was deprecated in 2001 and announced to live on for 5 years.
For now provide a kernel parameter for those who still need it.
--- arch/arm/Kconfig | 6 ++++++ arch/arm/kernel/Makefile | 4 +++- arch/arm/kernel/compat.c | 7 ------- arch/arm/kernel/compat.h | 2 -- arch/arm/kernel/setup.c | 11 +++++++++++ 5 files changed, 20 insertions(+), 10 deletions(-)
arch/arm/Kconfig +6 -0
@@ -1374,6 +1374,12 @@ config UACCESS_WITH_MEMCPY However, if the CPU data cache is using a write-allocate mode, this option is unlikely to provide any performance gain. +config DEPRECATED_PARAM_STRUCT + bool "Provide old way to pass kernel parameters" + help + This was deprecated in 2001 and announced to live on for 5 years. + Some old boot loaders still use this way. + endmenu menu "Boot options"
arch/arm/kernel/Makefile +3 -1
@@ -13,10 +13,12 @@ CFLAGS_REMOVE_return_address.o = -pg # Object file lists. -obj-y := compat.o elf.o entry-armv.o entry-common.o irq.o \ +obj-y := elf.o entry-armv.o entry-common.o irq.o \ process.o ptrace.o return_address.o setup.o signal.o \ sys_arm.o stacktrace.o time.o traps.o +obj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += compat.o + obj-$(CONFIG_LEDS) += leds.o obj-$(CONFIG_OC_ETM) += etm.o
arch/arm/kernel/compat.c +0 -7
@@ -217,10 +217,3 @@ void __init convert_to_tag_list(struct tag *tags)struct param_struct *params = (struct param_struct *)tags;build_tag_list (params, ¶ms->u2); } - -void __init squash_mem_tags (struct tag *tag) -{ -for (; tag->hdr.size; tag =tag_next (tag)) -if (tag->hdr.tag ==ATAG_MEM ) - tag->hdr.tag =ATAG_NONE ; -}
arch/arm/kernel/compat.h +0 -2
@@ -9,5 +9,3 @@*/ extern void convert_to_tag_list (struct tag *tags); - -extern void squash_mem_tags (struct tag *tag);
arch/arm/kernel/setup.c +11 -0
@@ -44,7 +44,9 @@#include <asm/traps.h> #include <asm/unwind.h> +#if defined(CONFIG_DEPRECATED_PARAM_STRUCT )#include "compat.h" +#endif #include "atags.h" #include "tcm.h"
@@ -663,6 +665,13 @@ static int __init customize_machine(void) }arch_initcall (customize_machine); +static void __init squash_mem_tags (struct tag *tag) +{ +for (; tag->hdr.size; tag =tag_next (tag)) +if (tag->hdr.tag ==ATAG_MEM ) + tag->hdr.tag =ATAG_NONE ; +} +void __init setup_arch (char **cmdline_p) {struct tag *tags = (struct tag *)&init_tags;
@@ -683,12 +692,14 @@ void __init setup_arch(char **cmdline_p)else if (mdesc->boot_params) tags =phys_to_virt (mdesc->boot_params); +#if defined(CONFIG_DEPRECATED_PARAM_STRUCT )/* * If we have the old style parameters, convert them to * a tag list. */ if (tags->hdr.tag !=ATAG_CORE )convert_to_tag_list (tags); +#endif if (tags->hdr.tag !=ATAG_CORE ) tags = (struct tag *)&init_tags;
Signature · 1 line
1.7.1
PATCH 9/11 ARM: uImage: require passing a LOADADDR when building with RUNTIME_PHYSOFFSET
In reply to Uwe Kleine-Königthe default load address (in the CONFIG_ZBOOT_ROM=n case) is ZRELADDR which (apart from being a stupid load address for the RUNTIME_PHYSOFFSET=n case) might not be a valid read/write memory on the target machine at all. So require passing a LOADADDR on the command line. This obiously makes the uImage more machine dependant than the zImage.
Note RUNTIME_PHYSOFFSET doesn't exist yet, but is about to come soon.
--- arch/arm/boot/Makefile | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
arch/arm/boot/Makefile +5 -1
@@ -64,11 +64,13 @@ quiet_cmd_uimage = UIMAGE $@ -C none -a $(LOADADDR) -e $(STARTADDR) \ -n 'Linux-$(KERNELRELEASE)' -d $< $@ +ifeq ($(CONFIG_RUNTIME_PHYS_OFFSET),) ifeq ($(CONFIG_ZBOOT_ROM),y) $(obj)/uImage: LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT) else $(obj)/uImage: LOADADDR=$(ZRELADDR) endif +endif ifeq ($(CONFIG_THUMB2_KERNEL),y) # Set bit 0 to 1 so that "mov pc, rx" switches to Thumb-2 mode
@@ -77,7 +79,9 @@ else $(obj)/uImage: STARTADDR=$(LOADADDR) endif -$(obj)/uImage: $(obj)/zImage FORCE +$(obj)/uImage: $(obj)/zImage FORCE + @test -n "$(LOADADDR)" || \ + (echo "You must specify a load address (i.e. make uImage LOADADDR=0x...)"; exit 1) $(call if_changed,uimage) @echo ' Image $@ is ready'
Signature · 1 line
1.7.1
PATCH 9/11 ARM: uImage: require passing a LOADADDR when building with RUNTIME_PHYSOFFSET
Quoted 6 lines · Uwe Kleine-K?nig
the default load address (in the
CONFIG_ZBOOT_ROM=ncase) is ZRELADDR which (apart from being a stupid load address for the RUNTIME_PHYSOFFSET=n case) might not be a valid read/write memory on the target machine at all. So require passing a LOADADDR on the command line. This obiously makes the uImage more machine dependant than the zImage.
Why is this required? If something is stupid here, it is the fact that the U-Boot image format insists on having a load address being built into it. That certainly makes uImage an unsuitable image format for the distribution of a cross platform kernel image.
Besides that, you are claiming above that ZRELADDR might not be a valid writable address when ZBOOT_ROM=n. If that was true we would be having boot failures all over the place already.
Remember that the goal for this revived effort behind the RUNTIME_PHYSOFFSET support is to eventually be able to boot a single kernel binary on multiple different platforms. Asking that a load address be provided at kernel compile time is rather incompatible with that goal. If there is no good default LOADADDR value for mkimage then simply don't provide any. I hope that mkimage can cope with that. Otherwise just give it 0 which is as wrong as any other value and let that be an incentive for the U-Boot people to fix the tool properly (i.e. use that as a flag to let U-Boot that the load address must be explicitly provided with the load command or whatever).
Therefore, this is a NAK from me.
Nicolas
PATCH 10/11 ARM: Remove unused PARAMS_PHYS from arch/arm/boot/compressed
In reply to Uwe Kleine-KönigFrom: Eric Miao <[email protected]>
The only reference in arch/arm/boot/compressed to PARAMS_PHYS is params() in head.S, which can be directly converted to the exact address as specified by arch/arm/mach-rpc/Makefile.boot.
--- arch/arm/boot/compressed/Makefile | 7 +------ arch/arm/boot/compressed/head.S | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-)
arch/arm/boot/compressed/Makefile +1 -6
@@ -79,16 +79,11 @@ endif EXTRA_CFLAGS := -fpic -fno-builtin EXTRA_AFLAGS := -Wa,-march=all -# Supply ZRELADDR and PARAMS_PHYS to the decompressor via linker symbols. We -# only define params_phys if the machine class defined the corresponding -# makefile variable. +# Supply ZRELADDR to the decompressor via a linker symbol. LDFLAGS_vmlinux := --defsym zreladdr=$(ZRELADDR) ifeq ($(CONFIG_CPU_ENDIAN_BE8),y) LDFLAGS_vmlinux += --be8 endif -ifneq ($(PARAMS_PHYS),) -LDFLAGS_vmlinux += --defsym params_phys=$(PARAMS_PHYS) -endif # ? LDFLAGS_vmlinux += -p # Report unresolved symbol references
arch/arm/boot/compressed/head.S +1 -1
@@ -321,7 +321,7 @@ LC1: .word reloc_end - reloc_start #ifdef CONFIG_ARCH_RPC .globl params -params: ldr r0, =params_phys +params: ldr r0, =0x10000100 @ params_phys for RPC mov pc, lr .ltorg .align
Signature · 1 line
1.7.1
PATCH 11/11 Auto calculate ZRELADDR and provide option for exceptions
In reply to Uwe Kleine-KönigFrom: Eric Miao <[email protected]>
As long as the zImage is placed within the 128MB range from the start of memory, ZRELADDR (Address where the decompressed kernel will be placed, usually == PHYS_OFFSET + TEXT_OFFSET) can be determined at run-time by masking PC with 0xf80000000.
Running through all the Makefile.boot, all those zreladdr-y addresses == 0x[0-f][08]00_0000 + TEXT_OFFSET can be determined at run-time.
Option CONFIG_AUTO_ZRELADDR and CONFIG_ZRELADDR are introduced, CONFIG_ZRELADDR _must_ be explicitly specified if:
- ((zreladdr-y - TEXT_OFFSET) & ~0xf8000000) != 0, which means masking PC with 0xf8000000 will result in an incorrect address. Currently this is only a problem on u300.
- or the assumption of the zImage being loaded by the bootloader within the first 128MB of RAM is incorrect
- or when ZBOOT_ROM is used, where the above assumption is usually wrong.
[ukleinek: changed mask from 0xf0000000 to 0xf8000000 for mx1 and shark
+ some review fixes from the mailing list]
--- arch/arm/Kconfig | 99 +++++++++++++++++++++++++++++++++++++ arch/arm/boot/Makefile | 8 +-- arch/arm/boot/compressed/Makefile | 3 +- arch/arm/boot/compressed/head.S | 12 +++- 4 files changed, 112 insertions(+), 10 deletions(-)
arch/arm/Kconfig +99 -0
@@ -1490,6 +1490,105 @@ config ATAGS_PROC Should the atags used to boot the kernel be exported in an "atags" file in procfs. Useful with kexec. +config AUTO_ZRELADDR + bool "Auto calculation of the decompressed kernel image address" + depends on !ZBOOT_ROM && !ARCH_U300 + help + ZRELADDR is the physical address where the decompressed kernel + image will be placed. If AUTO_ZRELADDR is selected, the address + will be determined at run-time by masking the current IP with + 0xf8000000. This assumes the zImage being placed in the first 128MB + from start of memory. + +config ZRELADDR + hex "Physical address of the decompressed kernel image" + depends on !AUTO_ZRELADDR + default 0x00008000 if ARCH_BCMRING ||\ + ARCH_CNS3XXX ||\ + ARCH_DOVE ||\ + ARCH_EBSA110 ||\ + ARCH_FOOTBRIDGE ||\ + ARCH_INTEGRATOR ||\ + ARCH_IOP13XX ||\ + ARCH_IOP33X ||\ + ARCH_IXP2000 ||\ + ARCH_IXP23XX ||\ + ARCH_IXP4XX ||\ + ARCH_KIRKWOOD ||\ + ARCH_KS8695 ||\ + ARCH_LOKI ||\ + ARCH_MMP ||\ + ARCH_MV78XX0 ||\ + ARCH_NOMADIK ||\ + ARCH_NUC93X ||\ + ARCH_NS9XXX ||\ + ARCH_ORION5X ||\ + ARCH_SPEAR3XX ||\ + ARCH_SPEAR6XX ||\ + ARCH_U8500 ||\ + ARCH_VERSATILE ||\ + ARCH_W90X900 + default 0x08008000 if ARCH_MX1 ||\ + ARCH_SHARK + default 0x10008000 if ARCH_MSM ||\ + ARCH_OMAP1 ||\ + ARCH_RPC + default 0x20008000 if ARCH_S5P6440 ||\ + ARCH_S5P6442 ||\ + ARCH_S5PC100 ||\ + ARCH_S5PV210 + default 0x30008000 if ARCH_S3C2410 ||\ + ARCH_S3C2400 ||\ + ARCH_S3C2412 ||\ + ARCH_S3C2416 ||\ + ARCH_S3C2440 ||\ + ARCH_S3C2443 + default 0x40008000 if ARCH_STMP378X ||\ + ARCH_STMP37XX ||\ + ARCH_SH7372 ||\ + ARCH_SH7377 + default 0x50008000 if ARCH_S3C64XX ||\ + ARCH_SH7367 + default 0x60008000 if ARCH_VEXPRESS + default 0x80008000 if ARCH_MX25 ||\ + ARCH_MX3 ||\ + ARCH_NETX ||\ + ARCH_OMAP2PLUS ||\ + ARCH_PNX4008 + default 0x90008000 if ARCH_MX5 ||\ + ARCH_MX91231 + default 0xa0008000 if ARCH_IOP32X ||\ + ARCH_PXA ||\ + MACH_MX27 + default 0xc0008000 if ARCH_LH7A40X ||\ + MACH_MX21 + default 0xf0008000 if ARCH_AAEC2000 ||\ + ARCH_L7200 + default 0xc0028000 if ARCH_CLPS711X + default 0x70008000 if ARCH_AT91 && (ARCH_AT91CAP9 || ARCH_AT91SAM9G45) + default 0x20008000 if ARCH_AT91 && !(ARCH_AT91CAP9 || ARCH_AT91SAM9G45) + default 0xc0008000 if ARCH_DAVINCI && ARCH_DAVINCI_DA8XX + default 0x80008000 if ARCH_DAVINCI && !ARCH_DAVINCI_DA8XX + default 0x00008000 if ARCH_EP93XX && EP93XX_SDCE3_SYNC_PHYS_OFFSET + default 0xc0008000 if ARCH_EP93XX && EP93XX_SDCE0_PHYS_OFFSET + default 0xd0008000 if ARCH_EP93XX && EP93XX_SDCE1_PHYS_OFFSET + default 0xe0008000 if ARCH_EP93XX && EP93XX_SDCE2_PHYS_OFFSET + default 0xf0008000 if ARCH_EP93XX && EP93XX_SDCE3_ASYNC_PHYS_OFFSET + default 0x00008000 if ARCH_GEMINI && GEMINI_MEM_SWAP + default 0x10008000 if ARCH_GEMINI && !GEMINI_MEM_SWAP + default 0x70008000 if ARCH_REALVIEW && REALVIEW_HIGH_PHYS_OFFSET + default 0x00008000 if ARCH_REALVIEW && !REALVIEW_HIGH_PHYS_OFFSET + default 0xc0208000 if ARCH_SA1100 && SA1111 + default 0xc0008000 if ARCH_SA1100 && !SA1111 + default 0x30108000 if ARCH_S3C2410 && PM_H1940 + default 0x28E08000 if ARCH_U300 && MACH_U300_SINGLE_RAM + default 0x48008000 if ARCH_U300 && !MACH_U300_SINGLE_RAM + help + ZRELADDR is the physical address where the decompressed kernel + image will be placed. ZRELADDR has to be specified when the + assumption of AUTO_ZRELADDR is not valid, or when ZBOOT_ROM is + selected. + endmenu menu "CPU Power Management"
arch/arm/boot/Makefile +3 -5
@@ -14,18 +14,16 @@ MKIMAGE := $(srctree)/scripts/mkuboot.sh ifneq ($(MACHINE),) -include $(srctree)/$(MACHINE)/Makefile.boot +-include $(srctree)/$(MACHINE)/Makefile.boot endif # Note: the following conditions must always be true: -# ZRELADDR == virt_to_phys(PAGE_OFFSET + TEXT_OFFSET) # PARAMS_PHYS must be within 4MB of ZRELADDR # INITRD_PHYS must be in RAM -ZRELADDR := $(zreladdr-y) PARAMS_PHYS := $(params_phys-y) INITRD_PHYS := $(initrd_phys-y) -export ZRELADDR INITRD_PHYS PARAMS_PHYS +export INITRD_PHYS PARAMS_PHYS targets := Image zImage xipImage bootpImage uImage
@@ -68,7 +66,7 @@ ifeq ($(CONFIG_RUNTIME_PHYS_OFFSET),) ifeq ($(CONFIG_ZBOOT_ROM),y) $(obj)/uImage: LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT) else -$(obj)/uImage: LOADADDR=$(ZRELADDR) +$(obj)/uImage: LOADADDR=$(CONFIG_ZRELADDR) endif endif
arch/arm/boot/compressed/Makefile +1 -2
@@ -4,6 +4,7 @@ # create a compressed vmlinuz image from the original vmlinux # +AFLAGS_head.o += -DTEXT_OFFSET=$(TEXT_OFFSET) HEAD = head.o OBJS = misc.o decompress.o FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c
@@ -79,8 +80,6 @@ endif EXTRA_CFLAGS := -fpic -fno-builtin EXTRA_AFLAGS := -Wa,-march=all -# Supply ZRELADDR to the decompressor via a linker symbol. -LDFLAGS_vmlinux := --defsym zreladdr=$(ZRELADDR) ifeq ($(CONFIG_CPU_ENDIAN_BE8),y) LDFLAGS_vmlinux += --be8 endif
arch/arm/boot/compressed/head.S +9 -3
@@ -170,9 +170,16 @@ not_angel: .text adr r0, LC0 - ARM( ldmia r0, {r1, r2, r3, r4, r5, r6, r11, ip, sp}) - THUMB( ldmia r0, {r1, r2, r3, r4, r5, r6, r11, ip} ) + ARM( ldmia r0, {r1, r2, r3, r5, r6, r11, ip, sp}) + THUMB( ldmia r0, {r1, r2, r3, r5, r6, r11, ip} ) THUMB( ldr sp, [r0, #32] ) +#ifdef CONFIG_AUTO_ZRELADDR + @ determine final kernel image address + and r4, pc, #0xf8000000 + add r4, r4, #TEXT_OFFSET +#else + ldr r4, =CONFIG_ZRELADDR +#endif subs r0, r0, r1 @ calculate the delta offset @ if delta is zero, we are
@@ -310,7 +317,6 @@ wont_overwrite: mov r0, r4 LC0: .word LC0 @ r1 .word __bss_start @ r2 .word _end @ r3 - .word zreladdr @ r4 .word _start @ r5 .word _image_size @ r6 .word _got_start @ r11
Signature · 1 line
1.7.1
PATCH 11/11 Auto calculate ZRELADDR and provide option for exceptions
Quoted 21 lines · Uwe Kleine-K?nig
From: Eric Miao <[email protected]>
As long as the zImage is placed within the 128MB range from the start of memory, ZRELADDR (Address where the decompressed kernel will be placed, usually ==
PHYS_OFFSET+TEXT_OFFSET) can be determined at run-time by masking PC with0xf80000000.Running through all the Makefile.boot, all those zreladdr-y addresses == 0x[0-f][08]00_0000 +
TEXT_OFFSETcan be determined at run-time.Option
CONFIG_AUTO_ZRELADDRandCONFIG_ZRELADDRare introduced,CONFIG_ZRELADDR_must_ be explicitly specified if:- ((zreladdr-y -
TEXT_OFFSET) & ~0xf8000000) != 0, which means masking PC with0xf8000000will result in an incorrect address. Currently this is only a problem on u300.- or the assumption of the zImage being loaded by the bootloader within the first 128MB of RAM is incorrect
Quoted 7 lines
- or when
ZBOOT_ROMis used, where the above assumption is usually wrong.[ukleinek: changed mask from
0xf0000000to0xf8000000for mx1 and shark
+ some review fixes from the mailing list]Signed-off-by Eric Miao <[email protected]>Signed-off-by Uwe Kleine-K?nig <[email protected]>
Although Eric did all the work, the original idea was mine. Therefore:
Quoted 206 lines
--- arch/arm/Kconfig | 99 +++++++++++++++++++++++++++++++++++++ arch/arm/boot/Makefile | 8 +-- arch/arm/boot/compressed/Makefile | 3 +- arch/arm/boot/compressed/head.S | 12 +++- 4 files changed, 112 insertions(+), 10 deletions(-)arch/arm/Kconfig +99
-0@@ -1490,6 +1490,105 @@ config ATAGS_PROC Should the atags used to boot the kernel be exported in an "atags" file in procfs. Useful with kexec. +config AUTO_ZRELADDR + bool "Auto calculation of the decompressed kernel image address" + depends on !ZBOOT_ROM && !ARCH_U300 + help + ZRELADDR is the physical address where the decompressed kernel + image will be placed. If AUTO_ZRELADDR is selected, the address + will be determined at run-time by masking the current IP with + 0xf8000000. This assumes the zImage being placed in the first 128MB + from start of memory. + +config ZRELADDR + hex "Physical address of the decompressed kernel image" + depends on !AUTO_ZRELADDR + default 0x00008000 if ARCH_BCMRING ||\ + ARCH_CNS3XXX ||\ + ARCH_DOVE ||\ + ARCH_EBSA110 ||\ + ARCH_FOOTBRIDGE ||\ + ARCH_INTEGRATOR ||\ + ARCH_IOP13XX ||\ + ARCH_IOP33X ||\ + ARCH_IXP2000 ||\ + ARCH_IXP23XX ||\ + ARCH_IXP4XX ||\ + ARCH_KIRKWOOD ||\ + ARCH_KS8695 ||\ + ARCH_LOKI ||\ + ARCH_MMP ||\ + ARCH_MV78XX0 ||\ + ARCH_NOMADIK ||\ + ARCH_NUC93X ||\ + ARCH_NS9XXX ||\ + ARCH_ORION5X ||\ + ARCH_SPEAR3XX ||\ + ARCH_SPEAR6XX ||\ + ARCH_U8500 ||\ + ARCH_VERSATILE ||\ + ARCH_W90X900 + default 0x08008000 if ARCH_MX1 ||\ + ARCH_SHARK + default 0x10008000 if ARCH_MSM ||\ + ARCH_OMAP1 ||\ + ARCH_RPC + default 0x20008000 if ARCH_S5P6440 ||\ + ARCH_S5P6442 ||\ + ARCH_S5PC100 ||\ + ARCH_S5PV210 + default 0x30008000 if ARCH_S3C2410 ||\ + ARCH_S3C2400 ||\ + ARCH_S3C2412 ||\ + ARCH_S3C2416 ||\ + ARCH_S3C2440 ||\ + ARCH_S3C2443 + default 0x40008000 if ARCH_STMP378X ||\ + ARCH_STMP37XX ||\ + ARCH_SH7372 ||\ + ARCH_SH7377 + default 0x50008000 if ARCH_S3C64XX ||\ + ARCH_SH7367 + default 0x60008000 if ARCH_VEXPRESS + default 0x80008000 if ARCH_MX25 ||\ + ARCH_MX3 ||\ + ARCH_NETX ||\ + ARCH_OMAP2PLUS ||\ + ARCH_PNX4008 + default 0x90008000 if ARCH_MX5 ||\ + ARCH_MX91231 + default 0xa0008000 if ARCH_IOP32X ||\ + ARCH_PXA ||\ + MACH_MX27 + default 0xc0008000 if ARCH_LH7A40X ||\ + MACH_MX21 + default 0xf0008000 if ARCH_AAEC2000 ||\ + ARCH_L7200 + default 0xc0028000 if ARCH_CLPS711X + default 0x70008000 if ARCH_AT91 && (ARCH_AT91CAP9 || ARCH_AT91SAM9G45) + default 0x20008000 if ARCH_AT91 && !(ARCH_AT91CAP9 || ARCH_AT91SAM9G45) + default 0xc0008000 if ARCH_DAVINCI && ARCH_DAVINCI_DA8XX + default 0x80008000 if ARCH_DAVINCI && !ARCH_DAVINCI_DA8XX + default 0x00008000 if ARCH_EP93XX && EP93XX_SDCE3_SYNC_PHYS_OFFSET + default 0xc0008000 if ARCH_EP93XX && EP93XX_SDCE0_PHYS_OFFSET + default 0xd0008000 if ARCH_EP93XX && EP93XX_SDCE1_PHYS_OFFSET + default 0xe0008000 if ARCH_EP93XX && EP93XX_SDCE2_PHYS_OFFSET + default 0xf0008000 if ARCH_EP93XX && EP93XX_SDCE3_ASYNC_PHYS_OFFSET + default 0x00008000 if ARCH_GEMINI && GEMINI_MEM_SWAP + default 0x10008000 if ARCH_GEMINI && !GEMINI_MEM_SWAP + default 0x70008000 if ARCH_REALVIEW && REALVIEW_HIGH_PHYS_OFFSET + default 0x00008000 if ARCH_REALVIEW && !REALVIEW_HIGH_PHYS_OFFSET + default 0xc0208000 if ARCH_SA1100 && SA1111 + default 0xc0008000 if ARCH_SA1100 && !SA1111 + default 0x30108000 if ARCH_S3C2410 && PM_H1940 + default 0x28E08000 if ARCH_U300 && MACH_U300_SINGLE_RAM + default 0x48008000 if ARCH_U300 && !MACH_U300_SINGLE_RAM + help + ZRELADDR is the physical address where the decompressed kernel + image will be placed. ZRELADDR has to be specified when the + assumption of AUTO_ZRELADDR is not valid, or when ZBOOT_ROM is + selected. + endmenu menu "CPU Power Management"arch/arm/boot/Makefile +3
-5@@ -14,18 +14,16 @@ MKIMAGE := $(srctree)/scripts/mkuboot.sh ifneq ($(MACHINE),) -include $(srctree)/$(MACHINE)/Makefile.boot +-include $(srctree)/$(MACHINE)/Makefile.boot endif # Note: the following conditions must always be true: -# ZRELADDR == virt_to_phys(PAGE_OFFSET + TEXT_OFFSET) # PARAMS_PHYS must be within 4MB of ZRELADDR # INITRD_PHYS must be in RAM -ZRELADDR := $(zreladdr-y) PARAMS_PHYS := $(params_phys-y) INITRD_PHYS := $(initrd_phys-y) -export ZRELADDR INITRD_PHYS PARAMS_PHYS +export INITRD_PHYS PARAMS_PHYS targets := Image zImage xipImage bootpImage uImage@@ -68,7 +66,7 @@ ifeq ($(CONFIG_RUNTIME_PHYS_OFFSET),) ifeq ($(CONFIG_ZBOOT_ROM),y) $(obj)/uImage: LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT) else -$(obj)/uImage: LOADADDR=$(ZRELADDR) +$(obj)/uImage: LOADADDR=$(CONFIG_ZRELADDR) endif endifarch/arm/boot/compressed/Makefile +1
-2@@ -4,6 +4,7 @@ # create a compressed vmlinuz image from the original vmlinux # +AFLAGS_head.o += -DTEXT_OFFSET=$(TEXT_OFFSET) HEAD = head.o OBJS = misc.o decompress.o FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c@@ -79,8 +80,6 @@ endif EXTRA_CFLAGS := -fpic -fno-builtin EXTRA_AFLAGS := -Wa,-march=all -# Supply ZRELADDR to the decompressor via a linker symbol. -LDFLAGS_vmlinux := --defsym zreladdr=$(ZRELADDR) ifeq ($(CONFIG_CPU_ENDIAN_BE8),y) LDFLAGS_vmlinux += --be8 endifarch/arm/boot/compressed/head.S +9
-3@@ -170,9 +170,16 @@ not_angel: .text adr r0, LC0 - ARM( ldmia r0, {r1, r2, r3, r4, r5, r6, r11, ip, sp}) - THUMB( ldmia r0, {r1, r2, r3, r4, r5, r6, r11, ip} ) + ARM( ldmia r0, {r1, r2, r3, r5, r6, r11, ip, sp}) + THUMB( ldmia r0, {r1, r2, r3, r5, r6, r11, ip} ) THUMB( ldr sp, [r0, #32] ) +#ifdef CONFIG_AUTO_ZRELADDR + @ determine final kernel image address + and r4, pc, #0xf8000000 + add r4, r4, #TEXT_OFFSET +#else + ldr r4, =CONFIG_ZRELADDR +#endif subs r0, r0, r1 @ calculate the delta offset @ if delta is zero, we are@@ -310,7 +317,6 @@ wont_overwrite: mov r0, r4 LC0: .word LC0 @ r1 .word __bss_start @ r2 .word _end @ r3 - .word zreladdr @ r4 .word _start @ r5 .word _image_size @ r6 .word _got_start @ r11Signature · 1 line
1.7.1
PATCH 11/11 Auto calculate ZRELADDR and provide option for exceptions
2010/7/5 Nicolas Pitre <[email protected]>:
Quoted 28 lines · Uwe Kleine-K?nig
Quoted 27 lines
From: Eric Miao <[email protected]>
As long as the zImage is placed within the 128MB range from the start of memory, ZRELADDR (Address where the decompressed kernel will be placed, usually ==
PHYS_OFFSET+TEXT_OFFSET) can be determined at run-time by masking PC with0xf80000000.Running through all the Makefile.boot, all those zreladdr-y addresses == 0x[0-f][08]00_0000 +
TEXT_OFFSETcan be determined at run-time.Option
CONFIG_AUTO_ZRELADDRandCONFIG_ZRELADDRare introduced,CONFIG_ZRELADDR_must_ be explicitly specified if:- ((zreladdr-y -
TEXT_OFFSET) & ~0xf8000000) != 0, which means ? masking PC with0xf8000000will result in an incorrect address. ? Currently this is only a problem on u300.- or the assumption of the zImage being loaded by the bootloader within ? the first 128MB of RAM is incorrect
- or when
ZBOOT_ROMis used, where the above assumption is usually wrong.[ukleinek: changed mask from
0xf0000000to0xf8000000for mx1 and shark
+ some review fixes from the mailing list]
Quoted 7 lines
Quoted 2 lines
Signed-off-by Eric Miao <[email protected]>Signed-off-by Uwe Kleine-K?nig <[email protected]>Although Eric did all the work, the original idea was mine. ?Therefore:
Signed-off-by Nicolas Pitre <[email protected]>
Yep. Uwe, please add this, thanks.
PATCH 11/11 Auto calculate ZRELADDR and provide option for exceptions
In reply to Uwe Kleine-Königarch/arm/Kconfig config ATAGS_PROC · line 1504
Quoted 2 lines · Uwe Kleine-K?nig
arch/arm/Kconfig +2
-0+config ZRELADDR + hex "Physical address of the decompressed kernel image"
Does it really make sense for users to be able to edit this? I don't think so as some platforms depend on its value being set appropriately, plus the requirements for it aren't documented in the help text.
PATCH 11/11 Auto calculate ZRELADDR and provide option for exceptions
Quoted 7 lines · Russell King - ARM Linux
arch/arm/Kconfig config ATAGS_PROC · line 1504
Quoted 2 lines · Uwe Kleine-K?nig
arch/arm/Kconfig +2
-0+config ZRELADDR + hex "Physical address of the decompressed kernel image"Does it really make sense for users to be able to edit this? I don't think so as some platforms depend on its value being set appropriately, plus the requirements for it aren't documented in the help text.
No, I don't think we should expose this to the user.
Nicolas
PATCH 1/1 ARM: don't expose CONFIG_ZRELADDR to the users
In reply to Russell King - ARM LinuxThis value is essential for booting a zImage and only depends on the memory layout of the machine to boot. This value was specified in Makefile.boot before
e69edc79 (ARM: Auto calculate ZRELADDR and provide option for exceptions)
and so wasn't available to change via .config.
--- arch/arm/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/Kconfig +1 -1
@@ -1528,7 +1528,7 @@ config AUTO_ZRELADDR from start of memory. config ZRELADDR - hex "Physical address of the decompressed kernel image" + hex depends on !AUTO_ZRELADDR default 0x00008000 if ARCH_BCMRING ||\ ARCH_CNS3XXX ||\
Signature · 1 line
1.7.1
cover Makefile.boot cleanup
In reply to Uwe Kleine-KönigHi Russell,
Quoted 3 lines · Uwe Kleine-K?nig
this series is a merge between Eric's and my patches that we did to clean up the early boot code. It doesn't contain runtime physoffset support for now, but I plan to pick that up later.
I added Nicolas' Acks to my tree and dropped the one patch he objected.
Are you willing to pull these now?
Best regards
Uwe
Quoted 43 lines
The following changes since commit
7e27d6e778cd87b6f2415515d7127eba53fe5d02:Linux 2.6.35-rc3 (2010-06-11 19:14:04 -0700)
are available in the git repository at:
git://git.pengutronix.de/git/ukl/linux-2.6.gitarm/bootingEric Miao (2):
ARM: Remove unusedPARAMS_PHYSfromarch/arm/boot/compressedAuto calculate ZRELADDR and provide option for exceptionsUwe Kleine-K?nig (9):
ARM: zImage: don't hard code the stack size twice
ARM: zImage: some comments for__armv3_mpu_cache_on
ARM: zImage:__armv3_mpu_cache_flush: respect should-be-zero specification
ARM: zImage: fix comments forcache_on,cache_offandcache_clean_flush
ARM: zImage: annotate debug functions about corrupted registers
ARM: remove bit-rottenSTANDALONE_DEBUGfor decompressor
ARM: zImage: don't define unused symbolinitrd_phys
ARM: deprecate support for old way to pass kernel parameters
ARM: uImage: require passing a LOADADDR when building withRUNTIME_PHYSOFFSETarch/arm/Kconfig | 105 +++++++++++++++++++++++++++++++ arch/arm/boot/Makefile | 14 +++-- arch/arm/boot/compressed/Makefile | 11 +--- arch/arm/boot/compressed/Makefile.debug | 23 ------- arch/arm/boot/compressed/head.S | 40 +++++++++--- arch/arm/boot/compressed/misc.c | 20 ------ arch/arm/kernel/Makefile | 4 +- arch/arm/kernel/compat.c | 7 -- arch/arm/kernel/compat.h | 2 - arch/arm/kernel/setup.c | 11 +++ 10 files changed, 157 insertions(+), 80 deletions(-) delete mode 100644 arch/arm/boot/compressed/Makefile.debugSignature · 7 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ | _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
cover Makefile.boot cleanup
Quoted 10 lines · Uwe Kleine-K?nig
Hi Russell,
Quoted 3 lines · Uwe Kleine-K?nig
this series is a merge between Eric's and my patches that we did to clean up the early boot code. It doesn't contain runtime physoffset support for now, but I plan to pick that up later.
I added Nicolas' Acks to my tree and dropped the one patch he objected.
Are you willing to pull these now?
FWIW, I'm fine with Russell pulling this into his tree for the next merge window. Maybe you could just resend an official pull request with the updated info. I'll include it in the Linaro consolidation tree in the mean time if you don't mind.
Nicolas
cover Makefile.boot cleanup
Hello Russell,
Quoted 6 lines · Nicolas Pitre
Quoted 5 lines · Uwe Kleine-K?nig
Quoted 3 lines · Uwe Kleine-K?nig
this series is a merge between Eric's and my patches that we did to clean up the early boot code. It doesn't contain runtime physoffset support for now, but I plan to pick that up later.
Quoted 7 lines
Quoted 3 lines
I added Nicolas' Acks to my tree and dropped the one patch he objected.
Are you willing to pull these now?
FWIW, I'm fine with Russell pulling this into his tree for the next merge window. Maybe you could just resend an official pull request with the updated info.
OK, I thought it similar enough to the original request, but if it helps I can do that:
The following changes since commit 7e27d6e778cd87b6f2415515d7127eba53fe5d02:
Linux 2.6.35-rc3 (2010-06-11 19:14:04 -0700)
are available in the git repository at:
git://git.pengutronix.de/git/ukl/linux-2.6.git arm/booting
Eric Miao (2):
ARM: Remove unused PARAMS_PHYS from arch/arm/boot/compressed Auto calculate ZRELADDR and provide option for exceptions
Uwe Kleine-K?nig (8):
ARM: zImage: don't hard code the stack size twice
ARM: zImage: some comments for __armv3_mpu_cache_on
ARM: zImage: __armv3_mpu_cache_flush: respect should-be-zero specification
ARM: zImage: fix comments for cache_on, cache_off and cache_clean_flush
ARM: zImage: annotate debug functions about corrupted registers
ARM: remove bit-rotten STANDALONE_DEBUG for decompressor
ARM: zImage: don't define unused symbol initrd_phys
ARM: deprecate support for old way to pass kernel parameters
arch/arm/Kconfig | 105 +++++++++++++++++++++++++++++++ arch/arm/boot/Makefile | 8 +-- arch/arm/boot/compressed/Makefile | 11 +--- arch/arm/boot/compressed/Makefile.debug | 23 ------- arch/arm/boot/compressed/head.S | 40 +++++++++--- arch/arm/boot/compressed/misc.c | 20 ------ arch/arm/kernel/Makefile | 4 +- arch/arm/kernel/compat.c | 7 -- arch/arm/kernel/compat.h | 2 - arch/arm/kernel/setup.c | 11 +++ 10 files changed, 152 insertions(+), 79 deletions(-) delete mode 100644 arch/arm/boot/compressed/Makefile.debug
Russell, can you please pull this for the next merge window?
Quoted 2 lines
I'll include it in the Linaro consolidation tree in
the mean time if you don't mind.
I don't know what the "Linaro consolidation tree" is, but I'm sure that even if I minded I couldn't stop you to take it. :-)
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
cover Makefile.boot cleanup
Quoted 4 lines · Uwe Kleine-K?nig
Quoted 2 lines
I'll include it in the Linaro consolidation tree in
the mean time if you don't mind.I don't know what the "Linaro consolidation tree" is, but I'm sure that even if I minded I couldn't stop you to take it. :-)
I think it is good courtesy to ask.
FYI: Linaro is http://www.linaro.org.
The consolidation tree is described here:
https://wiki.ubuntu.com/Specs/M/ARMKernelVersionAlignment
And the result can be found here:
http://git.linaro.org/gitweb?p=linux/arm_next.git;a=summary
Nicolas
cover Makefile.boot cleanup
In reply to Uwe Kleine-König2010/7/8 Uwe Kleine-K?nig <[email protected]>:
Quoted 21 lines
Hello Russell,
Quoted 6 lines · Nicolas Pitre
Quoted 5 lines · Uwe Kleine-K?nig
Quoted 3 lines · Uwe Kleine-K?nig
this series is a merge between Eric's and my patches that we did to clean up the early boot code. ?It doesn't contain runtime physoffset support for now, but I plan to pick that up later.
Quoted 7 lines
Quoted 3 lines
I added Nicolas' Acks to my tree and dropped the one patch he objected.
Are you willing to pull these now?
FWIW, I'm fine with Russell pulling this into his tree for the next merge window. ?Maybe you could just resend an official pull request with the updated info.
OK, I thought it similar enough to the original request, but if it helps I can do that:
The following changes since commit
7e27d6e778cd87b6f2415515d7127eba53fe5d02:
Quoted 8 lines
?Linux 2.6.35-rc3 (2010-06-11 19:14:04 -0700)
are available in the git repository at:
?git://git.pengutronix.de/git/ukl/linux-2.6.git arm/bootingEric Miao (2):
? ? ?ARM: Remove unusedPARAMS_PHYSfromarch/arm/boot/compressed? ? ?Auto calculate ZRELADDR and provide option for exceptions
This seems to miss the "ARM:" prefix, though a small issue.
Quoted 43 lines
Uwe Kleine-K?nig (8):
? ? ?ARM: zImage: don't hard code the stack size twice
? ? ?ARM: zImage: some comments for__armv3_mpu_cache_on
? ? ?ARM: zImage:__armv3_mpu_cache_flush: respect should-be-zero specification ? ? ?ARM: zImage: fix comments forcache_on,cache_offandcache_clean_flush? ? ?ARM: zImage: annotate debug functions about corrupted registers ? ? ?ARM: remove bit-rottenSTANDALONE_DEBUGfor decompressor
? ? ?ARM: zImage: don't define unused symbolinitrd_phys
? ? ?ARM: deprecate support for old way to pass kernel parameters?arch/arm/Kconfig ? ? ? ? ? ? ? ? ? ? ? ?| ?105 +++++++++++++++++++++++++++++++ ?arch/arm/boot/Makefile ? ? ? ? ? ? ? ? ?| ? ?8 +-- ?arch/arm/boot/compressed/Makefile ? ? ? | ? 11 +--- ?arch/arm/boot/compressed/Makefile.debug | ? 23 ------- ?arch/arm/boot/compressed/head.S ? ? ? ? | ? 40 +++++++++--- ?arch/arm/boot/compressed/misc.c ? ? ? ? | ? 20 ------ ?arch/arm/kernel/Makefile ? ? ? ? ? ? ? ?| ? ?4 +- ?arch/arm/kernel/compat.c ? ? ? ? ? ? ? ?| ? ?7 -- ?arch/arm/kernel/compat.h ? ? ? ? ? ? ? ?| ? ?2 - ?arch/arm/kernel/setup.c ? ? ? ? ? ? ? ? | ? 11 +++?10 files changed, 152 insertions(+), 79 deletions(-) ?delete mode 100644
arch/arm/boot/compressed/Makefile.debugRussell, can you please pull this for the next merge window?
Quoted 2 lines
? ? ? ? ? ? ? ? ? ?I'll include it in the Linaro consolidation tree in the mean time if you don't mind.
I don't know what the "Linaro consolidation tree" is, but I'm sure that even if I minded I couldn't stop you to take it. :-)
Best regards
Uwe--
Pengutronix e.K. ? ? ? ? ? ? ? ? ? ? ? ? ? | Uwe Kleine-K?nig ? ? ? ? ? ?| Industrial Linux Solutions ? ? ? ? ? ? ? ? | http://www.pengutronix.de/ ?|_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
cover Makefile.boot cleanup
In reply to Uwe Kleine-KönigHello Russell,
Quoted 28 lines · Uwe Kleine-K?nig
Quoted 6 lines · Nicolas Pitre
Quoted 5 lines · Uwe Kleine-K?nig
Quoted 3 lines · Uwe Kleine-K?nig
this series is a merge between Eric's and my patches that we did to clean up the early boot code. It doesn't contain runtime physoffset support for now, but I plan to pick that up later.
Quoted 7 lines
Quoted 3 lines
I added Nicolas' Acks to my tree and dropped the one patch he objected.
Are you willing to pull these now?
FWIW, I'm fine with Russell pulling this into his tree for the next merge window. Maybe you could just resend an official pull request with the updated info.
OK, I thought it similar enough to the original request, but if it helps I can do that:
The following changes since commit
7e27d6e778cd87b6f2415515d7127eba53fe5d02:Linux 2.6.35-rc3 (2010-06-11 19:14:04 -0700)
are available in the git repository at:
git://git.pengutronix.de/git/ukl/linux-2.6.gitarm/bootingEric Miao (2):
ARM: Remove unusedPARAMS_PHYSfromarch/arm/boot/compressedAuto calculate ZRELADDR and provide option for exceptions
Quoted 9 lines
Uwe Kleine-K?nig (8):
ARM: zImage: don't hard code the stack size twice
ARM: zImage: some comments for__armv3_mpu_cache_on
ARM: zImage:__armv3_mpu_cache_flush: respect should-be-zero specification
ARM: zImage: fix comments forcache_on,cache_offandcache_clean_flush
ARM: zImage: annotate debug functions about corrupted registers
ARM: remove bit-rottenSTANDALONE_DEBUGfor decompressor
ARM: zImage: don't define unused symbolinitrd_phys
ARM: deprecate support for old way to pass kernel parameters
I added an ARM: prefix to Eric's second commit, other than that the branch is unchanged. Do you pull for .36-rc1?
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
Git pull request, was Re: [PATCH 0/5] Makefile.boot cleanup
Russell,
Could you pull the above for the upcoming merge window please? We've got a couple patches depending on this and that would simplify things if this was merged into mainline.
Quoted 50 lines · Uwe Kleine-K?nig
Hello Russell,
Quoted 28 lines · Uwe Kleine-K?nig
Quoted 6 lines · Nicolas Pitre
Quoted 5 lines · Uwe Kleine-K?nig
Quoted 3 lines · Uwe Kleine-K?nig
this series is a merge between Eric's and my patches that we did to clean up the early boot code. It doesn't contain runtime physoffset support for now, but I plan to pick that up later.
Quoted 7 lines
Quoted 3 lines
I added Nicolas' Acks to my tree and dropped the one patch he objected.
Are you willing to pull these now?
FWIW, I'm fine with Russell pulling this into his tree for the next merge window. Maybe you could just resend an official pull request with the updated info.
OK, I thought it similar enough to the original request, but if it helps I can do that:
The following changes since commit
7e27d6e778cd87b6f2415515d7127eba53fe5d02:Linux 2.6.35-rc3 (2010-06-11 19:14:04 -0700)
are available in the git repository at:
git://git.pengutronix.de/git/ukl/linux-2.6.gitarm/bootingEric Miao (2):
ARM: Remove unusedPARAMS_PHYSfromarch/arm/boot/compressedAuto calculate ZRELADDR and provide option for exceptionsQuoted 9 lines
Uwe Kleine-K?nig (8):
ARM: zImage: don't hard code the stack size twice
ARM: zImage: some comments for__armv3_mpu_cache_on
ARM: zImage:__armv3_mpu_cache_flush: respect should-be-zero specification
ARM: zImage: fix comments forcache_on,cache_offandcache_clean_flush
ARM: zImage: annotate debug functions about corrupted registers
ARM: remove bit-rottenSTANDALONE_DEBUGfor decompressor
ARM: zImage: don't define unused symbolinitrd_phys
ARM: deprecate support for old way to pass kernel parametersI added an ARM: prefix to Eric's second commit, other than that the branch is unchanged. Do you pull for .36-rc1?
Best regards
UweSignature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |