All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: keystone2: enable initrd fixup for LPAE addressing
@ 2020-02-11  3:55 Lokesh Vutla
  2020-02-11 15:01 ` Tom Rini
  2020-02-14  9:52 ` Lokesh Vutla
  0 siblings, 2 replies; 5+ messages in thread
From: Lokesh Vutla @ 2020-02-11  3:55 UTC (permalink / raw)
  To: u-boot

From: Tero Kristo <t-kristo@ti.com>

Keystone2 u-boot loads the initrd image into non-LPAE addressed memory
but linux kernel is running in LPAE. This causes a conflict as kernel
detects that non-memory address is passed and kernel ignores initrd.
There is an existing fixup logic to modify the address in the proper
configuration, but this is disabled at the moment. Enable the fixup
by setting the env variable for this so that initrd can be used
properly.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
- This fixes boot on k2g platforms.

 include/configs/ti_armv7_keystone2.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h
index ba12428dbe..1b014c1022 100644
--- a/include/configs/ti_armv7_keystone2.h
+++ b/include/configs/ti_armv7_keystone2.h
@@ -213,6 +213,7 @@
 	"tftp_root=/\0"							\
 	"nfs_root=/export\0"						\
 	"mem_lpae=1\0"							\
+	"uinitrd_fixup=1\0"						\
 	"addr_ubi=0x82000000\0"						\
 	"addr_secdb_key=0xc000000\0"					\
 	"name_kern=zImage\0"						\
-- 
2.23.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] ARM: keystone2: enable initrd fixup for LPAE addressing
  2020-02-11  3:55 [PATCH] ARM: keystone2: enable initrd fixup for LPAE addressing Lokesh Vutla
@ 2020-02-11 15:01 ` Tom Rini
  2020-02-12  4:07   ` Lokesh Vutla
  2020-02-14  9:52 ` Lokesh Vutla
  1 sibling, 1 reply; 5+ messages in thread
From: Tom Rini @ 2020-02-11 15:01 UTC (permalink / raw)
  To: u-boot

On Tue, Feb 11, 2020 at 09:25:52AM +0530, Lokesh Vutla wrote:

> From: Tero Kristo <t-kristo@ti.com>
> 
> Keystone2 u-boot loads the initrd image into non-LPAE addressed memory
> but linux kernel is running in LPAE. This causes a conflict as kernel
> detects that non-memory address is passed and kernel ignores initrd.
> There is an existing fixup logic to modify the address in the proper
> configuration, but this is disabled at the moment. Enable the fixup
> by setting the env variable for this so that initrd can be used
> properly.
> 
> Signed-off-by: Tero Kristo <t-kristo@ti.com>
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> ---
> - This fixes boot on k2g platforms.
> 
>  include/configs/ti_armv7_keystone2.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h
> index ba12428dbe..1b014c1022 100644
> --- a/include/configs/ti_armv7_keystone2.h
> +++ b/include/configs/ti_armv7_keystone2.h
> @@ -213,6 +213,7 @@
>  	"tftp_root=/\0"							\
>  	"nfs_root=/export\0"						\
>  	"mem_lpae=1\0"							\
> +	"uinitrd_fixup=1\0"						\
>  	"addr_ubi=0x82000000\0"						\
>  	"addr_secdb_key=0xc000000\0"					\
>  	"name_kern=zImage\0"						\

OK, hold up.  Why is any of this code needed and can't the normal
bootm_size / bootm_low / etc as documented in the README enforce these
constraints?  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200211/c7c29fe8/attachment.sig>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] ARM: keystone2: enable initrd fixup for LPAE addressing
  2020-02-11 15:01 ` Tom Rini
@ 2020-02-12  4:07   ` Lokesh Vutla
  2020-02-12 13:04     ` Tom Rini
  0 siblings, 1 reply; 5+ messages in thread
From: Lokesh Vutla @ 2020-02-12  4:07 UTC (permalink / raw)
  To: u-boot

Hi Tom,

On 11/02/20 8:31 PM, Tom Rini wrote:
> On Tue, Feb 11, 2020 at 09:25:52AM +0530, Lokesh Vutla wrote:
> 
>> From: Tero Kristo <t-kristo@ti.com>
>>
>> Keystone2 u-boot loads the initrd image into non-LPAE addressed memory
>> but linux kernel is running in LPAE. This causes a conflict as kernel
>> detects that non-memory address is passed and kernel ignores initrd.
>> There is an existing fixup logic to modify the address in the proper
>> configuration, but this is disabled at the moment. Enable the fixup
>> by setting the env variable for this so that initrd can be used
>> properly.
>>
>> Signed-off-by: Tero Kristo <t-kristo@ti.com>
>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
>> ---
>> - This fixes boot on k2g platforms.
>>
>>  include/configs/ti_armv7_keystone2.h | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h
>> index ba12428dbe..1b014c1022 100644
>> --- a/include/configs/ti_armv7_keystone2.h
>> +++ b/include/configs/ti_armv7_keystone2.h
>> @@ -213,6 +213,7 @@
>>  	"tftp_root=/\0"							\
>>  	"nfs_root=/export\0"						\
>>  	"mem_lpae=1\0"							\
>> +	"uinitrd_fixup=1\0"						\
>>  	"addr_ubi=0x82000000\0"						\
>>  	"addr_secdb_key=0xc000000\0"					\
>>  	"name_kern=zImage\0"						\
> 
> OK, hold up.  Why is any of this code needed and can't the normal
> bootm_size / bootm_low / etc as documented in the README enforce these
> constraints?  Thanks!
> 

