Skip to contentSkip to conversation

armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

PATCH New Stephen Warren 4 participants 13 messages Oct 5, 2015 – Nov 10, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/4 armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

From: Stephen Warren <[email protected]>

The implementation of noncached_init() uses define MMU_SECTION_SIZE. Define this on ARM64.

Move the prototype of noncached_{init,alloc}() to a location that doesn't depend on !defined(CONFIG_ARM64).

Note that noncached_init() calls mmu_set_region_dcache_behaviour() which relies on something having set up translation tables with 2MB block size. The core ARMv8 MMU setup code does not do this by default, but currently relies on SoC specific MMU setup code. Be aware of this before enabling this feature on your platform!

---
 arch/arm/include/asm/system.h | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
arch/arm/include/asm/system.h +6 -5
index 868ea54b4fef..c2d3718eb90c 100644
@@ -17,6 +17,7 @@
 #define PGTABLE_SIZE	(0x10000)
 /* 2MB granularity */
 #define MMU_SECTION_SHIFT	21
+#define MMU_SECTION_SIZE	(1 << MMU_SECTION_SHIFT)
 
 #ifndef __ASSEMBLY__
 
@@ -278,11 +279,6 @@ enum {
  */
 void mmu_page_table_flush(unsigned long start, unsigned long stop);
 
-#ifdef CONFIG_SYS_NONCACHED_MEMORY
-void noncached_init(void);
-phys_addr_t noncached_alloc(size_t size, size_t align);
-#endif /* CONFIG_SYS_NONCACHED_MEMORY */
-
 #endif /* __ASSEMBLY__ */
 
 #define arch_align_stack(x) (x)
@@ -302,6 +298,11 @@ phys_addr_t noncached_alloc(size_t size, size_t align);
 void mmu_set_region_dcache_behaviour(phys_addr_t start, size_t size,
 				     enum dcache_option option);
 
+#ifdef CONFIG_SYS_NONCACHED_MEMORY
+void noncached_init(void);
+phys_addr_t noncached_alloc(size_t size, size_t align);
+#endif /* CONFIG_SYS_NONCACHED_MEMORY */
+
 #endif /* __ASSEMBLY__ */
 
 #endif
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/4 armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Quoted 5 lines · Stephen Warren

From: Stephen Warren <[email protected]>

The implementation of noncached_init() uses define MMU_SECTION_SIZE. Define this on ARM64.

Quoted 8 lines

Move the prototype of noncached_{init,alloc}() to a location that doesn't depend on !defined(CONFIG_ARM64).

Note that noncached_init() calls mmu_set_region_dcache_behaviour() which relies on something having set up translation tables with 2MB block size. The core ARMv8 MMU setup code does not do this by default, but currently relies on SoC specific MMU setup code. Be aware of this before enabling this feature on your platform!

Albert, it looks like I forgot to add you to the CC on this email. Sorry! Could you please take a look at this series and tell me what you think? If you need a resend just let me know.

Also note that this series is a dependency for PCIe support on 64-bit Tegra systems; I guess either Tom Warren would be looking for an ack so he can apply the series to the Tegra tree, or perhaps if you just apply the whole series, he can base his branch on the branch where you apply this.

#2 lore raw

PATCH 1/4 armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Hello Stephen,

Quoted 15 lines · Stephen Warren
Quoted 5 lines · Stephen Warren

From: Stephen Warren <[email protected]>

The implementation of noncached_init() uses define MMU_SECTION_SIZE. Define this on ARM64.

Quoted 8 lines

Move the prototype of noncached_{init,alloc}() to a location that doesn't depend on !defined(CONFIG_ARM64).

Note that noncached_init() calls mmu_set_region_dcache_behaviour() which relies on something having set up translation tables with 2MB block size. The core ARMv8 MMU setup code does not do this by default, but currently relies on SoC specific MMU setup code. Be aware of this before enabling this feature on your platform!

Quoted 8 lines

Albert, it looks like I forgot to add you to the CC on this email. Sorry! Could you please take a look at this series and tell me what you think? If you need a resend just let me know.

Also note that this series is a dependency for PCIe support on 64-bit Tegra systems; I guess either Tom Warren would be looking for an ack so he can apply the series to the Tegra tree, or perhaps if you just apply the whole series, he can base his branch on the branch where you apply this.

I'll have a look at it in the coming days.

Amicalement,

Signature · 1 line
Albert.
#3 lore raw

PATCH 1/4 armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Albert,

Quoted 35 lines

-----Original Message-----
From: Albert ARIBAUD [mailto:albert.u.boot at aribaud.net]
Sent: Wednesday, October 21, 2015 11:26 PM
To: Stephen Warren <[email protected]>
Cc: u-boot at lists.denx.de; Simon Glass <[email protected]>; Tom Warren <[email protected]>; Stephen Warren <[email protected]>; Thierry Reding <[email protected]>; York Sun <[email protected]>; Michal Simek <[email protected]>
Subject: Re: [U-Boot] [PATCH 1/4] armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Hello Stephen,

Quoted 11 lines · Stephen Warren
Quoted 10 lines · Stephen Warren

From: Stephen Warren <[email protected]>

The implementation of noncached_init() uses define MMU_SECTION_SIZE. Define this on ARM64.

Move the prototype of noncached_{init,alloc}() to a location that doesn't depend on !defined(CONFIG_ARM64).

Note that noncached_init() calls mmu_set_region_dcache_behaviour() which relies on something having set up translation tables with 2MB block

size.

Quoted 8 lines
Quoted 3 lines

The core ARMv8 MMU setup code does not do this by default, but currently relies on SoC specific MMU setup code. Be aware of this before enabling this feature on your platform!

Albert, it looks like I forgot to add you to the CC on this email. Sorry! Could you please take a look at this series and tell me what you think? If you need a resend just let me know.

Quoted 7 lines
Quoted 4 lines

Also note that this series is a dependency for PCIe support on 64-bit Tegra systems; I guess either Tom Warren would be looking for an ack so he can apply the series to the Tegra tree, or perhaps if you just apply the whole series, he can base his branch on the branch where you apply

this.

I'll have a look at it in the coming days.

Please let me know when this series is in arm/master (or u-boot/master), as I need it to base Stephen's PCI/PCIe/XUSB patches on before I can send a PR for u-boot-tegra/master. Thanks!

Tom
--
nvpublic

Quoted 4 lines

Amicalement,
--
Albert.

#4 lore raw

PATCH 1/4 armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

In reply to Albert ARIBAUD

Albert,

Quoted 55 lines

-----Original Message-----
From: Tom Warren
Sent: Tuesday, October 27, 2015 1:39 PM
To: 'Albert ARIBAUD' <[email protected]>; Stephen Warren <[email protected]>
Cc: u-boot at lists.denx.de; Simon Glass <[email protected]>; Stephen Warren <[email protected]>; Thierry Reding <[email protected]>; York Sun <[email protected]>; Michal Simek <[email protected]>
Subject: RE: [U-Boot] [PATCH 1/4] armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Albert,

Quoted 11 lines

-----Original Message-----
From: Albert ARIBAUD [mailto:albert.u.boot at aribaud.net]
Sent: Wednesday, October 21, 2015 11:26 PM
To: Stephen Warren <[email protected]>
Cc: u-boot at lists.denx.de; Simon Glass <[email protected]>; Tom Warren <[email protected]>; Stephen Warren <[email protected]>; Thierry Reding <[email protected]>; York Sun <[email protected]>; Michal Simek <[email protected]>
Subject: Re: [U-Boot] [PATCH 1/4] armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Quoted 8 lines

Hello Stephen,

Quoted 4 lines · Stephen Warren
Quoted 3 lines · Stephen Warren

From: Stephen Warren <[email protected]>

The implementation of noncached_init() uses define

MMU_SECTION_SIZE.

Quoted 22 lines
Quoted 8 lines
Quoted 8 lines

Define this on ARM64.

Move the prototype of noncached_{init,alloc}() to a location that doesn't depend on !defined(CONFIG_ARM64).

Note that noncached_init() calls mmu_set_region_dcache_behaviour() which relies on something having set up translation tables with 2MB block

size.

Quoted 13 lines
Quoted 3 lines

The core ARMv8 MMU setup code does not do this by default, but currently relies on SoC specific MMU setup code. Be aware of this before enabling this feature on your platform!

Albert, it looks like I forgot to add you to the CC on this email. Sorry! Could you please take a look at this series and tell me what you think? If you need a resend just let me know.

Also note that this series is a dependency for PCIe support on 64-bit Tegra systems; I guess either Tom Warren would be looking for an ack so he can apply the series to the Tegra tree, or perhaps if you just apply the whole series, he can base his branch on the branch where you apply

Quoted 6 lines
Quoted 3 lines

this.

I'll have a look at it in the coming days.

Please let me know when this series is in arm/master (or u-boot/master), as I need it to base Stephen's PCI/PCIe/XUSB patches on before I can send a PR for u-boot-tegra/master. Thanks!

I need this patchset in before I can add Stephen's PCIe/XUSB patchsets to Tegra U-Boot.

If you can Ack them, I can take them in via the Tegra repo, and send them upstream to TomR on my next PR. Or if you can let me know an ETA for getting them in to the ARM/master repo, I can base my schedule off of that. But I'm blocked until the ARMv8 MMU changes are in somewhere, and I'd like to clear this from my plate.

Thanks,

Tom
--
nvpublic

Quoted 8 lines

Tom
--
nvpublic

Quoted 4 lines

Amicalement,
--
Albert.

#5 lore raw

PATCH 1/4 armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

In reply to Albert ARIBAUD

Albert,

Ping!

Quoted 86 lines

-----Original Message-----
From: Tom Warren
Sent: Tuesday, November 03, 2015 12:19 PM
To: 'Albert ARIBAUD' <[email protected]>; 'Stephen Warren' <[email protected]>; Tom Rini (trini at konsulko.com) <[email protected]>
Cc: 'u-boot at lists.denx.de' <[email protected]>; 'Simon Glass' <[email protected]>; Stephen Warren <[email protected]>; Thierry Reding <[email protected]>; 'York Sun' <[email protected]>; 'Michal Simek' <[email protected]>; 'tomcwarren3959 at gmail.com' <[email protected]>
Subject: RE: [U-Boot] [PATCH 1/4] armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Albert,

Quoted 55 lines

-----Original Message-----
From: Tom Warren
Sent: Tuesday, October 27, 2015 1:39 PM
To: 'Albert ARIBAUD' <[email protected]>; Stephen Warren <[email protected]>
Cc: u-boot at lists.denx.de; Simon Glass <[email protected]>; Stephen Warren <[email protected]>; Thierry Reding <[email protected]>; York Sun <[email protected]>; Michal Simek <[email protected]>
Subject: RE: [U-Boot] [PATCH 1/4] armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Albert,

Quoted 11 lines

-----Original Message-----
From: Albert ARIBAUD [mailto:albert.u.boot at aribaud.net]
Sent: Wednesday, October 21, 2015 11:26 PM
To: Stephen Warren <[email protected]>
Cc: u-boot at lists.denx.de; Simon Glass <[email protected]>; Tom Warren <[email protected]>; Stephen Warren <[email protected]>; Thierry Reding <[email protected]>; York Sun <[email protected]>; Michal Simek <[email protected]>
Subject: Re: [U-Boot] [PATCH 1/4] armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Quoted 8 lines

Hello Stephen,

Quoted 4 lines · Stephen Warren
Quoted 3 lines · Stephen Warren

From: Stephen Warren <[email protected]>

The implementation of noncached_init() uses define

MMU_SECTION_SIZE.

Quoted 22 lines
Quoted 8 lines
Quoted 8 lines

Define this on ARM64.

Move the prototype of noncached_{init,alloc}() to a location that doesn't depend on !defined(CONFIG_ARM64).

Note that noncached_init() calls mmu_set_region_dcache_behaviour() which relies on something having set up translation tables with 2MB block

size.

Quoted 13 lines
Quoted 3 lines

The core ARMv8 MMU setup code does not do this by default, but currently relies on SoC specific MMU setup code. Be aware of this before enabling this feature on your platform!

Albert, it looks like I forgot to add you to the CC on this email. Sorry! Could you please take a look at this series and tell me what you think? If you need a resend just let me know.

Also note that this series is a dependency for PCIe support on 64-bit Tegra systems; I guess either Tom Warren would be looking for an ack so he can apply the series to the Tegra tree, or perhaps if you just apply the whole series, he can base his branch on the branch where you apply

Quoted 6 lines
Quoted 3 lines

this.

I'll have a look at it in the coming days.

Please let me know when this series is in arm/master (or u-boot/master), as I need it to base Stephen's PCI/PCIe/XUSB patches on before I can send a PR for u-boot-tegra/master. Thanks!

I need this patchset in before I can add Stephen's PCIe/XUSB patchsets to Tegra U-Boot.

If you can Ack them, I can take them in via the Tegra repo, and send them upstream to TomR on my next PR. Or if you can let me know an ETA for getting them in to the ARM/master repo, I can base my schedule off of that. But I'm blocked until the ARMv8 MMU changes are in somewhere, and I'd like to clear this from my plate.

Quoted 7 lines

Thanks,

Tom
--
nvpublic

Quoted 2 lines

Tom

--
nvpublic

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

Amicalement,
--
Albert.

#6 lore raw

PATCH 1/4 armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

In reply to Albert ARIBAUD

TomR,

Any chance of you taking a look at these ARM MMU patches and either taking them in to u-boot/master or ACKing them so I can take them in via the Tegra repo?

Thanks,

TomW

Quoted 120 lines

-----Original Message-----
From: Tom Warren
Sent: Friday, November 06, 2015 9:32 AM
To: 'Albert ARIBAUD' <[email protected]>; 'Stephen Warren' <[email protected]>; Tom Rini (trini at konsulko.com) <[email protected]>
Cc: 'u-boot at lists.denx.de' <[email protected]>; 'Simon Glass' <[email protected]>; Stephen Warren <[email protected]>; Thierry Reding <[email protected]>; 'York Sun' <[email protected]>; 'Michal Simek' <[email protected]>; 'tomcwarren3959 at gmail.com' <[email protected]>
Subject: RE: [U-Boot] [PATCH 1/4] armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Albert,

Ping!

Quoted 9 lines

-----Original Message-----
From: Tom Warren
Sent: Tuesday, November 03, 2015 12:19 PM
To: 'Albert ARIBAUD' <[email protected]>; 'Stephen Warren' <[email protected]>; Tom Rini (trini at konsulko.com) <[email protected]>
Cc: 'u-boot at lists.denx.de' <[email protected]>; 'Simon Glass' <[email protected]>; Stephen Warren <[email protected]>; Thierry Reding <[email protected]>; 'York Sun' <[email protected]>; 'Michal

Simek'

Quoted 5 lines

<[email protected]>; 'tomcwarren3959 at gmail.com' <[email protected]>
Subject: RE: [U-Boot] [PATCH 1/4] armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Quoted 22 lines

Albert,

Quoted 20 lines

-----Original Message-----
From: Tom Warren
Sent: Tuesday, October 27, 2015 1:39 PM
To: 'Albert ARIBAUD' <[email protected]>; Stephen Warren <[email protected]>
Cc: u-boot at lists.denx.de; Simon Glass <[email protected]>; Stephen Warren <[email protected]>; Thierry Reding <[email protected]>; York Sun <[email protected]>; Michal Simek <[email protected]>
Subject: RE: [U-Boot] [PATCH 1/4] armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Albert,

Quoted 6 lines

-----Original Message-----
From: Albert ARIBAUD [mailto:albert.u.boot at aribaud.net]
Sent: Wednesday, October 21, 2015 11:26 PM
To: Stephen Warren <[email protected]>
Cc: u-boot at lists.denx.de; Simon Glass <[email protected]>; Tom Warren <[email protected]>; Stephen Warren

<[email protected]>;

Quoted 51 lines
Quoted 36 lines
Quoted 5 lines

Thierry Reding <[email protected]>; York Sun <[email protected]>; Michal Simek <[email protected]>
Subject: Re: [U-Boot] [PATCH 1/4] armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Quoted 8 lines

Hello Stephen,

Quoted 4 lines · Stephen Warren
Quoted 3 lines · Stephen Warren

From: Stephen Warren <[email protected]>

The implementation of noncached_init() uses define

MMU_SECTION_SIZE.

Quoted 22 lines
Quoted 8 lines
Quoted 8 lines

Define this on ARM64.

Move the prototype of noncached_{init,alloc}() to a location that doesn't depend on !defined(CONFIG_ARM64).

Note that noncached_init() calls mmu_set_region_dcache_behaviour() which relies on something having set up translation tables with 2MB block

size.

Quoted 13 lines
Quoted 3 lines

The core ARMv8 MMU setup code does not do this by default, but currently relies on SoC specific MMU setup code. Be aware of this before enabling this feature on your platform!

Albert, it looks like I forgot to add you to the CC on this email. Sorry! Could you please take a look at this series and tell me what you think? If you need a resend just let me know.

Also note that this series is a dependency for PCIe support on 64-bit Tegra systems; I guess either Tom Warren would be looking for an ack so he can apply the series to the Tegra tree, or perhaps if you just apply the whole series, he can base his branch on the branch where you apply

Quoted 6 lines
Quoted 3 lines

this.

I'll have a look at it in the coming days.

Please let me know when this series is in arm/master (or u-boot/master), as I need it to base Stephen's PCI/PCIe/XUSB patches on before I can send a PR for u-boot-tegra/master. Thanks!

I need this patchset in before I can add Stephen's PCIe/XUSB patchsets to Tegra U-Boot.

If you can Ack them, I can take them in via the Tegra repo, and send them upstream to TomR on my next PR. Or if you can let me know an ETA for getting them in to the ARM/master repo, I can base my schedule off of that. But I'm blocked until the ARMv8 MMU changes are in somewhere, and I'd like to clear this from my plate.

Quoted 7 lines

Thanks,

Tom
--
nvpublic

Quoted 2 lines

Tom

--
nvpublic

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

Amicalement,
--
Albert.

#7 lore raw

PATCH 1/4 armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Quoted 5 lines · Tom Warren

TomR,

Any chance of you taking a look at these ARM MMU patches and either taking them in to u-boot/master or ACKing them so I can take them in via the Tegra repo?

So I know Albert was tacking a PR today and then ran into a bug with his Thumb-1 patchset. If they aren't in that PR then yes, I'll review/ack them but I suspect / hope Albert is taking a look and got side-tracked by the bug he found.

Quoted 125 lines

Thanks,

TomW

Quoted 120 lines

-----Original Message-----
From: Tom Warren
Sent: Friday, November 06, 2015 9:32 AM
To: 'Albert ARIBAUD' <[email protected]>; 'Stephen Warren' <[email protected]>; Tom Rini (trini at konsulko.com) <[email protected]>
Cc: 'u-boot at lists.denx.de' <[email protected]>; 'Simon Glass' <[email protected]>; Stephen Warren <[email protected]>; Thierry Reding <[email protected]>; 'York Sun' <[email protected]>; 'Michal Simek' <[email protected]>; 'tomcwarren3959 at gmail.com' <[email protected]>
Subject: RE: [U-Boot] [PATCH 1/4] armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Albert,

Ping!

Quoted 9 lines

-----Original Message-----
From: Tom Warren
Sent: Tuesday, November 03, 2015 12:19 PM
To: 'Albert ARIBAUD' <[email protected]>; 'Stephen Warren' <[email protected]>; Tom Rini (trini at konsulko.com) <[email protected]>
Cc: 'u-boot at lists.denx.de' <[email protected]>; 'Simon Glass' <[email protected]>; Stephen Warren <[email protected]>; Thierry Reding <[email protected]>; 'York Sun' <[email protected]>; 'Michal

Simek'

Quoted 5 lines

<[email protected]>; 'tomcwarren3959 at gmail.com' <[email protected]>
Subject: RE: [U-Boot] [PATCH 1/4] armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Quoted 22 lines

Albert,

Quoted 20 lines

-----Original Message-----
From: Tom Warren
Sent: Tuesday, October 27, 2015 1:39 PM
To: 'Albert ARIBAUD' <[email protected]>; Stephen Warren <[email protected]>
Cc: u-boot at lists.denx.de; Simon Glass <[email protected]>; Stephen Warren <[email protected]>; Thierry Reding <[email protected]>; York Sun <[email protected]>; Michal Simek <[email protected]>
Subject: RE: [U-Boot] [PATCH 1/4] armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Albert,

Quoted 6 lines

-----Original Message-----
From: Albert ARIBAUD [mailto:albert.u.boot at aribaud.net]
Sent: Wednesday, October 21, 2015 11:26 PM
To: Stephen Warren <[email protected]>
Cc: u-boot at lists.denx.de; Simon Glass <[email protected]>; Tom Warren <[email protected]>; Stephen Warren

<[email protected]>;

Quoted 51 lines
Quoted 36 lines
Quoted 5 lines

Thierry Reding <[email protected]>; York Sun <[email protected]>; Michal Simek <[email protected]>
Subject: Re: [U-Boot] [PATCH 1/4] armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Quoted 8 lines

Hello Stephen,

Quoted 4 lines · Stephen Warren
Quoted 3 lines · Stephen Warren

From: Stephen Warren <[email protected]>

The implementation of noncached_init() uses define

MMU_SECTION_SIZE.

Quoted 22 lines
Quoted 8 lines
Quoted 8 lines

Define this on ARM64.

Move the prototype of noncached_{init,alloc}() to a location that doesn't depend on !defined(CONFIG_ARM64).

Note that noncached_init() calls mmu_set_region_dcache_behaviour() which relies on something having set up translation tables with 2MB block

size.

Quoted 13 lines
Quoted 3 lines

The core ARMv8 MMU setup code does not do this by default, but currently relies on SoC specific MMU setup code. Be aware of this before enabling this feature on your platform!

Albert, it looks like I forgot to add you to the CC on this email. Sorry! Could you please take a look at this series and tell me what you think? If you need a resend just let me know.

Also note that this series is a dependency for PCIe support on 64-bit Tegra systems; I guess either Tom Warren would be looking for an ack so he can apply the series to the Tegra tree, or perhaps if you just apply the whole series, he can base his branch on the branch where you apply

Quoted 6 lines
Quoted 3 lines

this.

I'll have a look at it in the coming days.

Please let me know when this series is in arm/master (or u-boot/master), as I need it to base Stephen's PCI/PCIe/XUSB patches on before I can send a PR for u-boot-tegra/master. Thanks!

I need this patchset in before I can add Stephen's PCIe/XUSB patchsets to Tegra U-Boot.

If you can Ack them, I can take them in via the Tegra repo, and send them upstream to TomR on my next PR. Or if you can let me know an ETA for getting them in to the ARM/master repo, I can base my schedule off of that. But I'm blocked until the ARMv8 MMU changes are in somewhere, and I'd like to clear this from my plate.

Quoted 7 lines

Thanks,

Tom
--
nvpublic

Quoted 2 lines

Tom

--
nvpublic

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

Amicalement,
--
Albert.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151109/5133f26d/attachment.sig>
#8 lore raw

PATCH 1/4 armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Thanks, Tom.

Quoted 160 lines

-----Original Message-----
From: Tom Rini [mailto:trini at konsulko.com]
Sent: Monday, November 09, 2015 4:36 PM
To: Tom Warren <[email protected]>
Cc: Albert ARIBAUD <[email protected]>; swarren at wwwdotorg.org; u- boot at lists.denx.de; Simon Glass <[email protected]>; Stephen Warren <[email protected]>; Thierry Reding <[email protected]>; York Sun <[email protected]>; Michal Simek <[email protected]>; 'tomcwarren3959 at gmail.com' <[email protected]>
Subject: Re: [U-Boot] [PATCH 1/4] armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

* PGP Signed by an unknown key

Quoted 5 lines · Tom Warren

TomR,

Any chance of you taking a look at these ARM MMU patches and either taking them in to u-boot/master or ACKing them so I can take them in via the Tegra repo?

So I know Albert was tacking a PR today and then ran into a bug with his Thumb-1 patchset. If they aren't in that PR then yes, I'll review/ack them but I suspect / hope Albert is taking a look and got side-tracked by the bug he found.

Quoted 14 lines

Thanks,

TomW

Quoted 9 lines

-----Original Message-----
From: Tom Warren
Sent: Friday, November 06, 2015 9:32 AM
To: 'Albert ARIBAUD' <[email protected]>; 'Stephen Warren' <[email protected]>; Tom Rini (trini at konsulko.com) <[email protected]>
Cc: 'u-boot at lists.denx.de' <[email protected]>; 'Simon Glass' <[email protected]>; Stephen Warren <[email protected]>; Thierry Reding <[email protected]>; 'York Sun' <[email protected]>;

'Michal Simek'

Quoted 106 lines
Quoted 106 lines

<[email protected]>; 'tomcwarren3959 at gmail.com' <[email protected]>
Subject: RE: [U-Boot] [PATCH 1/4] armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Albert,

Ping!

Quoted 10 lines

-----Original Message-----
From: Tom Warren
Sent: Tuesday, November 03, 2015 12:19 PM
To: 'Albert ARIBAUD' <[email protected]>; 'Stephen Warren' <[email protected]>; Tom Rini (trini at konsulko.com) <[email protected]>
Cc: 'u-boot at lists.denx.de' <[email protected]>; 'Simon Glass' <[email protected]>; Stephen Warren <[email protected]>; Thierry Reding <[email protected]>; 'York Sun' <[email protected]>; 'Michal

Simek'

Quoted 5 lines

<[email protected]>; 'tomcwarren3959 at gmail.com' <[email protected]>
Subject: RE: [U-Boot] [PATCH 1/4] armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Quoted 22 lines

Albert,

Quoted 20 lines

-----Original Message-----
From: Tom Warren
Sent: Tuesday, October 27, 2015 1:39 PM
To: 'Albert ARIBAUD' <[email protected]>; Stephen Warren <[email protected]>
Cc: u-boot at lists.denx.de; Simon Glass <[email protected]>; Stephen Warren <[email protected]>; Thierry Reding <[email protected]>; York Sun <[email protected]>; Michal Simek <[email protected]>
Subject: RE: [U-Boot] [PATCH 1/4] armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Albert,

Quoted 6 lines

-----Original Message-----
From: Albert ARIBAUD [mailto:albert.u.boot at aribaud.net]
Sent: Wednesday, October 21, 2015 11:26 PM
To: Stephen Warren <[email protected]>
Cc: u-boot at lists.denx.de; Simon Glass <[email protected]>; Tom Warren <[email protected]>; Stephen Warren

<[email protected]>;

Quoted 58 lines
Quoted 37 lines
Quoted 6 lines

Thierry Reding <[email protected]>; York Sun <[email protected]>; Michal Simek <[email protected]>
Subject: Re: [U-Boot] [PATCH 1/4] armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Quoted 8 lines

Hello Stephen,

Quoted 4 lines · Stephen Warren
Quoted 3 lines · Stephen Warren

From: Stephen Warren <[email protected]>

The implementation of noncached_init() uses define

MMU_SECTION_SIZE.

Quoted 22 lines
Quoted 8 lines
Quoted 8 lines

Define this on ARM64.

Move the prototype of noncached_{init,alloc}() to a location that doesn't depend on !defined(CONFIG_ARM64).

Note that noncached_init() calls mmu_set_region_dcache_behaviour() which relies on something having set up translation tables with 2MB block

size.

Quoted 13 lines
Quoted 3 lines

The core ARMv8 MMU setup code does not do this by default, but currently relies on SoC specific MMU setup code. Be aware of this before enabling this feature on your platform!

Albert, it looks like I forgot to add you to the CC on this email. Sorry! Could you please take a look at this series and tell me what you think? If you need a resend just let me know.

Also note that this series is a dependency for PCIe support on 64-bit Tegra systems; I guess either Tom Warren would be looking for an ack so he can apply the series to the Tegra tree, or perhaps if you just apply the whole series, he can base his branch on the branch where you apply

Quoted 6 lines
Quoted 3 lines

this.

I'll have a look at it in the coming days.

Please let me know when this series is in arm/master (or u-boot/master), as I need it to base Stephen's PCI/PCIe/XUSB patches on before I can send a PR for u-boot-tegra/master. Thanks!

I need this patchset in before I can add Stephen's PCIe/XUSB patchsets to Tegra U-Boot.

If you can Ack them, I can take them in via the Tegra repo, and send them upstream to TomR on my next PR. Or if you can let me know an ETA for getting them in to the ARM/master repo, I can base my schedule off of that. But I'm blocked until the ARMv8 MMU changes are in somewhere, and I'd like to clear this from my plate.

Thanks,

Tom
--
nvpublic

Quoted 1 line
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line

Tom

--
nvpublic

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

Amicalement,
--
Albert.

--
Tom

* Unknown Key
* 0x56D6FECD

#9 lore raw

PATCH 1/4 armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Hello Tom,

Switching to these ASAP. :)

