summaryrefslogtreecommitdiff
path: root/arch/arm/lib/stack.c
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2021-09-23 22:38:21 -0400
committerTom Rini <[email protected]>2021-09-23 22:38:21 -0400
commit657668348b5d677afca029673479266ef601f8a6 (patch)
tree88d807a4872e12a0df8eefc8463da8af9b286bd5 /arch/arm/lib/stack.c
parent7b57e56739ed2c550d17a072a7f4c8326c0c83dc (diff)
parent8e85f36a8fabb4bd5216f6bfcc9a8224adb63496 (diff)
Merge branch '2021-09-23-assorted-updates' into next
- Rework lmb reservation so we have common code for all arches to use - armv8 cache.S cleanups, crc32 speedup - ENV_IS_NOWHWERE, pci io/memory base configuration fixes
Diffstat (limited to 'arch/arm/lib/stack.c')
-rw-r--r--arch/arm/lib/stack.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/lib/stack.c b/arch/arm/lib/stack.c
index b03e1cfc80c..656084c7e51 100644
--- a/arch/arm/lib/stack.c
+++ b/arch/arm/lib/stack.c
@@ -12,6 +12,7 @@
*/
#include <common.h>
#include <init.h>
+#include <lmb.h>
#include <asm/global_data.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -33,3 +34,16 @@ int arch_reserve_stacks(void)
return 0;
}
+
+static ulong get_sp(void)
+{
+ ulong ret;
+
+ asm("mov %0, sp" : "=r"(ret) : );
+ return ret;
+}
+
+void arch_lmb_reserve(struct lmb *lmb)
+{
+ arch_lmb_reserve_generic(lmb, get_sp(), gd->ram_top, 16384);
+}