K2 platforms has a special scenario. DDR view for U-Boot is starting from
0x8000_0000 - 0xFFFF_FFFF. Wheres as for kernel, the DDR view gets shifted to
0x8_0000_0000 - 0x8_7FFF_FFFF. This is a hardware limitation to ensure coherency
among different master in the SoC. In kernel all the page tables are fixed up by
the Kconfig CONFIG_ARM_PV_FIXUP. But the expectation is to pass the right
information in DTB. U-Boot already fixes up the memory address nodes in
ft_board_setup() but missed updating the linux-initrd. This patch enables the
fixup for initrd.

Thanks and regards,
Lokesh

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] ARM: keystone2: enable initrd fixup for LPAE addressing
  2020-02-12  4:07   ` Lokesh Vutla
@ 2020-02-12 13:04     ` Tom Rini
  0 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2020-02-12 13:04 UTC (permalink / raw)
  To: u-boot

On Wed, Feb 12, 2020 at 09:37:46AM +0530, Lokesh Vutla wrote:
> Hi Tom,
> 
> On 11/02/20 8:31 PM, Tom Rini wrote:
> > On Tue, Feb 11, 2020 at 09:25:52AM +0530, Lokesh Vutla wrote:
> > 
> >> From: Tero Kristo <t-kristo@ti.com>
> >>
> >> Keystone2 u-boot loads the initrd image into non-LPAE addressed memory
> >> but linux kernel is running in LPAE. This causes a conflict as kernel
> >> detects that non-memory address is passed and kernel ignores initrd.
> >> There is an existing fixup logic to modify the address in the proper
> >> configuration, but this is disabled at the moment. Enable the fixup
> >> by setting the env variable for this so that initrd can be used
> >> properly.
> >>
> >> Signed-off-by: Tero Kristo <t-kristo@ti.com>
> >> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> >> ---
> >> - This fixes boot on k2g platforms.
> >>
> >>  include/configs/ti_armv7_keystone2.h | 1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >> diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h
> >> index ba12428dbe..1b014c1022 100644
> >> --- a/include/configs/ti_armv7_keystone2.h
> >> +++ b/include/configs/ti_armv7_keystone2.h
> >> @@ -213,6 +213,7 @@
> >>  	"tftp_root=/\0"							\
> >>  	"nfs_root=/export\0"						\
> >>  	"mem_lpae=1\0"							\
> >> +	"uinitrd_fixup=1\0"						\
> >>  	"addr_ubi=0x82000000\0"						\
> >>  	"addr_secdb_key=0xc000000\0"					\
> >>  	"name_kern=zImage\0"						\
> > 
> > OK, hold up.  Why is any of this code needed and can't the normal
> > bootm_size / bootm_low / etc as documented in the README enforce these
> > constraints?  Thanks!
> > 
> 
> K2 platforms has a special scenario. DDR view for U-Boot is starting from
> 0x8000_0000 - 0xFFFF_FFFF. Wheres as for kernel, the DDR view gets shifted to
> 0x8_0000_0000 - 0x8_7FFF_FFFF. This is a hardware limitation to ensure coherency
> among different master in the SoC. In kernel all the page tables are fixed up by
> the Kconfig CONFIG_ARM_PV_FIXUP. But the expectation is to pass the right
> information in DTB. U-Boot already fixes up the memory address nodes in
> ft_board_setup() but missed updating the linux-initrd. This patch enables the
> fixup for initrd.

OK, thanks.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200212/7b289eec/attachment.sig>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] ARM: keystone2: enable initrd fixup for LPAE addressing
  2020-02-11  3:55 [PATCH] ARM: keystone2: enable initrd fixup for LPAE addressing Lokesh Vutla
  2020-02-11 15:01 ` Tom Rini
@ 2020-02-14  9:52 ` Lokesh Vutla
  1 sibling, 0 replies; 5+ messages in thread
From: Lokesh Vutla @ 2020-02-14  9:52 UTC (permalink / raw)
  To: u-boot



On 11/02/20 9:25 AM, Lokesh Vutla wrote:
> From: Tero Kristo <t-kristo@ti.com>
> 
> Keystone2 u-boot loads the initrd image into non-LPAE addressed memory
> but linux kernel is running in LPAE. This causes a conflict as kernel
> detects that non-memory address is passed and kernel ignores initrd.
> There is an existing fixup logic to modify the address in the proper
> configuration, but this is disabled at the moment. Enable the fixup
> by setting the env variable for this so that initrd can be used
> properly.
> 
> Signed-off-by: Tero Kristo <t-kristo@ti.com>
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>

Merged into u-boot-ti.

Thanks and regards,
Lokesh

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-02-14  9:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-11  3:55 [PATCH] ARM: keystone2: enable initrd fixup for LPAE addressing Lokesh Vutla
2020-02-11 15:01 ` Tom Rini
2020-02-12  4:07   ` Lokesh Vutla
2020-02-12 13:04     ` Tom Rini
2020-02-14  9:52 ` Lokesh Vutla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.