* [PATCH] m68knommu: improve config ROM setting defaults
@ 2023-09-13 12:51 Greg Ungerer
2023-09-13 13:00 ` Geert Uytterhoeven
0 siblings, 1 reply; 3+ messages in thread
From: Greg Ungerer @ 2023-09-13 12:51 UTC (permalink / raw)
To: linux-m68k; +Cc: geert, Greg Ungerer, kernel test robot
From: Greg Ungerer <gerg@linux-m68k.org>
The ROM region configuration settings used on some nommu m68k systems
(historically mostly 68328 (Dragonball) CPUs) default to an address
of 0. That can easily clash with default RAM address settings which
also default to 0. Of course that is invalid and those ranges overlap,
but if you make no value selection that is what you end up with. Those
default values produce a valid configuration but will fail compilation
like this:
m68k-linux-ld: section .rodata VMA [0000000000001000,0000000000262227] overlaps section .text VMA [0000000000000400,0000000000455e7f]
Looking at the platforms that use the ROM region configuration settings
it is clear that we can choose much better defaults than 0. By far the
most comman ROM region settings are these:
CONFIG_ROMVEC=0x10c10000
CONFIG_ROMSTART=0x10c10400
So lets make these the default values.
It is still possible to configure overlapping ROM and RAM regions, but
at least the defult selections are now valid.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202305301407.z33zOjcG-lkp@intel.com/
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
---
arch/m68k/Kconfig.machine | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/m68k/Kconfig.machine b/arch/m68k/Kconfig.machine
index 1f3574aef638..d06b1c5d9b0c 100644
--- a/arch/m68k/Kconfig.machine
+++ b/arch/m68k/Kconfig.machine
@@ -441,7 +441,7 @@ config ROM
config ROMVEC
hex "Address of the base of the ROM vectors"
- default "0"
+ default "0x10c10000"
depends on ROM
help
This is almost always the same as the base of the ROM. Since on all
@@ -450,7 +450,7 @@ config ROMVEC
config ROMSTART
hex "Address of the base of system image in ROM"
- default "0x400"
+ default "0x10c10400"
depends on ROM
help
Define the start address of the system image in ROM. Commonly this
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] m68knommu: improve config ROM setting defaults
2023-09-13 12:51 [PATCH] m68knommu: improve config ROM setting defaults Greg Ungerer
@ 2023-09-13 13:00 ` Geert Uytterhoeven
2023-09-13 13:05 ` Greg Ungerer
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2023-09-13 13:00 UTC (permalink / raw)
To: Greg Ungerer; +Cc: linux-m68k, Greg Ungerer, kernel test robot
Hi Greg,
Thanks for your patch!
On Wed, Sep 13, 2023 at 2:52 PM Greg Ungerer <gerg@kernel.org> wrote:
> From: Greg Ungerer <gerg@linux-m68k.org>
>
> The ROM region configuration settings used on some nommu m68k systems
> (historically mostly 68328 (Dragonball) CPUs) default to an address
> of 0. That can easily clash with default RAM address settings which
> also default to 0. Of course that is invalid and those ranges overlap,
> but if you make no value selection that is what you end up with. Those
> default values produce a valid configuration but will fail compilation
> like this:
>
> m68k-linux-ld: section .rodata VMA [0000000000001000,0000000000262227] overlaps section .text VMA [0000000000000400,0000000000455e7f]
>
> Looking at the platforms that use the ROM region configuration settings
> it is clear that we can choose much better defaults than 0. By far the
> most comman ROM region settings are these:
common
> CONFIG_ROMVEC=0x10c10000
> CONFIG_ROMSTART=0x10c10400
>
> So lets make these the default values.
>
> It is still possible to configure overlapping ROM and RAM regions, but
> at least the defult selections are now valid.
default
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202305301407.z33zOjcG-lkp@intel.com/
> Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] m68knommu: improve config ROM setting defaults
2023-09-13 13:00 ` Geert Uytterhoeven
@ 2023-09-13 13:05 ` Greg Ungerer
0 siblings, 0 replies; 3+ messages in thread
From: Greg Ungerer @ 2023-09-13 13:05 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linux-m68k, Greg Ungerer, kernel test robot
Hi Geert,
On 13/9/23 23:00, Geert Uytterhoeven wrote:
> Hi Greg,
>
> Thanks for your patch!
>
> On Wed, Sep 13, 2023 at 2:52 PM Greg Ungerer <gerg@kernel.org> wrote:
>> From: Greg Ungerer <gerg@linux-m68k.org>
>>
>> The ROM region configuration settings used on some nommu m68k systems
>> (historically mostly 68328 (Dragonball) CPUs) default to an address
>> of 0. That can easily clash with default RAM address settings which
>> also default to 0. Of course that is invalid and those ranges overlap,
>> but if you make no value selection that is what you end up with. Those
>> default values produce a valid configuration but will fail compilation
>> like this:
>>
>> m68k-linux-ld: section .rodata VMA [0000000000001000,0000000000262227] overlaps section .text VMA [0000000000000400,0000000000455e7f]
>>
>> Looking at the platforms that use the ROM region configuration settings
>> it is clear that we can choose much better defaults than 0. By far the
>> most comman ROM region settings are these:
>
> common
>
>> CONFIG_ROMVEC=0x10c10000
>> CONFIG_ROMSTART=0x10c10400
>>
>> So lets make these the default values.
>>
>> It is still possible to configure overlapping ROM and RAM regions, but
>> at least the defult selections are now valid.
>
> default
And I thought I spell checked them before sending :-(
I'll fix those up, thanks!
Regards
Greg
>>
>> Reported-by: kernel test robot <lkp@intel.com>
>> Closes: https://lore.kernel.org/oe-kbuild-all/202305301407.z33zOjcG-lkp@intel.com/
>> Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
>
> Gr{oetje,eeting}s,
>
> Geert
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-13 13:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-13 12:51 [PATCH] m68knommu: improve config ROM setting defaults Greg Ungerer
2023-09-13 13:00 ` Geert Uytterhoeven
2023-09-13 13:05 ` Greg Ungerer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox