Skip to contentSkip to conversation

Adding support for the new Armada XP development board from Marvell

PATCH New Gregory CLEMENT 5 participants 24 messages Feb 4, 2013 – Mar 21, 2013

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

v4 cover Adding support for the new Armada XP development board from Marvell

Hello,

This is the forth version (the third was not the last one finally) of a patch set to add the dts support for new Armada XP development board from Marvell called DB-MV784MP-GP.

The branch GP-board is available at
https://github.com/MISL-EBU-System-SW/mainline-public.git

Changelog:
v3->v4:
- change the amount of memory in DTS to indicate the size actually present on the board
- add a patch which allow the kernel to receive the amount of memory available on the board using ATAG (for legacy bootloader such as the one currently used on Marvell boards).

V2->v3
- fixed typos in comments
- fixed the compatible string for the board and use marvell,axp-gp instead of marvell,axp-db which was already used by an other board
- fixed the model name by remove the colon

v2->v1:
- added tested-by from Simon Guinot and Florian Fainelli
- added some comments to emphasize that the amount of memory may change.
- named the board ``development board''

Gregory CLEMENT (2):
arm: mvebu: update defconfig with ATAG support when using DT
arm: mvebu: support for the new Armada XP development

    board(DB-MV784MP-GP)
 arch/arm/boot/dts/Makefile         |    1 +
 arch/arm/boot/dts/armada-xp-gp.dts |  101 ++++++++++++++++++++++++++++++++++++
 arch/arm/configs/mvebu_defconfig   |    1 +
 3 files changed, 103 insertions(+)
 create mode 100644 arch/arm/boot/dts/armada-xp-gp.dts
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v4 1/2 arm: mvebu: update defconfig with ATAG support when using DT

Some of the mvebu boards (mainly the development board) come with plug-in RAM modules. This patch allows to let the bootloaders which have no support for DTS to give the real amount of memory available on the board.

---
 arch/arm/configs/mvebu_defconfig |    1 +
 1 file changed, 1 insertion(+)
arch/arm/configs/mvebu_defconfig +1 -0
index b5bc96c..8ec2217 100644
@@ -21,6 +21,7 @@ CONFIG_HIGHMEM=y
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_ARM_APPENDED_DTB=y
+CONFIG_ARM_ATAG_DTB_COMPAT=y
 CONFIG_VFP=y
 CONFIG_NET=y
 CONFIG_INET=y
Signature · 1 line
1.7.9.5
Applied
#2 lore raw

PATCH v4 1/2 arm: mvebu: update defconfig with ATAG support when using DT

Quoted 9 lines · Gregory CLEMENT

Some of the mvebu boards (mainly the development board) come with plug-in RAM modules. This patch allows to let the bootloaders which have no support for DTS to give the real amount of memory available on the board.

---
 arch/arm/configs/mvebu_defconfig |    1 +
 1 file changed, 1 insertion(+)

Applied to mvebu/boards

thx,

Jason.

#3 lore raw

PATCH v4 2/2 arm: mvebu: support for the new Armada XP development board(DB-MV784MP-GP)

In reply to Gregory CLEMENT

This is the new Armada XP evaluation board from Marvell. It comes with a RS232 port over USB, a SATA link, an internal SSD, 4 Ethernet Gigabit links.

Support for USB (Host and device), SDIO, PCIe will be added as drivers when they become available for Armada XP in mainline.

---
 arch/arm/boot/dts/Makefile         |    1 +
 arch/arm/boot/dts/armada-xp-gp.dts |  101 ++++++++++++++++++++++++++++++++++++
 2 files changed, 102 insertions(+)
 create mode 100644 arch/arm/boot/dts/armada-xp-gp.dts
arch/arm/boot/dts/Makefile +1 -0
index 5ebb44f..51aab4b 100644
@@ -78,6 +78,7 @@ dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \
 dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
 	armada-370-mirabox.dtb \
 	armada-xp-db.dtb \
+	armada-xp-gp.dtb \
 	armada-xp-openblocks-ax3-4.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx51-babbage.dtb \
 	imx53-ard.dtb \
arch/arm/boot/dts/armada-xp-gp.dts new file +101 -0

101 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#4 lore raw

PATCH v4 2/2 arm: mvebu: support for the new Armada XP development board(DB-MV784MP-GP)

Quoted 7 lines · Gregory CLEMENT

