Skip to contentSkip to conversation

riscv: ae350: support openSBI 1.0+ which enable FW_PIC

PATCH Superseded Rick Chen 3 participants 3 messages Jan 4, 2023

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Rick Chen

author
#0 lore raw

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

Original openSBI (without FW_PIC) will relocate itself from 0x1000000 to 0x0. After openSBI added FW_PIC codes, it will not relocate any more and always run at 0x1000000. Hence, it may overlap with Kernel memory region. So it is necessary to change openSBI address from 0x1000000 to 0x0.

More details can refer to commit cb052d771200
("riscv: qemu: spl: Fix booting Linux kernel with OpenSBI 1.0+")

---
Changes in v3
- fix typos

---
 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
Reviewed-by on v3 1/1
#1 lore raw
Quoted 2 lines · Rick Chen

Original openSBI (without FW_PIC) will relocate itself

nits: OpenSBI

Quoted 1 line

from 0x1000000 to 0x0. After openSBI added FW_PIC codes,

ditto

Quoted 2 lines

it will not relocate any more and always run at 0x1000000. Hence, it may overlap with Kernel memory region. So it is

with the Linux kernel?

Quoted 1 line

necessary to change openSBI address from 0x1000000 to 0x0.

ditto

Quoted 27 lines

More details can refer to commit cb052d771200
("riscv: qemu: spl: Fix booting Linux kernel with OpenSBI 1.0+")

---
Changes in v3
- fix typos

---
 board/AndesTech/ax25-ae350/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/AndesTech/ax25-ae350/Kconfig +1 -2
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
--
Quoted 2 lines

2.17.1

Otherwise,

#2 lore raw
Quoted 9 lines · Rick Chen
Quoted 2 lines

Original openSBI (without FW_PIC) will relocate itself

nits: OpenSBI

Quoted 1 line

from 0x1000000 to 0x0. After openSBI added FW_PIC codes,

ditto

OK, will fix it.

Quoted 9 lines
Quoted 3 lines

it will not relocate any more and always run at 0x1000000. Hence, it may overlap with Kernel memory region. So it is

with the Linux kernel?

Quoted 1 line

necessary to change openSBI address from 0x1000000 to 0x0.

ditto

OK, will fix it.

Quoted 25 lines
Quoted 25 lines

More details can refer to commit cb052d771200
("riscv: qemu: spl: Fix booting Linux kernel with OpenSBI 1.0+")

---
Changes in v3
- fix typos

---
 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 8 lines
Quoted 5 lines
board/AndesTech/ax25-ae350/Kconfig +0 -1
 config SYS_FDT_BASE
        hex
--

2.17.1

Otherwise,

Thanks for reviewing.

B.R,
Rick