[PATCH] 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.
Signed-off-by: Rick Chen rick@andestech.com --- board/AndesTech/ax25-ae350/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/AndesTech/ax25-ae350/Kconfig b/board/AndesTech/ax25-ae350/Kconfig index 36b67f0b52..4bb33b0793 100644 --- a/board/AndesTech/ax25-ae350/Kconfig +++ b/board/AndesTech/ax25-ae350/Kconfig @@ -25,7 +25,7 @@ config SPL_TEXT_BASE default 0x800000
config SPL_OPENSBI_LOAD_ADDR - default 0x01000000 + default 0x00000000
config SYS_FDT_BASE hex

On Wed, Dec 21, 2022 at 10:29 AM Rick Chen rick@andestech.com wrote:
Change openSBI load address from 0x1000000 to 0x0 and it
nits: OpenSBI
will start to run at 0x0 directly without relocation.
Signed-off-by: Rick Chen rick@andestech.com
board/AndesTech/ax25-ae350/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/AndesTech/ax25-ae350/Kconfig b/board/AndesTech/ax25-ae350/Kconfig index 36b67f0b52..4bb33b0793 100644 --- a/board/AndesTech/ax25-ae350/Kconfig +++ b/board/AndesTech/ax25-ae350/Kconfig @@ -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

Hi Bin,
On Wed, Dec 21, 2022 at 10:29 AM Rick Chen rick@andestech.com wrote:
Change openSBI load address from 0x1000000 to 0x0 and it
nits: OpenSBI
OK, will fix it.
will start to run at 0x0 directly without relocation.
Signed-off-by: Rick Chen rick@andestech.com
board/AndesTech/ax25-ae350/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/AndesTech/ax25-ae350/Kconfig b/board/AndesTech/ax25-ae350/Kconfig index 36b67f0b52..4bb33b0793 100644 --- a/board/AndesTech/ax25-ae350/Kconfig +++ b/board/AndesTech/ax25-ae350/Kconfig @@ -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?
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
Is the reason the same as commit cb052d771200b15717eeb68f185cf7caa2dcfea0 "riscv: qemu: spl: Fix booting Linux kernel with OpenSBI 1.0+"
Regards, Bin

On Thu, Dec 22, 2022 at 1:23 PM Rick Chen rickchen36@gmail.com wrote:
Hi Bin,
On Wed, Dec 21, 2022 at 10:29 AM Rick Chen rick@andestech.com wrote:
Change openSBI load address from 0x1000000 to 0x0 and it
nits: OpenSBI
OK, will fix it.
will start to run at 0x0 directly without relocation.
Signed-off-by: Rick Chen rick@andestech.com
board/AndesTech/ax25-ae350/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/AndesTech/ax25-ae350/Kconfig b/board/AndesTech/ax25-ae350/Kconfig index 36b67f0b52..4bb33b0793 100644 --- a/board/AndesTech/ax25-ae350/Kconfig +++ b/board/AndesTech/ax25-ae350/Kconfig @@ -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?
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

On Thu, Dec 22, 2022 at 1:23 PM Rick Chen rickchen36@gmail.com wrote:
Hi Bin,
On Wed, Dec 21, 2022 at 10:29 AM Rick Chen rick@andestech.com wrote:
Change openSBI load address from 0x1000000 to 0x0 and it
nits: OpenSBI
OK, will fix it.
will start to run at 0x0 directly without relocation.
Signed-off-by: Rick Chen rick@andestech.com
board/AndesTech/ax25-ae350/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/AndesTech/ax25-ae350/Kconfig b/board/AndesTech/ax25-ae350/Kconfig index 36b67f0b52..4bb33b0793 100644 --- a/board/AndesTech/ax25-ae350/Kconfig +++ b/board/AndesTech/ax25-ae350/Kconfig @@ -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?
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.
Regards, Bin

On Thu, Dec 22, 2022 at 4:07 PM Rick Chen rickchen36@gmail.com wrote:
On Thu, Dec 22, 2022 at 1:23 PM Rick Chen rickchen36@gmail.com wrote:
Hi Bin,
On Wed, Dec 21, 2022 at 10:29 AM Rick Chen rick@andestech.com wrote:
Change openSBI load address from 0x1000000 to 0x0 and it
nits: OpenSBI
OK, will fix it.
will start to run at 0x0 directly without relocation.
Signed-off-by: Rick Chen rick@andestech.com
board/AndesTech/ax25-ae350/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/AndesTech/ax25-ae350/Kconfig b/board/AndesTech/ax25-ae350/Kconfig index 36b67f0b52..4bb33b0793 100644 --- a/board/AndesTech/ax25-ae350/Kconfig +++ b/board/AndesTech/ax25-ae350/Kconfig @@ -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?
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

On Thu, Dec 22, 2022 at 4:07 PM Rick Chen rickchen36@gmail.com wrote:
On Thu, Dec 22, 2022 at 1:23 PM Rick Chen rickchen36@gmail.com wrote:
Hi Bin,
On Wed, Dec 21, 2022 at 10:29 AM Rick Chen rick@andestech.com wrote:
Change openSBI load address from 0x1000000 to 0x0 and it
nits: OpenSBI
OK, will fix it.
will start to run at 0x0 directly without relocation.
Signed-off-by: Rick Chen rick@andestech.com
board/AndesTech/ax25-ae350/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/AndesTech/ax25-ae350/Kconfig b/board/AndesTech/ax25-ae350/Kconfig index 36b67f0b52..4bb33b0793 100644 --- a/board/AndesTech/ax25-ae350/Kconfig +++ b/board/AndesTech/ax25-ae350/Kconfig @@ -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?
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.
OK. I will add more description about why 0x1000000 does not work.
Thanks, Rick
Regards, Biun
participants (3)
-
Bin Meng
-
Rick Chen
-
Rick Chen