Skip to contentSkip to conversation

Ability to load linux kernel on rock2 RK3288

PATCH Superseded Sandy Patterson 3 participants 15 messages Jul 11, 2016 – Oct 15, 2016

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Ability to load linux kernel on rock2 RK3288

I wasn't able to load the linux kernel using a Rock2 board using the latest master branch. The board hangs after it has handed executing over to the kernel. I found that the latest release that worked was v2016.03.

I did some searching and I suspect the problem may be cache related.

This patchset allows the kernel to start by reverting two problem commits and disabling EFI_LOADER which I suspect rubs the caching the wrong way. We also found that the 512M limit for fdt and initrd is now 256M. I'm not sure why this is.

This still doesn't work 100%. I think it's not initializing the SD card volages correctly, but at least the Kernel is loading.

I also am not sure changing the caching for all armv7 is the right answer. I wasn't too sure about the revert. I am not very familiar with this low level stuff.

Sandy Patterson

Sandy Patterson (4):
Revert "arm: Replace v7_maint_dcache_all(ARMV7_DCACHE_CLEAN_INVAL_ALL)
with asm code"
Revert "arm: Replace v7_maint_dcache_all(ARMV7_DCACHE_INVAL_ALL) with
asm code"
Disable CONFIG_EFI_LOADER for rock2.
RK3288 needs fdt and initrd below 256M now.

 arch/arm/cpu/armv7/Makefile                  |   2 +-
 arch/arm/cpu/armv7/cache_v7.c                | 135 ++++++++++++++++++++++-
 arch/arm/cpu/armv7/cache_v7_asm.S            | 154 ---------------------------
 arch/arm/mach-uniphier/arm32/lowlevel_init.S |  67 +++++++++++-
 configs/rock2_defconfig                      |   1 +
 include/configs/rk3288_common.h              |   6 +-
 6 files changed, 201 insertions(+), 164 deletions(-)
 delete mode 100644 arch/arm/cpu/armv7/cache_v7_asm.S
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/4 Revert "arm: Replace v7_maint_dcache_all(ARMV7_DCACHE_CLEAN_INVAL_ALL) with asm code"

This reverts commit c09d29057ab0b04db0857d319c6bff74de31b9c3.

Conflicts:

	arch/arm/cpu/armv7/cache_v7.c
	arch/arm/cpu/armv7/cache_v7_asm.S

---

 arch/arm/cpu/armv7/Makefile                  |   2 +-
 arch/arm/cpu/armv7/cache_v7.c                | 119 +++++++++++++++++++--
 arch/arm/cpu/armv7/cache_v7_asm.S            | 154 ---------------------------
 arch/arm/mach-uniphier/arm32/lowlevel_init.S |  67 +++++++++++-
 4 files changed, 180 insertions(+), 162 deletions(-)
 delete mode 100644 arch/arm/cpu/armv7/cache_v7_asm.S
arch/arm/cpu/armv7/Makefile +1 -1
index ddd8d12..34bd42b 100644
@@ -7,7 +7,7 @@
 
 extra-y	:= start.o
 
-obj-y	+= cache_v7.o cache_v7_asm.o
+obj-y	+= cache_v7.o
 
 obj-y	+= cpu.o cp15.o
 obj-y	+= syslib.o
arch/arm/cpu/armv7/cache_v7.c +113 -6

137 lines not on this page · raw message

arch/arm/cpu/armv7/cache_v7_asm.S deleted +0 -154

154 lines not on this page · raw message

arch/arm/mach-uniphier/arm32/lowlevel_init.S +66 -1

76 lines not on this page · raw message

Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/4 Revert "arm: Replace v7_maint_dcache_all(ARMV7_DCACHE_INVAL_ALL) with asm code"

In reply to Sandy Patterson

This reverts commit df120142f36b6ff8b12187b8860269763b2b3203.

Conflicts:

	arch/arm/cpu/armv7/cache_v7.c
	arch/arm/cpu/armv7/cache_v7_asm.S

---

 arch/arm/cpu/armv7/cache_v7.c | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)
arch/arm/cpu/armv7/cache_v7.c +21 -3
index 85b0b0e..3e1ea2c 100644
@@ -10,10 +10,16 @@
 #include <asm/armv7.h>
 #include <asm/utils.h>
 
