Support 4GB of memory on 32bit systems
Subsystems (7)
cover Support 4GB of memory on 32bit systems
Even on 32bit systems a full 4GB of DRAM may be installed and reported by the DRAM controller. Whether these 4GB are larger available depends on the size/configuration of address decoding windows and architectural features.
This increases the fields holding the RAM size to have at least 33bits (i.e. we use a u64) and fixes the fallout from the change: some casts, the usage of min() and a few printf formats have to be adjusted.
Philipp Tomsich (9):
dm: allow 4GB of DRAM on 32bit systems
rockchip: support 4GB DRAM on 32bit systems
common: include <inttypes.h> always
MIPS: use PRIx64 macros for printing ram size
rockchip: rk3368: change type of ram-size field for a
min()-calculation
ram: stm32mp1: use PRIx64 macros for printing ram size
board: keymile: add explicit cast to truncate the 64bit ram size field
board: cm_fx6: use PRIx64 macros for printing ram size
mpc85xx: add casts for ram size in min() calculation.
arch/arm/include/asm/arch-rockchip/sdram_common.h | 2 +- arch/arm/mach-rockchip/sdram_common.c | 8 ++++---- arch/arm/mach-stm32mp/dram_init.c | 2 +- arch/mips/mach-bmips/dram.c | 2 +- arch/powerpc/cpu/mpc85xx/cpu.c | 6 ++++-- board/compulab/cm_fx6/cm_fx6.c | 3 ++- board/keymile/km_arm/km_arm.c | 6 ++++-- drivers/ram/rockchip/dmc-rk3368.c | 2 +- drivers/ram/stm32mp1/stm32mp1_ram.c | 2 +- include/asm-generic/global_data.h | 2 +- include/common.h | 1 + include/ram.h | 9 ++++++++- 12 files changed, 29 insertions(+), 16 deletions(-)
Signature · 1 line
2.1.4
PATCH 1/9 dm: allow 4GB of DRAM on 32bit systems
Even on 32bit systems a full 4GB of DRAM may be installed and reported by the DRAM controller. Whether these 4GB are larger available depends on the size/configuration of address decoding windows and architectural features (e.g. consider a hypothetical architecture that uses dedicated instructions to access the 'memory-mapped' peripheral IO ranges). In U-Boot, the available DRAM, as reported by the device-model is independent of the accessible DRAM (i.e. adjusted top and effective size).
This was first reported against the RK3288, which may have 4GB DRAM attached, but will have a small (e.g. 128MB) window not accessible due to address decoding limitations.
The solution is to increase the types used for storing the ram_size to have at least 33 bits even on 32bit systems... i.e. we need to use a u64 for these always (this was previously only the case for PHYS_64BIT, which will have unwanted side-effects for 32bit systems and would require more intrusive changes).
This commit changes the size-field in 'struct ram' and the ram_size in 'gd' to be a u64.
---
include/asm-generic/global_data.h | 2 +- include/ram.h | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-)
include/asm-generic/global_data.h +1 -1
@@ -55,7 +55,7 @@ typedef struct global_data {unsigned long ram_base;/* Base address of RAM used by U-Boot */ unsigned long ram_top;/* Top address of RAM used by U-Boot */ unsigned long relocaddr;/* Start address of U-Boot in RAM */ -phys_size_t ram_size;/* RAM size */ +u64 ram_size;/* RAM size */ unsigned long mon_len;/* monitor len */ unsigned long irq_sp;/* irq stack pointer */ unsigned long start_addr_sp;/* start_addr_stackpointer */
include/ram.h +8 -1
@@ -9,7 +9,14 @@struct ram_info {phys_addr_t base; -size_t size; +/* +* We use a 64bit type for the size to correctly handle 32bit +* systems with 4GB of DRAM (which would overflow a 32bit type +* and read back as 0). For 64bit systems, we assume (for now) +* that they will always have less than 2^65 byte of DRAM +* installed. -- prt +*/ +u64 size; };struct ram_ops {
Signature · 1 line
2.1.4
PATCH 1/9 dm: allow 4GB of DRAM on 32bit systems
Quoted 22 lines · Philipp Tomsich
Even on 32bit systems a full 4GB of DRAM may be installed and reported by the DRAM controller. Whether these 4GB are larger available depends on the size/configuration of address decoding windows and architectural features (e.g. consider a hypothetical architecture that uses dedicated instructions to access the 'memory-mapped' peripheral IO ranges). In U-Boot, the available DRAM, as reported by the device-model is independent of the accessible DRAM (i.e. adjusted top and effective size).
This was first reported against the RK3288, which may have 4GB DRAM attached, but will have a small (e.g. 128MB) window not accessible due to address decoding limitations.
The solution is to increase the types used for storing the
ram_sizeto have at least 33 bits even on 32bit systems... i.e. we need to use a u64 for these always (this was previously only the case forPHYS_64BIT, which will have unwanted side-effects for 32bit systems and would require more intrusive changes).This commit changes the size-field in 'struct ram' and the
ram_sizein 'gd' to be a u64.
Quoted 8 lines
Reported-by Marty E. Plummer <[email protected]>Signed-off-by Philipp Tomsich <[email protected]>---
include/asm-generic/global_data.h | 2 +- include/ram.h | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-)
Quoted 18 lines
include/asm-generic/global_data.h +1
-1@@ -55,7 +55,7 @@ typedef struct global_data {unsigned long ram_base;/* Base address of RAM used by U-Boot */ unsigned long ram_top;/* Top address of RAM used by U-Boot */ unsigned long relocaddr;/* Start address of U-Boot in RAM */ -phys_size_t ram_size;/* RAM size */ +u64 ram_size;/* RAM size */ unsigned long mon_len;/* monitor len */ unsigned long irq_sp;/* irq stack pointer */ unsigned long start_addr_sp;/* start_addr_stackpointer */ include/ram.h +0
-0
include/ram.h line 15
Quoted 8 lines
include/ram.h +4
-1@@ -9,7 +9,14 @@struct ram_info {phys_addr_t base; -size_t size; +/* +* We use a 64bit type for the size to correctly handle 32bit +* systems with 4GB of DRAM (which would overflow a 32bit type +* and read back as 0). For 64bit systems, we assume (for now)
forever :-)
include/ram.h line 17
Quoted 2 lines
include/ram.h +2
-0+* that they will always have less than 2^65 byte of DRAM +* installed. -- prt
Is the prt your signature? I suggest dropping it.
Quoted 8 lines
include/ram.h +2
-1+*/ +u64 size; };struct ram_ops { --2.1.4
Regards,
Simon
PATCH 1/9 dm: allow 4GB of DRAM on 32bit systems
Quoted 67 lines · Simon Glass
Quoted 22 lines · On 26 July 2018 at 07:59, Philipp Tomsich <philipp.tomsich at…
Even on 32bit systems a full 4GB of DRAM may be installed and reported by the DRAM controller. Whether these 4GB are larger available depends on the size/configuration of address decoding windows and architectural features (e.g. consider a hypothetical architecture that uses dedicated instructions to access the 'memory-mapped' peripheral IO ranges). In U-Boot, the available DRAM, as reported by the device-model is independent of the accessible DRAM (i.e. adjusted top and effective size).
This was first reported against the RK3288, which may have 4GB DRAM attached, but will have a small (e.g. 128MB) window not accessible due to address decoding limitations.
The solution is to increase the types used for storing the
ram_sizeto have at least 33 bits even on 32bit systems... i.e. we need to use a u64 for these always (this was previously only the case forPHYS_64BIT, which will have unwanted side-effects for 32bit systems and would require more intrusive changes).This commit changes the size-field in 'struct ram' and the
ram_sizein 'gd' to be a u64.Quoted 8 lines
Reported-by Marty E. Plummer <[email protected]>Signed-off-by Philipp Tomsich <[email protected]>---
include/asm-generic/global_data.h| 2 +-include/ram.h| 9 ++++++++-2 files changed, 9 insertions(+), 2 deletions(-)Reviewed-by Simon Glass <sjg at chromium.org <mailto:[email protected]>>Quoted 18 lines
include/asm-generic/global_data.h +1
-1@@ -55,7 +55,7 @@ typedef struct global_data {unsigned long ram_base;/* Base address of RAM used by U-Boot */ unsigned long ram_top;/* Top address of RAM used by U-Boot */ unsigned long relocaddr;/* Start address of U-Boot in RAM */ -phys_size_t ram_size;/* RAM size */ +u64 ram_size;/* RAM size */ unsigned long mon_len;/* monitor len */ unsigned long irq_sp;/* irq stack pointer */ unsigned long start_addr_sp;/* start_addr_stackpointer */ include/ram.h +0
-0include/ram.h line 15
Quoted 8 lines
include/ram.h +4
-1@@ -9,7 +9,14 @@struct ram_info {phys_addr_t base; -size_t size; +/* +* We use a 64bit type for the size to correctly handle 32bit +* systems with 4GB of DRAM (which would overflow a 32bit type +* and read back as 0). For 64bit systems, we assume (for now) forever :-)
Quoted 4 lines
include/ram.h line 17
Quoted 2 lines
include/ram.h +2
-0+* that they will always have less than 2^65 byte of DRAM +* installed. -- prt Is the prt your signature? I suggest dropping it.
In fact it is. But I’ll need to rewrite the entire comment anyway for the next version of this series as there’s even more functions and places that the memory size is stored in...
Quoted 12 lines
Quoted 9 lines
include/ram.h +2
-1+*/ +u64 size; };struct ram_ops { --2.1.4
Regards,
Simon
PATCH 1/9 dm: allow 4GB of DRAM on 32bit systems
Quoted 67 lines · Dr. Philipp Tomsich
Quoted 67 lines · Simon Glass
Quoted 22 lines · On 26 July 2018 at 07:59, Philipp Tomsich <philipp.tomsich at…
Even on 32bit systems a full 4GB of DRAM may be installed and reported by the DRAM controller. Whether these 4GB are larger available depends on the size/configuration of address decoding windows and architectural features (e.g. consider a hypothetical architecture that uses dedicated instructions to access the 'memory-mapped' peripheral IO ranges). In U-Boot, the available DRAM, as reported by the device-model is independent of the accessible DRAM (i.e. adjusted top and effective size).
This was first reported against the RK3288, which may have 4GB DRAM attached, but will have a small (e.g. 128MB) window not accessible due to address decoding limitations.
The solution is to increase the types used for storing the
ram_sizeto have at least 33 bits even on 32bit systems... i.e. we need to use a u64 for these always (this was previously only the case forPHYS_64BIT, which will have unwanted side-effects for 32bit systems and would require more intrusive changes).This commit changes the size-field in 'struct ram' and the
ram_sizein 'gd' to be a u64.Quoted 8 lines
Reported-by Marty E. Plummer <[email protected]>Signed-off-by Philipp Tomsich <[email protected]>---
include/asm-generic/global_data.h| 2 +-include/ram.h| 9 ++++++++-2 files changed, 9 insertions(+), 2 deletions(-)Reviewed-by Simon Glass <sjg at chromium.org <mailto:[email protected]>>Quoted 18 lines
include/asm-generic/global_data.h +1
-1@@ -55,7 +55,7 @@ typedef struct global_data {unsigned long ram_base;/* Base address of RAM used by U-Boot */ unsigned long ram_top;/* Top address of RAM used by U-Boot */ unsigned long relocaddr;/* Start address of U-Boot in RAM */ -phys_size_t ram_size;/* RAM size */ +u64 ram_size;/* RAM size */ unsigned long mon_len;/* monitor len */ unsigned long irq_sp;/* irq stack pointer */ unsigned long start_addr_sp;/* start_addr_stackpointer */ include/ram.h +0
-0include/ram.h line 15
Quoted 8 lines
include/ram.h +4
-1@@ -9,7 +9,14 @@struct ram_info {phys_addr_t base; -size_t size; +/* +* We use a 64bit type for the size to correctly handle 32bit +* systems with 4GB of DRAM (which would overflow a 32bit type +* and read back as 0). For 64bit systems, we assume (for now) forever :-)
Quoted 12 lines
Quoted 4 lines
include/ram.h line 17
Quoted 2 lines
include/ram.h +2
-0+* that they will always have less than 2^65 byte of DRAM +* installed. -- prt Is the prt your signature? I suggest dropping it.
In fact it is. But I’ll need to rewrite the entire comment anyway for the next version of this series as there’s even more functions and places that the memory size is stored in...
Quoted 3 lines
Quoted 3 lines
include/ram.h +2
-0+*/ +u64 size;
With LPAE available in all modern ARM cores, shouldn't phys_addr_t just be u64? And then we'd probably want to use that throughout the code, right?
Alex
PATCH 1/9 dm: allow 4GB of DRAM on 32bit systems
Quoted 78 lines · Alexander Graf
Quoted 77 lines · Dr. Philipp Tomsich
Quoted 67 lines · Simon Glass
Quoted 22 lines · On 26 July 2018 at 07:59, Philipp Tomsich <philipp.tomsich at…
Even on 32bit systems a full 4GB of DRAM may be installed and reported by the DRAM controller. Whether these 4GB are larger available depends on the size/configuration of address decoding windows and architectural features (e.g. consider a hypothetical architecture that uses dedicated instructions to access the 'memory-mapped' peripheral IO ranges). In U-Boot, the available DRAM, as reported by the device-model is independent of the accessible DRAM (i.e. adjusted top and effective size).
This was first reported against the RK3288, which may have 4GB DRAM attached, but will have a small (e.g. 128MB) window not accessible due to address decoding limitations.
The solution is to increase the types used for storing the
ram_sizeto have at least 33 bits even on 32bit systems... i.e. we need to use a u64 for these always (this was previously only the case forPHYS_64BIT, which will have unwanted side-effects for 32bit systems and would require more intrusive changes).This commit changes the size-field in 'struct ram' and the
ram_sizein 'gd' to be a u64.Quoted 8 lines
Reported-by Marty E. Plummer <[email protected]>Signed-off-by Philipp Tomsich <[email protected]>---
include/asm-generic/global_data.h| 2 +-include/ram.h| 9 ++++++++-2 files changed, 9 insertions(+), 2 deletions(-)Reviewed-by Simon Glass <sjg at chromium.org <mailto:[email protected]>>Quoted 18 lines
include/asm-generic/global_data.h +1
-1@@ -55,7 +55,7 @@ typedef struct global_data {unsigned long ram_base;/* Base address of RAM used by U-Boot */ unsigned long ram_top;/* Top address of RAM used by U-Boot */ unsigned long relocaddr;/* Start address of U-Boot in RAM */ -phys_size_t ram_size;/* RAM size */ +u64 ram_size;/* RAM size */ unsigned long mon_len;/* monitor len */ unsigned long irq_sp;/* irq stack pointer */ unsigned long start_addr_sp;/* start_addr_stackpointer */ include/ram.h +0
-0include/ram.h line 15
Quoted 8 lines
include/ram.h +4
-1@@ -9,7 +9,14 @@struct ram_info {phys_addr_t base; -size_t size; +/* +* We use a 64bit type for the size to correctly handle 32bit +* systems with 4GB of DRAM (which would overflow a 32bit type +* and read back as 0). For 64bit systems, we assume (for now) forever :-)
Quoted 4 lines
include/ram.h line 17
Quoted 2 lines
include/ram.h +2
-0+* that they will always have less than 2^65 byte of DRAM +* installed. -- prt Is the prt your signature? I suggest dropping it.
In fact it is. But I’ll need to rewrite the entire comment anyway for the next version of this series as there’s even more functions and places that the memory size is stored in...
Quoted 1 line
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
include/ram.h line 19
Quoted 2 lines
include/ram.h +2
-0+*/ +u64 size;With LPAE available in all modern ARM cores, shouldn't
phys_addr_tjust be u64? And then we'd probably want to use that throughout the code, right?
Quite a few currently supported boards do not support LPAE, e.g. imx6.
live well,
vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180902/a1a2ae0a/attachment.sig>
PATCH 1/9 dm: allow 4GB of DRAM on 32bit systems
Quoted 83 lines
Am 02.09.2018 um 18:04 schrieb Vagrant Cascadian <[email protected]>:
Quoted 79 lines · Alexander Graf
Quoted 78 lines · Dr. Philipp Tomsich
Quoted 67 lines · Simon Glass
Quoted 22 lines · On 26 July 2018 at 07:59, Philipp Tomsich <philipp.tomsich at…
Even on 32bit systems a full 4GB of DRAM may be installed and reported by the DRAM controller. Whether these 4GB are larger available depends on the size/configuration of address decoding windows and architectural features (e.g. consider a hypothetical architecture that uses dedicated instructions to access the 'memory-mapped' peripheral IO ranges). In U-Boot, the available DRAM, as reported by the device-model is independent of the accessible DRAM (i.e. adjusted top and effective size).
This was first reported against the RK3288, which may have 4GB DRAM attached, but will have a small (e.g. 128MB) window not accessible due to address decoding limitations.
The solution is to increase the types used for storing the
ram_sizeto have at least 33 bits even on 32bit systems... i.e. we need to use a u64 for these always (this was previously only the case forPHYS_64BIT, which will have unwanted side-effects for 32bit systems and would require more intrusive changes).This commit changes the size-field in 'struct ram' and the
ram_sizein 'gd' to be a u64.Quoted 8 lines
Reported-by Marty E. Plummer <[email protected]>Signed-off-by Philipp Tomsich <[email protected]>---
include/asm-generic/global_data.h| 2 +-include/ram.h| 9 ++++++++-2 files changed, 9 insertions(+), 2 deletions(-)Reviewed-by Simon Glass <sjg at chromium.org <mailto:[email protected]>>Quoted 18 lines
include/asm-generic/global_data.h +1
-1@@ -55,7 +55,7 @@ typedef struct global_data {unsigned long ram_base;/* Base address of RAM used by U-Boot */ unsigned long ram_top;/* Top address of RAM used by U-Boot */ unsigned long relocaddr;/* Start address of U-Boot in RAM */ -phys_size_t ram_size;/* RAM size */ +u64 ram_size;/* RAM size */ unsigned long mon_len;/* monitor len */ unsigned long irq_sp;/* irq stack pointer */ unsigned long start_addr_sp;/* start_addr_stackpointer */ include/ram.h +0
-0include/ram.h line 15
Quoted 8 lines
include/ram.h +4
-1@@ -9,7 +9,14 @@struct ram_info {phys_addr_t base; -size_t size; +/* +* We use a 64bit type for the size to correctly handle 32bit +* systems with 4GB of DRAM (which would overflow a 32bit type +* and read back as 0). For 64bit systems, we assume (for now) forever :-)
Quoted 4 lines
include/ram.h line 17
Quoted 2 lines
include/ram.h +2
-0+* that they will always have less than 2^65 byte of DRAM +* installed. -- prt Is the prt your signature? I suggest dropping it.
In fact it is. But I’ll need to rewrite the entire comment anyway for the next version of this series as there’s even more functions and places that the memory size is stored in...
Quoted 1 line
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
include/ram.h line 19
Quoted 2 lines
include/ram.h +2
-0+*/ +u64 size;With LPAE available in all modern ARM cores, shouldn't
phys_addr_tjust be u64? And then we'd probably want to use that throughout the code, right?Quite a few currently supported boards do not support LPAE, e.g. imx6.
What I'm trying to say is that we probably want to make phys_addr_t be u64 when CONFIG_LPAE is set.
Alex
Quoted 4 lines
live well,
vagrant
PATCH 1/9 dm: allow 4GB of DRAM on 32bit systems
Quoted 86 lines · Alexander Graf
Quoted 86 lines
Am 02.09.2018 um 18:04 schrieb Vagrant Cascadian <[email protected]>:
Quoted 82 lines · Alexander Graf
Quoted 80 lines · Dr. Philipp Tomsich
Quoted 67 lines · Simon Glass
Quoted 22 lines · On 26 July 2018 at 07:59, Philipp Tomsich <philipp.tomsich at…
Even on 32bit systems a full 4GB of DRAM may be installed and reported by the DRAM controller. Whether these 4GB are larger available depends on the size/configuration of address decoding windows and architectural features (e.g. consider a hypothetical architecture that uses dedicated instructions to access the 'memory-mapped' peripheral IO ranges). In U-Boot, the available DRAM, as reported by the device-model is independent of the accessible DRAM (i.e. adjusted top and effective size).
This was first reported against the RK3288, which may have 4GB DRAM attached, but will have a small (e.g. 128MB) window not accessible due to address decoding limitations.
The solution is to increase the types used for storing the
ram_sizeto have at least 33 bits even on 32bit systems... i.e. we need to use a u64 for these always (this was previously only the case forPHYS_64BIT, which will have unwanted side-effects for 32bit systems and would require more intrusive changes).This commit changes the size-field in 'struct ram' and the
ram_sizein 'gd' to be a u64.Quoted 8 lines
Reported-by Marty E. Plummer <[email protected]>Signed-off-by Philipp Tomsich <[email protected]>---
include/asm-generic/global_data.h| 2 +-include/ram.h| 9 ++++++++-2 files changed, 9 insertions(+), 2 deletions(-)Reviewed-by Simon Glass <sjg at chromium.org <mailto:[email protected]>>Quoted 18 lines
include/asm-generic/global_data.h +1
-1@@ -55,7 +55,7 @@ typedef struct global_data {unsigned long ram_base;/* Base address of RAM used by U-Boot */ unsigned long ram_top;/* Top address of RAM used by U-Boot */ unsigned long relocaddr;/* Start address of U-Boot in RAM */ -phys_size_t ram_size;/* RAM size */ +u64 ram_size;/* RAM size */ unsigned long mon_len;/* monitor len */ unsigned long irq_sp;/* irq stack pointer */ unsigned long start_addr_sp;/* start_addr_stackpointer */ include/ram.h +0
-0include/ram.h line 15
Quoted 8 lines
include/ram.h +4
-1@@ -9,7 +9,14 @@struct ram_info {phys_addr_t base; -size_t size; +/* +* We use a 64bit type for the size to correctly handle 32bit +* systems with 4GB of DRAM (which would overflow a 32bit type +* and read back as 0). For 64bit systems, we assume (for now) forever :-)
Quoted 4 lines
include/ram.h line 17
Quoted 2 lines
include/ram.h +2
-0+* that they will always have less than 2^65 byte of DRAM +* installed. -- prt Is the prt your signature? I suggest dropping it.
In fact it is. But I’ll need to rewrite the entire comment anyway for the next version of this series as there’s even more functions and places that the memory size is stored in...
Quoted 3 lines
Quoted 3 lines
include/ram.h +2
-0+*/ +u64 size;
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
With LPAE available in all modern ARM cores, shouldn't
phys_addr_tjust be u64? And then we'd probably want to use that throughout the code, right?Quite a few currently supported boards do not support LPAE, e.g. imx6.
What I'm trying to say is that we probably want to make
phys_addr_tbe u64 whenCONFIG_LPAEis set.
That's right. Enabling PHYS_64BIT should be sufficient. Based on this phys_addr_t should be set to u32 or u64. arm already does that[1].
Thanks and regards,
Lokesh
PATCH 1/9 dm: allow 4GB of DRAM on 32bit systems
Hi,
Quoted 94 lines · Lokesh Vutla
Quoted 91 lines · Alexander Graf
Quoted 90 lines
Am 02.09.2018 um 18:04 schrieb Vagrant Cascadian <[email protected]>:
Quoted 79 lines · Alexander Graf
Quoted 78 lines · Dr. Philipp Tomsich
Quoted 67 lines · Simon Glass
Quoted 22 lines · On 26 July 2018 at 07:59, Philipp Tomsich <philipp.tomsich at…
Even on 32bit systems a full 4GB of DRAM may be installed and reported by the DRAM controller. Whether these 4GB are larger available depends on the size/configuration of address decoding windows and architectural features (e.g. consider a hypothetical architecture that uses dedicated instructions to access the 'memory-mapped' peripheral IO ranges). In U-Boot, the available DRAM, as reported by the device-model is independent of the accessible DRAM (i.e. adjusted top and effective size).
This was first reported against the RK3288, which may have 4GB DRAM attached, but will have a small (e.g. 128MB) window not accessible due to address decoding limitations.
The solution is to increase the types used for storing the
ram_sizeto have at least 33 bits even on 32bit systems... i.e. we need to use a u64 for these always (this was previously only the case forPHYS_64BIT, which will have unwanted side-effects for 32bit systems and would require more intrusive changes).This commit changes the size-field in 'struct ram' and the
ram_sizein 'gd' to be a u64.Quoted 8 lines
Reported-by Marty E. Plummer <[email protected]>Signed-off-by Philipp Tomsich <[email protected]>---
include/asm-generic/global_data.h| 2 +-include/ram.h| 9 ++++++++-2 files changed, 9 insertions(+), 2 deletions(-)Reviewed-by Simon Glass <sjg at chromium.org <mailto:[email protected]>>Quoted 18 lines
include/asm-generic/global_data.h +1
-1@@ -55,7 +55,7 @@ typedef struct global_data {unsigned long ram_base;/* Base address of RAM used by U-Boot */ unsigned long ram_top;/* Top address of RAM used by U-Boot */ unsigned long relocaddr;/* Start address of U-Boot in RAM */ -phys_size_t ram_size;/* RAM size */ +u64 ram_size;/* RAM size */ unsigned long mon_len;/* monitor len */ unsigned long irq_sp;/* irq stack pointer */ unsigned long start_addr_sp;/* start_addr_stackpointer */ include/ram.h +0
-0include/ram.h line 15
Quoted 8 lines
include/ram.h +4
-1@@ -9,7 +9,14 @@struct ram_info {phys_addr_t base; -size_t size; +/* +* We use a 64bit type for the size to correctly handle 32bit +* systems with 4GB of DRAM (which would overflow a 32bit type +* and read back as 0). For 64bit systems, we assume (for now) forever :-)
Quoted 4 lines
include/ram.h line 17
Quoted 2 lines
include/ram.h +2
-0+* that they will always have less than 2^65 byte of DRAM +* installed. -- prt Is the prt your signature? I suggest dropping it.
In fact it is. But I’ll need to rewrite the entire comment anyway for the next version of this series as there’s even more functions and places that the memory size is stored in...
Quoted 1 line
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
include/ram.h line 19
Quoted 2 lines
include/ram.h +2
-0+*/ +u64 size;With LPAE available in all modern ARM cores, shouldn't
phys_addr_tjust be u64? And then we'd probably want to use that throughout the code, right?Quite a few currently supported boards do not support LPAE, e.g. imx6.
Quoted 8 lines
Quoted 1 line
What I'm trying to say is that we probably want to make
phys_addr_tbe u64 whenCONFIG_LPAEis set.That's right. Enabling
PHYS_64BITshould be sufficient. Based on thisphys_addr_tshould be set to u32 or u64. arm already does that[1].
Yes I agree. So will this patch be changed?
Regards,
Simon
PATCH 1/9 dm: allow 4GB of DRAM on 32bit systems
Quoted 105 lines · Simon Glass
Hi,
Quoted 96 lines · Lokesh Vutla
Quoted 92 lines · Alexander Graf
Quoted 83 lines
Am 02.09.2018 um 18:04 schrieb Vagrant Cascadian <[email protected]>:
Quoted 79 lines · Alexander Graf
Quoted 78 lines · Dr. Philipp Tomsich
Quoted 67 lines · Simon Glass
Quoted 22 lines · On 26 July 2018 at 07:59, Philipp Tomsich <philipp.tomsich at…
Even on 32bit systems a full 4GB of DRAM may be installed and reported by the DRAM controller. Whether these 4GB are larger available depends on the size/configuration of address decoding windows and architectural features (e.g. consider a hypothetical architecture that uses dedicated instructions to access the 'memory-mapped' peripheral IO ranges). In U-Boot, the available DRAM, as reported by the device-model is independent of the accessible DRAM (i.e. adjusted top and effective size).
This was first reported against the RK3288, which may have 4GB DRAM attached, but will have a small (e.g. 128MB) window not accessible due to address decoding limitations.
The solution is to increase the types used for storing the
ram_sizeto have at least 33 bits even on 32bit systems... i.e. we need to use a u64 for these always (this was previously only the case forPHYS_64BIT, which will have unwanted side-effects for 32bit systems and would require more intrusive changes).This commit changes the size-field in 'struct ram' and the
ram_sizein 'gd' to be a u64.Quoted 8 lines
Reported-by Marty E. Plummer <[email protected]>Signed-off-by Philipp Tomsich <[email protected]>---
include/asm-generic/global_data.h| 2 +-include/ram.h| 9 ++++++++-2 files changed, 9 insertions(+), 2 deletions(-)Reviewed-by Simon Glass <sjg at chromium.org <mailto:[email protected]>>Quoted 18 lines
include/asm-generic/global_data.h +1
-1@@ -55,7 +55,7 @@ typedef struct global_data {unsigned long ram_base;/* Base address of RAM used by U-Boot */ unsigned long ram_top;/* Top address of RAM used by U-Boot */ unsigned long relocaddr;/* Start address of U-Boot in RAM */ -phys_size_t ram_size;/* RAM size */ +u64 ram_size;/* RAM size */ unsigned long mon_len;/* monitor len */ unsigned long irq_sp;/* irq stack pointer */ unsigned long start_addr_sp;/* start_addr_stackpointer */ include/ram.h +0
-0include/ram.h line 15
Quoted 8 lines
include/ram.h +4
-1@@ -9,7 +9,14 @@struct ram_info {phys_addr_t base; -size_t size; +/* +* We use a 64bit type for the size to correctly handle 32bit +* systems with 4GB of DRAM (which would overflow a 32bit type +* and read back as 0). For 64bit systems, we assume (for now) forever :-)
Quoted 4 lines
include/ram.h line 17
Quoted 2 lines
include/ram.h +2
-0+* that they will always have less than 2^65 byte of DRAM +* installed. -- prt Is the prt your signature? I suggest dropping it.
In fact it is. But I’ll need to rewrite the entire comment anyway for the next version of this series as there’s even more functions and places that the memory size is stored in...
Quoted 1 line
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
include/ram.h line 19
Quoted 2 lines
include/ram.h +2
-0+*/ +u64 size;With LPAE available in all modern ARM cores, shouldn't
phys_addr_tjust be u64? And then we'd probably want to use that throughout the code, right?Quite a few currently supported boards do not support LPAE, e.g. imx6.
What I'm trying to say is that we probably want to make
phys_addr_tbe u64 whenCONFIG_LPAEis set.
Quoted 8 lines
Quoted 6 lines
That's right. Enabling
PHYS_64BITshould be sufficient. Based on thisphys_addr_tshould be set to u32 or u64. arm already does that[1].Yes I agree. So will this patch be changed?
This patch-set needs to be revised for other reasons…
However, PHYS_64BIT is not a valid option for some of the affected chips (e.g. if the address space is indeed 32bit and the address-decode is not straightforward).
E.g. Marty Plummer already reported that the RK3288 breaks when enabling PHYS_64BIT.
Thanks,
Philipp.
PATCH 1/9 dm: allow 4GB of DRAM on 32bit systems
In reply to Lokesh VutlaQuoted 8 lines · Lokesh Vutla
Quoted 6 lines · Alexander Graf
Quoted 6 lines
Am 02.09.2018 um 18:04 schrieb Vagrant Cascadian <[email protected]>:
Quoted 2 lines
With LPAE available in all modern ARM cores, shouldn't
phys_addr_tjust be u64? And then we'd probably want to use that throughout the code, right?
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Quite a few currently supported boards do not support LPAE, e.g. imx6.
What I'm trying to say is that we probably want to make
phys_addr_tbe u64 whenCONFIG_LPAEis set.That's right. Enabling
PHYS_64BITshould be sufficient. Based on thisphys_addr_tshould be set to u32 or u64. arm already does that[1].
That will cause warnings from at least two sunxi drivers. I forgot which one the other was, but sunxi_mmc is one of them:
$ git grep -F -e '(u32 *)' drivers/mmc/sunxi_mmc.c drivers/mmc/sunxi_mmc.c: ccu_reg = (u32 *)ofnode_get_addr(args.node); drivers/mmc/sunxi_mmc.c: mmc_config_clk = (u32 *)ofnode_get_addr(args.node);
becase ofnode_get_addr() is declared like so:
include/dm/ofnode.h:phys_addr_t ofnode_get_addr(ofnode node);
Signature · 2 lines
Best regards, Rask Ingemann Lambertsen
PATCH 2/9 rockchip: support 4GB DRAM on 32bit systems
In reply to Philipp TomsichThe calculation in rockchip_sdram_size would overflow for 4GB on 32bit systems (i.e. when PHYS_64BIT is not defined).
This makes the internal variables and the signature prototype use a u64 to ensure that we can represent the 33rd bit (as in '4GB').
---
arch/arm/include/asm/arch-rockchip/sdram_common.h | 2 +- arch/arm/mach-rockchip/sdram_common.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/include/asm/arch-rockchip/sdram_common.h +1 -1
@@ -50,7 +50,7 @@#define SYS_REG_DBW_MASK 3/* Get sdram size decode from reg */ -size_t rockchip_sdram_size (phys_addr_t reg); +u64 rockchip_sdram_size (phys_addr_t reg);/* Called by U-Boot board_init_r for Rockchip SoCs */ int dram_init (void );
arch/arm/mach-rockchip/sdram_common.c +4 -4
@@ -11,11 +11,11 @@#include <dm/uclass-internal.h> DECLARE_GLOBAL_DATA_PTR ; -size_t rockchip_sdram_size (phys_addr_t reg) +u64 rockchip_sdram_size (phys_addr_t reg) {u32 rank, col, bk, cs0_row, cs1_row, bw, row_3_4; -size_t chipsize_mb =0 ; -size_t size_mb =0 ; +u64 chipsize_mb =0 ; +u64 size_mb =0 ;u32 ch;u32 sys_reg =readl (reg);
@@ -48,7 +48,7 @@ size_t rockchip_sdram_size(phys_addr_t reg) rank, col, bk, cs0_row, bw, row_3_4); } -return (size_t )size_mb <<20 ; +return (u64 )size_mb <<20 ; }int dram_init (void )
Signature · 1 line
2.1.4
PATCH 2/9 rockchip: support 4GB DRAM on 32bit systems
Quoted 6 lines · Philipp Tomsich
The calculation in
rockchip_sdram_sizewould overflow for 4GB on 32bit systems (i.e. whenPHYS_64BITis not defined).This makes the internal variables and the signature prototype use a u64 to ensure that we can represent the 33rd bit (as in '4GB').
Hi Philipp,
just to let you know that this is still not working on the veyron jerry chromebook with 4GB I have here (RK3288). The boot stops at:
U-Boot SPL 2018.07-00403-gdbe6ef8276 (Jul 26 2018 - 17:21:11 +0100) Trying to boot from SPI
U-Boot 2018.07-00403-gdbe6ef8276 (Jul 26 2018 - 17:21:11 +0100)
Model: Google Jerry DRAM: 0 Bytes
I'm still investigating why but for sure there are several points to fix to have a proper debug, see [0].
Also I was wondering if we should also fix get_effective_memsize() and gd->bd->bi_dram[].size
[0]https://gist.github.com/carlocaione/b93cfd9ee71e07fcf68d5c02256ff0fa
Cheers,
Signature · 1 line
Carlo Caione <[email protected]>
PATCH 2/9 rockchip: support 4GB DRAM on 32bit systems
Quoted 20 lines · Carlo Caione
Quoted 6 lines · Philipp Tomsich
The calculation in
rockchip_sdram_sizewould overflow for 4GB on 32bit systems (i.e. whenPHYS_64BITis not defined).This makes the internal variables and the signature prototype use a u64 to ensure that we can represent the 33rd bit (as in '4GB').
Hi Philipp,
just to let you know that this is still not working on the veyron jerry chromebook with 4GB I have here (RK3288). The boot stops at:U-Boot SPL 2018.07-00403-gdbe6ef8276 (Jul 26 2018 - 17:21:11 +0100) Trying to boot from SPI
U-Boot 2018.07-00403-gdbe6ef8276 (Jul 26 2018 - 17:21:11 +0100)
Quoted 8 lines
Model: Google Jerry DRAM: 0 BytesI'm still investigating why but for sure there are several points to fix to have a proper debug, see [0].
Also I was wondering if we should also fix
get_effective_memsize()and gd->bd->bi_dram[].size
Yes, we should. I missed that one…
I only have RK3368 and RK3399 targets to test here, so your testing is very much appreciated.
Quoted 7 lines
[0]https://gist.github.com/carlocaione/b93cfd9ee71e07fcf68d5c02256ff0fa
Cheers,
--
Carlo Caione <[email protected]>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 529 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180726/5fbb638b/attachment.sig>
PATCH 2/9 rockchip: support 4GB DRAM on 32bit systems
In reply to Carlo CaioneQuoted 23 lines · Carlo Caione
Quoted 6 lines · Philipp Tomsich
The calculation in
rockchip_sdram_sizewould overflow for 4GB on 32bit systems (i.e. whenPHYS_64BITis not defined).This makes the internal variables and the signature prototype use a u64 to ensure that we can represent the 33rd bit (as in '4GB').
Hi Philipp,
just to let you know that this is still not working on the veyron jerry chromebook with 4GB I have here (RK3288). The boot stops at:U-Boot SPL 2018.07-00403-gdbe6ef8276 (Jul 26 2018 - 17:21:11 +0100) Trying to boot from SPI
U-Boot 2018.07-00403-gdbe6ef8276 (Jul 26 2018 - 17:21:11 +0100)
Model: Google Jerry DRAM: 0 Bytes
Quoted 7 lines
I'm still investigating why but for sure there are several points to fix to have a proper debug, see [0].
Also I was wondering if we should also fix
get_effective_memsize()and gd->bd->bi_dram[].size[0]https://gist.github.com/carlocaione/b93cfd9ee71e07fcf68d5c02256ff0fa
Thanks for identifying these two… I’ll pick them up and include in the next series.
Quoted 5 lines
Cheers,
Signature · 1 line
Carlo Caione <[email protected]>
PATCH 2/9 rockchip: support 4GB DRAM on 32bit systems
In reply to Carlo CaioneQuoted 18 lines · Carlo Caione
Quoted 6 lines · Philipp Tomsich
The calculation in
rockchip_sdram_sizewould overflow for 4GB on 32bit systems (i.e. whenPHYS_64BITis not defined).This makes the internal variables and the signature prototype use a u64 to ensure that we can represent the 33rd bit (as in '4GB').
Hi Philipp,
just to let you know that this is still not working on the veyron jerry chromebook with 4GB I have here (RK3288). The boot stops at:U-Boot SPL 2018.07-00403-gdbe6ef8276 (Jul 26 2018 - 17:21:11 +0100) Trying to boot from SPI
Quoted 7 lines
U-Boot 2018.07-00403-gdbe6ef8276 (Jul 26 2018 - 17:21:11 +0100)
Model: Google Jerry DRAM: 0 BytesI'm still investigating why but for sure there are several points to fix to have a proper debug, see [0].
I reread ‘rockchip_sdram_size’ and it looks as if I forgot to mark the value shifted to create chipsize_mb as ULL. When looking at this code I had an uneasy feeling that this might run into the C type rules (i.e. 1 will be a 32bit integer and shifting it by 32 would result in 0), but I didn’t think that this would ever be the case and that any 4GB DRAM setup would be made
up of multiple channels or of multiple ranks.
Quoted 10 lines
Also I was wondering if we should also fix
get_effective_memsize()and gd->bd->bi_dram[].size[0]https://gist.github.com/carlocaione/b93cfd9ee71e07fcf68d5c02256ff0fa
Cheers,
Signature · 1 line
Carlo Caione <[email protected]>
PATCH 2/9 rockchip: support 4GB DRAM on 32bit systems
Quoted 29 lines · Dr. Philipp Tomsich
Quoted 20 lines · Carlo Caione
Quoted 8 lines · Philipp Tomsich
The calculation in
rockchip_sdram_sizewould overflow for 4GB on
32bit systems (i.e. whenPHYS_64BITis not defined).This makes the internal variables and the signature prototype use a
u64 to ensure that we can represent the 33rd bit (as in '4GB').Hi Philipp,
just to let you know that this is still not working on the veyron jerry
chromebook with 4GB I have here (RK3288). The boot stops at:U-Boot SPL 2018.07-00403-gdbe6ef8276 (Jul 26 2018 - 17:21:11 +0100) Trying to boot from SPI
Quoted 8 lines
U-Boot 2018.07-00403-gdbe6ef8276 (Jul 26 2018 - 17:21:11 +0100)
Model: Google Jerry DRAM: 0 BytesI'm still investigating why but for sure there are several points to
fix to have a proper debug, see [0].
Quoted 10 lines
I reread ‘rockchip_sdram_size’ and it looks as if I forgot to mark the value
shifted to createchipsize_mbas ULL. When looking at this code I had an
uneasy feeling that this might run into the C type rules (i.e. 1 will be a 32bit
integer and shifting it by 32 would result in 0), but I didn’t think that this
would ever be the case and that any 4GB DRAM setup would be made up of multiple channels or of multiple ranks.
It doesn't hurt but rockchip_sdram_size() is returning the correct value of 0x100000000 in my tests.
Signature · 1 line
Carlo Caione <[email protected]>
PATCH 2/9 rockchip: support 4GB DRAM on 32bit systems
Quoted 44 lines · Carlo Caione
Quoted 29 lines · Dr. Philipp Tomsich
Quoted 20 lines · Carlo Caione
Quoted 8 lines · Philipp Tomsich
The calculation in
rockchip_sdram_sizewould overflow for 4GB on
32bit systems (i.e. whenPHYS_64BITis not defined).This makes the internal variables and the signature prototype use a
u64 to ensure that we can represent the 33rd bit (as in '4GB').Hi Philipp,
just to let you know that this is still not working on the veyron jerry
chromebook with 4GB I have here (RK3288). The boot stops at:U-Boot SPL 2018.07-00403-gdbe6ef8276 (Jul 26 2018 - 17:21:11 +0100) Trying to boot from SPI
Quoted 8 lines
U-Boot 2018.07-00403-gdbe6ef8276 (Jul 26 2018 - 17:21:11 +0100)
Model: Google Jerry DRAM: 0 BytesI'm still investigating why but for sure there are several points to
fix to have a proper debug, see [0].Quoted 10 lines
I reread ‘rockchip_sdram_size’ and it looks as if I forgot to mark the value
shifted to createchipsize_mbas ULL. When looking at this code I had an
uneasy feeling that this might run into the C type rules (i.e. 1 will be a 32bit
integer and shifting it by 32 would result in 0), but I didn’t think that this
would ever be the case and that any 4GB DRAM setup would be made up of multiple channels or of multiple ranks.
Quoted 2 lines
It doesn't hurt but
rockchip_sdram_size()is returning the correct value of0x100000000in my tests.
The 'gd->bd->bi_dram[i].size’ path will also be involved and truncate this later on, but I am not convinced that it’s worth fixing the dram banks info for the general case.
Generally, typing for these bi_dram structures seems a mess: they are often cast to 32bit and sometimes to 64bit in common code (i.e. fdtdec.c uses unsigned long long).
I hope I can avoid touching this code.
Btw, here’s a gem from board_f.c (these two lines are after each other):
Quoted 2 lines
gd->ram_top = gd->ram_base + get_effective_memsize();
gd->ram_top = board_get_usable_ram_top(gd->mon_len);As the first line is clearly deal (except the fact that the compiler can’t tell that get_effective_memsize() should be side-effect free), we can drop it. I’ll send a separate patch for this to be picked up by Tom…
—Phil.
PATCH 3/9 common: include <inttypes.h> always
In reply to Philipp TomsichWith the ram-size variable changed to u64, we'll need appropriate macros for printing u64 values correctly either in 32bit builds (i.e. ILP32 models) or in 64bit builds (i.e. LP64 models). Best to make the PRIx64 macro available everywhere.
This include inttypes.h from common.h to make the various macros for formatted printing available to everyone.
---
include/common.h | 1 + 1 file changed, 1 insertion(+)
include/common.h +1 -0
@@ -30,6 +30,7 @@ typedef volatile unsigned char vu_char;#include <linux/stringify.h> #include <asm/ptrace.h> #include <stdarg.h> +#include <inttypes.h> #include <stdio.h> #include <linux/kernel.h>
Signature · 1 line
2.1.4
Masahiro Yamada
NAKPATCH 3/9 common: include <inttypes.h> always
2018-07-26 22:59 GMT+09:00 Philipp Tomsich
<[email protected]>:
Quoted 10 lines
With the ram-size variable changed to u64, we'll need appropriate macros for printing u64 values correctly either in 32bit builds (i.e. ILP32 models) or in 64bit builds (i.e. LP64 models). Best to make the PRIx64 macro available everywhere.
This include
inttypes.hfromcommon.hto make the various macros for formatted printing available to everyone.Signed-off-by Philipp Tomsich <[email protected]>---
NACK.
PRIx64 is evil crap. I would make the code super ugly. Do not use it.
The right thing to do is use the same typedefs
for all architectures.
typedef unsigned char u8; typedef unsigned short u16; typedef unsigned int u32; typedef unsigned long long u64;
This works for both ILP32 and LP64.
Use '%llx' for printing u64 variables _always_.
This is what Linux exactly does.
In fact, Linux defined fixed-width types differently for different architectures in old days.
After long time effort, Linux unified
the fixed-width types for the kernel space.
https://github.com/torvalds/linux/blob/master/include/uapi/asm-generic/int-ll64.h
See Linux commit:
commit 0c79a8e29b5fcbcbfd611daf9d500cfad8370fcf
Author: Geert Uytterhoeven <[email protected]> Date: Thu Jan 23 15:53:43 2014 -0800
asm/types.h: Remove include/asm-generic/int-l64.h
And, I fixed ARM Trusted Firmware in the same way:
https://github.com/ARM-software/arm-trusted-firmware/commit/0a2d5b43c81ed6132761023bf43755f13122ddf0
U-Boot is still doing wrong,
and core developers in U-Boot do not understand this, unfortunately.
Quoted 22 lines
include/common.h | 1 + 1 file changed, 1 insertion(+)include/common.h +1
-1@@ -30,6 +30,7 @@ typedef volatile unsigned char vu_char;#include <linux/stringify.h> #include <asm/ptrace.h> #include <stdarg.h> +#include <inttypes.h> #include <stdio.h> #include <linux/kernel.h> --2.1.4
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH 3/9 common: include <inttypes.h> always
+Tom
Hi Masahiro,
Quoted 65 lines · Masahiro Yamada
2018-07-26 22:59 GMT+09:00 Philipp Tomsich
<[email protected]>:Quoted 10 lines
With the ram-size variable changed to u64, we'll need appropriate macros for printing u64 values correctly either in 32bit builds (i.e. ILP32 models) or in 64bit builds (i.e. LP64 models). Best to make the PRIx64 macro available everywhere.
This include
inttypes.hfromcommon.hto make the various macros for formatted printing available to everyone.Signed-off-by Philipp Tomsich <[email protected]>---
NACK.
PRIx64 is evil crap. I would make the code super ugly. Do not use it.
The right thing to do is use the same typedefs
for all architectures.typedef unsigned char u8; typedef unsigned short u16; typedef unsigned int u32; typedef unsigned long long u64;This works for both ILP32 and LP64.
Use '%llx' for printing u64 variables _always_.
This is what Linux exactly does.
In fact, Linux defined fixed-width types differently for different architectures in old days.
After long time effort, Linux unified
the fixed-width types for the kernel space.https://github.com/torvalds/linux/blob/master/include/uapi/asm-generic/int-ll64.h
See Linux commit:
commit
0c79a8e29b5fcbcbfd611daf9d500cfad8370fcfAuthor: Geert Uytterhoeven <[email protected]> Date: Thu Jan 23 15:53:43 2014 -0800
asm/types.h: Removeinclude/asm-generic/int-l64.hAnd, I fixed ARM Trusted Firmware in the same way:
Quoted 8 lines
https://github.com/ARM-software/arm-trusted-firmware/commit/0a2d5b43c81ed6132761023bf43755f13122ddf0
U-Boot is still doing wrong,
and core developers in U-Boot do not understand this, unfortunately.
While this works in many cases we do seem to have problems with some toolchains. Perhaps things are better now as my problems were a a few years back. Things like size_t with %z caused problems too. I remember m68k producing warnings when I tried this.
I am certainly interested in converting over to this other approach. I am also OK with the PRi stuff, since it only affects a relatively small number of cases.
Regards,
Simon
PATCH 3/9 common: include <inttypes.h> always
Quoted 79 lines · Simon Glass
+Tom
Hi Masahiro,
Quoted 65 lines · Masahiro Yamada
2018-07-26 22:59 GMT+09:00 Philipp Tomsich
<[email protected]>:Quoted 10 lines
With the ram-size variable changed to u64, we'll need appropriate macros for printing u64 values correctly either in 32bit builds (i.e. ILP32 models) or in 64bit builds (i.e. LP64 models). Best to make the PRIx64 macro available everywhere.
This include
inttypes.hfromcommon.hto make the various macros for formatted printing available to everyone.Signed-off-by Philipp Tomsich <[email protected]>---
NACK.
PRIx64 is evil crap. I would make the code super ugly. Do not use it.
The right thing to do is use the same typedefs
for all architectures.typedef unsigned char u8; typedef unsigned short u16; typedef unsigned int u32; typedef unsigned long long u64;This works for both ILP32 and LP64.
Use '%llx' for printing u64 variables _always_.
This is what Linux exactly does.
In fact, Linux defined fixed-width types differently for different architectures in old days.
After long time effort, Linux unified
the fixed-width types for the kernel space.https://github.com/torvalds/linux/blob/master/include/uapi/asm-generic/int-ll64.h
See Linux commit:
commit
0c79a8e29b5fcbcbfd611daf9d500cfad8370fcfAuthor: Geert Uytterhoeven <[email protected]> Date: Thu Jan 23 15:53:43 2014 -0800
asm/types.h: Removeinclude/asm-generic/int-l64.hAnd, I fixed ARM Trusted Firmware in the same way:
Quoted 8 lines
https://github.com/ARM-software/arm-trusted-firmware/commit/0a2d5b43c81ed6132761023bf43755f13122ddf0
U-Boot is still doing wrong,
and core developers in U-Boot do not understand this, unfortunately.
Quoted 8 lines
While this works in many cases we do seem to have problems with some toolchains. Perhaps things are better now as my problems were a a few years back. Things like
size_twith %z caused problems too. I remember m68k producing warnings when I tried this.I am certainly interested in converting over to this other approach. I am also OK with the PRi stuff, since it only affects a relatively small number of cases.
It would certainly be worth giving things another try with current compilers.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180803/467aba57/attachment.sig>
PATCH 3/9 common: include <inttypes.h> always
2018-08-04 0:01 GMT+09:00 Tom Rini <[email protected]>:
Quoted 77 lines · Simon Glass
Quoted 76 lines
+Tom
Hi Masahiro,
Quoted 71 lines · Masahiro Yamada
2018-07-26 22:59 GMT+09:00 Philipp Tomsich
<[email protected]>:Quoted 10 lines
With the ram-size variable changed to u64, we'll need appropriate macros for printing u64 values correctly either in 32bit builds (i.e. ILP32 models) or in 64bit builds (i.e. LP64 models). Best to make the PRIx64 macro available everywhere.
This include
inttypes.hfromcommon.hto make the various macros for formatted printing available to everyone.Signed-off-by Philipp Tomsich <[email protected]>---
NACK.
PRIx64 is evil crap. I would make the code super ugly. Do not use it.
The right thing to do is use the same typedefs
for all architectures.typedef unsigned char u8; typedef unsigned short u16; typedef unsigned int u32; typedef unsigned long long u64;This works for both ILP32 and LP64.
Use '%llx' for printing u64 variables _always_.
This is what Linux exactly does.
In fact, Linux defined fixed-width types differently for different architectures in old days.
After long time effort, Linux unified
the fixed-width types for the kernel space.https://github.com/torvalds/linux/blob/master/include/uapi/asm-generic/int-ll64.h
See Linux commit:
commit
0c79a8e29b5fcbcbfd611daf9d500cfad8370fcfAuthor: Geert Uytterhoeven <[email protected]> Date: Thu Jan 23 15:53:43 2014 -0800
asm/types.h: Removeinclude/asm-generic/int-l64.hAnd, I fixed ARM Trusted Firmware in the same way:
https://github.com/ARM-software/arm-trusted-firmware/commit/0a2d5b43c81ed6132761023bf43755f13122ddf0
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
U-Boot is still doing wrong,
and core developers in U-Boot do not understand this, unfortunately.While this works in many cases we do seem to have problems with some toolchains. Perhaps things are better now as my problems were a a few years back.
Please pin-point the pre-built toolchains with which you had problems.
In other words, please show a compiler that has:
sizeof(int) != 4
or
sizeof(long long) != 8
Quoted 2 lines
Quoted 2 lines
Things like
size_twith %z caused problems too. I remember m68k producing warnings when I tried this.
This is true, but
the typedefs of uint{8,16,32,64}_t
and the typedef of size_t are
_different_ problems.
Please do not mix them up to exaggerate things.
Most 32 bit architectures use "unsigned int" size_t, and all 64 bit architectures use "unsigned long" size_t as stated in
https://github.com/torvalds/linux/blob/v4.17/include/uapi/asm-generic/posix_types.h#L63
Linux kernel hard-codes size_t and ssize_t, thus people are supposed to use a compiler with proper size_t define.
Such compilers are provided in
https://mirrors.edge.kernel.org/pub/tools/crosstool/
If you are not happy about hard-coding size_t,
you can do like this:
typedef __SIZE_TYPE__ size_t;
typedef __typeof(__builtin_choose_expr(__builtin_types_compatible_p(size_t, unsigned long), (long)0, (int)0)) ssize_t;
Quoted 3 lines
Quoted 3 lines
I am certainly interested in converting over to this other approach. I am also OK with the PRi stuff, since it only affects a relatively small number of cases.
Whether the code is right or not
should not be judged by the number of use cases.
Quoted 11 lines
It would certainly be worth giving things another try with current compilers.
--
Tom_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH 3/9 common: include <inttypes.h> always
In reply to Philipp TomsichHi Philipp
Quoted 22 lines
-----Original Message-----
From: Philipp Tomsich <[email protected]>
Sent: jeudi 26 juillet 2018 16:00With the ram-size variable changed to u64, we'll need appropriate macros for printing u64 values correctly either in 32bit builds (i.e. ILP32 models) or in 64bit builds (i.e. LP64 models). Best to make the PRIx64 macro available everywhere.
This include
inttypes.hfromcommon.hto make the various macros for formatted printing available to everyone.Signed-off-by Philipp Tomsich <[email protected]>---
include/common.h | 1 + 1 file changed, 1 insertion(+)include/common.h index 940161f..9de9145 renamed from include/common.h +0
-0100644
include/common.h typedef volatile unsigned char vu_char; · line 35
Quoted 6 lines
include/common.h +1
-0@@ -30,6 +30,7 @@ typedef volatile unsigned char vu_char;#include <linux/stringify.h> #include <asm/ptrace.h> #include <stdarg.h> +#include <inttypes.h> #include <stdio.h> #include <linux/kernel.h>
I think the include should be moved after the line 40 and __STDC_FORMAT_MACROS definition :
-/* Bring in printf format macros if inttypes.h is included */ +/* Bring in printf format macros defined in inttypes.h */ #define __STDC_FORMAT_MACROS
+#include <inttypes.h>
Regards
Patrick
PATCH 4/9 MIPS: use PRIx64 macros for printing ram size
In reply to Philipp TomsichWith the recent changes of the underlying types for the ram size, we need to adjust the formatting. Use PRIx64 to print the (now) u64 field.
---
arch/mips/mach-bmips/dram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/mach-bmips/dram.c +1 -1
@@ -28,7 +28,7 @@ int dram_init(void)return 0 ; } -debug ("SDRAM base=%zx, size=%x\n" , ram.base, ram.size); +debug ("SDRAM base=%zx, size=%" PRIx64"\n" , ram.base, ram.size); gd->ram_size = ram.size;
Signature · 1 line
2.1.4
PATCH 4/9 MIPS: use PRIx64 macros for printing ram size
Quoted 8 lines · Philipp Tomsich
With the recent changes of the underlying types for the ram size, we need to adjust the formatting. Use PRIx64 to print the (now) u64 field.
Signed-off-by Philipp Tomsich <[email protected]>---
arch/mips/mach-bmips/dram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
PATCH 4/9 MIPS: use PRIx64 macros for printing ram size
In reply to Philipp Tomsich2018-07-26 15:59 GMT+02:00 Philipp Tomsich
<[email protected]>:
Quoted 8 lines
With the recent changes of the underlying types for the ram size, we need to adjust the formatting. Use PRIx64 to print the (now) u64 field.
Signed-off-by Philipp Tomsich <[email protected]>---
arch/mips/mach-bmips/dram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
- Daniel
PATCH 5/9 rockchip: rk3368: change type of ram-size field for a min()-calculation
In reply to Philipp TomsichWith the recent changes of the underlying types for the ram size, we need to cast the constant used in clamping to u64 instead of size_t.
---
drivers/ram/rockchip/dmc-rk3368.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ram/rockchip/dmc-rk3368.c +1 -1
@@ -960,7 +960,7 @@ static int rk3368_dmc_probe(struct udevice *dev)* is SoC register space (i.e. reserved), and 0xfe000000~0xfeffffff is * inaccessible for some IP controller. */ - priv->info.size =min (priv->info.size, (size_t )0xfe000000 ); + priv->info.size =min (priv->info.size, (u64 )0xfe000000 );return 0 ; }
Signature · 1 line
2.1.4
PATCH 5/9 rockchip: rk3368: change type of ram-size field for a min()-calculation
Hi Phiipp,
Quoted 8 lines · Philipp Tomsich
With the recent changes of the underlying types for the ram size, we need to cast the constant used in clamping to u64 instead of
size_t.Signed-off-by Philipp Tomsich <[email protected]>---
drivers/ram/rockchip/dmc-rk3368.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ram/rockchip/dmc-rk3368.c static int rk3368_dmc_probe(struct udevice *dev) · line 963
Quoted 11 lines
drivers/ram/rockchip/dmc-rk3368.c +1
-1@@ -960,7 +960,7 @@ static int rk3368_dmc_probe(struct udevice *dev)* is SoC register space (i.e. reserved), and 0xfe000000~0xfeffffff is * inaccessible for some IP controller. */ - priv->info.size =min (priv->info.size, (size_t )0xfe000000 ); + priv->info.size =min (priv->info.size, (u64 )0xfe000000 );
Why case at all? Is it because min() is a macro?
Quoted 6 lines
drivers/ram/rockchip/dmc-rk3368.c +0
-1return 0 ; } --2.1.4
Regards,
Simon
PATCH 6/9 ram: stm32mp1: use PRIx64 macros for printing ram size
In reply to Philipp TomsichWith the recent changes of the underlying types for the ram size, we need to adjust the formatting. Use PRIx64 to print the (now) u64 field.
---
arch/arm/mach-stm32mp/dram_init.c | 2 +- drivers/ram/stm32mp1/stm32mp1_ram.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-stm32mp/dram_init.c +1 -1
@@ -25,7 +25,7 @@ int dram_init(void)debug ("Cannot get RAM size: %d\n" , ret);return ret; } -debug ("RAM init base=%lx, size=%x\n" , ram.base, ram.size); +debug ("RAM init base=%lx, size=%" PRIx64"\n" , ram.base, ram.size); gd->ram_size = ram.size;
drivers/ram/stm32mp1/stm32mp1_ram.c +1 -1
@@ -130,7 +130,7 @@ static __maybe_unused int stm32mp1_ddr_setup(struct udevice *dev)/* check memory access for all memory */ if (config.info.size != priv->info.size) { -printf ("DDR invalid size : 0x%x, expected 0x%x\n" , +printf ("DDR invalid size : 0x%" PRIx64", expected 0x%x\n" , priv->info.size, config.info.size);return -EINVAL ; }
Signature · 1 line
2.1.4
PATCH 6/9 ram: stm32mp1: use PRIx64 macros for printing ram size
Hi Philipp
Quoted 42 lines
-----Original Message-----
From: Philipp Tomsich <[email protected]>
Sent: jeudi 26 juillet 2018 16:00With the recent changes of the underlying types for the ram size, we need to adjust the formatting. Use PRIx64 to print the (now) u64 field.
Signed-off-by Philipp Tomsich <[email protected]>---
arch/arm/mach-stm32mp/dram_init.c | 2 +- drivers/ram/stm32mp1/stm32mp1_ram.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)arch/arm/mach- renamed from arch/arm/mach-stm32mp/dram_init.c +0
-0
stm32mp/dram_init.c
index 7688b3e..e4c6302 100644arch/arm/mach-stm32mp/dram_init.c +1
-1@@ -25,7 +25,7 @@ int dram_init(void)debug ("Cannot get RAM size: %d\n" , ret);return ret; } -debug ("RAM init base=%lx, size=%x\n" , ram.base, ram.size); +debug ("RAM init base=%lx, size=%" PRIx64"\n" , ram.base, ram.size); gd->ram_size = ram.size;drivers/ram/stm32mp1/stm32mp1_ram.c +1
-1@@ -130,7 +130,7 @@ static __maybe_unused int stm32mp1_ddr_setup(struct udevice *dev)/* check memory access for all memory */ if (config.info.size != priv->info.size) { -printf ("DDR invalid size : 0x%x, expected 0x%x\n" , +printf ("DDR invalid size : 0x%" PRIx64", expected 0x%x\n" , priv->info.size, config.info.size);return -EINVAL ;
Quoted 3 lines
}
--
2.1.4
Tested on STM32MP157c EV1 board with debug activated for RAM driver. The traces are displayed correctly.
Regard
Patrick
PATCH 6/9 ram: stm32mp1: use PRIx64 macros for printing ram size
In reply to Philipp TomsichQuoted 11 lines · Philipp Tomsich
With the recent changes of the underlying types for the ram size, we need to adjust the formatting. Use PRIx64 to print the (now) u64 field.
Signed-off-by Philipp Tomsich <[email protected]>---
arch/arm/mach-stm32mp/dram_init.c | 2 +- drivers/ram/stm32mp1/stm32mp1_ram.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
PATCH 7/9 board: keymile: add explicit cast to truncate the 64bit ram size field
In reply to Philipp TomsichWith the change to a 64bit ram size field for 32bit architectures, we need to add an explicit cast to truncate when converting to a pointer. This casts to 'void*' through 'uintptr_t'.
---
board/keymile/km_arm/km_arm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
board/keymile/km_arm/km_arm.c +4 -2
@@ -521,13 +521,15 @@ int post_hotkeys_pressed(void)ulong post_word_load (void ) { -void * addr = (void *) (gd->ram_size -BOOTCOUNT_ADDR +POST_WORD_OFF ); +void *addr = (void *)((uintptr_t )gd->ram_size - +BOOTCOUNT_ADDR +POST_WORD_OFF );return in_le32 (addr); }void post_word_store (ulong value) { -void * addr = (void *) (gd->ram_size -BOOTCOUNT_ADDR +POST_WORD_OFF ); +void *addr = (void *)((uintptr_t )gd->ram_size - +BOOTCOUNT_ADDR +POST_WORD_OFF );out_le32 (addr, value); }
Signature · 1 line
2.1.4
PATCH 7/9 board: keymile: add explicit cast to truncate the 64bit ram size field
Quoted 9 lines · Philipp Tomsich
With the change to a 64bit ram size field for 32bit architectures, we need to add an explicit cast to truncate when converting to a pointer. This casts to 'void*' through '
uintptr_t'.Signed-off-by Philipp Tomsich <[email protected]>---
board/keymile/km_arm/km_arm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
PATCH 8/9 board: cm_fx6: use PRIx64 macros for printing ram size
In reply to Philipp TomsichWith the recent changes of the underlying types for the ram size, we need to adjust the formatting. Use PRIx64 to print the (now) u64 field.
---
board/compulab/cm_fx6/cm_fx6.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
board/compulab/cm_fx6/cm_fx6.c +2 -1
@@ -704,7 +704,8 @@ int dram_init(void) gd->ram_size -=0x100000 ;break ;default : -printf ("ERROR: Unsupported DRAM size 0x%lx\n" , gd->ram_size); +printf ("ERROR: Unsupported DRAM size 0x%" PRIx64"\n" , + gd->ram_size);return -1 ; }
Signature · 1 line
2.1.4
PATCH 8/9 board: cm_fx6: use PRIx64 macros for printing ram size
2018-07-26 22:59 GMT+09:00 Philipp Tomsich
<[email protected]>:
Quoted 6 lines
With the recent changes of the underlying types for the ram size, we need to adjust the formatting. Use PRIx64 to print the (now) u64 field.
Signed-off-by Philipp Tomsich <[email protected]>---
As I commented in 3/9,
using PRIx64 is wrong.
Quoted 24 lines
board/compulab/cm_fx6/cm_fx6.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)board/compulab/cm_fx6/cm_fx6.c +2
-2@@ -704,7 +704,8 @@ int dram_init(void) gd->ram_size -=0x100000 ;break ;default : -printf ("ERROR: Unsupported DRAM size 0x%lx\n" , gd->ram_size); +printf ("ERROR: Unsupported DRAM size 0x%" PRIx64"\n" , + gd->ram_size);return -1 ; } --2.1.4
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH 8/9 board: cm_fx6: use PRIx64 macros for printing ram size
Quoted 6 lines · Masahiro Yamada
2018-07-26 22:59 GMT+09:00 Philipp Tomsich
<[email protected]>:Quoted 4 lines
With the recent changes of the underlying types for the ram size, we need to adjust the formatting. Use PRIx64 to print the (now) u64 field.
Quoted 7 lines
Quoted 2 lines
Signed-off-by Philipp Tomsich <[email protected]>---
As I commented in 3/9,
using PRIx64 is wrong.
I'm happy enough if we can more to using fixed types (long int = 32-bit, long long = 64-bit). But is anyone actually working on this?
For now this is standard C and seems good enough to me.
PATCH 9/9 mpc85xx: add casts for ram size in min() calculation.
In reply to Philipp TomsichWith the change of the ram size fields to u64, we need to use explicit casts to ensure that min()-implementation sees the same type for both its arguments.
---
arch/powerpc/cpu/mpc85xx/cpu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
arch/powerpc/cpu/mpc85xx/cpu.c +4 -2
@@ -604,7 +604,8 @@ static int reset_tlb(phys_addr_t p_addr, u32 size, phys_addr_t *phys_offset)int arch_memory_test_advance (u32 *vstart,u32 *size,phys_addr_t *phys_offset) {phys_addr_t test_cap, p_addr; -phys_size_t p_size =min (gd->ram_size,CONFIG_MAX_MEM_MAPPED ); +phys_size_t p_size =min ((phys_size_t )gd->ram_size, + (phys_size_t )CONFIG_MAX_MEM_MAPPED ); #if !defined(CONFIG_PHYS_64BIT) || \ !defined(CONFIG_SYS_INIT_RAM_ADDR_PHYS) || \
@@ -632,7 +633,8 @@ int arch_memory_test_advance(u32 *vstart, u32 *size, phys_addr_t *phys_offset)/* initialization for testing area */ int arch_memory_test_prepare (u32 *vstart,u32 *size,phys_addr_t *phys_offset) { -phys_size_t p_size =min (gd->ram_size,CONFIG_MAX_MEM_MAPPED ); +phys_size_t p_size =min ((phys_size_t )gd->ram_size, + (phys_size_t )CONFIG_MAX_MEM_MAPPED ); *vstart =CONFIG_SYS_DDR_SDRAM_BASE ; *size = (u32 ) p_size;/* CONFIG_MAX_MEM_MAPPED < 4G */
Signature · 1 line
2.1.4
PATCH 9/9 mpc85xx: add casts for ram size in min() calculation.
Quoted 26 lines · Philipp Tomsich
With the change of the ram size fields to u64, we need to use explicit casts to ensure that min()-implementation sees the same type for both its arguments.
Signed-off-by Philipp Tomsich <[email protected]>---
arch/powerpc/cpu/mpc85xx/cpu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)arch/powerpc/cpu/mpc85xx/cpu.c +2
-1@@ -604,7 +604,8 @@ static int reset_tlb(phys_addr_t p_addr, u32 size, phys_addr_t *phys_offset)int arch_memory_test_advance (u32 *vstart,u32 *size,phys_addr_t *phys_offset) {phys_addr_t test_cap, p_addr; -phys_size_t p_size =min (gd->ram_size,CONFIG_MAX_MEM_MAPPED ); +phys_size_t p_size =min ((phys_size_t )gd->ram_size, + (phys_size_t )CONFIG_MAX_MEM_MAPPED ); #if !defined(CONFIG_PHYS_64BIT) || \ !defined(CONFIG_SYS_INIT_RAM_ADDR_PHYS) || \
arch/powerpc/cpu/mpc85xx/cpu.c int arch_memory_test_advance(u32 *vstart, u32 *size, phys_addr_t *phys_offset) · line 640
Quoted 9 lines
arch/powerpc/cpu/mpc85xx/cpu.c +2
-1@@ -632,7 +633,8 @@ int arch_memory_test_advance(u32 *vstart, u32 *size, phys_addr_t *phys_offset)/* initialization for testing area */ int arch_memory_test_prepare (u32 *vstart,u32 *size,phys_addr_t *phys_offset) { -phys_size_t p_size =min (gd->ram_size,CONFIG_MAX_MEM_MAPPED ); +phys_size_t p_size =min ((phys_size_t )gd->ram_size, + (phys_size_t )CONFIG_MAX_MEM_MAPPED ); *vstart =CONFIG_SYS_DDR_SDRAM_BASE ; *size = (u32 ) p_size;/* CONFIG_MAX_MEM_MAPPED < 4G */
We didn't have any issue with 36-bit physical address on mpc85xx. I see this change is needed after you change gd->ram_size.
cover Support 4GB of memory on 32bit systems
In reply to Philipp TomsichQuoted 22 lines · Philipp Tomsich
Even on 32bit systems a full 4GB of DRAM may be installed and reported by the DRAM controller. Whether these 4GB are larger available depends on the size/configuration of address decoding windows and architectural features.
This increases the fields holding the RAM size to have at least 33bits (i.e. we use a u64) and fixes the fallout from the change: some casts, the usage of
min()and a few printf formats have to be adjusted.Philipp Tomsich (9):
dm: allow 4GB of DRAM on 32bit systems
rockchip: support 4GB DRAM on 32bit systems
common: include <inttypes.h> always
MIPS: use PRIx64 macros for printing ram size
rockchip: rk3368: change type of ram-size field for a
min()-calculation
ram: stm32mp1: use PRIx64 macros for printing ram size
board: keymile: add explicit cast to truncate the 64bit ram size field
board:cm_fx6: use PRIx64 macros for printing ram size
mpc85xx: add casts for ram size inmin()calculation.
Quoted 13 lines
arch/arm/include/asm/arch-rockchip/sdram_common.h | 2 +- arch/arm/mach-rockchip/sdram_common.c | 8 ++++---- arch/arm/mach-stm32mp/dram_init.c | 2 +- arch/mips/mach-bmips/dram.c | 2 +- arch/powerpc/cpu/mpc85xx/cpu.c | 6 ++++-- board/compulab/cm_fx6/cm_fx6.c | 3 ++- board/keymile/km_arm/km_arm.c | 6 ++++-- drivers/ram/rockchip/dmc-rk3368.c | 2 +- drivers/ram/stm32mp1/stm32mp1_ram.c | 2 +- include/asm-generic/global_data.h | 2 +- include/common.h | 1 + include/ram.h | 9 ++++++++- 12 files changed, 29 insertions(+), 16 deletions(-)
Please rework this on top of
https://patchwork.ozlabs.org/user/todo/uboot/?series=59452 thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180810/ab559ac5/attachment.sig>