Quoted 162 lines · Tom Warren

Thanks, Tom.

Quoted 160 lines

-----Original Message-----
From: Tom Rini [mailto:trini at konsulko.com]
Sent: Monday, November 09, 2015 4:36 PM
To: Tom Warren <[email protected]>
Cc: Albert ARIBAUD <[email protected]>; swarren at wwwdotorg.org; u- boot at lists.denx.de; Simon Glass <[email protected]>; Stephen Warren <[email protected]>; Thierry Reding <[email protected]>; York Sun <[email protected]>; Michal Simek <[email protected]>; 'tomcwarren3959 at gmail.com' <[email protected]>
Subject: Re: [U-Boot] [PATCH 1/4] armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

* PGP Signed by an unknown key

Quoted 5 lines · Tom Warren

TomR,

Any chance of you taking a look at these ARM MMU patches and either taking them in to u-boot/master or ACKing them so I can take them in via the Tegra repo?

So I know Albert was tacking a PR today and then ran into a bug with his Thumb-1 patchset. If they aren't in that PR then yes, I'll review/ack them but I suspect / hope Albert is taking a look and got side-tracked by the bug he found.

Quoted 14 lines

Thanks,

TomW

Quoted 9 lines

-----Original Message-----
From: Tom Warren
Sent: Friday, November 06, 2015 9:32 AM
To: 'Albert ARIBAUD' <[email protected]>; 'Stephen Warren' <[email protected]>; Tom Rini (trini at konsulko.com) <[email protected]>
Cc: 'u-boot at lists.denx.de' <[email protected]>; 'Simon Glass' <[email protected]>; Stephen Warren <[email protected]>; Thierry Reding <[email protected]>; 'York Sun' <[email protected]>;