-#define ARMV7_DCACHE_INVAL_RANGE	1
-#define ARMV7_DCACHE_CLEAN_INVAL_RANGE	2
+#define ARMV7_DCACHE_INVAL_ALL		1
+#define ARMV7_DCACHE_CLEAN_INVAL_ALL	2
+#define ARMV7_DCACHE_INVAL_RANGE	3
+#define ARMV7_DCACHE_CLEAN_INVAL_RANGE	4
 
 #ifndef CONFIG_SYS_DCACHE_OFF
+
+/* Asm functions from cache_v7_asm.S */
+void v7_flush_dcache_all(void);
+
 static int check_cache_range(unsigned long start, unsigned long stop)
 {
 	int ok = 1;
@@ -31,6 +37,18 @@ static int check_cache_range(unsigned long start, unsigned long stop)
 	return ok;
 }
 
+/*
+ * Write the level and type you want to Cache Size Selection Register(CSSELR)
+ * to get size details from Current Cache Size ID Register(CCSIDR)
+ */
+static void set_csselr(u32 level, u32 type)
+{
+	u32 csselr = level << 1 | type;
+
+	/* Write to Cache Size Selection Register(CSSELR) */
+	asm volatile ("mcr p15, 2, %0, c0, c0, 0" : : "r" (csselr));
+}
+
 static u32 get_ccsidr(void)
 {
 	u32 ccsidr;
@@ -238,7 +256,7 @@ static void v7_inval_tlb(void)
 
 void invalidate_dcache_all(void)
 {
-	v7_invalidate_dcache_all();
+	v7_maint_dcache_all(ARMV7_DCACHE_INVAL_ALL);
 
 	v7_outer_cache_inval_all();
 }
Signature · 1 line
1.9.1
#3 lore raw

PATCH 3/4 Disable CONFIG_EFI_LOADER for rock2.

In reply to Sandy Patterson

I'm not sure why this breaks kernel loading.

---

 configs/rock2_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/rock2_defconfig +1 -0
index 3e16b80..3a06b7e 100644
@@ -67,3 +67,4 @@ CONFIG_USE_PRIVATE_LIBGCC=y
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_ERRNO_STR=y
+# CONFIG_EFI_LOADER is not set
Signature · 1 line
1.9.1
#4 lore raw

PATCH 4/4 RK3288 needs fdt and initrd below 256M now.

In reply to Sandy Patterson

I am not sure why this limit is changing. But my kernel doesn't load when it's above 256. This was testing on the rock2 board.

---

 include/configs/rk3288_common.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/configs/rk3288_common.h +3 -3
index 9d50d83..b88e7e5 100644
@@ -97,11 +97,11 @@
 
 #include <config_distro_bootcmd.h>
 
-/* Linux fails to load the fdt if it's loaded above 512M on a Rock 2 board, so
+/* Linux fails to load the fdt if it's loaded above 256M on a Rock 2 board, so
  * limit the fdt reallocation to that */
 #define CONFIG_EXTRA_ENV_SETTINGS \
-	"fdt_high=0x1fffffff\0" \
-	"initrd_high=0x1fffffff\0" \
+	"fdt_high=0x0fffffff\0" \
+	"initrd_high=0x0fffffff\0" \
 	ENV_MEM_LAYOUT_SETTINGS \
 	ROCKCHIP_DEVICE_SETTINGS \
 	BOOTENV
Signature · 1 line
1.9.1
#5 lore raw

PATCH 4/4 RK3288 needs fdt and initrd below 256M now.

Hi Sandy,

Quoted 9 lines · Sandy Patterson

I am not sure why this limit is changing. But my kernel doesn't load when it's above 256. This was testing on the rock2 board.

---

 include/configs/rk3288_common.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Is this patch not needed now?

Quoted 21 lines
include/configs/rk3288_common.h +3 -4
index 9d50d83..b88e7e5 100644
@@ -97,11 +97,11 @@
 
 #include <config_distro_bootcmd.h>
 
-/* Linux fails to load the fdt if it's loaded above 512M on a Rock 2 board, so
+/* Linux fails to load the fdt if it's loaded above 256M on a Rock 2 board, so
  * limit the fdt reallocation to that */
 #define CONFIG_EXTRA_ENV_SETTINGS \
-       "fdt_high=0x1fffffff\0" \
-       "initrd_high=0x1fffffff\0" \
+       "fdt_high=0x0fffffff\0" \
+       "initrd_high=0x0fffffff\0" \
        ENV_MEM_LAYOUT_SETTINGS \
        ROCKCHIP_DEVICE_SETTINGS \
        BOOTENV
--
Quoted 2 lines

1.9.1

Regards,
Simon

#6 lore raw

PATCH 4/4 RK3288 needs fdt and initrd below 256M now.

Quoted 8 lines · Simon Glass

Hi Sandy,

Quoted 4 lines · Sandy Patterson

I am not sure why this limit is changing. But my kernel doesn't load when it's above 256. This was testing on the rock2 board.

Quoted 8 lines
Quoted 5 lines

---

 include/configs/rk3288_common.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Is this patch not needed now?

I just retested with the latest from u-boot.git/master . This patch is still required for booing on rock2. I tested with the same mainline kernel version as before (4.7.0-rc6). I don't know why, and I haven't tried searching back through the history to see if it used to work and what changed, sorry.

Quoted 31 lines

include/configs/rk3288_

Quoted 3 lines
include/configs/rk3288_ renamed from include/configs/rk3288_common.h +0 -0

common.h

include/configs/rk3288_common.h line 100

Quoted 8 lines

index 9d50d83..b88e7e5 100644

include/configs/rk3288_common.h +0 -1
@@ -97,11 +97,11 @@
 
 #include <config_distro_bootcmd.h>
 
-/* Linux fails to load the fdt if it's loaded above 512M on a Rock 2

board, so

include/configs/rk3288_common.h line 100

Quoted 1 line
include/configs/rk3288_common.h +1 -0
+/* Linux fails to load the fdt if it's loaded above 256M on a Rock 2

board, so

Quoted 10 lines
include/configs/rk3288_common.h +2 -3
  * limit the fdt reallocation to that */
 #define CONFIG_EXTRA_ENV_SETTINGS \
-       "fdt_high=0x1fffffff\0" \
-       "initrd_high=0x1fffffff\0" \
+       "fdt_high=0x0fffffff\0" \
+       "initrd_high=0x0fffffff\0" \
        ENV_MEM_LAYOUT_SETTINGS \
        ROCKCHIP_DEVICE_SETTINGS \
        BOOTENV
--
Quoted 2 lines

1.9.1

Regards,
Simon

#7 lore raw

PATCH 4/4 RK3288 needs fdt and initrd below 256M now.

Quoted 18 lines · Sandy Patterson
Quoted 15 lines · Simon Glass

Hi Sandy,

Quoted 9 lines · Sandy Patterson

I am not sure why this limit is changing. But my kernel doesn't load when it's above 256. This was testing on the rock2 board.

---

 include/configs/rk3288_common.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Quoted 7 lines
Quoted 1 line

Is this patch not needed now?

I just retested with the latest from u-boot.git/master . This patch is still required for booing on rock2. I tested with the same mainline kernel version as before (4.7.0-rc6). I don't know why, and I haven't tried searching back through the history to see if it used to work and what changed, sorry.

Still not tested tags for this.

Updated commit subject and:

Applied to u-boot-rockchip, thanks!

#8 lore raw

cover Ability to load linux kernel on rock2 RK3288

In reply to Sandy Patterson

I did a little more on this, and talked to someone else here. It seems that my problem with loading the kernel including these patches is specific to our kernel and after applying a local patch we have, it appears to load fine.

So this patchset gets me back to the same functionality in v2016.03.

We're left with the puzzle of what's wrong on the RK3288 regarding caching and memory.

Sandy Patterson

Quoted 45 lines · Sandy Patterson

I wasn't able to load the linux kernel using a Rock2 board using the latest master branch. The board hangs after it has handed executing over to the kernel. I found that the latest release that worked was v2016.03.

I did some searching and I suspect the problem may be cache related.

This patchset allows the kernel to start by reverting two problem commits and disabling EFI_LOADER which I suspect rubs the caching the wrong way. We also found that the 512M limit for fdt and initrd is now 256M.
I'm not sure why this is.

This still doesn't work 100%. I think it's not initializing the SD card volages correctly, but at least the Kernel is loading.

I also am not sure changing the caching for all armv7 is the right answer. I wasn't too sure about the revert. I am not very familiar with this low level stuff.

Sandy Patterson

Sandy Patterson (4):
Revert "arm: Replace v7_maint_dcache_all(ARMV7_DCACHE_CLEAN_INVAL_ALL)
with asm code"
Revert "arm: Replace v7_maint_dcache_all(ARMV7_DCACHE_INVAL_ALL) with
asm code"
Disable CONFIG_EFI_LOADER for rock2.
RK3288 needs fdt and initrd below 256M now.

 arch/arm/cpu/armv7/Makefile                  |   2 +-
 arch/arm/cpu/armv7/cache_v7.c                | 135 ++++++++++++++++++++++-
 arch/arm/cpu/armv7/cache_v7_asm.S            | 154
---------------------------
 arch/arm/mach-uniphier/arm32/lowlevel_init.S |  67 +++++++++++-
 configs/rock2_defconfig                      |   1 +
 include/configs/rk3288_common.h              |   6 +-
 6 files changed, 201 insertions(+), 164 deletions(-)
 delete mode 100644 arch/arm/cpu/armv7/cache_v7_asm.S

--
1.9.1

#9 lore raw

cover Ability to load linux kernel on rock2 RK3288

HI Sandy,

Quoted 9 lines · Sandy Patterson

I did a little more on this, and talked to someone else here. It seems that my problem with loading the kernel including these patches is specific to our kernel and after applying a local patch we have, it appears to load fine.

So this patchset gets me back to the same functionality in v2016.03.

We're left with the puzzle of what's wrong on the RK3288 regarding caching and memory.

So what is the status of this patch set? Should it be withdrawn?

Regards,
Simon

Quoted 52 lines

Sandy Patterson

Quoted 46 lines · Sandy Patterson

I wasn't able to load the linux kernel using a Rock2 board using the latest master branch. The board hangs after it has handed executing over to the kernel. I found that the latest release that worked was v2016.03.

I did some searching and I suspect the problem may be cache related.

This patchset allows the kernel to start by reverting two problem commits and disabling EFI_LOADER which I suspect rubs the caching the wrong way. We also found that the 512M limit for fdt and initrd is now 256M.
I'm not sure why this is.

This still doesn't work 100%. I think it's not initializing the SD card volages correctly, but at least the Kernel is loading.

I also am not sure changing the caching for all armv7 is the right answer. I wasn't too sure about the revert. I am not very familiar with this low level stuff.

Sandy Patterson

Sandy Patterson (4):
Revert "arm: Replace v7_maint_dcache_all(ARMV7_DCACHE_CLEAN_INVAL_ALL)
with asm code"
Revert "arm: Replace v7_maint_dcache_all(ARMV7_DCACHE_INVAL_ALL) with
asm code"
Disable CONFIG_EFI_LOADER for rock2.
RK3288 needs fdt and initrd below 256M now.

 arch/arm/cpu/armv7/Makefile                  |   2 +-
 arch/arm/cpu/armv7/cache_v7.c                | 135
++++++++++++++++++++++-
 arch/arm/cpu/armv7/cache_v7_asm.S            | 154
---------------------------
 arch/arm/mach-uniphier/arm32/lowlevel_init.S |  67 +++++++++++-
 configs/rock2_defconfig                      |   1 +
 include/configs/rk3288_common.h              |   6 +-
 6 files changed, 201 insertions(+), 164 deletions(-)
 delete mode 100644 arch/arm/cpu/armv7/cache_v7_asm.S

--
1.9.1

#10 lore raw

cover Ability to load linux kernel on rock2 RK3288

Hi Simon,

I think I screwed up submitting, and didn't cc the maintainers for the reverts. I can resubmit and get patman to behave. What do you suggest?

I still think this is the best patch to getting rock2 to load kernels again.

I just retested with a patch specific to my kernel. I think 3.14 linux has some quirks in how it wants the dram setup, and I get instability without some changes to the dram init. I don't have enough of a system to test for this instability using the latest mainline kernel, so I left that patch out.

Ziyuan had an alternative fix for efi_loader, but it looks like it may break efi_loader for others, and I don't know how to test the efi functionality, so I think disabling for RK3288 is best. I think I should move the CONFIG_EFI_LOADER patch to somehow patching rk3288_common.h instead (can I #undef config vars in that file?)

Sandy

Quoted 75 lines · Simon Glass

HI Sandy,

Quoted 1 line · Sandy Patterson

I did a little more on this, and talked to someone else here. It seems

that

Quoted 7 lines

my problem with loading the kernel including these patches is specific to our kernel and after applying a local patch we have, it appears to load fine.

So this patchset gets me back to the same functionality in v2016.03.

We're left with the puzzle of what's wrong on the RK3288 regarding

caching

Quoted 1 line

and memory.

So what is the status of this patch set? Should it be withdrawn?

Regards,
Simon

Quoted 4 lines

Sandy Patterson

On Mon, Jul 11, 2016 at 1:38 PM, Sandy Patterson <

apatterson at sightlogix.com>

Quoted 48 lines
Quoted 46 lines · wrote:

I wasn't able to load the linux kernel using a Rock2 board using the latest master branch. The board hangs after it has handed executing over to the kernel. I found that the latest release that worked was v2016.03.

I did some searching and I suspect the problem may be cache related.

This patchset allows the kernel to start by reverting two problem commits and disabling EFI_LOADER which I suspect rubs the caching the wrong way. We also found that the 512M limit for fdt and initrd is now 256M.
I'm not sure why this is.

This still doesn't work 100%. I think it's not initializing the SD card volages correctly, but at least the Kernel is loading.

I also am not sure changing the caching for all armv7 is the right answer. I wasn't too sure about the revert. I am not very familiar with this low level stuff.

Sandy Patterson

Sandy Patterson (4):
Revert "arm: Replace v7_maint_dcache_all(ARMV7_DCACHE_CLEAN_INVAL_ALL)
with asm code"
Revert "arm: Replace v7_maint_dcache_all(ARMV7_DCACHE_INVAL_ALL) with
asm code"
Disable CONFIG_EFI_LOADER for rock2.
RK3288 needs fdt and initrd below 256M now.

 arch/arm/cpu/armv7/Makefile                  |   2 +-
 arch/arm/cpu/armv7/cache_v7.c                | 135
++++++++++++++++++++++-
 arch/arm/cpu/armv7/cache_v7_asm.S            | 154
---------------------------
 arch/arm/mach-uniphier/arm32/lowlevel_init.S |  67 +++++++++++-
 configs/rock2_defconfig                      |   1 +
 include/configs/rk3288_common.h              |   6 +-
 6 files changed, 201 insertions(+), 164 deletions(-)
 delete mode 100644 arch/arm/cpu/armv7/cache_v7_asm.S

--
1.9.1

#11 lore raw

cover Ability to load linux kernel on rock2 RK3288

+Hans, Tom

Hi Sandy,

Quoted 12 lines · Sandy Patterson

Hi Simon,

I think I screwed up submitting, and didn't cc the maintainers for the reverts. I can resubmit and get patman to behave. What do you suggest?

I still think this is the best patch to getting rock2 to load kernels again.

I just retested with a patch specific to my kernel. I think 3.14 linux has some quirks in how it wants the dram setup, and I get instability without some changes to the dram init. I don't have enough of a system to test for this instability using the latest mainline kernel, so I left that patch out.

Quoted 5 lines

Ziyuan had an alternative fix for efi_loader, but it looks like it may break efi_loader for others, and I don't know how to test the efi functionality, so I think disabling for RK3288 is best. I think I should move the CONFIG_EFI_LOADER patch to somehow patching rk3288_common.h instead (can I #undef config vars in that file?)

Yes please can you resend and cc the maintainers and original author. Patman -t should do this automatically.

Also with the revert of Han's ARM patches, please can you describe the problem so it is clear why we need to revert?

Regards,
Simon

[...]

#12 lore raw

cover Ability to load linux kernel on rock2 RK3288

Ziyuan,

I retested the kernel loading. I'm using 3.14 kernel. I also tested with linux-4.7-rc6. I still require both the cache reverts and disabling efi_loader on u-boot/master and u-boot-rockchip/master. (see below for testing parameters)

Hans,
I have been unable to boot an RK3288 rock2 square board since v2016.03 release. The kernel fails to start.

Before reverting I get this on my console:

Starting kernel ...

### ERROR ### Please RESET the board ###

Another possibly related problem which has similar effect without the ERROR potion above is a call to invalidate_icache_all() from efi_runtime.c. Commenting out this line or disabled CONFIG_EFI_LOADER seems to allow the kernel to boot.

testing:
board: radxa rock2 square
kernel: 3.14 custom, and linux-4.7-rc6 - multi_v7_defconfig zImage rk3288-radxa-rock.dtb
toolchain: gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabi loading from sd card - the actual loading seems fine though. I'm not sure how emmc would change anything.

booting command for 4.7 (we use and care about 3.14, but i thought it would be easier to show with 4.7-rc6. I get the same behavior with 3.14):
setenv bootargs root=/dev/mmcblk0p4
ext4load mmc 0:3 0x02000000 /zImage; ext4load mmc 0:3 0x01f00000 /rk3288-rock2-square.dtb
bootz 0x02000000 - 0x01f00000

u-boot/master: 95d52733036af7438a5285d729d53844ec48c63e CONFIG_EFI_LOADER=n and cache reverts required to load kernel *_high changes don't seem to be required anymore

u-boot-rockchip: 1781acd31b01225402167fbdb8fa97157cc269eb CONFIG_EFI_LOADER=n and cache reverts required to load kernel *_high changes don't seem to be required anymore

Sandy Patterson

Quoted 42 lines · Simon Glass

+Hans, Tom

Hi Sandy,

Quoted 6 lines · Sandy Patterson

Hi Simon,

I think I screwed up submitting, and didn't cc the maintainers for the reverts. I can resubmit and get patman to behave. What do you suggest?

I still think this is the best patch to getting rock2 to load kernels

again.

Quoted 2 lines

I just retested with a patch specific to my kernel. I think 3.14 linux

has

Quoted 2 lines

some quirks in how it wants the dram setup, and I get instability without some changes to the dram init. I don't have enough of a system to test

for

Quoted 1 line

this instability using the latest mainline kernel, so I left that patch

out.

Quoted 2 lines

Ziyuan had an alternative fix for efi_loader, but it looks like it may

break

Quoted 1 line

efi_loader for others, and I don't know how to test the efi

functionality,

Quoted 2 lines

so I think disabling for RK3288 is best. I think I should move the CONFIG_EFI_LOADER patch to somehow patching rk3288_common.h instead (can

I

Quoted 1 line

#undef config vars in that file?)

Yes please can you resend and cc the maintainers and original author. Patman -t should do this automatically.

Also with the revert of Han's ARM patches, please can you describe the problem so it is clear why we need to revert?

Regards,
Simon

[...]

#13 lore raw

cover Ability to load linux kernel on rock2 RK3288

?Alexander Graf

Quoted 97 lines · Sandy Patterson

Ziyuan,

I retested the kernel loading. I'm using 3.14 kernel. I also tested with linux-4.7-rc6. I still require both the cache reverts and disabling efi_loader on u-boot/master and u-boot-rockchip/master. (see below for testing parameters)

Hans,
I have been unable to boot an RK3288 rock2 square board since v2016.03 release. The kernel fails to start.

Before reverting I get this on my console:

Starting kernel ...

### ERROR ### Please RESET the board ###

Another possibly related problem which has similar effect without the ERROR potion above is a call to invalidate_icache_all() from efi_runtime.c. Commenting out this line or disabled CONFIG_EFI_LOADER seems to allow the kernel to boot.

testing:
board: radxa rock2 square
kernel: 3.14 custom, and linux-4.7-rc6 - multi_v7_defconfig zImage rk3288-radxa-rock.dtb
toolchain: gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabi loading from sd card - the actual loading seems fine though. I'm not sure how emmc would change anything.

booting command for 4.7 (we use and care about 3.14, but i thought it would be easier to show with 4.7-rc6. I get the same behavior with 3.14):
setenv bootargs root=/dev/mmcblk0p4
ext4load mmc 0:3 0x02000000 /zImage; ext4load mmc 0:3 0x01f00000 /rk3288-rock2-square.dtb
bootz 0x02000000 - 0x01f00000

u-boot/master: 95d52733036af7438a5285d729d53844ec48c63e CONFIG_EFI_LOADER=n and cache reverts required to load kernel *_high changes don't seem to be required anymore

u-boot-rockchip: 1781acd31b01225402167fbdb8fa97157cc269eb CONFIG_EFI_LOADER=n and cache reverts required to load kernel *_high changes don't seem to be required anymore

Sandy Patterson

On Thu, Jul 21, 2016 at 11:21 PM, Simon Glass <[email protected] <mailto:[email protected]>> wrote:

+Hans, Tom

Hi Sandy,

On 15 July 2016 at 07:40, Sandy Patterson
<apatterson at sightlogix.com <mailto:[email protected]>> wrote:
> Hi Simon,
>
> I think I screwed up submitting, and didn't cc the maintainers for the
> reverts. I can resubmit and get patman to behave. What do you suggest?
>
> I still think this is the best patch to getting rock2 to load kernels again.
>
> I just retested with a patch specific to my kernel. I think 3.14 linux has
> some quirks in how it wants the dram setup, and I get instability without
> some changes to the dram init. I don't have enough of a system to test for
> this instability using the latest mainline kernel, so I left that patch out.
>
> Ziyuan had an alternative fix for efi_loader, but it looks like it may break
> efi_loader for others, and I don't know how to test the efi functionality,
> so I think disabling for RK3288 is best. I think I should move the > CONFIG_EFI_LOADER patch to somehow patching rk3288_common.h instead (can I
> #undef config vars in that file?)

Yes please can you resend and cc the maintainers and original author. Patman -t should do this automatically.

Also with the revert of Han's ARM patches, please can you describe the problem so it is clear why we need to revert?

Regards,
Simon

[...]

#14 lore raw

cover Ability to load linux kernel on rock2 RK3288

In reply to Sandy Patterson

Hi Standy,

Quoted 20 lines · Sandy Patterson

I did a little more on this, and talked to someone else here. It seems that my problem with loading the kernel including these patches is specific to our kernel and after applying a local patch we have, it appears to load fine.

So this patchset gets me back to the same functionality in v2016.03.

We're left with the puzzle of what's wrong on the RK3288 regarding caching and memory.

Sandy Patterson

On Mon, Jul 11, 2016 at 1:38 PM, Sandy Patterson
<apatterson at sightlogix.com <mailto:[email protected]>> wrote:

I wasn't able to load the linux kernel using a Rock2 board using the latest master branch. The board hangs after it has handed executing over to the kernel. I found that the latest release that worked was v2016.03.

Quoted 8 lines

I did some searching and I suspect the problem may be cache related.

This patchset allows the kernel to start by reverting two problem commits and disabling EFI_LOADER which I suspect rubs the caching the wrong way. We also found that the 512M limit for fdt and initrd is now 256M.
I'm not sure why this is.

I just tried to boot linux kernel on my rk3288 board with the latest u-boot. Everything looks sane.

board: rk3288-fennec
u-boot: branch u-boot-rockchip/master, also enable CONFIG_EFI_LOADER boot device: eMMC
bootcmd: mmc dev 1; mmc read 0x2000000 0x14000 0x10000; bootz 0x2000000 (custom partitions layout )

Could try again, let me know if you still have any problem.

Quoted 39 lines

This still doesn't work 100%. I think it's not initializing the SD card
volages correctly, but at least the Kernel is loading.

I also am not sure changing the caching for all armv7 is the right answer. I wasn't too sure about the revert. I am not very familiar with
this low level stuff.

Sandy Patterson

Sandy Patterson (4):
Revert "arm: Replace
v7_maint_dcache_all(ARMV7_DCACHE_CLEAN_INVAL_ALL)
with asm code"
Revert "arm: Replace v7_maint_dcache_all(ARMV7_DCACHE_INVAL_ALL)
with
asm code"
Disable CONFIG_EFI_LOADER for rock2.
RK3288 needs fdt and initrd below 256M now.

arch/arm/cpu/armv7/Makefile | 2 +-
arch/arm/cpu/armv7/cache_v7.c | 135
++++++++++++++++++++++-
arch/arm/cpu/armv7/cache_v7_asm.S | 154
---------------------------
arch/arm/mach-uniphier/arm32/lowlevel_init.S | 67 +++++++++++-
configs/rock2_defconfig | 1 +
include/configs/rk3288_common.h | 6 +-
6 files changed, 201 insertions(+), 164 deletions(-) delete mode 100644 arch/arm/cpu/armv7/cache_v7_asm.S

--
1.9.1