diff mbox

[v2,01/05] ARM: shmobile: kzm9g-reference: 0x48008000 load address

Message ID 20141217094214.7039.68681.sendpatchset@w520 (mailing list archive)
State Deferred
Delegated to: Simon Horman
Headers show

Commit Message

Magnus Damm Dec. 17, 2014, 9:42 a.m. UTC
From: Magnus Damm <damm+renesas@opensource.se>

Adjust the load address for the KZM9G DT reference case
to make it compatible with upcoming sh73a0 Multiplatform
and CONFIG_AUTO_ZRELADDR=y.

Without the not-yet-merged sh73a0 multiplatform support
the KZM9G uImage can be built without any special care,
but once we go DTS-only then the Makefile.boot entry will
disappear and the Multiplatform image will be built using
CONFIG_AUTO_ZRELADDR=y. To generate an uImage for KZM9G
the following example can be followed:

$ make ARCH=arm LOADADDR=0x48008000 uImage

For now simply adjust the non-multiplatform KZM9G DT
reference implementation to be compatible with ZRELADDR.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---

 arch/arm/mach-shmobile/Makefile.boot |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Geert Uytterhoeven Dec. 17, 2014, 9:48 a.m. UTC | #1
Hi Magnus,

On Wed, Dec 17, 2014 at 10:42 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
> From: Magnus Damm <damm+renesas@opensource.se>
>
> Adjust the load address for the KZM9G DT reference case
> to make it compatible with upcoming sh73a0 Multiplatform
> and CONFIG_AUTO_ZRELADDR=y.
>
> Without the not-yet-merged sh73a0 multiplatform support
> the KZM9G uImage can be built without any special care,
> but once we go DTS-only then the Makefile.boot entry will
> disappear and the Multiplatform image will be built using
> CONFIG_AUTO_ZRELADDR=y. To generate an uImage for KZM9G
> the following example can be followed:
>
> $ make ARCH=arm LOADADDR=0x48008000 uImage
>
> For now simply adjust the non-multiplatform KZM9G DT
> reference implementation to be compatible with ZRELADDR.
>
> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>

Does this mean it now boots with reg = <0x41000000 0x1e800000>
in the memory node, and
[PATCH/RFC 1/2] ARM: shmobile: kzm9g dts: Declare the full 512 MiB of RAM
http://www.spinics.net/lists/linux-sh/msg37196.html
[PATCH/RFC 2/2] ARM: shmobile: kzm9g-reference dts: Declare the full
512 MiB of RAM
http://www.spinics.net/lists/linux-sh/msg37195.html
are not needed?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Magnus Damm Dec. 17, 2014, 9:51 a.m. UTC | #2
Hi Geert,

On Wed, Dec 17, 2014 at 6:48 PM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> Hi Magnus,
>
> On Wed, Dec 17, 2014 at 10:42 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
>> From: Magnus Damm <damm+renesas@opensource.se>
>>
>> Adjust the load address for the KZM9G DT reference case
>> to make it compatible with upcoming sh73a0 Multiplatform
>> and CONFIG_AUTO_ZRELADDR=y.
>>
>> Without the not-yet-merged sh73a0 multiplatform support
>> the KZM9G uImage can be built without any special care,
>> but once we go DTS-only then the Makefile.boot entry will
>> disappear and the Multiplatform image will be built using
>> CONFIG_AUTO_ZRELADDR=y. To generate an uImage for KZM9G
>> the following example can be followed:
>>
>> $ make ARCH=arm LOADADDR=0x48008000 uImage
>>
>> For now simply adjust the non-multiplatform KZM9G DT
>> reference implementation to be compatible with ZRELADDR.
>>
>> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
>
> Does this mean it now boots with reg = <0x41000000 0x1e800000>
> in the memory node, and
> [PATCH/RFC 1/2] ARM: shmobile: kzm9g dts: Declare the full 512 MiB of RAM
> http://www.spinics.net/lists/linux-sh/msg37196.html
> [PATCH/RFC 2/2] ARM: shmobile: kzm9g-reference dts: Declare the full
> 512 MiB of RAM
> http://www.spinics.net/lists/linux-sh/msg37195.html
> are not needed?

Thanks, but I believe they are not needed.

The new load address is compatible with the ZRELADDR 0xf8000000 mask
and that's all it takes.

I may be wrong though, let me know if you run into trouble.

Cheers,

/ magnus
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Geert Uytterhoeven Dec. 17, 2014, 12:36 p.m. UTC | #3
Hi Magnus,

On Wed, Dec 17, 2014 at 10:51 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
> On Wed, Dec 17, 2014 at 6:48 PM, Geert Uytterhoeven
> <geert@linux-m68k.org> wrote:
>> On Wed, Dec 17, 2014 at 10:42 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
>>> From: Magnus Damm <damm+renesas@opensource.se>
>>>
>>> Adjust the load address for the KZM9G DT reference case
>>> to make it compatible with upcoming sh73a0 Multiplatform
>>> and CONFIG_AUTO_ZRELADDR=y.
>>>
>>> Without the not-yet-merged sh73a0 multiplatform support
>>> the KZM9G uImage can be built without any special care,
>>> but once we go DTS-only then the Makefile.boot entry will
>>> disappear and the Multiplatform image will be built using
>>> CONFIG_AUTO_ZRELADDR=y. To generate an uImage for KZM9G
>>> the following example can be followed:
>>>
>>> $ make ARCH=arm LOADADDR=0x48008000 uImage
>>>
>>> For now simply adjust the non-multiplatform KZM9G DT
>>> reference implementation to be compatible with ZRELADDR.
>>>
>>> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
>>
>> Does this mean it now boots with reg = <0x41000000 0x1e800000>
>> in the memory node, and
>> [PATCH/RFC 1/2] ARM: shmobile: kzm9g dts: Declare the full 512 MiB of RAM
>> http://www.spinics.net/lists/linux-sh/msg37196.html
>> [PATCH/RFC 2/2] ARM: shmobile: kzm9g-reference dts: Declare the full
>> 512 MiB of RAM
>> http://www.spinics.net/lists/linux-sh/msg37195.html
>> are not needed?
>
> Thanks, but I believe they are not needed.
>
> The new load address is compatible with the ZRELADDR 0xf8000000 mask
> and that's all it takes.
>
> I may be wrong though, let me know if you run into trouble.