'Michal Simek'

Quoted 106 lines
Quoted 106 lines

<[email protected]>; 'tomcwarren3959 at gmail.com' <[email protected]>
Subject: RE: [U-Boot] [PATCH 1/4] armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Albert,

Ping!

Quoted 10 lines

-----Original Message-----
From: Tom Warren
Sent: Tuesday, November 03, 2015 12:19 PM
To: 'Albert ARIBAUD' <[email protected]>; 'Stephen Warren' <[email protected]>; Tom Rini (trini at konsulko.com) <[email protected]>
Cc: 'u-boot at lists.denx.de' <[email protected]>; 'Simon Glass' <[email protected]>; Stephen Warren <[email protected]>; Thierry Reding <[email protected]>; 'York Sun' <[email protected]>; 'Michal

Simek'

Quoted 5 lines

<[email protected]>; 'tomcwarren3959 at gmail.com' <[email protected]>
Subject: RE: [U-Boot] [PATCH 1/4] armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Quoted 22 lines

Albert,

Quoted 20 lines

-----Original Message-----
From: Tom Warren
Sent: Tuesday, October 27, 2015 1:39 PM
To: 'Albert ARIBAUD' <[email protected]>; Stephen Warren <[email protected]>
Cc: u-boot at lists.denx.de; Simon Glass <[email protected]>; Stephen Warren <[email protected]>; Thierry Reding <[email protected]>; York Sun <[email protected]>; Michal Simek <[email protected]>
Subject: RE: [U-Boot] [PATCH 1/4] armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Albert,