This is the new Armada XP evaluation board from Marvell. It comes with a RS232 port over USB, a SATA link, an internal SSD, 4 Ethernet Gigabit links.

Support for USB (Host and device), SDIO, PCIe will be added as drivers when they become available for Armada XP in mainline.

Quoted 8 lines
---
 arch/arm/boot/dts/Makefile         |    1 +
 arch/arm/boot/dts/armada-xp-gp.dts |  101 ++++++++++++++++++++++++++++++++++++
 2 files changed, 102 insertions(+)
 create mode 100644 arch/arm/boot/dts/armada-xp-gp.dts

dammit. I missed v4 and applied v3 of this patch. The only difference is the size of RAM (I applied 3GB, v4 has 4GB). I'll go ahead and apply v4 ATAG defconfig (patch #1 of v4) to mvebu/boards. Then, we'll do a follow-up patch to -rc1 to correct the RAM size.

This is too small a change be worth going through and redoing /boards and /dt at this point.

Sorry about that.

thx,

Jason.

#5 lore raw

PATCH 1/1 ARM: mvebu: fix RAM size for Armada XP board DB-MV784MP-GP

The board is supplied with a 4GB RAM module. This value can be overridden by the bootloader based on probed memory size. We set it to a reasonable value here.

---
As promised, catching this fix in the -rc cycle.

For those not familiar, earlier versions of the patch adding this board listed 3GB because that is all that was visible. I mistaken applied v3 of the patch instead of v4 which properly listed 4GB. This patch cleans up my error.

 arch/arm/boot/dts/armada-xp-gp.dts | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
arch/arm/boot/dts/armada-xp-gp.dts +4 -5
index 1c8afe2..4a2776a 100644
@@ -28,12 +28,11 @@
 		device_type = "memory";
 
 		/*
-		 * 4 GB of plug-in RAM modules by default but only 3GB
-		 * are visible, the amount of memory available can be
-		 * changed by the bootloader according the size of the
-		 * module actually plugged
+		 * 4 GB of plug-in RAM modules by default. The amount of memory
+		 * available can be changed by the bootloader according the
+		 * size of the module actually plugged
 		 */
-		reg = <0x00000000 0xC0000000>;
+		reg = <0x00000000 0xD0000000>;
 	};
 
 	soc {
Signature · 1 line
1.8.1.5
#6 lore raw

PATCH 1/1 ARM: mvebu: fix RAM size for Armada XP board DB-MV784MP-GP

Hello.

Quoted 20 lines · Jason Cooper

The board is supplied with a 4GB RAM module. This value can be overridden by the bootloader based on probed memory size. We set it to a reasonable value here.

---
As promised, catching this fix in the -rc cycle.

For those not familiar, earlier versions of the patch adding this board listed 3GB because that is all that was visible. I mistaken applied v3 of the patch instead of v4 which properly listed 4GB. This patch cleans up my error.

  arch/arm/boot/dts/armada-xp-gp.dts | 9 ++++-----
  1 file changed, 4 insertions(+), 5 deletions(-)
arch/arm/boot/dts/armada-xp-gp.dts +0 -0
index 1c8afe2..4a2776a 100644

arch/arm/boot/dts/armada-xp-gp.dts line 32

Quoted 9 lines
arch/arm/boot/dts/armada-xp-gp.dts +2 -4
@@ -28,12 +28,11 @@
  		device_type = "memory";
 
  		/*
-		 * 4 GB of plug-in RAM modules by default but only 3GB
-		 * are visible, the amount of memory available can be
-		 * changed by the bootloader according the size of the
-		 * module actually plugged
+		 * 4 GB of plug-in RAM modules by default. The amount of memory
+		 * available can be changed by the bootloader according the

"According to the size".

arch/arm/boot/dts/armada-xp-gp.dts line 35

Quoted 4 lines
arch/arm/boot/dts/armada-xp-gp.dts +2 -1
+		 * size of the module actually plugged
  		 */
-		reg = <0x00000000 0xC0000000>;
+		reg = <0x00000000 0xD0000000>;

But this is not 4G?

arch/arm/boot/dts/armada-xp-gp.dts line 36

Quoted 1 line
arch/arm/boot/dts/armada-xp-gp.dts +0 -0
  	};

WBR, Sergei

#7 lore raw

PATCH 1/1 ARM: mvebu: fix RAM size for Armada XP board DB-MV784MP-GP

Quoted 36 lines · Sergei Shtylyov

Hello.

Quoted 20 lines · Jason Cooper