Oops, I hadn't noticed this is for CONFIG_MACH_KZM9G_REFERENCE,
so this not used for not multi-platform.

Hence no change is made for multi-platform.
How can the memory address in the DTS of 0x41000000 work with
CONFIG_AUTO_ZRELADDR?

Do you boot a zImage or a uImage?

I usually use a zImage with appended DTB on kzm9g. It fails as before:

TFTP from server 192.168.97.21; our IP address is 192.168.97.35
Filename 'kzm9g/zImage.dtb'.
Load address: 0x43000000
Loading: #################################################################
         #################################################################
         ###############################################################
done
Bytes transferred = 2829743 (2b2daf hex)

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 3.18.0-kzm9g-multiplatform-11069-g3086a70162bdec42
(geert@ramsan) (gcc version 4.9.0 (GCC) ) #274 SMP Wed Dec 17 13:28:08
CET 2014
CPU: ARMv7 Processor [412fc098] revision 8 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: KZM-A9-GT
bootconsole [earlycon0] enabled
debug: ignoring loglevel setting.
Memory policy: Data cache writealloc
On node 0 totalpages: 124928
free_area_init_node: node 0, pgdat c058f640, node_mem_map df428000
  Normal zone: 976 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 124928 pages, LIFO batch:31

When trying with a uImage with the "new" load address i.e.

make ARCH=arm LOADADDR=0x48008000 uImage

it still fails:

TFTP from server 192.168.97.21; our IP address is 192.168.97.35
Filename 'kzm9g/uImage'.
Load address: 0x43000000
Loading: #################################################################
         #################################################################
         ##############################################################
done
Bytes transferred = 2811440 (2ae630 hex)
KZM-A9-GT# tftp 0x50000000 kzm9g/sh73a0-kzm9g.dtb
smc911x: detected LAN9221 controller
smc911x: phy initialized
smc911x: MAC 00:01:9b:04:04:20
Using smc911x-0 device
TFTP from server 192.168.97.21; our IP address is 192.168.97.35
Filename 'kzm9g/sh73a0-kzm9g.dtb'.
Load address: 0x50000000
Loading: ##
done
Bytes transferred = 18367 (47bf hex)
KZM-A9-GT# bootm 0x43000000 - 0x50000000
## Booting kernel from Legacy Image at 43000000 ...
   Image Name:   Linux-3.18.0-kzm9g-multiplatform
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2811376 Bytes = 2.7 MiB
   Load Address: 48008000
   Entry Point:  48008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 50000000
   Booting using the fdt blob at 0x50000000
   Loading Kernel Image ... OK
OK
   Loading Device Tree to 417f8000, end 417ff7be ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 3.18.0-kzm9g-multiplatform-11069-g3086a70162bdec42
(geert@ramsan) (gcc version 4.9.0 (GCC) ) #274 SMP Wed Dec 17 13:28:08
CET 2014
CPU: ARMv7 Processor [412fc098] revision 8 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: KZM-A9-GT
Ignoring memory range 0x41000000 - 0x48000000
bootconsole [earlycon0] enabled
debug: ignoring loglevel setting.
Memory policy: Data cache writealloc
On node 0 totalpages: 98304
free_area_init_node: node 0, pgdat c058f640, node_mem_map d7cf8000
  Normal zone: 768 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 98304 pages, LIFO batch:31