Quoted 6 lines

-----Original Message-----
From: Albert ARIBAUD [mailto:albert.u.boot at aribaud.net]
Sent: Wednesday, October 21, 2015 11:26 PM
To: Stephen Warren <[email protected]>
Cc: u-boot at lists.denx.de; Simon Glass <[email protected]>; Tom Warren <[email protected]>; Stephen Warren

<[email protected]>;

Quoted 58 lines
Quoted 37 lines
Quoted 6 lines

Thierry Reding <[email protected]>; York Sun <[email protected]>; Michal Simek <[email protected]>
Subject: Re: [U-Boot] [PATCH 1/4] armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

Quoted 8 lines

Hello Stephen,

Quoted 4 lines · Stephen Warren
Quoted 3 lines · Stephen Warren

From: Stephen Warren <[email protected]>

The implementation of noncached_init() uses define

MMU_SECTION_SIZE.

Quoted 22 lines
Quoted 8 lines
Quoted 8 lines

Define this on ARM64.

Move the prototype of noncached_{init,alloc}() to a location that doesn't depend on !defined(CONFIG_ARM64).

Note that noncached_init() calls mmu_set_region_dcache_behaviour() which relies on something having set up translation tables with 2MB block

size.

Quoted 13 lines
Quoted 3 lines