The board is supplied with a 4GB RAM module. This value can be overridden by the bootloader based on probed memory size. We set it to a reasonable value here.

---
As promised, catching this fix in the -rc cycle.

For those not familiar, earlier versions of the patch adding this board listed 3GB because that is all that was visible. I mistaken applied v3 of the patch instead of v4 which properly listed 4GB. This patch cleans up my error.

  arch/arm/boot/dts/armada-xp-gp.dts | 9 ++++-----
  1 file changed, 4 insertions(+), 5 deletions(-)
arch/arm/boot/dts/armada-xp-gp.dts +0 -0
index 1c8afe2..4a2776a 100644

arch/arm/boot/dts/armada-xp-gp.dts line 32

Quoted 9 lines
arch/arm/boot/dts/armada-xp-gp.dts +2 -4
@@ -28,12 +28,11 @@
  		device_type = "memory";
 
  		/*
-		 * 4 GB of plug-in RAM modules by default but only 3GB
-		 * are visible, the amount of memory available can be
-		 * changed by the bootloader according the size of the
-		 * module actually plugged
+		 * 4 GB of plug-in RAM modules by default. The amount of memory
+		 * available can be changed by the bootloader according the

"According to the size".

Quoted 6 lines

arch/arm/boot/dts/armada-xp-gp.dts line 35

Quoted 4 lines
arch/arm/boot/dts/armada-xp-gp.dts +2 -1
+		 * size of the module actually plugged
  		 */
-		reg = <0x00000000 0xC0000000>;
+		reg = <0x00000000 0xD0000000>;

But this is not 4G?

You're totally right!
It should be reg = <0x00000000 0xF0000000>;

Quoted 5 lines

arch/arm/boot/dts/armada-xp-gp.dts line 36

Quoted 2 lines
arch/arm/boot/dts/armada-xp-gp.dts +0 -0
  	};

WBR, Sergei

Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#8 lore raw

PATCH 1/1 ARM: mvebu: fix RAM size for Armada XP board DB-MV784MP-GP

Quoted 44 lines · Gregory CLEMENT
Quoted 36 lines · Sergei Shtylyov

Hello.

Quoted 20 lines · Jason Cooper

The board is supplied with a 4GB RAM module. This value can be overridden by the bootloader based on probed memory size. We set it to a reasonable value here.

---
As promised, catching this fix in the -rc cycle.

For those not familiar, earlier versions of the patch adding this board listed 3GB because that is all that was visible. I mistaken applied v3 of the patch instead of v4 which properly listed 4GB. This patch cleans up my error.

  arch/arm/boot/dts/armada-xp-gp.dts | 9 ++++-----
  1 file changed, 4 insertions(+), 5 deletions(-)
arch/arm/boot/dts/armada-xp-gp.dts +0 -0
index 1c8afe2..4a2776a 100644

arch/arm/boot/dts/armada-xp-gp.dts line 32

Quoted 9 lines
arch/arm/boot/dts/armada-xp-gp.dts +2 -4
@@ -28,12 +28,11 @@
  		device_type = "memory";
 
  		/*
-		 * 4 GB of plug-in RAM modules by default but only 3GB
-		 * are visible, the amount of memory available can be
-		 * changed by the bootloader according the size of the
-		 * module actually plugged
+		 * 4 GB of plug-in RAM modules by default. The amount of memory
+		 * available can be changed by the bootloader according the

"According to the size".

Quoted 6 lines

arch/arm/boot/dts/armada-xp-gp.dts line 35

Quoted 4 lines
arch/arm/boot/dts/armada-xp-gp.dts +2 -1
+		 * size of the module actually plugged
  		 */
-		reg = <0x00000000 0xC0000000>;
+		reg = <0x00000000 0xD0000000>;

But this is not 4G?

Quoted 2 lines

You're totally right!
It should be reg = <0x00000000 0xF0000000>;

$ printf "0x%08x\n" `echo "4 * (1024 ^ 3)" | bc`
0x100000000

?

thx,

Jason.

#9 lore raw

PATCH 1/1 ARM: mvebu: fix RAM size for Armada XP board DB-MV784MP-GP

In reply to Gregory CLEMENT
Quoted 9 lines · Gregory CLEMENT
Quoted 6 lines

arch/arm/boot/dts/armada-xp-gp.dts line 35

Quoted 4 lines
arch/arm/boot/dts/armada-xp-gp.dts +2 -1
+		 * size of the module actually plugged
  		 */