Unable to handle kernel paging request at virtual address b97f8000
pgd = c0004000
[b97f8000] *pgd=00000000
Internal error: Oops: 5 [#1] SMP ARM
Modules linked in:
CPU: 0 PID: 0 Comm: swapper Not tainted
3.18.0-kzm9g-multiplatform-11069-g3086a70162bdec42 #274
Hardware name: Generic SH73A0 (Flattened Device Tree)
task: c0562968 ti: c0558000 task.ti: c0558000
PC is at fdt_check_header+0xc/0x80
LR is at __unflatten_device_tree+0x24/0xf4

Am I missing something?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Magnus Damm Dec. 17, 2014, 1:08 p.m. UTC | #4
Hi Geert,

On Wed, Dec 17, 2014 at 9:36 PM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> Hi Magnus,
>
> On Wed, Dec 17, 2014 at 10:51 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
>> On Wed, Dec 17, 2014 at 6:48 PM, Geert Uytterhoeven
>> <geert@linux-m68k.org> wrote:
>>> On Wed, Dec 17, 2014 at 10:42 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
>>>> From: Magnus Damm <damm+renesas@opensource.se>
>>>>
>>>> Adjust the load address for the KZM9G DT reference case
>>>> to make it compatible with upcoming sh73a0 Multiplatform
>>>> and CONFIG_AUTO_ZRELADDR=y.
>>>>
>>>> Without the not-yet-merged sh73a0 multiplatform support
>>>> the KZM9G uImage can be built without any special care,
>>>> but once we go DTS-only then the Makefile.boot entry will
>>>> disappear and the Multiplatform image will be built using
>>>> CONFIG_AUTO_ZRELADDR=y. To generate an uImage for KZM9G
>>>> the following example can be followed:
>>>>
>>>> $ make ARCH=arm LOADADDR=0x48008000 uImage
>>>>
>>>> For now simply adjust the non-multiplatform KZM9G DT
>>>> reference implementation to be compatible with ZRELADDR.
>>>>
>>>> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
>>>
>>> Does this mean it now boots with reg = <0x41000000 0x1e800000>
>>> in the memory node, and
>>> [PATCH/RFC 1/2] ARM: shmobile: kzm9g dts: Declare the full 512 MiB of RAM
>>> http://www.spinics.net/lists/linux-sh/msg37196.html
>>> [PATCH/RFC 2/2] ARM: shmobile: kzm9g-reference dts: Declare the full
>>> 512 MiB of RAM
>>> http://www.spinics.net/lists/linux-sh/msg37195.html
>>> are not needed?
>>
>> Thanks, but I believe they are not needed.
>>
>> The new load address is compatible with the ZRELADDR 0xf8000000 mask
>> and that's all it takes.
>>
>> I may be wrong though, let me know if you run into trouble.
>
> Oops, I hadn't noticed this is for CONFIG_MACH_KZM9G_REFERENCE,
> so this not used for not multi-platform.

Right. We have no space to store this kind of information in case of
multiplatform. So I thought I'd fix up the legacy DT reference case
first and store that in the commit log.

> Hence no change is made for multi-platform.
> How can the memory address in the DTS of 0x41000000 work with
> CONFIG_AUTO_ZRELADDR?

So the address 0x4100xxxx is the start address for the memory bank.
The AUTO_ZRELADDR code doesn't care about that, instead it only looks
at what the PC value happens to be and masks it with 0xf800xxxx. So
with the new 0x4800xxxx load address the result will still be
0x4800xxxx which means it will not go outside our defined range. With
the "old" load address the mask results in that the destination
becomes a value below 0x4100xxxx.

> Do you boot a zImage or a uImage?

uImage built from zImage with appended DTB.

These 4 steps actually:
rm arch/arm/boot/zImage
make -j 9 ARCH=arm CROSS_COMPILE=_ dtbs zImage
cat arch/arm/boot/dts/sh73a0-kzm9g.dtb >> arch/arm/boot/zImage
make -j 9 ARCH=arm CROSS_COMPILE=_ LOADADDR=0x48008000 uImage

> I usually use a zImage with appended DTB on kzm9g. It fails as before:
>
> TFTP from server 192.168.97.21; our IP address is 192.168.97.35
> Filename 'kzm9g/zImage.dtb'.
> Load address: 0x43000000
> Loading: #################################################################
>          #################################################################
>          ###############################################################
> done
> Bytes transferred = 2829743 (2b2daf hex)
>
> Starting kernel ...
>
> Uncompressing Linux... done, booting the kernel.
> Booting Linux on physical CPU 0x0
> Linux version 3.18.0-kzm9g-multiplatform-11069-g3086a70162bdec42
> (geert@ramsan) (gcc version 4.9.0 (GCC) ) #274 SMP Wed Dec 17 13:28:08
> CET 2014
> CPU: ARMv7 Processor [412fc098] revision 8 (ARMv7), cr=10c5387d
> CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
> Machine model: KZM-A9-GT
> bootconsole [earlycon0] enabled
> debug: ignoring loglevel setting.
> Memory policy: Data cache writealloc
> On node 0 totalpages: 124928
> free_area_init_node: node 0, pgdat c058f640, node_mem_map df428000
>   Normal zone: 976 pages used for memmap
>   Normal zone: 0 pages reserved
>   Normal zone: 124928 pages, LIFO batch:31

Wow, earlycon. Luxury. =)
The string above says "kzm9g-multiplatform". Did you try legacy or DT
reference without CCF?

> When trying with a uImage with the "new" load address i.e.
>
> make ARCH=arm LOADADDR=0x48008000 uImage
>
> it still fails:
>
> TFTP from server 192.168.97.21; our IP address is 192.168.97.35
> Filename 'kzm9g/uImage'.
> Load address: 0x43000000
> Loading: #################################################################
>          #################################################################
>          ##############################################################
> done
> Bytes transferred = 2811440 (2ae630 hex)
> KZM-A9-GT# tftp 0x50000000 kzm9g/sh73a0-kzm9g.dtb
> smc911x: detected LAN9221 controller
> smc911x: phy initialized
> smc911x: MAC 00:01:9b:04:04:20
> Using smc911x-0 device
> TFTP from server 192.168.97.21; our IP address is 192.168.97.35
> Filename 'kzm9g/sh73a0-kzm9g.dtb'.
> Load address: 0x50000000
> Loading: ##
> done
> Bytes transferred = 18367 (47bf hex)
> KZM-A9-GT# bootm 0x43000000 - 0x50000000
> ## Booting kernel from Legacy Image at 43000000 ...
>    Image Name:   Linux-3.18.0-kzm9g-multiplatform
>    Image Type:   ARM Linux Kernel Image (uncompressed)
>    Data Size:    2811376 Bytes = 2.7 MiB
>    Load Address: 48008000
>    Entry Point:  48008000
>    Verifying Checksum ... OK
> ## Flattened Device Tree blob at 50000000
>    Booting using the fdt blob at 0x50000000
>    Loading Kernel Image ... OK
> OK
>    Loading Device Tree to 417f8000, end 417ff7be ... OK
>
> Starting kernel ...
>
> Uncompressing Linux... done, booting the kernel.
> Booting Linux on physical CPU 0x0
> Linux version 3.18.0-kzm9g-multiplatform-11069-g3086a70162bdec42
> (geert@ramsan) (gcc version 4.9.0 (GCC) ) #274 SMP Wed Dec 17 13:28:08
> CET 2014
> CPU: ARMv7 Processor [412fc098] revision 8 (ARMv7), cr=10c5387d
> CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
> Machine model: KZM-A9-GT
> Ignoring memory range 0x41000000 - 0x48000000
> bootconsole [earlycon0] enabled
> debug: ignoring loglevel setting.
> Memory policy: Data cache writealloc
> On node 0 totalpages: 98304
> free_area_init_node: node 0, pgdat c058f640, node_mem_map d7cf8000
>   Normal zone: 768 pages used for memmap
>   Normal zone: 0 pages reserved
>   Normal zone: 98304 pages, LIFO batch:31
> Unable to handle kernel paging request at virtual address b97f8000
> pgd = c0004000
> [b97f8000] *pgd=00000000
> Internal error: Oops: 5 [#1] SMP ARM
> Modules linked in:
> CPU: 0 PID: 0 Comm: swapper Not tainted
> 3.18.0-kzm9g-multiplatform-11069-g3086a70162bdec42 #274
> Hardware name: Generic SH73A0 (Flattened Device Tree)
> task: c0562968 ti: c0558000 task.ti: c0558000
> PC is at fdt_check_header+0xc/0x80
> LR is at __unflatten_device_tree+0x24/0xf4
>
> Am I missing something?

You seem to be using "bootm 0x43000000 - 0x50000000".
In my case I simply use "bootp; bootm". I also tend to use appended
DTB and compile-in the command line to rely on the boot loader as
little as ever possible.

One thing that bit me for quite some time was when handling the case
CONFIG_AUTO_ZRELADDR=n. I built the zImage using my steps above but I
did not pass the LOADADDR when building the zImage - so the
"zreladdr-y" value in Makefile.boot was still the default value which
ended up in the kernel image. What I mistakenly ended up doing was to
only adjust the uImage load address. And your bootm line above has
even more magic to it - so you may have 3 different versions... =)

Once I made sure to keep those load addresses in sync and/or set
CONFIG_AUTO_ZRELADDR=y then things worked much better.

Cheers,

/ magnus
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Geert Uytterhoeven Dec. 17, 2014, 1:35 p.m. UTC | #5
Hi Magnus,

On Wed, Dec 17, 2014 at 2:08 PM, Magnus Damm <magnus.damm@gmail.com> wrote:
>> Do you boot a zImage or a uImage?
>
> uImage built from zImage with appended DTB.
>
> These 4 steps actually:
> rm arch/arm/boot/zImage
> make -j 9 ARCH=arm CROSS_COMPILE=_ dtbs zImage
> cat arch/arm/boot/dts/sh73a0-kzm9g.dtb >> arch/arm/boot/zImage
> make -j 9 ARCH=arm CROSS_COMPILE=_ LOADADDR=0x48008000 uImage

Thanks, that works!
But the machine lost 128 MiB of RAM, compared to adjusting the "reg" property
of the memory node :-(

>> I usually use a zImage with appended DTB on kzm9g. It fails as before:

>> Uncompressing Linux... done, booting the kernel.
>> Booting Linux on physical CPU 0x0
>> Linux version 3.18.0-kzm9g-multiplatform-11069-g3086a70162bdec42
>> (geert@ramsan) (gcc version 4.9.0 (GCC) ) #274 SMP Wed Dec 17 13:28:08
>> CET 2014
>> CPU: ARMv7 Processor [412fc098] revision 8 (ARMv7), cr=10c5387d
>> CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
>> Machine model: KZM-A9-GT
>> bootconsole [earlycon0] enabled
>> debug: ignoring loglevel setting.
>> Memory policy: Data cache writealloc
>> On node 0 totalpages: 124928
>> free_area_init_node: node 0, pgdat c058f640, node_mem_map df428000
>>   Normal zone: 976 pages used for memmap
>>   Normal zone: 0 pages reserved
>>   Normal zone: 124928 pages, LIFO batch:31
>
> Wow, earlycon. Luxury. =)

Noh, a necessity when developing ;-)

> The string above says "kzm9g-multiplatform". Did you try legacy or DT
> reference without CCF?

Yes, they both work (with zImage and appended DTB), as before.

>> When trying with a uImage with the "new" load address i.e.
>>
>> make ARCH=arm LOADADDR=0x48008000 uImage
>>
>> it still fails:

>> ## Flattened Device Tree blob at 50000000
>>    Booting using the fdt blob at 0x50000000
>>    Loading Kernel Image ... OK
>> OK
>>    Loading Device Tree to 417f8000, end 417ff7be ... OK

Aarghl, u-Boot copied the DT below 0x48000000. That's why it fails:

>> Unable to handle kernel paging request at virtual address b97f8000

Hence no choice but to use uImage+DTB.

> You seem to be using "bootm 0x43000000 - 0x50000000".
> In my case I simply use "bootp; bootm". I also tend to use appended

My DHCP server (OpenWRT dnsmasq) doesn't provide TFTP/NFS
information to its clients.

> DTB and compile-in the command line to rely on the boot loader as
> little as ever possible.

Indeed.

> One thing that bit me for quite some time was when handling the case
> CONFIG_AUTO_ZRELADDR=n. I built the zImage using my steps above but I
> did not pass the LOADADDR when building the zImage - so the
> "zreladdr-y" value in Makefile.boot was still the default value which
> ended up in the kernel image. What I mistakenly ended up doing was to
> only adjust the uImage load address. And your bootm line above has
> even more magic to it - so you may have 3 different versions... =)

I usually use zImage, which is better for multiplatform.
In theory the same multiplatform zImage should boot on all machines.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Magnus Damm Dec. 17, 2014, 2:28 p.m. UTC | #6
Hi Geert,

On Wed, Dec 17, 2014 at 10:35 PM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> Hi Magnus,
>
> On Wed, Dec 17, 2014 at 2:08 PM, Magnus Damm <magnus.damm@gmail.com> wrote:
>>> Do you boot a zImage or a uImage?
>>
>> uImage built from zImage with appended DTB.
>>
>> These 4 steps actually:
>> rm arch/arm/boot/zImage
>> make -j 9 ARCH=arm CROSS_COMPILE=_ dtbs zImage
>> cat arch/arm/boot/dts/sh73a0-kzm9g.dtb >> arch/arm/boot/zImage
>> make -j 9 ARCH=arm CROSS_COMPILE=_ LOADADDR=0x48008000 uImage
>
> Thanks, that works!
> But the machine lost 128 MiB of RAM, compared to adjusting the "reg" property
> of the memory node :-(

Huh, I wasn't aware that we also loose memory!?

I suppose we need to update the code to allow registering memory below
the kernel load address.

>>> I usually use a zImage with appended DTB on kzm9g. It fails as before:
>
>>> Uncompressing Linux... done, booting the kernel.
>>> Booting Linux on physical CPU 0x0
>>> Linux version 3.18.0-kzm9g-multiplatform-11069-g3086a70162bdec42
>>> (geert@ramsan) (gcc version 4.9.0 (GCC) ) #274 SMP Wed Dec 17 13:28:08
>>> CET 2014
>>> CPU: ARMv7 Processor [412fc098] revision 8 (ARMv7), cr=10c5387d
>>> CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
>>> Machine model: KZM-A9-GT
>>> bootconsole [earlycon0] enabled
>>> debug: ignoring loglevel setting.
>>> Memory policy: Data cache writealloc
>>> On node 0 totalpages: 124928
>>> free_area_init_node: node 0, pgdat c058f640, node_mem_map df428000
>>>   Normal zone: 976 pages used for memmap
>>>   Normal zone: 0 pages reserved
>>>   Normal zone: 124928 pages, LIFO batch:31
>>
>> Wow, earlycon. Luxury. =)
>
> Noh, a necessity when developing ;-)

Yeah, I need to look into how to make use of your new bits!

>> The string above says "kzm9g-multiplatform". Did you try legacy or DT
>> reference without CCF?
>
> Yes, they both work (with zImage and appended DTB), as before.

Good!

>>> When trying with a uImage with the "new" load address i.e.
>>>
>>> make ARCH=arm LOADADDR=0x48008000 uImage
>>>
>>> it still fails:
>
>>> ## Flattened Device Tree blob at 50000000
>>>    Booting using the fdt blob at 0x50000000
>>>    Loading Kernel Image ... OK
>>> OK
>>>    Loading Device Tree to 417f8000, end 417ff7be ... OK
>
> Aarghl, u-Boot copied the DT below 0x48000000. That's why it fails:
>
>>> Unable to handle kernel paging request at virtual address b97f8000
>
> Hence no choice but to use uImage+DTB.

The kernel seems to want to get pointers to data it can access directly. =)

>> You seem to be using "bootm 0x43000000 - 0x50000000".
>> In my case I simply use "bootp; bootm". I also tend to use appended
>
> My DHCP server (OpenWRT dnsmasq) doesn't provide TFTP/NFS
> information to its clients.

OpenWRT and dnsmasq is nice, but for development purpose I tend to use
the DHCP server from ISC.

>> DTB and compile-in the command line to rely on the boot loader as
>> little as ever possible.
>
> Indeed.
>
>> One thing that bit me for quite some time was when handling the case
>> CONFIG_AUTO_ZRELADDR=n. I built the zImage using my steps above but I
>> did not pass the LOADADDR when building the zImage - so the
>> "zreladdr-y" value in Makefile.boot was still the default value which
>> ended up in the kernel image. What I mistakenly ended up doing was to
>> only adjust the uImage load address. And your bootm line above has
>> even more magic to it - so you may have 3 different versions... =)
>
> I usually use zImage, which is better for multiplatform.
> In theory the same multiplatform zImage should boot on all machines.

Right, my default case is zImage as well. On broken boot loaders I
tend to stick with whatever (almost) works. =)

Cheers,

/ magnus
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Geert Uytterhoeven Dec. 17, 2014, 2:37 p.m. UTC | #7
Hi Magnus,

On Wed, Dec 17, 2014 at 3:28 PM, Magnus Damm <magnus.damm@gmail.com> wrote:
>>> uImage built from zImage with appended DTB.
>>>
>>> These 4 steps actually:
>>> rm arch/arm/boot/zImage
>>> make -j 9 ARCH=arm CROSS_COMPILE=_ dtbs zImage
>>> cat arch/arm/boot/dts/sh73a0-kzm9g.dtb >> arch/arm/boot/zImage
>>> make -j 9 ARCH=arm CROSS_COMPILE=_ LOADADDR=0x48008000 uImage
>>
>> Thanks, that works!
>> But the machine lost 128 MiB of RAM, compared to adjusting the "reg" property
>> of the memory node :-(
>
> Huh, I wasn't aware that we also loose memory!?

Ignoring memory range 0x41000000 - 0x48000000

It's indeed easy to miss this extra line of output, without e.g.
https://github.com/geertu/linux-scripts/blob/master/linux-dmesg-diff

> I suppose we need to update the code to allow registering memory below
> the kernel load address.

That requires enabling more NUMA features...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laurent Pinchart Dec. 17, 2014, 4:27 p.m. UTC | #8
On Wednesday 17 December 2014 14:35:32 Geert Uytterhoeven wrote:
> On Wed, Dec 17, 2014 at 2:08 PM, Magnus Damm <magnus.damm@gmail.com> wrote:
> >> Do you boot a zImage or a uImage?
> > 
> > uImage built from zImage with appended DTB.
> > 
> > These 4 steps actually:
> > rm arch/arm/boot/zImage
> > make -j 9 ARCH=arm CROSS_COMPILE=_ dtbs zImage
> > cat arch/arm/boot/dts/sh73a0-kzm9g.dtb >> arch/arm/boot/zImage
> > make -j 9 ARCH=arm CROSS_COMPILE=_ LOADADDR=0x48008000 uImage
> 
> Thanks, that works!

And it doesn't for me :-/

Any idea why NFS root doesn't work with your wip branch and shmobile_defconfig 
(with NFSv4 and NFSv3 ACL disabled) ? The kernel stops after

[    6.630000] Sending DHCP requests ., OK
[    6.670000] IP-Config: Got DHCP answer from 192.168.1.47, my address is 
192.168.1.254
[    6.680000] IP-Config: Complete:
[    6.690000]      device=eth0, hwaddr=00:01:9b:04:04:22, 
ipaddr=192.168.1.254, mask=255.255.255.0, gw=255.255.255.255
[    6.700000]      host=192.168.1.254, domain=, nis-domain=(none)
[    6.700000]      bootserver=192.168.1.47, rootserver=192.168.1.47, 
rootpath=/home/laurent/src/iob/netboot/renesas
[    6.710000]      nameserver0=192.168.1.47
[    6.720000] SDHI2 Vcc: disabling
[    6.720000] SDHI0 Vcc: disabling
[    6.720000] vccq_mc0: disabling
[    6.730000] ALSA device list:
[    6.730000]   #0: fsia-dai-ak4642-hifi

and then oopses after a timeout. No NFS-related packet is received by the host 
according to tcpdump.

> But the machine lost 128 MiB of RAM, compared to adjusting the "reg"
> property of the memory node :-(
> 
> >> I usually use a zImage with appended DTB on kzm9g. It fails as before:
> >> 
> >> Uncompressing Linux... done, booting the kernel.
> >> Booting Linux on physical CPU 0x0
> >> Linux version 3.18.0-kzm9g-multiplatform-11069-g3086a70162bdec42
> >> (geert@ramsan) (gcc version 4.9.0 (GCC) ) #274 SMP Wed Dec 17 13:28:08
> >> CET 2014
> >> CPU: ARMv7 Processor [412fc098] revision 8 (ARMv7), cr=10c5387d
> >> CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
> >> Machine model: KZM-A9-GT
> >> bootconsole [earlycon0] enabled
> >> debug: ignoring loglevel setting.
> >> Memory policy: Data cache writealloc
> >> On node 0 totalpages: 124928
> >> free_area_init_node: node 0, pgdat c058f640, node_mem_map df428000
> >> 
> >>   Normal zone: 976 pages used for memmap
> >>   Normal zone: 0 pages reserved
> >>   Normal zone: 124928 pages, LIFO batch:31
> > 
> > Wow, earlycon. Luxury. =)
> 
> Noh, a necessity when developing ;-)
> 
> > The string above says "kzm9g-multiplatform". Did you try legacy or DT
> > reference without CCF?
> 
> Yes, they both work (with zImage and appended DTB), as before.
> 
> >> When trying with a uImage with the "new" load address i.e.
> >> 
> >> make ARCH=arm LOADADDR=0x48008000 uImage
> >> 
> >> it still fails:
> >> 
> >> ## Flattened Device Tree blob at 50000000
> >> 
> >>    Booting using the fdt blob at 0x50000000
> >>    Loading Kernel Image ... OK
> >> 
> >> OK
> >> 
> >>    Loading Device Tree to 417f8000, end 417ff7be ... OK
> 
> Aarghl, u-Boot copied the DT below 0x48000000. That's why it fails:
> >> Unable to handle kernel paging request at virtual address b97f8000
> 
> Hence no choice but to use uImage+DTB.
> 
> > You seem to be using "bootm 0x43000000 - 0x50000000".
> > In my case I simply use "bootp; bootm". I also tend to use appended
> 
> My DHCP server (OpenWRT dnsmasq) doesn't provide TFTP/NFS
> information to its clients.
> 
> > DTB and compile-in the command line to rely on the boot loader as
> > little as ever possible.
> 
> Indeed.
> 
> > One thing that bit me for quite some time was when handling the case
> > CONFIG_AUTO_ZRELADDR=n. I built the zImage using my steps above but I
> > did not pass the LOADADDR when building the zImage - so the
> > "zreladdr-y" value in Makefile.boot was still the default value which
> > ended up in the kernel image. What I mistakenly ended up doing was to
> > only adjust the uImage load address. And your bootm line above has
> > even more magic to it - so you may have 3 different versions... =)
> 
> I usually use zImage, which is better for multiplatform.
> In theory the same multiplatform zImage should boot on all machines.
Geert Uytterhoeven Dec. 17, 2014, 4:33 p.m. UTC | #9
Hi Laurent,

On Wed, Dec 17, 2014 at 5:27 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> On Wednesday 17 December 2014 14:35:32 Geert Uytterhoeven wrote:
>> On Wed, Dec 17, 2014 at 2:08 PM, Magnus Damm <magnus.damm@gmail.com> wrote:
>> >> Do you boot a zImage or a uImage?
>> >
>> > uImage built from zImage with appended DTB.
>> >
>> > These 4 steps actually:
>> > rm arch/arm/boot/zImage
>> > make -j 9 ARCH=arm CROSS_COMPILE=_ dtbs zImage
>> > cat arch/arm/boot/dts/sh73a0-kzm9g.dtb >> arch/arm/boot/zImage
>> > make -j 9 ARCH=arm CROSS_COMPILE=_ LOADADDR=0x48008000 uImage
>>
>> Thanks, that works!

I meant: it boots much further. It did stop somewhere around NFS root.
That wasn't my wip, but e13397e01771be0eb50f2c38fd77b6867b48dde4 with
ccf and multiplatform patches.

> And it doesn't for me :-/
>
> Any idea why NFS root doesn't work with your wip branch and shmobile_defconfig
> (with NFSv4 and NFSv3 ACL disabled) ? The kernel stops after
>
> [    6.630000] Sending DHCP requests ., OK
> [    6.670000] IP-Config: Got DHCP answer from 192.168.1.47, my address is
> 192.168.1.254
> [    6.680000] IP-Config: Complete:
> [    6.690000]      device=eth0, hwaddr=00:01:9b:04:04:22,
> ipaddr=192.168.1.254, mask=255.255.255.0, gw=255.255.255.255
> [    6.700000]      host=192.168.1.254, domain=, nis-domain=(none)
> [    6.700000]      bootserver=192.168.1.47, rootserver=192.168.1.47,
> rootpath=/home/laurent/src/iob/netboot/renesas
> [    6.710000]      nameserver0=192.168.1.47
> [    6.720000] SDHI2 Vcc: disabling
> [    6.720000] SDHI0 Vcc: disabling
> [    6.720000] vccq_mc0: disabling
> [    6.730000] ALSA device list:
> [    6.730000]   #0: fsia-dai-ak4642-hifi
>
> and then oopses after a timeout. No NFS-related packet is received by the host
> according to tcpdump.

Strange, my WIP should work for kzm9g-legacy and kzm9g-multiplatform.

I'll email you my .config by PM.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Geert Uytterhoeven Dec. 17, 2014, 4:37 p.m. UTC | #10
Hi Laurent,

On Wed, Dec 17, 2014 at 5:33 PM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
>> Any idea why NFS root doesn't work with your wip branch and shmobile_defconfig
>> (with NFSv4 and NFSv3 ACL disabled) ? The kernel stops after
>>
>> [    6.630000] Sending DHCP requests ., OK
>> [    6.670000] IP-Config: Got DHCP answer from 192.168.1.47, my address is
>> 192.168.1.254
>> [    6.680000] IP-Config: Complete:
>> [    6.690000]      device=eth0, hwaddr=00:01:9b:04:04:22,
>> ipaddr=192.168.1.254, mask=255.255.255.0, gw=255.255.255.255
>> [    6.700000]      host=192.168.1.254, domain=, nis-domain=(none)
>> [    6.700000]      bootserver=192.168.1.47, rootserver=192.168.1.47,
>> rootpath=/home/laurent/src/iob/netboot/renesas
>> [    6.710000]      nameserver0=192.168.1.47
>> [    6.720000] SDHI2 Vcc: disabling
>> [    6.720000] SDHI0 Vcc: disabling
>> [    6.720000] vccq_mc0: disabling
>> [    6.730000] ALSA device list:
>> [    6.730000]   #0: fsia-dai-ak4642-hifi
>>
>> and then oopses after a timeout. No NFS-related packet is received by the host
>> according to tcpdump.
>
> Strange, my WIP should work for kzm9g-legacy and kzm9g-multiplatform.

Sorry, I missed that you're using shmobile_defconfig. That may indeed fail.
Does it have CONFIG_RENESAS_BSC=y?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laurent Pinchart Dec. 17, 2014, 5:42 p.m. UTC | #11
Hi Geert,

On Wednesday 17 December 2014 17:37:38 Geert Uytterhoeven wrote:
> On Wed, Dec 17, 2014 at 5:33 PM, Geert Uytterhoeven wrote:
> >> Any idea why NFS root doesn't work with your wip branch and
> >> shmobile_defconfig (with NFSv4 and NFSv3 ACL disabled) ? The kernel
> >> stops after
> >> 
> >> [    6.630000] Sending DHCP requests ., OK
> >> [    6.670000] IP-Config: Got DHCP answer from 192.168.1.47, my address
> >> is 192.168.1.254
> >> [    6.680000] IP-Config: Complete:
> >> [    6.690000]      device=eth0, hwaddr=00:01:9b:04:04:22,
> >> ipaddr=192.168.1.254, mask=255.255.255.0, gw=255.255.255.255
> >> [    6.700000]      host=192.168.1.254, domain=, nis-domain=(none)
> >> [    6.700000]      bootserver=192.168.1.47, rootserver=192.168.1.47,
> >> rootpath=/home/laurent/src/iob/netboot/renesas
> >> [    6.710000]      nameserver0=192.168.1.47
> >> [    6.720000] SDHI2 Vcc: disabling
> >> [    6.720000] SDHI0 Vcc: disabling
> >> [    6.720000] vccq_mc0: disabling
> >> [    6.730000] ALSA device list:
> >> [    6.730000]   #0: fsia-dai-ak4642-hifi
> >> 
> >> and then oopses after a timeout. No NFS-related packet is received by the
> >> host according to tcpdump.
> > 
> > Strange, my WIP should work for kzm9g-legacy and kzm9g-multiplatform.
> 
> Sorry, I missed that you're using shmobile_defconfig. That may indeed fail.
> Does it have CONFIG_RENESAS_BSC=y?

Now I do, and it works much better. I can boot to userspace with 
shmobile_defconfig + CONFIG_RENESAS_BSC. Thank you.
Magnus Damm Dec. 18, 2014, 1:31 a.m. UTC | #12
Hi Simon,

On Wed, Dec 17, 2014 at 6:42 PM, Magnus Damm <magnus.damm@gmail.com> wrote:
> From: Magnus Damm <damm+renesas@opensource.se>
>
> Adjust the load address for the KZM9G DT reference case
> to make it compatible with upcoming sh73a0 Multiplatform
> and CONFIG_AUTO_ZRELADDR=y.
>
> Without the not-yet-merged sh73a0 multiplatform support
> the KZM9G uImage can be built without any special care,
> but once we go DTS-only then the Makefile.boot entry will
> disappear and the Multiplatform image will be built using
> CONFIG_AUTO_ZRELADDR=y. To generate an uImage for KZM9G
> the following example can be followed:
>
> $ make ARCH=arm LOADADDR=0x48008000 uImage
>
> For now simply adjust the non-multiplatform KZM9G DT
> reference implementation to be compatible with ZRELADDR.
>
> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
> ---

Simon, this seems to work for both Geert and Laurent. Can you please pick up?

Thanks,

/ magnus
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Geert Uytterhoeven Dec. 18, 2014, 8:10 a.m. UTC | #13
On Thu, Dec 18, 2014 at 2:31 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
> On Wed, Dec 17, 2014 at 6:42 PM, Magnus Damm <magnus.damm@gmail.com> wrote:
>> From: Magnus Damm <damm+renesas@opensource.se>
>>
>> Adjust the load address for the KZM9G DT reference case
>> to make it compatible with upcoming sh73a0 Multiplatform
>> and CONFIG_AUTO_ZRELADDR=y.
>>
>> Without the not-yet-merged sh73a0 multiplatform support
>> the KZM9G uImage can be built without any special care,
>> but once we go DTS-only then the Makefile.boot entry will
>> disappear and the Multiplatform image will be built using
>> CONFIG_AUTO_ZRELADDR=y. To generate an uImage for KZM9G
>> the following example can be followed:
>>
>> $ make ARCH=arm LOADADDR=0x48008000 uImage
>>
>> For now simply adjust the non-multiplatform KZM9G DT
>> reference implementation to be compatible with ZRELADDR.
>>
>> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
>> ---
>
> Simon, this seems to work for both Geert and Laurent. Can you please pick up?

