* Patch to ARM's redboot_linux_exec.c file
@ 2010-03-08 19:39 Mahesh Mahadevan
0 siblings, 0 replies; only message in thread
From: Mahesh Mahadevan @ 2010-03-08 19:39 UTC (permalink / raw)
To: ecos-patches
[-- Attachment #1: Type: text/plain, Size: 696 bytes --]
Hello All,
I ran into an issue with the Redboot "exec" command on an ARM-based platform. After copying the downloaded kernel to the entry address, the PC was getting set to an incorrect entry address thereby causing the kernel decompression step to fail.
On further debugging, I found that Register r2 was being used to store the "entry" input operand in the inline assembly code at the end of the do_exec() function.
r2 is also used to store the Linux kernel parameters, I have attached a patch to fix this issue.
Best Regards,
-Mahesh
_________________________________________________________________
The latest songs, trailers and more
http://video.in.msn.com/
[-- Attachment #2: 0001-Add-r2-to-clobber-list-to-avoid-using-r2-to-store-th.patch --]
[-- Type: text/plain, Size: 1009 bytes --]
From 6d371b4f6dabc768d5c181f8f5ec753df773887d Mon Sep 17 00:00:00 2001
From: Mahesh Mahadevan <r9aadq@freescale.com>
Date: Mon, 8 Mar 2010 13:00:26 -0600
Subject: [PATCH] Add r2 to clobber list to avoid using r2 to store the input operands
Signed-off-by: Mahesh Mahadevan <r9aadq@freescale.com>
---
.../hal/arm/arch/current/src/redboot_linux_exec.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/packages/hal/arm/arch/current/src/redboot_linux_exec.c b/packages/hal/arm/arch/current/src/redboot_linux_exec.c
index 62665d0..386dfce 100755
--- a/packages/hal/arm/arch/current/src/redboot_linux_exec.c
+++ b/packages/hal/arm/arch/current/src/redboot_linux_exec.c
@@ -528,7 +528,7 @@ do_exec(int argc, char *argv[])
"r"(CYGARC_PHYSICAL_ADDRESS(CYGHWR_REDBOOT_ARM_TRAMPOLINE_ADDRESS)),
"r"(CYGARC_PHYSICAL_ADDRESS(CYGHWR_REDBOOT_ARM_LINUX_TAGS_ADDRESS)),
"r"(system_rev)
- : "r0", "r1"
+ : "r0", "r1", "r2"
);
}
--
1.6.0.4
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-08 19:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-08 19:39 Patch to ARM's redboot_linux_exec.c file Mahesh Mahadevan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).