Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFS Gluon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
firmware
FFS Gluon
Commits
ff574cfe
Commit
ff574cfe
authored
9 years ago
by
Matthias Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
ar71xx/lzma-loader: fix O32 ABI conformance
Backport of r48279
parent
b6c57664
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
patches/openwrt/0046-ar71xx-lzma-loader-fix-O32-ABI-conformance.patch
+36
-0
36 additions, 0 deletions
...wrt/0046-ar71xx-lzma-loader-fix-O32-ABI-conformance.patch
with
36 additions
and
0 deletions
patches/openwrt/0046-ar71xx-lzma-loader-fix-O32-ABI-conformance.patch
0 → 100644
+
36
−
0
View file @
ff574cfe
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sun, 28 Feb 2016 04:49:51 +0100
Subject: ar71xx/lzma-loader: fix O32 ABI conformance
According to the calling convention of the o32 ABI the caller
function must reserve stack space for $a0-$a3 registers in case
the callee needs to save its arguments.
The assembly code of the loader does not reserve stack space for
these registers thus when the 'loader_main' function needs to save
its arguments, those will be stored in the 'workspace' area instead
of the stack.
Because the workspace area is also used by other part of the code, the
saved register values gets overwritten and this often leads to failed
kernel boots.
Fix the code to reserve stack space for the registers to avoid this
error.
Backport of r48279
diff --git a/target/linux/ar71xx/image/lzma-loader/src/head.S b/target/linux/ar71xx/image/lzma-loader/src/head.S
index 543996a..47a7c9b 100644
--- a/target/linux/ar71xx/image/lzma-loader/src/head.S
+++ b/target/linux/ar71xx/image/lzma-loader/src/head.S
@@ -109,6 +109,9 @@
__bss_check:
/* Setup new "C" stack */
la sp, _stack
+ /* reserve stack space for a0-a3 registers */
+ subu sp, 16
+
/* jump to the decompressor routine */
la t0, loader_main
jr t0
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment