Commit 584a7cc6 authored by Russell King's avatar Russell King

Pass a physical address from the boot loader for the location of the

initrd instead of a virtual address; the boot loader has no business
knowing the kernel's virtual to physical mappings, which could
change in the future.
parent 626ad0e2
......@@ -14,14 +14,12 @@ ifeq ($(CONFIG_CPU_26),y)
ZRELADDR = 0x02080000
PARAMS_PHYS = 0x0207c000
INITRD_PHYS = 0x02180000
INITRD_VIRT = 0x02180000
endif
ifeq ($(CONFIG_ARCH_RPC),y)
ZRELADDR = 0x10008000
PARAMS_PHYS = 0x10000100
INITRD_PHYS = 0x18000000
INITRD_VIRT = 0xc8000000
endif
ifeq ($(CONFIG_ARCH_CLPS7500),y)
......@@ -32,7 +30,6 @@ ifeq ($(CONFIG_ARCH_EBSA110),y)
ZRELADDR = 0x00008000
PARAMS_PHYS = 0x00000400
INITRD_PHYS = 0x00800000
INITRD_VIRT = 0xc0800000
endif
ifeq ($(CONFIG_ARCH_SHARK),y)
......@@ -44,14 +41,12 @@ ifeq ($(CONFIG_FOOTBRIDGE),y)
ZRELADDR = 0x00008000
PARAMS_PHYS = 0x00000100
INITRD_PHYS = 0x00800000
INITRD_VIRT = 0xc0800000
endif
ifeq ($(CONFIG_ARCH_INTEGRATOR),y)
ZRELADDR = 0x00008000
PARAMS_PHYS = 0x00000100
INITRD_PHYS = 0x00800000
INITRD_VIRT = 0xc0800000
endif
ifeq ($(CONFIG_ARCH_CAMELOT),y)
......@@ -75,11 +70,9 @@ endif
# Should probably have some agreement on these...
ifeq ($(CONFIG_ARCH_P720T),y)
INITRD_PHYS = 0xc0400000
INITRD_VIRT = 0xc0400000
endif
ifeq ($(CONFIG_ARCH_CDB89712),y)
INITRD_PHYS = 0x00700000
INITRD_VIRT = 0xc0300000
endif
ifeq ($(CONFIG_ARCH_SA1100),y)
......@@ -119,7 +112,7 @@ ZTEXTADDR =0
ZBSSADDR =ALIGN(4)
endif
export SYSTEM ZTEXTADDR ZBSSADDR ZRELADDR INITRD_PHYS INITRD_VIRT PARAMS_PHYS
export SYSTEM ZTEXTADDR ZBSSADDR ZRELADDR INITRD_PHYS PARAMS_PHYS
Image: $(CONFIGURE) $(SYSTEM)
$(OBJCOPY) -O binary -R .note -R .comment -S $(SYSTEM) $@
......@@ -139,7 +132,7 @@ bootp/bootp: zImage initrd
@$(MAKE) -C bootp bootp
initrd:
@test "$(INITRD_VIRT)" != "" || (echo This architecture does not support INITRD; exit -1)
@test "$(INITRD_PHYS)" != "" || (echo This architecture does not support INITRD; exit -1)
@test "$(INITRD)" != "" || (echo You must specify INITRD; exit -1)
install: $(CONFIGURE) Image
......
......@@ -5,7 +5,6 @@
ZSYSTEM =$(TOPDIR)/arch/arm/boot/zImage
ZLDFLAGS =-p -X -T bootp.lds \
--defsym initrd_addr=$(INITRD_PHYS) \
--defsym initrd_virt=$(INITRD_VIRT) \
--defsym params=$(PARAMS_PHYS) \
--defsym kernel_addr=$(ZTEXTADDR)
......
......@@ -102,8 +102,8 @@ data: .word initrd_start
.word kernel_len
.word 0x54410001 @ r4 = ATAG_CORE
.word 0x54410005 @ r5 = ATAG_INITRD
.word initrd_virt @ r6
.word 0x54420005 @ r5 = ATAG_INITRD
.word initrd_addr @ r6
.word initrd_len @ r7
.word params @ r8
......
......@@ -517,6 +517,20 @@ static int __init parse_tag_initrd(const struct tag *tag)
__tagtable(ATAG_INITRD, parse_tag_initrd);
static int __init parse_tag_initrd2(const struct tag *tag)
{
unsigned long start = 0;
if (tag->u.initrd.size) {
start = (unsigned long)phys_to_virt(tag->u.initrd.start);
setup_initrd(start, tag->u.initrd.size);
}
return 0;
}
__tagtable(ATAG_INITRD2, parse_tag_initrd2);
static int __init parse_tag_serialnr(const struct tag *tag)
{
system_serial_low = tag->u.serialnr.low;
......
......@@ -131,8 +131,15 @@ struct tag_ramdisk {
};
/* describes where the compressed ramdisk image lives */
/*
* this one accidentally used virtual addresses - as such,
* its depreciated.
*/
#define ATAG_INITRD 0x54410005
/* describes where the compressed ramdisk image lives */
#define ATAG_INITRD2 0x54420005
struct tag_initrd {
u32 start; /* physical start address */
u32 size; /* size of compressed ramdisk image in bytes */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment