68000 code integration
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Greg,
Quoted 14 lines · Greg Ungerer
Hi Luis,
Quoted 9 lines · Luis Alves
Here is my second attempt for the 68000 code integration.
What I have done:
Merged all 68000 based cpu's in platform/68000 and deleted 68*328 subdirs.
Modified respective Makefile's to correctly build each target. Added support for my board/cpu in Kconfig's
Merged allhead.Sfiles into one.
Quoted 5 lines
Overall this is starting to look really good. I like the common 68000 platform directory. That has worked out well.
Did you send this to the m68k-linux list as well?
I don't see it in the CC list.
Yes, but in two separated emails (I had some headache with google smtp server).
Quoted 7 lines
This is a big patch on its own though. Do you think there is any way you can break it up, into logical but smaller pieces? Something like firstly a patch that reorgs the directories for current 68x328 targets. Then follow on patches that add your board support.
Quoted 8 lines
Oh, and another suggestion :-)
Did you use git to generate this?
If you use git format-patch with the -B and -M options it will handle moves and renames a little better, producing much smaller patches for email list review. It will collapse those peskybootlogo.hfiles in this patch for example. And it also makes it much easier to see any changes made to moved files that are otherwise no obvious.
Yes, I've used git with Linus kernel as base, but I've just started using git and don't know all the available options and features. I'll try out the referred options.
Quoted 5 lines
Oh, sorry, another suggestion as well :-)
If you run this patch through the kernelsscripts/checkpatch.plchecker it will list out any formating issues. It would be good to fix those up as well.
Your suggestions are always welcome :)
I'll run that script.
Quoted 4 lines
An observation from the patch, the
68000/entry-*.Sfiles all look quite similar. Is there any way they can be merged into a single file?
I'm just noticed that accidentally I've added the 'entry-68000.S'! This file should be removed.
About merging, yes I plan to do it later. The thing is that in my first attempt of running this kernel in the 68000 the entry code from the 68328 had a strange behavior (you should remember debugging this with me - lots of softlocks).
Then I've used the entry.S from coldfire sources as base and it worked smooth. Also, the existing trap exception code doesn't work with 68000 cpu's since they don't provide the vector in the stack.
Quoted 2 lines
Thanks for doing this, it is looking really nice.
The pleasure is all mine :)
Regards,
Luis
Quoted 108 lines
Regards
GregQuoted 83 lines
In future iterations, more code can/will be merged.
For the 68000 (and my board) the code is working fine. I have a fast and stable kernel running in the old 68000.
It would be nice if someone could test the 68[xx]328 target code and eventually fix any bugs.The exception code for the 68000 is not yet completed (not having the exception vector on the stack is boring).
I plan to send future updates for the 68000 (and the code for my board drivers, not included in this patch)Regards,
Luis Alves---
arch/m68k/Kconfig.cpu | 2 +-arch/m68k/Kconfig.machine| 6 +arch/m68k/Makefile| 6 +-arch/m68k/include/asm/alce68k.h| 136 ++arch/m68k/kernel/setup_no.c| 3 +arch/m68k/platform/68000/Makefile| 26 +arch/m68k/platform/68000/bootlogo-vz.h| 3204
+++++++++++++++++++++++++++++
arch/m68k/platform/68000/bootlogo.h | 270 +++arch/m68k/platform/68000/config-alce68k.c| 179 ++arch/m68k/platform/68000/config-ez.c| 76 +arch/m68k/platform/68000/config-vz.c| 188 ++arch/m68k/platform/68000/config.c| 55 +arch/m68k/platform/68000/entry-68000.S| 463 +++++arch/m68k/platform/68000/entry-alce68k.S| 453 ++++arch/m68k/platform/68000/entry.S| 261 +++arch/m68k/platform/68000/head.S| 310 +++arch/m68k/platform/68000/ints-alce68k.c| 387 ++++arch/m68k/platform/68000/ints.c| 186 ++arch/m68k/platform/68000/romvec.S| 35 +arch/m68k/platform/68000/timers-alce68k.c| 112 +arch/m68k/platform/68000/timers.c| 135 ++arch/m68k/platform/68328/Makefile| 21 -arch/m68k/platform/68328/bootlogo.h| 270 ---arch/m68k/platform/68328/config.c| 55 -arch/m68k/platform/68328/entry.S| 261 ---arch/m68k/platform/68328/head-de2.S| 128 --arch/m68k/platform/68328/head-pilot.S| 207 --arch/m68k/platform/68328/head-ram.S| 141 --arch/m68k/platform/68328/head-rom.S| 105 -arch/m68k/platform/68328/ints.c| 186 --arch/m68k/platform/68328/romvec.S| 35 -arch/m68k/platform/68328/timers.c| 135 --arch/m68k/platform/68EZ328/Makefile | 5 - arch/m68k/platform/68EZ328/config.c | 76 - arch/m68k/platform/68VZ328/Makefile | 11 - arch/m68k/platform/68VZ328/bootlogo.h | 3204 ----------------------------- arch/m68k/platform/68VZ328/config.c | 188 -- 37 files changed, 6488 insertions(+), 5033 deletions(-)create mode 100644
arch/m68k/include/asm/alce68k.hcreate mode 100644arch/m68k/platform/68000/Makefilecreate mode 100644arch/m68k/platform/68000/bootlogo-vz.hcreate mode 100644arch/m68k/platform/68000/bootlogo.hcreate mode 100644arch/m68k/platform/68000/config-alce68k.ccreate mode 100644arch/m68k/platform/68000/config-ez.ccreate mode 100644arch/m68k/platform/68000/config-vz.ccreate mode 100644arch/m68k/platform/68000/config.ccreate mode 100644arch/m68k/platform/68000/entry-68000.Screate mode 100644arch/m68k/platform/68000/entry-alce68k.Screate mode 100644arch/m68k/platform/68000/entry.Screate mode 100644arch/m68k/platform/68000/head.Screate mode 100644arch/m68k/platform/68000/ints-alce68k.ccreate mode 100644arch/m68k/platform/68000/ints.ccreate mode 100644arch/m68k/platform/68000/romvec.Screate mode 100644arch/m68k/platform/68000/timers-alce68k.ccreate mode 100644arch/m68k/platform/68000/timers.cdelete mode 100644arch/m68k/platform/68328/Makefiledelete mode 100644arch/m68k/platform/68328/bootlogo.hdelete mode 100644arch/m68k/platform/68328/config.cdelete mode 100644arch/m68k/platform/68328/entry.Sdelete mode 100644arch/m68k/platform/68328/head-de2.Sdelete mode 100644arch/m68k/platform/68328/head-pilot.Sdelete mode 100644arch/m68k/platform/68328/head-ram.Sdelete mode 100644arch/m68k/platform/68328/head-rom.SQuoted 8 lines
delete mode 100644
arch/m68k/platform/68328/ints.cdelete mode 100644arch/m68k/platform/68328/romvec.Sdelete mode 100644arch/m68k/platform/68328/timers.cdelete mode 100644arch/m68k/platform/68EZ328/Makefiledelete mode 100644arch/m68k/platform/68EZ328/config.cdelete mode 100644arch/m68k/platform/68VZ328/Makefiledelete mode 100644arch/m68k/platform/68VZ328/bootlogo.hdelete mode 100644arch/m68k/platform/68VZ328/config.c--
------------------------------------------------------------------------
Greg Ungerer -- Principal Engineer EMAIL: [email protected] SnapGear Group, McAfee PHONE: +61 7 3435 2888 8 Gardner Close FAX: +61 7 3217 5323 Milton, QLD, 4064, Australia WEB: http://www.SnapGear.com
Quoted 2 lines · Luis Alves
Also, the existing trap exception code doesn't work with 68000 cpu's since they don't provide the vector in the stack.
arch/m68k/kernel/entry_mm.S (yes, _mm, as Amiga platform code is based on the m68k "mm" framework) from
http://git.kernel.org/?p=linux/kernel/git/geert/linux-m68k.git;a=shortlog;h=refs/heads/uamiga-untested
should have trap support for 68000.
Never tested on real hardware, though.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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
Hi Geert,
Thanks for that info, I didn't know about that Amiga port. I've looked into that implementation and it's similar to what I've done. But as far as I can tell the code is also incomplete (the trap_c function doesn't distinguish who caused the trap because pt_regs->format and pt_regs->vector are pointing to some random values).
Is the Amiga development active? I can see that the last commit was about 1 year ago.
Thanks and regards,
Luis Alves
Quoted 20 lines · Geert Uytterhoeven
Quoted 2 lines · Luis Alves
Also, the existing trap exception code doesn't work with 68000 cpu's since they don't provide the vector in the stack.
arch/m68k/kernel/entry_mm.S(yes,_mm, as Amiga platform code is based on the m68k "mm" framework) from
http://git.kernel.org/?p=linux/kernel/git/geert/linux-m68k.git;a=shortlog;h=refs/heads/uamiga-untested
should have trap support for 68000.
Never tested on real hardware, though.Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]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
Hi Luis,
Quoted 2 lines · Luis Alves
Is the Amiga development active? I can see that the last commit was about 1 year ago.
Not really. From time to time (starting at 2.6.8.1 IIRC), I spent some time on it when I feel a bit bored ;-)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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
Hi Luis,
Quoted 1 line · Luis Alves
On Fri, May 4, 2012 at 7:53 AM, Greg Ungerer<[email protected]> wrote:
[snip]
Quoted 4 lines
Quoted 3 lines
An observation from the patch, the
68000/entry-*.Sfiles all look quite similar. Is there any way they can be merged into a single file?
Quoted 8 lines
I'm just noticed that accidentally I've added the '
entry-68000.S'! This file should be removed.About merging, yes I plan to do it later. The thing is that in my first attempt of running this kernel in the 68000 the entry code from the 68328 had a strange behavior (you should remember debugging this with me - lots of softlocks).
Then I've used theentry.Sfrom coldfire sources as base and it worked smooth.
I suspect the existing 68x328 code is broken, and we probably want to use your fixed and working version of this entry.S for all.
I don't have any real 68328 based hardware, but many years ago people used the xcopilot simulator for 68328 testing. I don't know what the state of it these days, but it may still be useful.
Regards
Greg
------------------------------------------------------------------------
Greg Ungerer -- Principal Engineer EMAIL: [email protected] SnapGear Group, McAfee PHONE: +61 7 3435 2888 8 Gardner Close FAX: +61 7 3217 5323 Milton, QLD, 4064, Australia WEB: http://www.SnapGear.com