Skip to contentSkip to conversation

riscv: ae350: Support openSBI 1.0+ which enable FW_PIC

PATCH Superseded Rick Chen 3 participants 7 messages Dec 21, 2022 – Dec 22, 2022

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Rick Chen

author
#0 lore raw

PATCH 1/1 riscv: ae350: Support openSBI 1.0+ which enable FW_PIC

Change openSBI load address from 0x1000000 to 0x0 and it will start to run at 0x0 directly without relocation.

---
 board/AndesTech/ax25-ae350/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/AndesTech/ax25-ae350/Kconfig +1 -1
index 36b67f0b52..4bb33b0793 100644
@@ -25,7 +25,7 @@ config SPL_TEXT_BASE
 	default 0x800000
 
 config SPL_OPENSBI_LOAD_ADDR
-	default 0x01000000
+	default 0x00000000
 
 config SYS_FDT_BASE
 	hex
Signature · 1 line
2.17.1
#1 lore raw
Quoted 2 lines · Rick Chen

Change openSBI load address from 0x1000000 to 0x0 and it

nits: OpenSBI

Quoted 12 lines

will start to run at 0x0 directly without relocation.

---
 board/AndesTech/ax25-ae350/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/AndesTech/ax25-ae350/Kconfig +0 -0
index 36b67f0b52..4bb33b0793 100644

board/AndesTech/ax25-ae350/Kconfig config SPL_TEXT_BASE

Quoted 9 lines
board/AndesTech/ax25-ae350/Kconfig +1 -2
@@ -25,7 +25,7 @@ config SPL_TEXT_BASE
        default 0x800000
 
 config SPL_OPENSBI_LOAD_ADDR
-       default 0x01000000
+       default 0x00000000
 
 config SYS_FDT_BASE
        hex
--

Can you describe why is this change a must have, like why 0x01000000 does not work?

Is the reason the same as commit cb052d771200b15717eeb68f185cf7caa2dcfea0 "riscv: qemu: spl: Fix booting Linux kernel with OpenSBI 1.0+"

Regards,
Bin

#2 lore raw

Hi Bin,

Quoted 5 lines · Rick Chen
Quoted 2 lines

Change openSBI load address from 0x1000000 to 0x0 and it

nits: OpenSBI

OK, will fix it.

Quoted 19 lines
Quoted 19 lines

will start to run at 0x0 directly without relocation.

---
 board/AndesTech/ax25-ae350/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/AndesTech/ax25-ae350/Kconfig +1 -1
index 36b67f0b52..4bb33b0793 100644
@@ -25,7 +25,7 @@ config SPL_TEXT_BASE
        default 0x800000
 
 config SPL_OPENSBI_LOAD_ADDR
-       default 0x01000000
+       default 0x00000000
 
Quoted 6 lines

board/AndesTech/ax25-ae350/Kconfig config SPL_TEXT_BASE

Quoted 3 lines
board/AndesTech/ax25-ae350/Kconfig +0 -1
 config SYS_FDT_BASE
        hex
--

Can you describe why is this change a must have, like why 0x01000000 does not work?

When I prepare this patch, I have tried two OpenSBI address, 0x1000000 and 0x0. And both boot successfully. I think maybe the Kernel Image is smaller one that it just don't overlap
the memory region !

Thanks,
Rick

Quoted 6 lines

Is the reason the same as commit cb052d771200b15717eeb68f185cf7caa2dcfea0 "riscv: qemu: spl: Fix booting Linux kernel with OpenSBI 1.0+"

Regards,
Bin

#3 lore raw
Quoted 37 lines · Rick Chen

Hi Bin,

Quoted 5 lines · Rick Chen
Quoted 2 lines

Change openSBI load address from 0x1000000 to 0x0 and it

nits: OpenSBI

OK, will fix it.

Quoted 19 lines
Quoted 19 lines

will start to run at 0x0 directly without relocation.

---
 board/AndesTech/ax25-ae350/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/AndesTech/ax25-ae350/Kconfig +1 -1
index 36b67f0b52..4bb33b0793 100644
@@ -25,7 +25,7 @@ config SPL_TEXT_BASE
        default 0x800000
 
 config SPL_OPENSBI_LOAD_ADDR
-       default 0x01000000
+       default 0x00000000
 
Quoted 6 lines

board/AndesTech/ax25-ae350/Kconfig config SPL_TEXT_BASE

Quoted 3 lines
board/AndesTech/ax25-ae350/Kconfig +0 -1
 config SYS_FDT_BASE
        hex
--

Can you describe why is this change a must have, like why 0x01000000 does not work?

Quoted 4 lines

When I prepare this patch, I have tried two OpenSBI address, 0x1000000 and 0x0. And both boot successfully. I think maybe the Kernel Image is smaller one that it just don't overlap
the memory region !

