sh: fix uImage Entry Point

Previous thread: sh_keysc: remove request_mem_region() and release_mem_region() by Linux Kernel Mailing List on Monday, July 28, 2008 - 10:09 am. (1 message)

Next thread: sh: Wire up new syscalls. by Linux Kernel Mailing List on Monday, July 28, 2008 - 10:09 am. (1 message)
From: Linux Kernel Mailing List
Date: Monday, July 28, 2008 - 10:09 am

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=82cb1f...
Commit:     82cb1f6fb3f69518eaa4ab9c0fa7eabc253ad26f
Parent:     d3aa43a9db3b18e65f91985b5b91f2450d8b4048
Author:     Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
AuthorDate: Wed Jul 23 16:49:06 2008 +0900
Committer:  Paul Mundt <lethal@linux-sh.org>
CommitDate: Mon Jul 28 18:16:41 2008 +0900

    sh: fix uImage Entry Point
    
    fix the problem that cannot boot using uImage when PAGE_SIZE is
    8kbyte or 64kbyte.
    
    Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
    Signed-off-by: Paul Mundt <lethal@linux-sh.org>
---
 arch/sh/boot/Makefile |    2 +-
 arch/sh/mm/Kconfig    |    8 ++++++++
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/arch/sh/boot/Makefile b/arch/sh/boot/Makefile
index 89b4086..8b37869 100644
--- a/arch/sh/boot/Makefile
+++ b/arch/sh/boot/Makefile
@@ -40,7 +40,7 @@ KERNEL_LOAD	:= $(shell /bin/bash -c 'printf "0x%08x" \
 KERNEL_ENTRY	:= $(shell /bin/bash -c 'printf "0x%08x" \
 		     $$[$(CONFIG_PAGE_OFFSET)  + \
 			$(CONFIG_MEMORY_START) + \
-			$(CONFIG_ZERO_PAGE_OFFSET)+0x1000]')
+			$(CONFIG_ZERO_PAGE_OFFSET) + $(CONFIG_ENTRY_OFFSET)]')
 
 quiet_cmd_uimage = UIMAGE  $@
       cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A sh -O linux -T kernel \
diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig
index 29d8e3c..56d0a7d 100644
--- a/arch/sh/mm/Kconfig
+++ b/arch/sh/mm/Kconfig
@@ -170,6 +170,14 @@ config PAGE_SIZE_64KB
 
 endchoice
 
+config ENTRY_OFFSET
+	hex
+	default "0x00001000" if PAGE_SIZE_4KB
+	default "0x00002000" if PAGE_SIZE_8KB
+	default "0x00004000" if PAGE_SIZE_16KB
+	default "0x00010000" if PAGE_SIZE_64KB
+	default "0x00000000"
+
 choice
 	prompt "HugeTLB page size"
 	depends on HUGETLB_PAGE && (CPU_SH4 || CPU_SH5) && MMU
--

Previous thread: sh_keysc: remove request_mem_region() and release_mem_region() by Linux Kernel Mailing List on Monday, July 28, 2008 - 10:09 am. (1 message)

Next thread: sh: Wire up new syscalls. by Linux Kernel Mailing List on Monday, July 28, 2008 - 10:09 am. (1 message)