I really don't like losing 25% of RAM...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Magnus Damm Dec. 18, 2014, 9:05 a.m. UTC | #14
Hi Geert,

On Thu, Dec 18, 2014 at 5:10 PM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> On Thu, Dec 18, 2014 at 2:31 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
>> On Wed, Dec 17, 2014 at 6:42 PM, Magnus Damm <magnus.damm@gmail.com> wrote:
>>> From: Magnus Damm <damm+renesas@opensource.se>
>>>
>>> Adjust the load address for the KZM9G DT reference case
>>> to make it compatible with upcoming sh73a0 Multiplatform
>>> and CONFIG_AUTO_ZRELADDR=y.
>>>
>>> Without the not-yet-merged sh73a0 multiplatform support
>>> the KZM9G uImage can be built without any special care,
>>> but once we go DTS-only then the Makefile.boot entry will
>>> disappear and the Multiplatform image will be built using
>>> CONFIG_AUTO_ZRELADDR=y. To generate an uImage for KZM9G
>>> the following example can be followed:
>>>
>>> $ make ARCH=arm LOADADDR=0x48008000 uImage
>>>
>>> For now simply adjust the non-multiplatform KZM9G DT
>>> reference implementation to be compatible with ZRELADDR.
>>>
>>> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
>>> ---
>>
>> Simon, this seems to work for both Geert and Laurent. Can you please pick up?
>
> I really don't like losing 25% of RAM...

Sure, so the ARM arch needs to be beaten into shape somehow. =)

But compared to before we can at least boot multiplatform.

Cheers,

/ magnus
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Geert Uytterhoeven Dec. 18, 2014, 9:30 a.m. UTC | #15
Hi Magnus,

On Thu, Dec 18, 2014 at 10:05 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
>> I really don't like losing 25% of RAM...
>
> Sure, so the ARM arch needs to be beaten into shape somehow. =)
>
> But compared to before we can at least boot multiplatform.

An alternative solution is to change the memory region to include the first
16 MiB of RAM.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Magnus Damm Dec. 18, 2014, 10:11 a.m. UTC | #16
Hi Geert,

On Thu, Dec 18, 2014 at 6:30 PM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> Hi Magnus,
>
> On Thu, Dec 18, 2014 at 10:05 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
>>> I really don't like losing 25% of RAM...
>>
>> Sure, so the ARM arch needs to be beaten into shape somehow. =)
>>
>> But compared to before we can at least boot multiplatform.
>
> An alternative solution is to change the memory region to include the first
> 16 MiB of RAM.

If that is possible then sure! I however always assumed that part of
the memory is reserved due to the SH core (or some other piece of
hardware) is using for other purposes.

Cheers,

/ magnus
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Geert Uytterhoeven Dec. 18, 2014, 10:19 a.m. UTC | #17
Hi Magnus,

On Thu, Dec 18, 2014 at 11:11 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
> On Thu, Dec 18, 2014 at 6:30 PM, Geert Uytterhoeven
> <geert@linux-m68k.org> wrote:
>> On Thu, Dec 18, 2014 at 10:05 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
>>>> I really don't like losing 25% of RAM...
>>>
>>> Sure, so the ARM arch needs to be beaten into shape somehow. =)
>>>
>>> But compared to before we can at least boot multiplatform.
>>
>> An alternative solution is to change the memory region to include the first
>> 16 MiB of RAM.
>
> If that is possible then sure! I however always assumed that part of
> the memory is reserved due to the SH core (or some other piece of
> hardware) is using for other purposes.

I've been running with these for quite a while:
[PATCH/RFC 1/2] ARM: shmobile: kzm9g dts: Declare the full 512 MiB of RAM
http://www.spinics.net/lists/linux-sh/msg37196.html
[PATCH/RFC 2/2] ARM: shmobile: kzm9g-reference dts: Declare the full
512 MiB of RAM
http://www.spinics.net/lists/linux-sh/msg37195.html

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Simon Horman Dec. 18, 2014, 11:46 p.m. UTC | #18
On Thu, Dec 18, 2014 at 10:31:29AM +0900, Magnus Damm wrote:
> Hi Simon,
> 
> On Wed, Dec 17, 2014 at 6:42 PM, Magnus Damm <magnus.damm@gmail.com> wrote:
> > From: Magnus Damm <damm+renesas@opensource.se>
> >
> > Adjust the load address for the KZM9G DT reference case
> > to make it compatible with upcoming sh73a0 Multiplatform
> > and CONFIG_AUTO_ZRELADDR=y.
> >
> > Without the not-yet-merged sh73a0 multiplatform support
> > the KZM9G uImage can be built without any special care,
> > but once we go DTS-only then the Makefile.boot entry will
> > disappear and the Multiplatform image will be built using
> > CONFIG_AUTO_ZRELADDR=y. To generate an uImage for KZM9G
> > the following example can be followed:
> >
> > $ make ARCH=arm LOADADDR=0x48008000 uImage
> >
> > For now simply adjust the non-multiplatform KZM9G DT
> > reference implementation to be compatible with ZRELADDR.
> >
> > Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
> > ---
> 
> Simon, this seems to work for both Geert and Laurent. Can you please pick up?

More discussion between yourself and Geert seems to have followed.
I'd like some consensus reached there.
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- 0001/arch/arm/mach-shmobile/Makefile.boot
+++ work/arch/arm/mach-shmobile/Makefile.boot	2014-12-17 16:21:58.000000000 +0900
@@ -6,7 +6,7 @@  loadaddr-$(CONFIG_MACH_ARMADILLO800EVA)
 loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000
 loadaddr-$(CONFIG_MACH_BOCKW_REFERENCE) += 0x60008000
 loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000
-loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000
+loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x48008000
 loadaddr-$(CONFIG_MACH_MACKEREL) += 0x40008000
 loadaddr-$(CONFIG_MACH_MARZEN) += 0x60008000