The core ARMv8 MMU setup code does not do this by default, but currently relies on SoC specific MMU setup code. Be aware of this before enabling this feature on your platform!

Albert, it looks like I forgot to add you to the CC on this email. Sorry! Could you please take a look at this series and tell me what you think? If you need a resend just let me know.

Also note that this series is a dependency for PCIe support on 64-bit Tegra systems; I guess either Tom Warren would be looking for an ack so he can apply the series to the Tegra tree, or perhaps if you just apply the whole series, he can base his branch on the branch where you apply

Quoted 6 lines
Quoted 3 lines

this.

I'll have a look at it in the coming days.

Please let me know when this series is in arm/master (or u-boot/master), as I need it to base Stephen's PCI/PCIe/XUSB patches on before I can send a PR for u-boot-tegra/master. Thanks!

I need this patchset in before I can add Stephen's PCIe/XUSB patchsets to Tegra U-Boot.

If you can Ack them, I can take them in via the Tegra repo, and send them upstream to TomR on my next PR. Or if you can let me know an ETA for getting them in to the ARM/master repo, I can base my schedule off of that. But I'm blocked until the ARMv8 MMU changes are in somewhere, and I'd like to clear this from my plate.

Thanks,

Tom
--
nvpublic

Quoted 1 line
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line

