46 lines
1.3 KiB
Diff
46 lines
1.3 KiB
Diff
|
From 39727c90aad7a77d216092f55e3604792826c820 Mon Sep 17 00:00:00 2001
|
||
|
From: Nick Xie <nick@khadas.com>
|
||
|
Date: Fri, 21 Aug 2020 14:59:07 +0800
|
||
|
Subject: [PATCH 26/40] GX: update TEXT_OFFSET for Amlogic MESON SoC
|
||
|
|
||
|
Signed-off-by: Nick Xie <nick@khadas.com>
|
||
|
---
|
||
|
arch/arm64/Makefile | 4 ++++
|
||
|
arch/arm64/kernel/head.S | 4 ++--
|
||
|
2 files changed, 6 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
|
||
|
index 148362c285f8..e4cb0644f693 100644
|
||
|
--- a/arch/arm64/Makefile
|
||
|
+++ b/arch/arm64/Makefile
|
||
|
@@ -128,7 +128,11 @@ endif
|
||
|
head-y := arch/arm64/kernel/head.o
|
||
|
|
||
|
# The byte offset of the kernel image in RAM from the start of RAM.
|
||
|
+ifeq ($(CONFIG_ARCH_MESON),y)
|
||
|
+TEXT_OFFSET := 0x01080000
|
||
|
+else
|
||
|
TEXT_OFFSET := 0x0
|
||
|
+endif
|
||
|
|
||
|
ifeq ($(CONFIG_KASAN_SW_TAGS), y)
|
||
|
KASAN_SHADOW_SCALE_SHIFT := 4
|
||
|
diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
|
||
|
index 037421c66b14..18b37e2d2a00 100644
|
||
|
--- a/arch/arm64/kernel/head.S
|
||
|
+++ b/arch/arm64/kernel/head.S
|
||
|
@@ -42,8 +42,8 @@
|
||
|
#error TEXT_OFFSET must be at least 4KB aligned
|
||
|
#elif (PAGE_OFFSET & 0x1fffff) != 0
|
||
|
#error PAGE_OFFSET must be at least 2MB aligned
|
||
|
-#elif TEXT_OFFSET > 0x1fffff
|
||
|
-#error TEXT_OFFSET must be less than 2MB
|
||
|
+//#elif TEXT_OFFSET > 0x1fffff
|
||
|
+//#error TEXT_OFFSET must be less than 2MB
|
||
|
#endif
|
||
|
|
||
|
/*
|
||
|
--
|
||
|
2.25.1
|
||
|
|