But why 0x01000000 does not work?

Regards,
Bin

#4 lore raw
Quoted 38 lines · Rick Chen
Quoted 37 lines

Hi Bin,

Quoted 5 lines · Rick Chen
Quoted 2 lines

Change openSBI load address from 0x1000000 to 0x0 and it

nits: OpenSBI

OK, will fix it.

Quoted 25 lines
Quoted 13 lines

will start to run at 0x0 directly without relocation.

---
 board/AndesTech/ax25-ae350/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/AndesTech/ax25-ae350/Kconfig +0 -0
index 36b67f0b52..4bb33b0793 100644

board/AndesTech/ax25-ae350/Kconfig config SPL_TEXT_BASE

Quoted 9 lines
board/AndesTech/ax25-ae350/Kconfig +1 -2
@@ -25,7 +25,7 @@ config SPL_TEXT_BASE
        default 0x800000
 
 config SPL_OPENSBI_LOAD_ADDR
-       default 0x01000000
+       default 0x00000000
 
 config SYS_FDT_BASE
        hex
--

Can you describe why is this change a must have, like why 0x01000000 does not work?

Quoted 6 lines
Quoted 4 lines

When I prepare this patch, I have tried two OpenSBI address, 0x1000000 and 0x0. And both boot successfully. I think maybe the Kernel Image is smaller one that it just don't overlap
the memory region !

But why 0x01000000 does not work?

0x1000000 is not a preferable runtime address for OpenSBI.

Quoted 3 lines

Regards,
Bin

#5 lore raw
Quoted 39 lines · Rick Chen
Quoted 39 lines · Rick Chen
Quoted 37 lines

Hi Bin,

Quoted 5 lines · Rick Chen
Quoted 2 lines

Change openSBI load address from 0x1000000 to 0x0 and it

nits: OpenSBI

OK, will fix it.

Quoted 25 lines
Quoted 13 lines

will start to run at 0x0 directly without relocation.

---
 board/AndesTech/ax25-ae350/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/AndesTech/ax25-ae350/Kconfig +0 -0
index 36b67f0b52..4bb33b0793 100644

board/AndesTech/ax25-ae350/Kconfig config SPL_TEXT_BASE

Quoted 9 lines
board/AndesTech/ax25-ae350/Kconfig +1 -2
@@ -25,7 +25,7 @@ config SPL_TEXT_BASE
        default 0x800000
 
 config SPL_OPENSBI_LOAD_ADDR
-       default 0x01000000
+       default 0x00000000
 
 config SYS_FDT_BASE
        hex
--

Can you describe why is this change a must have, like why 0x01000000 does not work?

Quoted 9 lines
Quoted 6 lines
Quoted 4 lines

When I prepare this patch, I have tried two OpenSBI address, 0x1000000 and 0x0. And both boot successfully. I think maybe the Kernel Image is smaller one that it just don't overlap
the memory region !

But why 0x01000000 does not work?

0x1000000 is not a preferable runtime address for OpenSBI.

Why? It once worked so something has changed to break and it remains unexplained yet.

Regards,
Biun

#6 lore raw
Quoted 45 lines · Rick Chen
Quoted 44 lines
Quoted 44 lines · Rick Chen
Quoted 41 lines

Hi Bin,

Quoted 5 lines · Rick Chen
Quoted 2 lines

Change openSBI load address from 0x1000000 to 0x0 and it

nits: OpenSBI

OK, will fix it.

Quoted 19 lines
Quoted 19 lines

will start to run at 0x0 directly without relocation.

---
 board/AndesTech/ax25-ae350/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/AndesTech/ax25-ae350/Kconfig +1 -1
index 36b67f0b52..4bb33b0793 100644
@@ -25,7 +25,7 @@ config SPL_TEXT_BASE
        default 0x800000
 
 config SPL_OPENSBI_LOAD_ADDR
-       default 0x01000000
+       default 0x00000000
 
Quoted 6 lines

board/AndesTech/ax25-ae350/Kconfig config SPL_TEXT_BASE

Quoted 3 lines
board/AndesTech/ax25-ae350/Kconfig +0 -1
 config SYS_FDT_BASE
        hex
--

Can you describe why is this change a must have, like why 0x01000000 does not work?

When I prepare this patch, I have tried two OpenSBI address, 0x1000000 and 0x0. And both boot successfully. I think maybe the Kernel Image is smaller one that it just don't overlap
the memory region !

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

But why 0x01000000 does not work?

0x1000000 is not a preferable runtime address for OpenSBI.

Why? It once worked so something has changed to break and it remains unexplained yet.

OK. I will add more description about why 0x1000000 does not work.

Thanks,
Rick

Quoted 3 lines

Regards,
Biun