-		reg = <0x00000000 0xC0000000>;
+		reg = <0x00000000 0xD0000000>;

But this is not 4G?

You're totally right!
It should be reg = <0x00000000 0xF0000000>;

Isn't it 'right' as it is? The various included DT's put devices at address 0xd0008000 for instance, memory shouldn't overlap that..

Ie you loose the address space 0xD0000000 -> 0x100000000 due to internal registers.

If the HW supports > 32 bit physical addressing then you'd want to program the DDR mapping to put some of the DDR above the 4G limit.

Cheers,
Jason

#10 lore raw

PATCH 1/1 ARM: mvebu: fix RAM size for Armada XP board DB-MV784MP-GP

Quoted 9 lines · Jason Gunthorpe
Quoted 7 lines · Gregory CLEMENT
Quoted 6 lines

arch/arm/boot/dts/armada-xp-gp.dts line 35

Quoted 4 lines
arch/arm/boot/dts/armada-xp-gp.dts +2 -1
+		 * size of the module actually plugged
  		 */
-		reg = <0x00000000 0xC0000000>;
+		reg = <0x00000000 0xD0000000>;

But this is not 4G?

Quoted 5 lines
Quoted 2 lines

You're totally right!
It should be reg = <0x00000000 0xF0000000>;

Isn't it 'right' as it is? The various included DT's put devices at address 0xd0008000 for instance, memory shouldn't overlap that..

Shouldn't DT describe the hardware? The hardware has 4GB. How much of it Linux decides to use so as to avoid overlaps with registers etc, is not a hardware issue, but software.

Andrew

#11 lore raw

PATCH 1/1 ARM: mvebu: fix RAM size for Armada XP board DB-MV784MP-GP

Quoted 13 lines · Andrew Lunn
Quoted 12 lines · Jason Gunthorpe
Quoted 9 lines · Gregory CLEMENT
Quoted 6 lines

arch/arm/boot/dts/armada-xp-gp.dts line 35

Quoted 4 lines
arch/arm/boot/dts/armada-xp-gp.dts +2 -1
+		 * size of the module actually plugged
  		 */
-		reg = <0x00000000 0xC0000000>;
+		reg = <0x00000000 0xD0000000>;

But this is not 4G?

You're totally right!
It should be reg = <0x00000000 0xF0000000>;

Quoted 6 lines
Quoted 2 lines

Isn't it 'right' as it is? The various included DT's put devices at address 0xd0008000 for instance, memory shouldn't overlap that..

Shouldn't DT describe the hardware? The hardware has 4GB. How much of it Linux decides to use so as to avoid overlaps with registers etc, is not a hardware issue, but software.

Sure, but which HW? The 'reg' in 'memory' is not describing a DDR bus. It is describing the DDR address mapping registers in the SOC - and they are probably set for 0 -> 0xD0000000 by the firmware.

To describe the 4G of DDR you need DT nodes that show:
- The N DDR chip selects going to each DDR rank
- How much memory is in each DDR rank
- How each chip select is currently mapped into CPU address space

This is the minimal amount of information needed for Linux to reprogram the entire address map, if it so chooses.

To me, the *address map* in the DTB passed from the firwmare should reflect the state of the machine when the OS is started. That way an OS without drivers for the address map hardware will function properly.

Regards,
Jason

#12 lore raw

PATCH 1/1 ARM: mvebu: fix RAM size for Armada XP board DB-MV784MP-GP

In reply to Sergei Shtylyov
Quoted 26 lines · Sergei Shtylyov

Hello.

Quoted 22 lines · Jason Cooper

The board is supplied with a 4GB RAM module. This value can be overridden by the bootloader based on probed memory size. We set it to a reasonable value here.

---
As promised, catching this fix in the -rc cycle.

For those not familiar, earlier versions of the patch adding this board listed 3GB because that is all that was visible. I mistaken applied v3 of the patch instead of v4 which properly listed 4GB. This patch cleans up my error.

 arch/arm/boot/dts/armada-xp-gp.dts | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
arch/arm/boot/dts/armada-xp-gp.dts +0 -0
index 1c8afe2..4a2776a 100644
@@ -28,12 +28,11 @@
 		device_type = "memory";
 
Quoted 9 lines

arch/arm/boot/dts/armada-xp-gp.dts line 32