Tom

--
nvpublic

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

Amicalement,
--
Albert.

--
Tom

* Unknown Key
* 0x56D6FECD

Amicalement,

Signature · 1 line
Albert.
#10 lore raw

PATCH 2/4 armv8: allow custom MMU setup routines on ARMv8

In reply to Stephen Warren

From: Stephen Warren <[email protected]>

In order for noncached_init() to operate correctly, SoCs must set up a custom page table with fine-grained (2MiB) sections, which can be configured from noncached_init().

This is currently performed by arch/arm/cpu/armv8/{fsl-lsch3,zynqmp}/cpu.c by cut/pasting and re-implementing mmu_setup, enable_caches(), etc. There are some other reasons for the duplication there though, such as enabling icache early, and enabling dcaching earlier with a different configuration.

This change makes mmu_setup() a weak implementation, so that the MMU setup code can be replaced without having to duplicate other code that calls it.

---
 arch/arm/cpu/armv8/cache_v8.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/cpu/armv8/cache_v8.c +1 -1
index 6bde1cf6a00e..f4b19272e17b 100644
@@ -32,7 +32,7 @@ inline void set_pgtable_table(u64 *page_table, u64 index, u64 *table_addr)
 }
 
 /* to activate the MMU we need to set up virtual memory */
-static void mmu_setup(void)
+__weak void mmu_setup(void)
 {
 	bd_t *bd = gd->bd;
 	u64 *page_table = (u64 *)gd->arch.tlb_addr, i, j;
Signature · 1 line
1.9.1
#11 lore raw

PATCH 3/4 ARM: tegra: add custom MMU setup on ARMv8

In reply to Stephen Warren

From: Stephen Warren <[email protected]>

This sets up a fine-grained page table, which is a requirement for noncached_init() to operate correctly.

MMU setup code currently exists in a number of places:
- A version in the core ARMv8 support code that sets up page tables that use very large block sizes that CONFIG_SYS_NONCACHED_MEMORY doesn't support.
- Enhanced versions for fsl-lsch3 and zynmq that set up finer grained page tables.

Ideally, rather than duplicating the MMU setup code yet again this patch would instead consolidate all the different routines into the core ARMv8 code so that it supported all use-cases. However, this will require significant effort since there appear to be a number of discrepancies[1] between different versions of the code, and between the defines/values by some copies of the MMU setup code use and the architectural MMU documentation. Some reverse engineering will be required to determine the intent of the current code.

[1] For example, in the core ARMv8 MMU setup code, three defines named TCR_EL[123]_IPS_BITS exist, but only one of them sets the IPS field and the others set a different field (T1SZ) in the page tables. As far as I can tell so far, there should be no need to set different values per exception level nor to modify the T1SZ field at all, since TTBR1 shouldn't be enabled anyway. Another example is inconsistent values for *_VA_BITS between the current core ARMv8 MMU setup code and the various SoC- specific MMU setup code. Another example is that asm/armv8/mmu.h's value for SECTION_SHIFT doesn't match asm/system.h's MMU_SECTION_SHIFT; research is needed to determine which code relies on which of those values and why, and whether fixing the incorrect value will cause any regression.

---
 arch/arm/mach-tegra/Makefile    |   1 +
 arch/arm/mach-tegra/arm64-mmu.c | 131 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 132 insertions(+)
 create mode 100644 arch/arm/mach-tegra/arm64-mmu.c
arch/arm/mach-tegra/Makefile +1 -0
index 75924ad84800..98431a91f875 100644
@@ -15,6 +15,7 @@ obj-$(CONFIG_CMD_ENTERRCM) += cmd_enterrcm.o
 obj-$(CONFIG_PWM_TEGRA) += pwm.o
 endif
 
+obj-$(CONFIG_ARM64) += arm64-mmu.o
 obj-y += ap.o
 obj-y += board.o board2.o
 obj-y += cache.o
arch/arm/mach-tegra/arm64-mmu.c new file +131 -0

131 lines not on this page · raw message

Signature · 1 line
1.9.1
#12 lore raw

PATCH 4/4 ARM: tegra: enable CONFIG_SYS_NONCACHED_MEMORY everywhere

In reply to Stephen Warren

From: Stephen Warren <[email protected]>

Now that we have solved the problems that prevented this feature from being enabled, enable it everywhere.

---
 include/configs/tegra-common-post.h | 2 --
 1 file changed, 2 deletions(-)
include/configs/tegra-common-post.h +0 -2
index 651c4c493536..68da23e8b70c 100644
@@ -19,9 +19,7 @@
 #define CONFIG_SYS_MALLOC_LEN		(4 << 20)	/* 4MB  */
 #endif
 
-#ifndef CONFIG_ARM64
 #define CONFIG_SYS_NONCACHED_MEMORY	(1 << 20)	/* 1 MiB */
-#endif
 
 #ifndef CONFIG_SPL_BUILD
 #define BOOT_TARGET_DEVICES(func) \
Signature · 1 line
1.9.1