Quoted 7 lines
arch/arm/boot/dts/armada-xp-gp.dts +2 -4
 		/*
-		 * 4 GB of plug-in RAM modules by default but only 3GB
-		 * are visible, the amount of memory available can be
-		 * changed by the bootloader according the size of the
-		 * module actually plugged
+		 * 4 GB of plug-in RAM modules by default. The amount of memory
+		 * available can be changed by the bootloader according the

"According to the size".

ok.

Quoted 6 lines

arch/arm/boot/dts/armada-xp-gp.dts line 35

Quoted 4 lines
arch/arm/boot/dts/armada-xp-gp.dts +2 -1
+		 * size of the module actually plugged
 		 */
-		reg = <0x00000000 0xC0000000>;
+		reg = <0x00000000 0xD0000000>;

But this is not 4G?

Interesting, this was the value given in v4 of the original patch adding this board. I should have double-checked it. v2 on the way.

thx,

Jason.

#13 lore raw

PATCH 1/1 ARM: mvebu: fix RAM size for Armada XP board DB-MV784MP-GP

Quoted 46 lines · Jason Cooper
Quoted 26 lines · Sergei Shtylyov

Hello.

Quoted 22 lines · Jason Cooper

The board is supplied with a 4GB RAM module. This value can be overridden by the bootloader based on probed memory size. We set it to a reasonable value here.

---
As promised, catching this fix in the -rc cycle.

For those not familiar, earlier versions of the patch adding this board listed 3GB because that is all that was visible. I mistaken applied v3 of the patch instead of v4 which properly listed 4GB. This patch cleans up my error.

 arch/arm/boot/dts/armada-xp-gp.dts | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
arch/arm/boot/dts/armada-xp-gp.dts +0 -0
index 1c8afe2..4a2776a 100644
@@ -28,12 +28,11 @@
 		device_type = "memory";
 
Quoted 9 lines

arch/arm/boot/dts/armada-xp-gp.dts line 32

Quoted 7 lines
arch/arm/boot/dts/armada-xp-gp.dts +2 -4
 		/*
-		 * 4 GB of plug-in RAM modules by default but only 3GB
-		 * are visible, the amount of memory available can be
-		 * changed by the bootloader according the size of the
-		 * module actually plugged
+		 * 4 GB of plug-in RAM modules by default. The amount of memory
+		 * available can be changed by the bootloader according the

"According to the size".

ok.

Quoted 6 lines

arch/arm/boot/dts/armada-xp-gp.dts line 35

Quoted 4 lines
arch/arm/boot/dts/armada-xp-gp.dts +2 -1
+		 * size of the module actually plugged
 		 */
-		reg = <0x00000000 0xC0000000>;
+		reg = <0x00000000 0xD0000000>;

But this is not 4G?

Quoted 3 lines

Interesting, this was the value given in v4 of the original patch adding this board. I should have double-checked it. v2 on the way.

I was wrong in my initial version, all we can do in 32 bits is not 4GB but 4GB-1B:
reg = <0x00000000 0xFFFFFFFF>

Quoted 4 lines

thx,

Jason.

Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#14 lore raw

PATCH 1/1 ARM: mvebu: fix RAM size for Armada XP board DB-MV784MP-GP

Quoted 47 lines · Gregory CLEMENT
Quoted 46 lines · Jason Cooper
Quoted 26 lines · Sergei Shtylyov

Hello.

Quoted 22 lines · Jason Cooper

The board is supplied with a 4GB RAM module. This value can be overridden by the bootloader based on probed memory size. We set it to a reasonable value here.

---
As promised, catching this fix in the -rc cycle.

For those not familiar, earlier versions of the patch adding this board listed 3GB because that is all that was visible. I mistaken applied v3 of the patch instead of v4 which properly listed 4GB. This patch cleans up my error.

 arch/arm/boot/dts/armada-xp-gp.dts | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
arch/arm/boot/dts/armada-xp-gp.dts +0 -0
index 1c8afe2..4a2776a 100644
@@ -28,12 +28,11 @@
 		device_type = "memory";
 
Quoted 9 lines

arch/arm/boot/dts/armada-xp-gp.dts line 32

Quoted 7 lines
arch/arm/boot/dts/armada-xp-gp.dts +2 -4
 		/*
-		 * 4 GB of plug-in RAM modules by default but only 3GB
-		 * are visible, the amount of memory available can be
-		 * changed by the bootloader according the size of the
-		 * module actually plugged
+		 * 4 GB of plug-in RAM modules by default. The amount of memory
+		 * available can be changed by the bootloader according the

"According to the size".

ok.

Quoted 6 lines

arch/arm/boot/dts/armada-xp-gp.dts line 35

Quoted 4 lines
arch/arm/boot/dts/armada-xp-gp.dts +2 -1
+		 * size of the module actually plugged
 		 */
-		reg = <0x00000000 0xC0000000>;
+		reg = <0x00000000 0xD0000000>;

But this is not 4G?

Quoted 6 lines
Quoted 3 lines

Interesting, this was the value given in v4 of the original patch adding this board. I should have double-checked it. v2 on the way.

I was wrong in my initial version, all we can do in 32 bits is not 4GB but 4GB-1B:
reg = <0x00000000 0xFFFFFFFF>

hmmm, with the impending conquering of the server market by ARM, you'd think we'd at least be able to parse a 64 bit integer...

thx,

Jason.

#15 lore raw

PATCH 1/1 ARM: mvebu: fix RAM size for Armada XP board DB-MV784MP-GP

Quoted 5 lines · Jason Cooper
Quoted 2 lines

I was wrong in my initial version, all we can do in 32 bits is not 4GB but 4GB-1B: reg = <0x00000000 0xFFFFFFFF>

hmmm, with the impending conquering of the server market by ARM, you'd think we'd at least be able to parse a 64 bit integer...

AFAIK, it would be like this:

/ {
        #address-cells = <2>;
        #size-cells = <2>;
        memory {
                device_type = "memory";
                reg = <0 0  1 0>;
        };

And the other children nodes must be revised to support the 2 dw address and size..

Regards,
Jason

#16 lore raw

PATCH 1/1 ARM: mvebu: fix RAM size for Armada XP board DB-MV784MP-GP

Quoted 18 lines · Jason Gunthorpe
Quoted 5 lines · Jason Cooper
Quoted 2 lines

I was wrong in my initial version, all we can do in 32 bits is not 4GB but 4GB-1B: reg = <0x00000000 0xFFFFFFFF>

hmmm, with the impending conquering of the server market by ARM, you'd think we'd at least be able to parse a 64 bit integer...

AFAIK, it would be like this:

/ {
        #address-cells = <2>;
        #size-cells = <2>;
        memory {
                device_type = "memory";
                reg = <0 0  1 0>;
        };
Quoted 2 lines

And the other children nodes must be revised to support the 2 dw address and size..

Agreed, but that's a pretty invasive change for a fix. I'll go with 0xFFFFFFFF for now, and look forward to LPAE support including proper 64bit values.

thx,

Jason.

#17 lore raw

PATCH v2 1/1 ARM: mvebu: fix RAM size for Armada XP board DB-MV784MP-GP

In reply to Jason Cooper

The board is supplied with a 4GB RAM module. This value can be overridden by the bootloader based on probed memory size. We set it to a reasonable value here.

---
Changes from v1:
- grammatical fix suggested by Sergei Shtylyov
- correct size suggested by several folks (within 32bit, 1 dword)

As promised, catching this fix in the -rc cycle.

For those not familiar, earlier versions of the patch adding this board listed 3GB because that is all that was visible. I mistaken applied v3 of the patch instead of v4 which properly listed 4GB. This patch cleans up my error.

 arch/arm/boot/dts/armada-xp-gp.dts | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
arch/arm/boot/dts/armada-xp-gp.dts +4 -5
index 1c8afe2..7a7b6ee 100644
@@ -28,12 +28,11 @@
 		device_type = "memory";
 
 		/*
-		 * 4 GB of plug-in RAM modules by default but only 3GB
-		 * are visible, the amount of memory available can be
-		 * changed by the bootloader according the size of the
-		 * module actually plugged
+		 * 4 GB of plug-in RAM modules by default. The amount of memory
+		 * available can be changed by the bootloader according to the
+		 * size of the module actually plugged
 		 */
-		reg = <0x00000000 0xC0000000>;
+		reg = <0x00000000 0xFFFFFFFF>;
 	};
 
 	soc {
Signature · 1 line
1.8.1.5
#18 lore raw

PATCH v2 1/1 ARM: mvebu: fix RAM size for Armada XP board DB-MV784MP-GP

Quoted 9 lines · Jason Cooper

The board is supplied with a 4GB RAM module. This value can be overridden by the bootloader based on probed memory size. We set it to a reasonable value here.

Changes from v1:
- grammatical fix suggested by Sergei Shtylyov
- correct size suggested by several folks (within 32bit, 1 dword)

Quoted 5 lines

As promised, catching this fix in the -rc cycle.

For those not familiar, earlier versions of the patch adding this board listed 3GB because that is all that was visible. I mistaken applied v3 of the patch instead of v4 which properly listed 4GB. This patch cleans up my error.

What happens when the kernel tries to treat 0xD0000000 and above as memory? Lots of internal register blocks overlap 0 -> 4GB - won't this cause resource conflicts on boot? I'm actually very surprised it boots at all - what does /proc/iomem say?

Jason

#19 lore raw

PATCH v2 1/1 ARM: mvebu: fix RAM size for Armada XP board DB-MV784MP-GP

Quoted 12 lines · Jason Gunthorpe
Quoted 11 lines · Jason Cooper

The board is supplied with a 4GB RAM module. This value can be overridden by the bootloader based on probed memory size. We set it to a reasonable value here.

Changes from v1:
- grammatical fix suggested by Sergei Shtylyov
- correct size suggested by several folks (within 32bit, 1 dword)

As promised, catching this fix in the -rc cycle.

Quoted 8 lines
Quoted 3 lines

For those not familiar, earlier versions of the patch adding this board listed 3GB because that is all that was visible. I mistaken applied v3 of the patch instead of v4 which properly listed 4GB. This patch cleans up my error.

What happens when the kernel tries to treat 0xD0000000 and above as memory? Lots of internal register blocks overlap 0 -> 4GB - won't this cause resource conflicts on boot? I'm actually very surprised it boots at all - what does /proc/iomem say?

We'll have to wait to hear from Gregory or Florian on that. They are the only two I know of who have this board. I can only compile-test.

thx,

Jason.

#20 lore raw

PATCH v2 1/1 ARM: mvebu: fix RAM size for Armada XP board DB-MV784MP-GP

Quoted 17 lines · Jason Cooper
Quoted 16 lines · Jason Gunthorpe
Quoted 14 lines · Jason Cooper

The board is supplied with a 4GB RAM module. This value can be overridden by the bootloader based on probed memory size. We set it to a reasonable value here.

Changes from v1:
- grammatical fix suggested by Sergei Shtylyov
- correct size suggested by several folks (within 32bit, 1 dword)

As promised, catching this fix in the -rc cycle.

For those not familiar, earlier versions of the patch adding this board listed 3GB because that is all that was visible. I mistaken applied v3 of the patch instead of v4 which properly listed 4GB. This patch cleans up my error.

Quoted 8 lines
Quoted 4 lines

What happens when the kernel tries to treat 0xD0000000 and above as memory? Lots of internal register blocks overlap 0 -> 4GB - won't this cause resource conflicts on boot? I'm actually very surprised it boots at all - what does /proc/iomem say?

We'll have to wait to hear from Gregory or Florian on that. They are the only two I know of who have this board. I can only compile-test.

Indeed there are conflicts with the internals registers. I was too focused on the size of the RAM itslelf and I forgotten that if we use the 4GB we have no more address space for the internal registers themselves.
Even with LPAE we will need to leave a "hole" from 0xD0000000 to 0x100000000 for these registers.

So to conclude, currently, if we try to boot the Armada XP GP board with reg = <0x00000000 0xFFFFFFFF>, the kernel crash, even if there is 4GB of RAM.

Quoted 4 lines

thx,

Jason.

Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#21 lore raw

PATCH v2 1/1 ARM: mvebu: fix RAM size for Armada XP board DB-MV784MP-GP

Quoted 33 lines · Gregory CLEMENT
Quoted 17 lines · Jason Cooper
Quoted 16 lines · Jason Gunthorpe
Quoted 14 lines · Jason Cooper

The board is supplied with a 4GB RAM module. This value can be overridden by the bootloader based on probed memory size. We set it to a reasonable value here.

Changes from v1:
- grammatical fix suggested by Sergei Shtylyov
- correct size suggested by several folks (within 32bit, 1 dword)

As promised, catching this fix in the -rc cycle.

For those not familiar, earlier versions of the patch adding this board listed 3GB because that is all that was visible. I mistaken applied v3 of the patch instead of v4 which properly listed 4GB. This patch cleans up my error.

Quoted 8 lines
Quoted 4 lines

What happens when the kernel tries to treat 0xD0000000 and above as memory? Lots of internal register blocks overlap 0 -> 4GB - won't this cause resource conflicts on boot? I'm actually very surprised it boots at all - what does /proc/iomem say?

We'll have to wait to hear from Gregory or Florian on that. They are the only two I know of who have this board. I can only compile-test.

Indeed there are conflicts with the internals registers. I was too focused on the size of the RAM itslelf and I forgotten that if we use the 4GB we have no more address space for the internal registers themselves.
Even with LPAE we will need to leave a "hole" from 0xD0000000 to 0x100000000 for these registers.

Quoted 3 lines

So to conclude, currently, if we try to boot the Armada XP GP board with reg = <0x00000000 0xFFFFFFFF>, the kernel crash, even if there is 4GB of RAM.

Ok, so for now, we'll go with <0x00000000 0xD0000000>.

thx,

Jason.

#22 lore raw

PATCH v3 1/1 ARM: mvebu: fix RAM size for Armada XP board DB-MV784MP-GP

In reply to Jason Cooper

The board is supplied with a 4GB RAM module. This value can be overridden by the bootloader based on probed memory size. We set it to a reasonable value here.

---
Changes from v2:
- trimmed size to not conflict with internal register addresses, added comment. Thanks to Jason Gunthorpe for raising this and Gregory Clement for confirming.

Changes from v1:
- grammatical fix suggested by Sergei Shtylyov
- correct size suggested by several folks (within 32bit, 1 dword)

As promised, catching this fix in the -rc cycle.

For those not familiar, earlier versions of the patch adding this board listed 3GB because that is all that was visible. I mistaken applied v3 of the patch instead of v4 which properly listed 4GB. This patch cleans up my error.

 arch/arm/boot/dts/armada-xp-gp.dts | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
arch/arm/boot/dts/armada-xp-gp.dts +7 -5
index 1c8afe2..b2d7804 100644
@@ -28,12 +28,14 @@
 		device_type = "memory";
 
 		/*
-		 * 4 GB of plug-in RAM modules by default but only 3GB
-		 * are visible, the amount of memory available can be
-		 * changed by the bootloader according the size of the
-		 * module actually plugged
+		 * 4 GB of plug-in RAM modules by default. The amount of memory
+		 * available can be changed by the bootloader according to the
+		 * size of the module actually plugged
+		 *
+		 * Clipped at 0xD0000000 since this is the start of the internal
+		 * registers.
 		 */
-		reg = <0x00000000 0xC0000000>;
+		reg = <0x00000000 0xD0000000>;
 	};
 
 	soc {
Signature · 1 line
1.8.1.5
#23 lore raw

PATCH v3 1/1 ARM: mvebu: fix RAM size for Armada XP board DB-MV784MP-GP

Quoted 16 lines · Jason Cooper

The board is supplied with a 4GB RAM module. This value can be overridden by the bootloader based on probed memory size. We set it to a reasonable value here.

---
Changes from v2:
- trimmed size to not conflict with internal register addresses, added comment. Thanks to Jason Gunthorpe for raising this and Gregory Clement for confirming.

Changes from v1:
- grammatical fix suggested by Sergei Shtylyov
- correct size suggested by several folks (within 32bit, 1 dword)

As promised, catching this fix in the -rc cycle.

Quoted 7 lines

For those not familiar, earlier versions of the patch adding this board listed 3GB because that is all that was visible. I mistaken applied v3 of the patch instead of v4 which properly listed 4GB. This patch cleans up my error.

 arch/arm/boot/dts/armada-xp-gp.dts | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

I'm going to hang on to this since there is a pretty good chance the LPAE code posted today will make it in this window and supercedes this.

thx,

Jason.

Quoted 33 lines
arch/arm/boot/dts/armada-xp-gp.dts +7 -5
index 1c8afe2..b2d7804 100644
@@ -28,12 +28,14 @@
 		device_type = "memory";
 
 		/*
-		 * 4 GB of plug-in RAM modules by default but only 3GB
-		 * are visible, the amount of memory available can be
-		 * changed by the bootloader according the size of the
-		 * module actually plugged
+		 * 4 GB of plug-in RAM modules by default. The amount of memory
+		 * available can be changed by the bootloader according to the
+		 * size of the module actually plugged
+		 *
+		 * Clipped at 0xD0000000 since this is the start of the internal
+		 * registers.
 		 */
-		reg = <0x00000000 0xC0000000>;
+		reg = <0x00000000 0xD0000000>;
 	};
 
 	soc {
Signature · 7 lines
1.8.1.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel